NetCDF header size #3101
-
Is there an API function that will return the header size of a particular netCDF file? If not, does the following AI-generated code snippet give a reasonable size:
The reason I am asking is that we are having some issues with parallel IO with pNetCDF and nc_redef/nc_enddef calls and want to reserve a header large enough that the header can (nopefully) accomodate all the dims and variables and attributes we will probably have in the file. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
To check header size/extent of classic files, PnetCDF has a utility program called ncoffsets
|
Beta Was this translation helpful? Give feedback.
-
FYI. PnetCDF has 2 C APIs for inquiring the header size and extent. |
Beta Was this translation helpful? Give feedback.
-
If having some additional space in the file header section is desired in case
I suggest call it and only at the first call after file creation, not after |
Beta Was this translation helpful? Give feedback.
FYI. PnetCDF has 2 C APIs for inquiring the header size and extent.
ncmpi_inq_header_size
ncmpi_inq_header_extent