Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve the fix for Unidata#350 included in Unidata#1119
1) We have to use H5Tequal() to compare HDF5 type IDs. 2) When checking if we can re-use an NC_CHAR attribute it is enough to compare data types (H5Tequal() takes care of the size comparison). 3) This commit adds missing code (reuse_att was set but not used). Now an attribute in a NetCDF-4 file can be modified as many times as necessary, as long its type and length remain the same. Modifications changing either type or length of an attribute require deleting and re-creating an attribute which increments the attribute order creation index. Once this index reaches 65535 all attribute modifications (for a particular group or variable) will fail. For reference: Issue 350 title: NetCDF-4 limits the number of times an attribute can be modified Pull request 1119 title: Fix checking for HDF5 max dims, no longer re-create atts if not needed, confirm behavior for HDF5 cyclical files, allow user to set mpiexec
- Loading branch information