Skip to content

FutureWarning: xarray will not decode timedelta values based on the presence of a timedelta-like units attribute by default #737

@nate-kean

Description

@nate-kean

Describe the bug

  /root/conda/envs/RAiDER/lib/python3.12/site-packages/RAiDER/aria/prepFromGUNW.py:255: FutureWarning: In a future version, xarray
will not decode timedelta values based on the presence of a timedelta-like units attribute by default. Instead it will rely on the
presence of a timedelta64 dtype attribute, which is now xarray's default way of encoding timedelta64 values. To continue decoding
timedeltas based on the presence of a timedelta-like units attribute, users will need to explicitly opt-in by passing True or
CFTimedeltaCoder(decode_via_units=True) to decode_timedelta. To silence this warning, set decode_timedelta to True, False, or a
'CFTimedeltaCoder' instance.
    with xr.open_dataset(self.path_gunw, group=group) as ds:

To Reproduce
Run test/test_GUNW.py::test_GUNW_workflow_fails_if_a_download_fails

Desktop (please complete the following information):

  • RAiDER git tag: dev b837793
  • OS: Linux 6.6.87.2-microsoft-standard-WSL2 x86_64

Additional context
Add any other context about the problem her

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions