-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inconsistent bounds (lat_bnds etc) after subset operation #224
Comments
The unnecessary coordinate at the bounds variables, like:
... was already reported to A workaround to get rid off these coordinates is provided in For example like this: ds.lat_bnds.encoding["coordinates"] = None |
Workaround?In the test notebook above I'm applying all mentioned workarounds on the ds.time.encoding["_FillValue"] = None
ds.lon.encoding["_FillValue"] = None
ds.lat.encoding["_FillValue"] = None
ds.height.encoding["_FillValue"] = None
ds.lat_bnds.encoding["_FillValue"] = None
ds.lat_bnds.encoding["coordinates"] = None
ds.lon_bnds.encoding["_FillValue"] = None
ds.lon_bnds.encoding["coordinates"] = None
ds.time_bnds.encoding["_FillValue"] = None
ds.time_bnds.encoding["coordinates"] = None Then I write the dataset as netcdf file: ds.to_netcdf("/tmp/out.nc") Both |
@Zeitsperre @sol1105 @agstephens thoughts? |
workaround can be added like this (from PR #204): clisops/clisops/ops/base_operation.py Lines 70 to 87 in d7a339a
|
@cehbrecht: It looks like using the example code above (from PR #204) is the best place to clean up the dataset. Hopefully, it will only involve adding a few extra lines of code. |
Fixed in clisops by #225. Works also now in daops and rook. |
Description
The CDS team reported issues about inconsistent bounds (lat_bnds, ...) after using the
subset
operation:The
cdo sinfo
command shows warnings on thesubset
output netcdf file:The CDS users reported some tools have problems with these netcdf files ... like Panoply.
What I Did
I have prepared a notebook to reproduce this issue:
https://nbviewer.org/github/roocs/rooki/blob/master/notebooks/tests/test-c3s-cmip6-subset.ipynb
It runs the
subset
operation on a rook test instance with the latestclisops
version 0.9.0.It shows the
cdo sinfo
andncdump -h
outputs of the original cmip6 netcdf file, which looks fine.On the subset output of the same netcdf file have the following issues:
cdo sinfo
ndump -h
The text was updated successfully, but these errors were encountered: