From d236b16432122603c00e930ac2ea796a0606f604 Mon Sep 17 00:00:00 2001 From: sloosvel Date: Fri, 25 Mar 2022 16:59:10 +0100 Subject: [PATCH 1/4] Delete scalar longitude coordinate --- earthdiagnostics/ocean/moc.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/earthdiagnostics/ocean/moc.py b/earthdiagnostics/ocean/moc.py index 4f3f3c5d..1b4767a3 100644 --- a/earthdiagnostics/ocean/moc.py +++ b/earthdiagnostics/ocean/moc.py @@ -153,7 +153,6 @@ class Moc(Diagnostic): Utils.copy_variable(handler_source, handler_temp, "time", True, True) Utils.copy_variable(handler_source, handler_temp, "lev", True, True) - handler_temp.createDimension("i", 1) handler_temp.createDimension("j", gphiv.shape[0]) handler_temp.createDimension("region", len(result)) handler_temp.createDimension("region_length", 50) @@ -163,24 +162,18 @@ class Moc(Diagnostic): ) lat = handler_temp.createVariable( - self.data_convention.lat_name, float, ("j", "i")) + self.data_convention.lat_name, float, ("j", )) lat[...] = gphiv[:, max_gphiv] lat.units = "degrees_north" lat.long_name = "Latitude" lat.standard_name = "latitude" - - lon = handler_temp.createVariable( - self.data_convention.lon_name, float, ("j", "i")) - lon[...] = 0 - lon.units = "degrees_east" - lon.long_name = "Longitude" - lon.standard_name = "longitude" + lat.axis = 'Y' var = handler_temp.createVariable( - "vsftmyz", float, ("time", "lev", "i", "j", "region") + "vsftmyz", float, ("time", "lev", "j", "region") ) var.units = "Sverdrup" - var.coordinates = "lev time latitude longitude" + var.coordinates = "latitude region" var.long_name = "Ocean meridional overturning volume streamfunction" var.missing_value = 1e20 var.fill_value = 1e20 -- GitLab From faa3eb8e74f669bed791e2bfecf388b1e93d1951 Mon Sep 17 00:00:00 2001 From: sloosvel Date: Tue, 3 May 2022 17:39:27 +0200 Subject: [PATCH 2/4] Remove last latitude point --- earthdiagnostics/ocean/moc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/earthdiagnostics/ocean/moc.py b/earthdiagnostics/ocean/moc.py index 1b4767a3..1d473663 100644 --- a/earthdiagnostics/ocean/moc.py +++ b/earthdiagnostics/ocean/moc.py @@ -149,7 +149,7 @@ class Moc(Diagnostic): handler_source = Utils.open_cdf(self.variable_file.local_file) handler_temp = Utils.open_cdf(temp, "w") gphiv = np.squeeze(mesh.get_grid_latitude(cell_point="V")) - max_gphiv = np.unravel_index(np.argmax(gphiv), gphiv.shape)[1] + max_gphiv = np.unravel_index(np.argmax(gphiv), gphiv.shape)[1] - 1 Utils.copy_variable(handler_source, handler_temp, "time", True, True) Utils.copy_variable(handler_source, handler_temp, "lev", True, True) -- GitLab From 7669341ccd7c235d17196e9b281a1749e1ed69d4 Mon Sep 17 00:00:00 2001 From: sloosvel Date: Thu, 5 May 2022 16:13:54 +0200 Subject: [PATCH 3/4] Fix bug in interpolate --- earthdiagnostics/ocean/interpolatecdo.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/earthdiagnostics/ocean/interpolatecdo.py b/earthdiagnostics/ocean/interpolatecdo.py index 9873f8c8..12421854 100644 --- a/earthdiagnostics/ocean/interpolatecdo.py +++ b/earthdiagnostics/ocean/interpolatecdo.py @@ -305,6 +305,8 @@ class InterpolateCDO(Diagnostic): except AttributeError: units = None coordinates = list() + if 'type' in var.coordinates: + coordinates.append('type') for dim in var.dimensions: if dim == "i": coordinates.append(lon_name) -- GitLab From 498d150e2659f29c0e7bf6826f79d3bd921463f7 Mon Sep 17 00:00:00 2001 From: sloosvel Date: Fri, 13 May 2022 17:12:32 +0200 Subject: [PATCH 4/4] Increase version --- VERSION | 2 +- doc/source/conf.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index fa8da207..62841113 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.5.8 +3.5.9 diff --git a/doc/source/conf.py b/doc/source/conf.py index cafff619..b450227a 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.8" +release = "3.5.9" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -- GitLab