addGRIDlast

Adds a single-valued independent variable as the slowest-varying independent variable

var ivar addGRIDlast

Arguments
labeltypedescription
var variable Variable to be manipulated
ivar grid Independent variable to be applied to variable
Returns
var' variable Variable with single-valued independent variable as the slowest-varying independent variable added

Description

addGRIDlast attaches a new single-valued grid (independent variable) to the latest variable on the stack and makes the grid the last grid in the variable chunk.

Example

SOURCES .UEA .CRU .Jones .CRUTEM3 .tanom
/Z /meters ordered [2] NewGRID
addGRIDlast


This example creates and adds a new, single-valued height (Z) grid to the CRUTEM3 land-only surface temperature anomaly data set. "/Z /meters ordered [2] NewGRID" creates a new grid called "Z", with units in meters, that is ordered, and has a single value of 2. addGRIDlast then attaches this grid to the temperature anomaly data set, making it the last grid in the data chunk.

In the Live Link Example the top line of the data set page shows the name of the selected data set and variable and the ordering of the data set grids. In this example, using addGRIDlast, the grids are ordered as [X Y | T Z]. If addGRID were used instead, the grids would be ordered as [X Y | Z T].

Live Link Example