Skip to content
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

Bug: returnXDataset=True and force=False are incompatible in the python bindings #56

Open
kobebryant432 opened this issue Aug 2, 2024 · 0 comments

Comments

@kobebryant432
Copy link

kobebryant432 commented Aug 2, 2024

When using the force=False option to make use of the cache instead of recalculating it seems that it is no longer possible to return the result as an xarray Dataset. I would expect that the dataset is still returned based on the cached netcdf.
This results in ds_regridded_cdo_python being an empty list, while in the /tmp/ directory the netcdf can be found.

import cdo
gridfile = "r360x180"
cdo = cdo.Cdo()

ds_regridded_cdo_python = cdo.remapbil(gridfile, input=ds, returnXDataset=True, force=False)

Without the force=False (default is True) an xr.Dataset is returned. Ideally whether or not the cache is used or the calculation is repeated I would expect to get an xr.Dataset. The cached netcdf could maybe be reloaded into an xr.Dataset if it exists and the force=False option is active?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant