NCL Home > Documentation > Functions > Metadata routines

nameDim

Assigns given named dimensions, long_name, and units to the input variable.

Prototype

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"  ; This library is automatically loaded
                                                             ; from NCL V6.2.0 onward.
                                                             ; No need for user to explicitly load.

	function nameDim (
		x            ,          
		dimNames [*] : string,  
		longName     : string,  
		units        : string   
	)

	return_val [dimsizes(x)] :  typeof(x)

Arguments

x

Array to assign dimensions and attributes to.

dimNames

An array of dimension names to assign to x. It must be the same length as the rank of x.

longName

A single string to assign to the "long_name" attribute.

units

A single string to assign to the "units" attribute.

Return value

The input array x is returned with the attached dimensions and attributes.

Description

This function assigns the given named dimensions, long_name, and units to the input variable.

See Also

There are many metadata routines available.

Examples

There are no examples currently available for this function. Check the other metadata routine pages for similar examples.