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

[netCDF #FMC-393036]: typo and question on NC_DISKLESS



> 1. The examples in the docs for NC_DISKLESS should change the
> filename from "foo_HDF5_classic.nc" to "diskless.nc".

Will do.

> 2. NC_DISKLESS should not be used (and causes a failure) when
> used to nc_open() netCDF4 files. If a file's format is not known
> a priori, then one must use nc_open() to determine its format. So
> the only way I can think of to determine whether it is safe to
> use NC_DISKLESS to nc_open() a file is to first open the file
> without NC_DISKLESS, then query its format, then if it is netCDF3
> close it and re-open it with NC_DISKLESS.  Is this algorithm
> correct/optimal? I want to stay within the API and not inspect
> for type using magic numbers.

Let me propose an alternative, namely
nc_open() on a netcdf-4 file with NC_DISKLESS will not fail,
but will ignore the flag.

Can you see any problems with that?


=Dennis Heimbigner
  Unidata


Ticket Details
===================
Ticket ID: FMC-393036
Department: Support netCDF
Priority: Normal
Status: Closed