diff --git a/regional_mom6/regional_mom6.py b/regional_mom6/regional_mom6.py index 24c2cb4e..7095289b 100644 --- a/regional_mom6/regional_mom6.py +++ b/regional_mom6/regional_mom6.py @@ -479,7 +479,7 @@ def hyperbolictan_thickness_profile( assert np.isclose(total_depth, nlayers * (bottom_layer_thickness + top_layer_thickness) / 2, atol=atol) - if total_depth == target_depth: + if np.isclose(total_depth, target_depth, atol=atol): return layer_thicknesses else: # rescaled top_layer_thickness so that total_depth == target_depth