topgrad
Calculation
Return value
the gradient of the input data with the same size 2D, 3D or 4D array
Parameters
field
direc
type: scalar string
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 242 2007-04-06 08:35:17Z 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
cm_4cal
cm_4data
cm_4mmesh
Statistics
McCabe cyclic | 67 |
McCabe essential | 1 |
McCabe modular design | 1 |