From f25537216daffc098d6347532872918f14942a6b Mon Sep 17 00:00:00 2001 From: Javier Vegas-Regidor Date: Wed, 5 Feb 2020 11:57:57 +0100 Subject: [PATCH] Revert "Do not save basin if all values are 0" This reverts commit 1a964f717f12068e4658d910f9f887748857493a. --- earthdiagnostics/ocean/siasiesiv.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/earthdiagnostics/ocean/siasiesiv.py b/earthdiagnostics/ocean/siasiesiv.py index 94c1e78b..64eb90f3 100644 --- a/earthdiagnostics/ocean/siasiesiv.py +++ b/earthdiagnostics/ocean/siasiesiv.py @@ -254,8 +254,7 @@ class Siasiesiv(Diagnostic): else: var_res.units = "m^2" for i, basin in enumerate(self.masks): - if not np.all(res[i, ...] == 0): - var_region[i, ...] = netCDF4.stringtoarr(str(basin), 50) - var_res[..., i] = res[i, ...] + var_region[i, ...] = netCDF4.stringtoarr(str(basin), 50) + var_res[..., i] = res[i, ...] handler_temp.close() self.generated[var].set_local_file(temp, diagnostic=self) -- GitLab