http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/variables-xpressions/XPRESSIONS#_VPINDEXENTRY_429
@DIN—definite integral
The transformation @DIN computes the definite integral—a single value that is
the integral between two points along an axis (compare with
@IIN). It is obtained as the sum of the grid_box*variable
product at each grid point. Grid points at the ends of the
indicated range are weighted by the fraction of the grid box
that falls within the integration interval.
If @DIN is specified simultaneously
on multiple axes the calculation will be performed as a
multiple integration rather than as sequential single
integrations. The output will document this fact by indicating
a transformation of "@IN4" or "XY integ." See the General Information on transformations for
important details about this transformation. (In particular
note that when the limits are given in index values, the
transformation includes the entire interval of both endpoints;
if it is given in world coordinates, it uses partial grid
cells out to those world limits.)
Example:
yes? CONTOUR/X=160E:160W/Y=5S:5N u[Z=0:50@DIN]
In a latitude/longitude coordinate
system X=@DIN is sensitive to the COS(latitude) correction.
Integration over complex regions in
space may be achieved by masking the multi-dimensional
variable in question and using the multi-dimensional form of
@DIN. For example
yes? LET
salinity_where_temp_gt_15 = IF temp GT 15 THEN salt
yes? LIST salinity_where_temp_gt_15[X=@DIN,Y=@DIN,Z=@DIN]