From b929dcf07c939e59768b31c892f71c3a4dff4be0 Mon Sep 17 00:00:00 2001 From: Sven Kiefer Date: Fri, 27 Oct 2023 07:35:21 +0200 Subject: [PATCH] changed Z_l to Z --- gcm_toolkit/utils/interface.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcm_toolkit/utils/interface.py b/gcm_toolkit/utils/interface.py index 6cd13c3..b7fa44b 100644 --- a/gcm_toolkit/utils/interface.py +++ b/gcm_toolkit/utils/interface.py @@ -253,10 +253,11 @@ def _set_data_common(self, time, tag=None, regrid_lowres=False, data = [] names = [] data_nr = 0 + for key in dsi.keys(): if key in ['T', 'ClAb', 'ClDs', 'ClDr'] or 'ClVf' in key: names.append(key) - for h, _ in enumerate(dsi[c['Z_l']]): + for h, _ in enumerate(dsi[c['Z']]): data.append(dsi[key].values[h].flatten()) data_nr += 1 @@ -269,7 +270,6 @@ def _set_data_common(self, time, tag=None, regrid_lowres=False, coords={ 'lat': ([c["lat"]], c_lat), 'lon': ([c["lon"]], [-90, 90]), - 'Z_l': ([c["Z_l"]], dsi[c['Z_l']].values), 'Z': ([c["Z"]], dsi[c['Z']].values) }, attrs=dsi.attrs @@ -288,10 +288,10 @@ def _set_data_common(self, time, tag=None, regrid_lowres=False, index = 0 for key in names: fill = np.zeros((lat_points, 2, len(dsi[c["Z"]].values))) - for h, _ in enumerate(dsi[c['Z_l']]): + for h, _ in enumerate(dsi[c['Z']]): fill[:, :, h] = tmp[:, :, index] index += 1 - ds_transit[key] = ((c['lat'], c['lon'], c['Z_l']), fill) + ds_transit[key] = ((c['lat'], c['lon'], c['Z']), fill) # add mark that data is ready for tranist callcuations ds_transit.attrs['transit'] = True