-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid conversion of generic time coordinates #10071
Comments
Thanks for opening your first issue here at xarray! Be sure to follow the issue template! |
Thanks for raising this @Dave-Allured. That confusing However, if you do want microsecond-resolution timedeltas, be sure to pass a coder = xr.coders.CFTimedeltaCoder(time_unit="us")
ds = xr.open_dataset("xtime.nc", decode_timedelta=coder) which works as expected for me. |
@spencerkclark Thanks for explaining. As novice to Xarray, I was not aware of Please fix that invalid |
It's new to experienced users too! We have only recently enabled the use of non-nanosecond timedeltas and datetimes, so there are obviously still some kinks to sort out—thanks for your patience / understanding. It will be good to get this false warning issue fixed. |
What happened?
Using xarray.open_dataset. Trying to read a Netcdf dataset with generic time coordinates, not CF, with time:units = "seconds". Trying to apply the conversion "time_unit='us'" as directed by a warning message.
What did you expect to happen?
Minimal Complete Verifiable Example
MVCE confirmation
Relevant log output
Anything else we need to know?
Source code for xtime.nc:
Generate the actual test file using this command:
Environment
The text was updated successfully, but these errors were encountered: