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

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



Sergey,

Oops, I spoke too soon.  It looks like the bug is in your program.  You have 
not specified use of the large file format in your nccre() call, so the file 
you are creating is the "netCDF classic" format, which has 32-bit offsets 
instead of 64-bit offsets.  For "netCDF classic" format files, the size 
constraints for variables are different than for 64-bit offset files.  In 
particular, in the netCDF classic format, all records are limited in size to 
about 2 GiBytes, as documented in the netCDF User Guide:

  
http://www.unidata.ucar.edu/software/netcdf/docs/netcdf.html#Large-File-Support

I assumed you were using the Large File Support and 64-bit offset format, which 
has no such limit on record size.  In an earlier email, I asked

  When you create the netCDF file by calling nf_create() or nf90_create(),
  do you include the flag that specifies using the Large File Support so
  variables can be larger than 2 GiBytes? For an example of how to do this,
  see the FAQ on Large File Support here:

  
http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#Large%20File%20Support

The example program you sent actually used the old netCDF-2 Fortran-77 
interface function nccre() with no indication that Large File support was 
needed:

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

If you replace this statement with the netCDF-3 Fortran interface function

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

I think the program will complete with no error, as it did here.

The old NCCRE() Fortran-77 function checks the creation flags and won't allow 
the flag IOR(NF_CLOBBER,NF_64BIT_OFFSET), so this is a bug we should fix with 
that interface, to allow use of the Large File Support in the netCDF-2 
interface.  But you can use the netCDF-3 function nf_create() as above in a 
program that otherwise uses the netCDF-2 Fortran interface to easily get around 
this problem until it's fixed.

--Russ

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