transient vs committed types #2846
Replies: 2 comments 1 reply
-
Citing from NetCDF Users Guide v1.1, section NetCDF-4 User Defined Data Types:
Is this correct? It seems like it's not (see, Unidata/netcdf4-python#1308). Or is it the same as for dimensions Enhanced Data Model in NetCDF-4/HDF5 Files:
|
Beta Was this translation helpful? Give feedback.
-
Frankly, I cannot give a good answer to your issue. The use of duplicate transient types has along history. AFAIK, when netcdf started using HDF5, the early |
Beta Was this translation helpful? Give feedback.
-
Updates:
This is a more general question how to use transient types in connection with committed types especially when using user types (Compound, Enum, Vlen).
I've currently asked Unidata/netcdf4-python#1308 where I'm able to create a malformed netcdf file using
netcdf4-python
where a variable correctly written can't be read back properly.Over at
h5netcdf
(h5netcdf/h5netcdf#228) I've taken a deeper look into that issue. IIUCnetcdf-c
creates a committed type (eg. for an enum). When creating a variable a copy of that committed enum type is written into the underlying hdf5 dataset as transient type [*].I've created a workflow using h5netcdf/h5py to create a similar file with same committed types but with shared/linked types in the underlying dataset. That file can be read perfectly fine by
netcdf-c
,ncdump
leads to same output. Usingh5dump
(andh5ls
) reveal the difference in the two files.Unfortunately I'm not that fluent in C so I hope you will excuse me providing just the python code and the two resulting files.
Questions:
_FillValue
-attribute?test_h5.nc
) up to netcdf standards, although it uses linked/shared committed type for dataset and_FillValue
-attribute?Please find below the python code to create the two files and the two resulting files (gzipped to be attachable). Thanks for any comments and suggestions.
Output of the above:
$ ncdump test_nc.nc
$ ncdump test_h5.nc
$ h5dump test_nc.nc
$ h5dump test_h5.nc
test_nc.nc.gz
test_h5.nc.gz
Beta Was this translation helpful? Give feedback.
All reactions