[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #YYS-526547]: netCDF file limitation?
- Subject: [netCDF #YYS-526547]: netCDF file limitation?
- Date: Fri, 19 Jun 2009 10:03:51 -0600
Hi Mingkui,
> I want to know if there is a 2G limitation for creating a netCDF file
> by ncgen, version 3.6.3, even version 4? I am creating a netCDF file
> with 3-D(30x1100x1400) variables by ncgen. When I make the file has 6
> variables, it is ok, and the file size is about 2.1G. But when I want
> to add one more 3-D variable, I get such error message:
>
> ncgen: NetCDF: One or more variable sizes violate format constraints
No, you just have to tell ncgen to use the 64-bit offset variant of
the file format (indicated with a "-k 2" option), for example:
$ ncgen -k2 -b rst1.cdl
$ ls -l rst1.nc
-rw-r--r-- 1 russ ustaff 2587200404 Jun 19 09:59 rst1.nc
The "-k kind" options for ncgen are documented in the man page
documentation:
ncgen [-b] [-c] [-f] [-k kind_of_file] [-x] [-n] [-o
netcdf_filename] input_file
...
-k kind_of_file
Using -k2 or -k "64-bit offset" specifies that generat-
ed file (or program) should use version 2 of format
that employs 64-bit file offsets. The default is to
use version 1 ("classic") format with 32-bit file
offsets, although this limits the size of the netCDF
file, variables, and records to the sizes supported by
the classic format. (NetCDF-4 will support additional
kinds of netCDF files, "netCDF-4" and "netCDF-4 classic
model".) Note: -v is also accepted to mean the same
thing as -k for backward compatibility, but -k is pre-
ferred, to match the corresponding ncdump option.
--Russ
> Here is the content of my test case .cdl file:
>
> netcdf rst1 {
> dimensions:
> xi = 1400 ;
> eta = 1100 ;
> s = 30 ;
> variables:
> double a(s, eta, xi) ;
> double b(s, eta, xi) ;
> double c(s, eta, xi) ;
> double d(s, eta, xi) ;
> double e(s, eta, xi) ;
> double f(s, eta, xi) ;
> double g(s, eta, xi) ;
> }
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: YYS-526547
Department: Support netCDF
Priority: Normal
Status: Closed