Deletes one or more attributes associated with a variable.
Available in version 4.2.0.a034 and later.
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" procedure delete_VarAtts ( var , atts )
Any valid variable.atts
A variable of type string or integer. If it is of type string then it can be a single element or a one dimensional array specifying the names of the attributes to be deleted.
If it is of type integer, by convention =-1, then all the attributes associated with the variable var will be deleted.
This procedure checks to see if each specified attribute exists. If it does exist, it is deleted.
There are many metadata tools.
The following require that contributed.ncl be loaded prior to invoking the function.
Let the variable x have 5 attributes: "apple", "peach", "orange", "banana", "pineapple". Let's say that 3 attributes ("peach", "banana", "pineapple") are to be deleted while the others ("apple", "orange") are to be retained. The classic approach would be:
Let the variable x have 50 attributes: Delete all the attributes associated with x.