NCL Home > Documentation > Functions

Description of return_val prototype

return_val is the generic name used when indicating the return value prototype for NCL's built-in functions.

The return_val prototype line is used for informational purposes only, and is not meant to be considered valid NCL code. Below is a description of the various incantations of prototyping return_val and what they mean. This list is not all-inclusive; it is meant to help you understand how this information is used.

In some of the function documentation pages, it is not possible to fully prototype the return value on this single line. When this occurs, more information should appear in in the "Description" section, or possibly in the optional "Return Value" section.

return_val [1] : numeric
The return value is a scalar with a type of numeric (byte, short, integer, long, float, or double).
return_val [20] : integer
The return value is a one-dimensional array of length 20 and of type integer.
return_val [*] : string
The return value is a one-dimensional array of an unspecified length and of type string. In the special case where where '[*]' is '[1]', the return value will be a scalar.
return_val [*][*] : float
The return value is a two-dimensional array of unspecified size and of type float.
return_val : float or double
The return value is a scalar or an array of any dimensionality and of type float or double.
return_val [dimsizes(x)] : typeof(x)
The return value has the same dimensionality and type as the input variable x.
return_val [2,dimsizes(dv)] : float or double
The return value's leftmost dimension is of size 2, and the remaining dimensions are the same as dv's. The type is float or double.
return_val [dimsizes(time),{6}] : float or string
The return value is a float or a string whose dimensions are either the same as time's, or else they are the same dimensions as time with an additional rightmost dimension of length 6.