cchdo / hydro

The big ol CCHDO netCDF-CF project
https://hydro.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
1 stars 2 forks source link

Set string types to char #11

Closed DocOtak closed 4 years ago

DocOtak commented 4 years ago

The largest problem with strings in netcdf files (despite being CF-1.8 compliant) is the lack of support in the native matlab netcdf reader for them. Really users are better of using the HDF5 library if they can...

However, an real technical limitation to strings is their lack of support for compression in netcdf files. In some tests, it seems we can get a 10x reduction in file size if we switch to char arrays (and hopefully let xarray handle the string conversions).