cfgrib icon indicating copy to clipboard operation
cfgrib copied to clipboard

Newer versions of xarray gives a FutureWarning for decode_timedelta

Open johtoblan opened this issue 10 months ago • 0 comments

What happened?

/data/common/miniforge3/envs/wp3/lib/python3.11/site-packages/cfgrib/xarray_plugin.py:131: FutureWarning: In a future version of xarray decode_timedelta will default to False rather than None. To silence this warning, set decode_timedelta to True, False, or a 'CFTimedeltaCoder' instance. vars, attrs, coord_names = xr.conventions.decode_cf_variables(

What are the steps to reproduce the bug?

Opening a grib-dataset with xarray >=2015.1.2

Will be fixed by making decode_timedelta = False in https://github.com/ecmwf/cfgrib/blob/e463c5f25d701e2eb377dabfd9522ddd5d8f1836/cfgrib/xarray_plugin.py#L97

Version

=0.9.15.0

Platform (OS and architecture)

Linux eqc-quality-tools.eqc.compute.cci1.ecmwf.int 5.14.0-362.8.1.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 8 17:36:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Relevant log output


Accompanying data

No response

Organisation

MET Norway

johtoblan avatar Feb 25 '25 15:02 johtoblan