topgrad
Calculation
Return value
the gradient of the input data with the same size 2D, 3D or 4D
array, located on the appropriate grid (see restrictions)
Parameters
field
direc
type: scalar string
Keywords
MILLION
type: scalar: 0 or 1
default: 0
Examples
IDL> @tst_initorca2
IDL> plt, grad({arr:gphit,g:'T'}, 'x')
IDL> plt, grad({arr:gphit,g:'T'}, 'y')
Version history
Version
$Id: grad.pro 371 2008-08-07 09:32:02Z pinsard $
History
Sebastien Masson (smasson@lodyc.jussieu.fr)
Known issues
Restrictions
- Works only for Arakawa C-grid.
- When computing the gradient, the result is not on the same grid point
than the input data. In consequence, we update, vargrid and the grid position
parameters (firstx[tuvf], lastx[tuvf], nx[tuvf], firsty[tuvf], lasty[tuvf],
ny[tuvf], firstz[tw], lastz[tw], nz[tw]).
- points that cannot be computed (domain boundaries, coastline) are set to NaN
- the common variable jpt is used to differ xyz (jpt=1) and xyt (jpt=1) cases.
Other attributes
Uses routines
Statistics
McCabe cyclic | 70 |
McCabe essential | 1 |
McCabe modular design | 1 |