[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #HQN-423106]: netcdf4 with NC_NETCDF4 and NC_64BIT_OFFSET



Hi Greg,

> I tried to create a netcdf file using NC_NETCDF4 & NC_64BIT_OFFSET &
> NC_CLASSIC_MODEL and it fails.  Looking at nc4file.c, there is an
> explicit check that disallows for both NC_NETCDF4 and NC_64BIT_OFFSET
> both being set.
> 
> Is this intentional (or, obviously this is intentional, what is
> the background on this decision).   I have a model that needs to use
> NC_NETCDF4 and the NC_CLASSIC_MODEL, but has a dimension that exceeds 2^31
> (but is < 2^32).

Yes, it's intentional.  NC_64BIT_OFFSET is only intended to specify use of 
the variant of the classic format that uses 64-bit offsets instead of 32-bit 
offsets.  It corresponds to format 2 of the four netCDF format variants.  All 
netCDF-4/HDF5 files (formats 3 and 4) uses 64-bit offsets as far as I know.

If you use (NC_NETCDF4 || NC_CLASSIC_MODEL) that will use netCDF-4/HDF5
storage with 64-bit offsets.  The "NC_CLASSIC_MODEL" refers to the data model, 
not the format.

This should be documented more clearly to avoid the confusion you point out.

> If I remove the check, what break?

I don't know, but I would recommend not removing the test, instead just removing
use of NC_64BIT_OFFSET from the nc_create() call.

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: HQN-423106
Department: Support netCDF
Priority: Normal
Status: Closed


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.