diff --git a/VERSION b/VERSION index 1545d966571dc86b54c98f888a0e6451501f8c81..d5c0c99142898e7915ff3a5805c69eafe9461f26 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.5.0 +3.5.1 diff --git a/doc/source/conf.py b/doc/source/conf.py index 17ef04e572063310657798260ad3b7e2e86cb4be..e939abc022f68b1bb3fb8cced31f39a25c082455 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -65,7 +65,7 @@ copyright = u"2020, BSC-CNS Earth Sciences Department" # The short X.Y version. version = "3.5" # The full version, including alpha/beta/rc tags. -release = "3.5.0" +release = "3.5.1" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/earthdiagnostics/ocean/regionmean.py b/earthdiagnostics/ocean/regionmean.py index b1a48300defc7f6ba029cbe076a45d29436c81bd..c38502286ef8d8b3e01a4b051c85c3cf168b2561 100644 --- a/earthdiagnostics/ocean/regionmean.py +++ b/earthdiagnostics/ocean/regionmean.py @@ -216,6 +216,20 @@ class RegionMean(Diagnostic): ) e3 = e3.extract(depth_constraint) data = data.extract(depth_constraint) + if self.box.min_depth is -1 and self.box.max_depth is not -1: + self.box.min_depth = 0 + depth_constraint = iris.Constraint( + depth=lambda c: self.box.min_depth <= c <= self.box.max_depth + ) + e3 = e3.extract(depth_constraint) + data = data.extract(depth_constraint) + if self.box.min_depth is not -1 and self.box.max_depth is -1: + self.box.max_depth = 6000 + depth_constraint = iris.Constraint( + depth=lambda c: self.box.min_depth <= c <= self.box.max_depth + ) + e3 = e3.extract(depth_constraint) + data = data.extract(depth_constraint) volcello = areacello * e3.data.astype(np.float32) mean = regmean.compute_regmean_3d(data.data, masks, volcello) self._save_result_2d("mean", mean, data) diff --git a/setup.py b/setup.py index 4fab770a8127a3f8437d6a259d328342f48ac23f..6ce49394e1c156fe44904f7b7ba4346c35aba0b7 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ REQUIREMENTS = { "cdo>=1.3.4", "cfgrib", "dask[array]", - "diagonals>=0.3", + "diagonals>=0.3.1", "netCDF4", "nco>=0.0.3", "numba",