NCL Website header
NCL Home > Documentation > Functions > Regridding

g2gsh_Wrap

Interpolates a scalar quantity from one Gaussian grid to another (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 g2gsh_Wrap (
		grid        : numeric,  
		outdims [2] : integer,  
		twave   [1] : integer   
	)

	return_val  :  float or double

Arguments

grid

An array of 2 or more dimensions whose rightmost two dimensions must be latitude x longitude. The values must be in ascending latitude order.

outdims

An array indicating the dimensions of the rightmost two dimensions of the output grid (outdims[0] = nlatb, outdims[1] = nlonb).

twave

A 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)

Description

This function is identical to g2gsh, except the return value will have metadata added based on metadata attached to grid. See the g2gsh page for full documentation and examples.