Closed malmans2 closed 1 month ago
Please can you post an example warning output you get when "changes to xr.open_dataset kwargs are not recommended"?
Here it is:
import earthkit.data
collection_id = "reanalysis-era5-single-levels"
request = {
"variable": "2t",
"product_type": "reanalysis",
"date": "2012-12-01",
"time": "12:00",
}
ds = earthkit.data.from_source("cds", collection_id, **request)
kwargs = {"chunks": {}, "squeeze": True}
ds.to_xarray(xarray_open_dataset_kwargs=kwargs)
In , overriding the default value (chunks=None) with chunks={} is not recommended.
In , overriding the default value (squeeze=False) with squeeze=True is not recommended.
Is your feature request related to a problem? Please describe.
It would be easier for us to handle warnings if they are issued using the standard library
warnings
rather thanlogging
.For example,
earthkit
warns users that changes toxr.open_dataset
kwargs are not recommended, which produces a lot of warnings for us.I think the change would be in line with the official logging HOWTO:
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
No response
Organisation
B-Open / CADS-EQC