Given a reference to a file, this procedure is used to define a list
of dimension names, dimension sizes, and a logical array indicating
whether the dimensions are unlimited.
procedure filedimdef (
thefile : file,
dimnames : string,
dimsizes : integer,
is_unlimited : logical
The reference to the file that you want to write the dimensions to.
An array of dimension names you want to write to thefile.
An array of dimension sizes of the dimensions you want to write to
An array of logical values indicating whether the corresponding dimensions
are unlimited in size, note netCDF only allows one unlimited dimension.
This procedure is used to pre-define dimensions in a file. Usually the file is being
created and must have been opened as either read/write or create. The fourth
parameter allows the dimension to be defined as unlimited. NetCDF files only
allow one dimension to be unlimited. Unlimited dimensions can grow while
normal dimensions can not. A typical use of unlimited dimensions is to create a
data from multiple input files. For unlimited dimensions the size value is
ignored. Unlimited dimensions have a size of 0 until a variable with the
unlimited dimension name is assigned to the file.
Using this procedure is much more efficient than writing a
variable's dimensions one at a time.
This procedure is part of a set of procedures called fileattdef, filevarattdef, and filevardef.
ncf = addfile("myfile.nc","c")
; Define dimensions.
dimNames = (/ "lon", "lat", "lev", "time" /)
dimSizes = (/ nlon, nlat, nlev, -1 /)
dimUnlim = (/ False, False, False, True /)
filedimdef( ncf, dimNames, dimSizes, dimUnlim )
Reference Manual Control Panel
NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?
$Revision: 1.6 $ $Date: 1998/07/06 22:37:00 $