Re: A question while creating large NetCDF files

From: Dave Allured <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Mon Nov 16 2009 - 21:56:26 MST

Ming,

You have a total of 2.3 Gbytes of data, which exceeds the 2.0 Gb
general limit for default type Netcdf files. Try either of these
suggestions, the first one is simpler.

1. Set the Format option to "LargeFile". See documentation under
Netcdf format in the setfileoption procedure:

http://www.ncl.ucar.edu/Document/Functions/Built-in/setfileoption.shtml

2. Predefine all of the file variables so that the last one defined
is one of the large 3-D arrays. If you do this correctly, I think
that everything will fit under the special rules for exceeding 2 Gb
in Classic format:

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

Also, remember to predefine all variables and attributes for a file
this large, before writing any data variables, or else your program
will take excessive time repositioning data.

Dave Allured
CU/CIRES Climate Diagnostics Center (CDC)
http://cires.colorado.edu/science/centers/cdc/
NOAA/ESRL/PSD, Climate Analysis Branch (CAB)
*** http://www.esrl.noaa.gov/psd/psd1/ ***
NOTICE: NEW PSD1/CAB WEBSITE ADDRESS AS OF 2009-OCT-14
PRODUCT AND DATA CONSUMERS PLEASE TAKE NOTE

陈名 wrote:
> Dear NCL users:
>
> I was trying to create a large NC file- the desired file header is as
> following:
>
> filename: 2008-01
> path: 2008-01.nc <http://2008-01.nc/>
> file global attributes:
> creation_date : Mon Nov 16 14:26:18 CST 2009
> description : 2008 half hourly Met Data
> dimensions:
> time = 1488
> lat = 180
> lon = 360
> scalar = 1
> variables:
> float TBOT ( time, lat, lon )
>
> float WIND ( time, lat, lon )
>
> float QBOT ( time, lat, lon )
>
> float PRECTmms ( time, lat, lon )
>
> float FSDS ( time, lat, lon )
>
> float PSRT ( time, lat, lon )
>
> float time ( time )
>
> float LATIXY ( lat, lon )
>
> float LONGXY ( lat, lon )
>
> float EDGEN ( scalar )
>
> float EDGEE ( scalar )
>
> float EDGES ( scalar )
>
> float EDGEW ( scalar )
>
>
> But I keep receiving this error message:
>
> ncendef: ncid 1: NetCDF: One or more variable sizes violate format
> constraints
> ncclose: ncid 1: NetCDF: One or more variable sizes violate format
> constraints
>
> I searched on NCL website and thought it could be a large file problem,
> so I tried to reduce the time dimension to be 1000, and it go through
> well. However, I still need the large file and I don't know how to avoid
> this error. Could someone give me a hint? The attachment is the ncl
> script I used. Thanks a lot!
>
> Ming
>
>
>
> --
> Department of Soil, Water and Climate
> 439 Borlaug Hall 1991 Upper Buford Cir.
> St. Paul 55108
> MN USA
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Nov 16 21:56:34 2009

This archive was generated by hypermail 2.1.8 : Mon Nov 23 2009 - 12:24:02 MST