You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've rewritten the IGP netcdf data on SciServer into zarr. When I try to open the new zarr data I hit an error with the shift_average variables:
----> 5 od = ospy.open_oceandataset.from_catalog("IGPwinter",local_catalog_file)
~/mambaforge/envs/Oceanography/lib/python3.10/site-packages/oceanspy/open_oceandataset.py in ?(name, catalog_url)
223
224 # Shift averages
225 shift_averages = metadata.pop("shift_averages", None)
226 if shift_averages is not None:
--> 227 od = od.shift_averages(**shift_averages)
228
229 # Set OceanSpy stuff
230 for var in ["aliases", "parameters", "name", "description", "projection"]:
~/mambaforge/envs/Oceanography/lib/python3.10/site-packages/oceanspy/_oceandataset.py in ?(self, averageList)
996
997 for var in self._ds.data_vars:
998 original_output = self._ds[var].attrs.pop("original_output", None)
999 if original_output == "average" or var in averageList:
-> 1000 ds_tmp = self._ds[var].drop_vars("time").isel(time=slice(1, None))
1001 self._ds[var] = ds_tmp.rename({"time": "time_midp"})
1002 if original_output is not None:
1003 self._ds[var].attrs["original_output"] = original_output
~/mambaforge/envs/Oceanography/lib/python3.10/site-packages/xarray/core/dataarray.py in ?(self, names, errors)
3143 Dimensions without coordinates: x, y
3144 """
3145 if callable(names):
3146 names = names(self)
-> 3147 ds = self._to_temp_dataset().drop_vars(names, errors=errors)
3148 return self._from_temp_dataset(ds)
~/mambaforge/envs/Oceanography/lib/python3.10/site-packages/xarray/core/dataset.py in ?(self, names, errors)
5945 names_set = {names}
5946 else:
5947 names_set = set(names)
5948 if errors == "raise":
-> 5949 self._assert_all_in_dataset(names_set)
5950
5951 # GH6505
5952 other_names = set()
~/mambaforge/envs/Oceanography/lib/python3.10/site-packages/xarray/core/dataset.py in ?(self, names, virtual_okay)
5809 if virtual_okay:
5810 bad_names -= self.virtual_variables
5811 if bad_names:
5812 ordered_bad_names = [name for name in names if name in bad_names]
-> 5813 raise ValueError(
5814 f"These variables cannot be found in this dataset: {ordered_bad_names}"
5815 )
ValueError: These variables cannot be found in this dataset: ['time']
The issue is that the time-like variable for the shift_average data is not called time, it's called time_midp already. I'm confused why this doesn't also cause an issue reading from netcdf, but it doesn't. Ideas on how to fix?
The text was updated successfully, but these errors were encountered:
I've rewritten the
IGP
netcdf data on SciServer intozarr
. When I try to open the newzarr
data I hit an error with theshift_average
variables:The issue is that the time-like variable for the
shift_average
data is not calledtime
, it's calledtime_midp
already. I'm confused why this doesn't also cause an issue reading fromnetcdf
, but it doesn't. Ideas on how to fix?The text was updated successfully, but these errors were encountered: