
f2gsh_Wrap
Interpolates a scalar quantity from a fixed grid to a Gaussian grid (with optional truncation) (retains 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 f2gsh_Wrap ( grid : numeric, outdims [2] : integer, twave [1] : integer ) return_val : float or double
Arguments
gridAn array of 2 or more dimensions whose rightmost two dimensions must be latitude x longitude. The values must be in ascending latitude order.
outdimsAn array indicating the dimensions of the rightmost two dimensions of the output grid (outdims[0] = nlatb, outdims[1] = nlonb).
twaveA scalar integer indicating the optional wave truncation:
-
twave = 0 => exact interpolation
twave > 0 => exact interpolation and triangular truncation at twave
twave < 0 => exact interpolation, triangular truncation at twave and spectral coefficient tapering (the effect is to smooth the data)
Return value
The return array's dimensions are the same as grid's dimensions, except the rightmost two dimensions, nlata and nlona, are replaced by nlatb and nlonb. The type will be double if the input is double, and float otherwise.
Description
This function is identical to f2gsh, except the return value will have metadata added based on metadata attached to grid. See the f2gsh page for full documentation and examples.