Given a reference to a file, this procedure is used to define list of variable names, variable types, and variable dimension names.


	procedure filevardef (
		thefile[1] : file,
		varnames : string,
		types : string,
		dimnames : string


The reference to the file that you want to define the variables in.
An array of variable names you want to define.
An array of variable types of the variables you want to define
The set of dimensions which apply to all names in varnames


This procedure defines one or more variables in and output netCDF or HDF file. varnames can contain multiple names of variables and types must contain a type name for each variable name in varnames. All variables to be defined will be defined with the set of dimension names in dimnames. The dimensions must be in the order desired. Dimension 0 is the first entry in dimnames. The dimensions must also have been defined already either with the procedure filedimdef or by normal variable assignment.

This procedure is part of a set of procedures called fileattdef, filedimdef, and filevarattdef.


  ncf = addfile("","c")
  varNames2D = (/ "PS" /)
  varTypes2D = (/ "float" /)
  varNames3D = (/ "T", "Q" /)
  varTypes3D = (/ "float", "float" /)
  filevardef( ncf, varNames2D, varTypes2D, (/  "lat", "lon" /) )
  filevardef( ncf, varNames3D, varTypes3D, (/  "lev", "lat", "lon" /) )

Reference Manual Control Panel

NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?

$Revision: 1.6 $ $Date: 1998/07/06 22:37:01 $