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

[Support #NTO-725658]: I have a problem with NetCDFPerl



Shinsaku,

> I had a mistype on th elast email.
> I'm sorry for that.
> My problem was that I had an error like
> "One or more variable sizes violate format constraints."
> when I used "enddef" function.
> 
> What I wanted to do was
> getting dimensions and variables from an existed netCDF file, first,
> then making a new netCDF file and put them on the new file , actually
> copying dimensions and variables.
> During that process, the new file was in define mode.
> So, I tried to use "endef" and make the new file data mode for putting
> data on each variables which had been made before.
> I, however, got the error at the "endef" point, but I could not make a
> new netCDF file.

I understand.

I asked our netCDF leader about the error message.  This is what he
said:

Sure, one explanation is a note inside one of the netCDF FAQs:

  Q: Why do I get an error message when I try to create a file larger
     than 2 GiB with the new library? 

  A: ... 

     If you get the netCDF library error "One or more variable sizes
     violate format constraints", you are trying to define a variable
     larger than permitted for the file format variant. This error
     typically occurs when leaving "define mode" rather than when
     defining a variable. The error status cannot be returned when a
     variable is first defined, because the last fixed-size variable
     defined is permitted to be larger than other fixed-size variables
     (when there are no record variables). 

     Similarly, the last record variable may be larger than other record
     variables. This means that subsequently adding a small variable to
     an existing file may be invalid, because it makes what was
     previously the last variable now in violation of the format size
     constraints. For details on the format size constraints, see the
     Users Guide sections NetCDF Classic Format Limitations 

       
http://www.unidata.ucar.edu/netcdf/docs/netcdf/NetCDF-Classic-Format-Limitations.html

     and NetCDF 64-bit Offset Format Limitations.

      
http://www.unidata.ucar.edu/netcdf/docs/netcdf/NetCDF-64-bit-Offset-Format-Limitations.html

So,  it appears that the file that you're trying to create is too
big.  You might be able to increase the maximum supported file size
by rebuilding the Perl interpreter, the netCDF installation,
and the netCDF-Perl package with support for large files.

I think I would build a netCDF installation with support for large
files and then use the ncdump(1) utility to generate a C or Fortran
program capable of creating the source netCDF file.  I would then
modify that program so that it did what the perl script tried to
do.

Alternatively, you could try one of the many netCDF-based packages
to see if they can do what you want.  They are listed at
<http://www.unidata.ucar.edu/software/netcdf/software.html>

Sorry I can't be of more help.  You might try the netCDF mailing-
list or <address@hidden>.

> ******************************
> Shinsaku A Nakamura
> address@hidden
> ******************************

Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: NTO-725658
Department: Support netCDF Perl
Priority: Normal
Status: Closed