NCL Home >
Documentation >
Functions >
Metadata routines
copy_VarMeta
Copies all attributes, named dimensions and coordinate variables from one variable to another.
Prototype
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" procedure copy_VarMeta ( var_from , var_to )
Arguments
var_fromAn array of any dimensionality. Must have attributes, named dimensions and coordinate variables.
var_toAn array of any dimensionality. Its dimensions must be a subset of the leftmost dimensions of var_from. For example, if var_from is dimensioned time x lev x lat x lon, then var_to can be dimensioned:
- the same size
- time x lev x lat
- lev x lat
- lat
Description
This procedure copies all attributes, named dimensions and coordinate variables from var_from to var_to.
If var_from and var_to are not the same size, this procedure is "smart" enough to only calculate the appropriate number of dimensions possessed by var_to.
See Also
There are many metadata tools