-
Notifications
You must be signed in to change notification settings - Fork 6
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
Why not pack data into unsigned int types? #202
Comments
When the CF convention was written, the netCDF format only supported signed types. This restriction on data model support, it's named netCDF Probably, support for new types could be proposed as an enhancement. P.S.: This out of scope for the CF Convention, but if you are using writing packed data to encode new data, you can apply netCDF4 chunking feature, apply shaving to non-significant bits on the float number, and add the deflate filter, honouring classic data model and CF, without the use of CF packed data feature and using float/double original type. |
The CF convention does allow for unsigned integer types, just not for packing float/double into. |
yes, you are right!! The restriction on classic data model was removed on CF-1.9, allowing, among others, some data types from the enhanced data model. The Packed Data sections wasn't updated following that. |
Yes, I think this question is now answered. |
Dear Gwyn @gfireman I'm closing this issue now, because it's been addressed by a recent update to the working version of the convention (that will be released in a month or so). Please see the updated section 8.1. Thanks for asking the question. If it's not completely answered, please feel free to reopen this issue. Cheers Jonathan |
Conventions say:
Why not ubyte, ushort, or uint?
We typically pack data into unsigned int types.
To be CF compliant we'd have to change types - and then adjust scale_factor and add_offset to recover the range lost to a sign bit.
The text was updated successfully, but these errors were encountered: