NCL Website header
NCL Home > Documentation > Functions > Type converters

dble2flt

Converts values of type double to values of type float and preserves metadata.

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 dble2flt (
		x  : double   
	)

	return_val [dimsizes(x)] :  float

Arguments

x

An array of any dimensionality and of type double.

Return value

An array of the same size as x and of type float.

Description

This function converts values of type double to values of type float and preserves metadata.

Note: this function is slightly different than the built-in set of conversion functions (like floattointeger and shorttobyte), because it requires loading the "contributed.ncl" script and it preserves metadata. It has a slightly different naming style than the built-in functions, just to set it apart from these other functions.

See Also

doubletofloat, short2flt, flt2dble

Examples

See here for an example script that uses this function. No other examples are available currently.