-
Notifications
You must be signed in to change notification settings - Fork 2
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
Too many attributes converted to string #135
Comments
That doesn't quite seem to be the problem. I just tested it and I also tried to force either |
Darn. I'm on: |
I'm on the latest xscen (0.4.12), but numpy 1.22.4 and xarray 2022.6.0 |
Woups, I'm sorry, I had not noticed that with my code, both methods seem to work. With However, in both cases, EDIT: |
In
save_to_zarr
andsave_to_netcdf
, we coerce attributes of "funky" types into strings before writing to file. However, our "funky" check is not exhaustive enough.See:
xscen/xscen/io.py
Lines 333 to 338 in 134c31b
An example is found here:
Which give :
numpy.float32
, something that the line above does not catch. And thus, floating point coordinates of the rotated pole are converted to string when written to file, which breaks it.I suspect something changed in the recent xarray, because I otherwise don't understand how we wouldn't have caught that earlier.
The text was updated successfully, but these errors were encountered: