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

[netCDF #MOB-465267]: Increasing maximum record size



Sergey,

Here's my current understanding of the problem:

1. You are not using netCDF library calls directly but are instead using an 
"IOAPI" library.
2. The IOAPI library uses the (old) netCDF-2 Fortran-77 interface.
3. You need to create netCDF files that use the 64-bit offset variant to 
support large record sizes.
4. The netCDF-2 Fortran-77 interface does not allow an argument to nccre() to 
specify use of the 64-bit offset variant of the file format.

Here are several possible solutions to the problem:

1.  Find some way to specify to the IOAPI library that you want large files 
that use 64-bit offsets, for example passing in a flag or deciding that you 
will always create 64-bit offset files. Modify the IOAPI library to create such 
files (when specified or by default) by replacing the current call to nccre() 
that looks like

   ncid = nccre ('foo.ncf', ncclob, rcode)

by the netCDF-3 F77 call nf_create instead, but specifying the new file type in 
the mode argument as follows:

    rcode=nf_create('foo.ncf',IOR(NF_CLOBBER,NF_64BIT_OFFSET),ncid)

Then recompile the IOAPI library and relink your application.

2.  Modify the netCDF-3.6.1 library so that its support for the old netCDF-2 
F77 interface allows specifying a 64-bit offset file when calling NCCRE().  
This involves replacing line 254 in the file 
netcdf-3.6.1/src/fortran/fort-v2compat.c:

    if (clobmode != NC_CLOBBER && clobmode != NC_NOCLOBBER)

with the following instead:

    if (clobmode < 0 ||
        clobmode > NC_NOCLOBBER + NC_64BIT_OFFSET + NC_SHARE + NC_STRICT_NC3 + 
NC_LOCK)

Then recompile the netCDF library and relink your application.  With this 
solution, you don't have to change IOAPI.

3.  Wait for the next release of netCDF 3.6.2, which will have this fix in it, 
to allow creating large files from the old version 2 Fortran interface.

--Russ



, the problem of creating netCDF files that use the 64-bit offset variant of 
the netCDF format must be fixed in the IOAPI library.
Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: MOB-465267
Department: Support netCDF
Priority: High
Status: Closed