Skip to content
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

netcdf attributes & codadef (scalar vs. array) #13

Open
svniemeijer opened this issue Aug 30, 2016 · 2 comments
Open

netcdf attributes & codadef (scalar vs. array) #13

svniemeijer opened this issue Aug 30, 2016 · 2 comments

Comments

@svniemeijer
Copy link
Contributor

svniemeijer commented Aug 30, 2016

In CODA, the dynamic definitions for netcdf use a scalar for netcdf attributes if there is only one element, and will use an array if there is more than one element. If we want to create a codadef where the number of elements can range from 1 to more, then we have a problem, since we don’t read the attributes with one element as an array.

The best way forward (which also solves other aspects, such as allowing conversions and introducing 'time' types) is to use codadefs to (re)interpret how netcdf/etc. products are read (just as XML).

We could combine this with a global CODA option that will either read products using the dynamic format or using the codadef format. If the dynamic format is used a codacheck will then still be possible. This will allow to present all issues instead of stopping at the first issue found (which is what will happen when (re)interpreting the product using the codadef as format).

@svniemeijer
Copy link
Contributor Author

svniemeijer commented Aug 30, 2016

Similar to the netcdf attribute issue, there is also the problem of how to deal with the difference between char and string as the choice for 'native type' (single char vs. char sequence) for self-describing formats.

@svniemeijer
Copy link
Contributor Author

svniemeijer commented Dec 13, 2016

For the netcdf4 format, which uses HDF5, the netcdf4 library seems to always store attributes of numbers as arrays. This means that CODA will always use an array for attributes in netcdf4 files.
The downside is that it is thus currently not possible to represent a scalar attribute as a scalar in CODA for netcdf4 files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant