Skip to content

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

@kobebryant432

Description

@kobebryant432

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions