div

Divides the last two items on the stack.

A B div

Arguments
labeltypedescription
A variable or constant variable or constant to be divided by B (i.e.,the dividend)
B variable or constant variable or constant by which A is divided (i.e.,the divisor)
Returns
quotient variable or constant The resulting quotient when A is divided by B.

If either A or B are variables, then quotient will be a variable. If both A and B are constants, then quotient will also be a constant.


Description

div divides the next to last item on the stack (the dividend) by the last item on the stack (the divisor) to produce a resulting quotient. If one of the two items is a variable that depends on at least one grid, the resulting quotient will be a variable as well. If both items in the operation are constants, the result will be a constant.

Example

In this example, Reanalysis global mean sea level pressure values at all grid locations and times are divided by a constant value of 100.

SOURCES .NOAA .NCEP-NCAR .CDAS-1 .MONTHLY .Intrinsic .MSL .pressure
100 div


Live Example Link

In the following example, the Reanalysis gridded pressure level temperature is divided by the virtual temperature variable in the same data set. Since the two variables match completely along the X, Y, and T grids, and along a sample of the P grid, the quotient is calculated gridpoint by gridpoint.

SOURCES .NOAA .NCEP-NCAR .CDAS-1 .MONTHLY .Intrinsic .PressureLevel .temp
SOURCES .NOAA .NCEP-NCAR .CDAS-1 .MONTHLY .Intrinsic .PressureLevel .vtemp
div


Live Example Link


See also

Arithmetic Functions: abs add differences eexp ln log mag mod mul RESCALE sqrt sqrtsgn sub sum