-
-
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
utility function to save complex values as a netCDF file #4068
Comments
For others reading this issue, the h5netcdf workaround was discussed in #3297, with further discussion on supporting complex numbers in netCDF in cf-convention/discuss#369. The short version: There is a longer discussion of why netCDF-C doesn't understand these files at Unidata/netcdf-c#267. That specific issue is for booleans, but complex numbers are likely the same. |
Personally, I think the |
Currently, we disallow to save complex values to a netCDF file.
Maybe netCDF itself does not support complex values, but there may be some workarounds.
It would be very handy for me.
The most naive workaround may be to split each complex value into a real and imaginary part, add some flags, and restore it when loading them from the file.
Maybe we may add a special suffix to the variable name?
I think there may be a better way.
Any thoughts are welcome :)
p.s.
I just found that
engine=h5netcdf
can save complex values, but the file becomes an invalid netcdf file.I'm not sure if it worth the trouble just to make a valid netCDF file.
The text was updated successfully, but these errors were encountered: