Use h5netcdf as default - #10
Conversation
NetCDF4 may crash depending on environments due to unsafe threading. This commit makes the code use h5netcdf when it is available for the xarray backend. h5netcdf is known to be safer than netcdf4. BDS-1212
aesgeorges
left a comment
There was a problem hiding this comment.
With h5netcdf becoming the new default backend (and netcdf4 being the fallback) we should add h5netcdf in our dependencies in pyproj.toml.
We did not need to specify netcdf4 before as it came packaged with uxarray. With this update however, a user would unknowingly always be using netcdf4 unless they manually installed h5netcdf in their environment, as netcdf4 would always be available and no error would be raised.
|
Actually, I did not add the package dependency on purpose because it is optional, only used when it is already installed by the user as you noted. So, it is intended. I do not think netcdf4 is not a required package for xarray, either. I have thought about adding h5netcdf to optional dependencies. |
|
That makes sense since this is the expected behavior. Will merge! |
NetCDF4 may crash depending on environments due to unsafe threading. This commit makes the code use h5netcdf when it is available for the xarray backend. h5netcdf is known to be safer than netcdf4.
BDS-1212