Closed lbesnard closed 3 years ago
AFAICR, there is no exact representation for float16 in C. The closest equivalent is short
but a bit better than float16.
I'm not too fussed about supporting float 16, we barely ever use them. Float 32 though is more important.
Ok, my bad. It turns out this is "false advertising" in the template schema. NetCDF actually doesn't support a 16-bit floating point type (see https://www.unidata.ucar.edu/software/netcdf/docs/data_type.html).
So the fix is to review all the values specified there, and remove any that are actually not consistent with netCDF.
The template suggests that it is possible to use 'float16' https://github.com/aodn/aodn-netcdf-tools/blob/c62ba047f9aec92c340c71b444b9fe31250feb37/ncwriter/template_schema.json#L57
However, the netcdf-writer bugs for me for float16. (float, float32 and float64 work fine)