
NCL Home >
Documentation >
Functions >
Type converters
byte2flt
Converts values of type byte to values of type float.
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 byte2flt ( x : byte ) return_val [dimsizes(x)] : float
Arguments
xAn array of any dimensionality. Must be of type byte.
Return value
An array of the same size as x. Type float.
Description
This function converts byte data to float using the "scale" and "offset" attributes (if present), and preserves metadata.
Other attributes similar to "scale" and "offset" will be recognized:
- offset:
- "add_offset", "OFFSET", "Offset", "_offset", "Intercept", "intercept"
- scale:
- "SCALE", "Scale", "_scale", "scale_factor", "Scale_factor", "Slope" , "slope"
See Also