vint(psexpr,expr,top)
This function performs a mass-weighted vertical integral in mb pressure coordinates. The three arguments to vint
are:
psexpr
a GrADS expression for the
surface pressure, in mb, which bounds the integral on
the bottom.
expr
a GrADS expression
representing the quantity to be integrated.
top
the bounding top pressure, in mb. This value must be a constant and cannot be
provided as an expression.
The calculation is a sum of the mass-weighted layers:
f/g * sum(expr * Delta(level))
The bounds of the integration are the surface pressure and the
indicated top
value. The scale factors are f=100
and g=9.8. The summation is done for each layer present that is
between the bounds. The layers are determined by the Z levels of the
default file. Each layer is considered to be from the midpoints
between the levels actually present, and is assumed to have the same
value throughout the layer, namely the value of the gridpoint at the
middle of the layer.
expr
.
top
pressure value to be at the top of a layer, which is midway between
grid points. For example, if the default file (and the data) have
pressure levels of ...,500,400,300,250,... then a good value for
top
might be 275, the value at the top of the
layer that extends from 350 to 275 mb.
vint
function operates only in an X-Y varying
dimension environment.
A typical use of vint
might be:
vint(ps,q,275)
This expression will integrate specific humidity to obtain precipitable water, in mm.