Skip to content

[Enhancement]: Xarray: Deprecated since version 2025.01.1: Please pass a coders.CFDatetimeCoder instance initialized with use_cftime to the decode_times kwarg instead. #719

@tomvothecoder

Description

@tomvothecoder

Is your feature request related to a problem?

xarray=2025.01.1 deprecates the use_cftime kwarg, which affects xcdat.open_dataset() and xcdat.open_mfdataset().

Related to: https://github.com/pydata/xarray/releases/tag/v2025.01.1

It also includes an update to the time decoding infrastructure as a step toward pydata/xarray#9618.

Describe the solution you'd like

  1. Add code that checks the Xarray version to determine what to use
	if xarray.__version__ < 2025.01.1: 
		use_cftime = True
    else:
    	decode_times = coders.CFDatimeCoder(use_cftime=True) 

Describe alternatives you've considered

No response

Additional context

Metadata

Metadata

Assignees

Labels

minorA minor release, includes backwards compatible changes.priority: nowRequires immediate attention

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions