GRID

Regrids a variable onto a newly-defined, evenly-spaced grid (i.e., independent variable)

var grid lowbound step highbound GRID

Arguments
labeltypedescription
var variable variable to be regridded
grid grid grid (i.e., independent variable) on which new grid specifications (e.g., lowbound, step, highbound) are to be applied
lowbound number lower limit of new grid definition
step number width (in units of grid) between new grid points

If n is not an integer, where n=(highbound-lowbound)/step, then step is assigned closest value that allows n to be an integer.

highbound number upper limit of new grid definition
Returns
regridvar variable var regridded onto newly-defined grid

Data at new grid points are based on linear interpolation of original var.


Description

GRID regrids an existing independent variable (grid) associated with a data set or variable with a newly-defined evenly-spaced grid based upon user-defined limits and spacing.

In the function arguments "var" is a data variable that depends on the independent variable "grid", "lowbound" is the minimum value of the new grid being defined, "step" is the evenly-spaced interval of the new grid in the units of "grid", and "highbound" is the upper limit of the new grid.

Example

In the following example, a gridded data set of monthly mean short wave radiances is spatially regridded globally (from -180° to 179° in longitude and -90° to 90° in latitude) from 2.5° lat/lon grid spacing to 1° lat/lon spacing. Bi-linear interpolation is used to regrid from the coarser to the finer grid.

SOURCES .ERBE .global .monthly .srb
X -180 1 179 GRID
Y -90 1 90 GRID


Live Example Link


See also

Grid Modification: regridAverage removeGRID renameGRID replaceGRID SAMPLE_MISSING shiftdata shiftdatashort shiftGRID splitstreamgrid unsplitstreamgrid zeropointwidth
Independent Variable Modification: regridAverage regridLB regridLinear removeGRID renameGRID replaceGRID SAMPLE_MISSING shiftdata shiftdatashort shiftGRID splitstreamgrid use_as_grid
Regridding: regridAverage regridLB regridLinear transit