I don't entirely understand all of the different packages and standards, but it appears that there's now some more built-in support within xarray for handling complex numbers in netCDF files. Here's what I've looked at so far:
Suggested action:
- Confirm that using the following syntax is the preferred approach and isn't going to change any minute (it seems like you may already/soon be able to do this using
engine=netcdf4): da.to_netcdf("complex.nc", engine="h5netcdf", invalid_netcdf=True)
- Update (maybe even delete)
write_netcdf and read_netcdf in core.py
I don't entirely understand all of the different packages and standards, but it appears that there's now some more built-in support within
xarrayfor handling complex numbers in netCDF files. Here's what I've looked at so far:xarraynoting some new functionality for netCDFs: Writing complex numbers to netCDF pydata/xarray#9246xarray's docs for handling complex numbers for netCDFs: https://docs.xarray.dev/en/stable/user-guide/io.html#invalid-netcdf-filesSuggested action:
engine=netcdf4):da.to_netcdf("complex.nc", engine="h5netcdf", invalid_netcdf=True)write_netcdfandread_netcdfincore.py