...
Computes the covariance of two fieldsets. With n fields in the input fieldsets, if xik and yik are the ith values of the kth field of each input field respectively and zi is the ith value of the resulting field, the formula can be written :
Note that the following lines are equivalent:
...
With n fields in the input fieldsets, if xik , yik are the ith value of the kth input fieldsets and zi is the ith value of the resulting field:
A missing value in either input fieldset will result in a missing value in the corresponding place in the output fieldset.
...
abs(data-value) <= threshold
...
list grib_get (fieldset, list)
list grib_get (fieldset, list, string)
...
This function computes the average value of field. Each grid point value is weighted by the cosine of its latitude :
Where ϕi is the latitude and xi is the grid point value. If the input fieldset contains only one field, a number is returned. If there is more than one field, a list of numbers is returned. Missing values in the input fieldset are bypassed in this calculation. For each field for which there are no valid values, nil
is returned.
...
The list parameter must contain exactly four numbers representing a geographical area. These numbers should be in the order north, west, south and east (negative values for western and southern coordinates). Non-rectangular masks, and even convex masks can be created by using the operators and , or and not . To create the following mask :
First decompose into basic rectangles :
Then create a mask for each of them and use and and or to compose the desired mask. This is the corresponding macro :
...
Computes the mean field of a fieldset. A missing value in any field will result in a missing value in the corresponding place in the output fieldset. With n fields in the input fieldset, if xik is the ith value of the kth input field and yi is the ith value of the resulting field, the formula can be written :
fieldset
mean_ew
( fieldset )
...
With n fields in the input fieldsets, if xik, yik are the ith value of the kth input fieldsets and zi is the ith value of the resulting field:
number or list
nearest_gridpoint
( fieldset,list )
number or list nearest_gridpoint
( fieldset,number,number )vector or list nearest_gridpoint ( fieldset,vector,vector )
...
Computes the root mean square of a fieldset. A missing value in any field will result in a missing value in the corresponding place in the output fieldset. With n fields in the input fieldset, if xik is the ith value of the kth input field and yi is the ith value of the resulting field, the formula can be written :
Note that the following lines are equivalent :
...
Computes the standard deviation of a fieldset. A missing value in any field will result in a missing value in the corresponding place in the output fieldset. With n fields in the input fieldset, if xik is the ith value of the kth input field and yi is the ith value of the resulting field, the formula can be written :
Note that the following lines are equivalent :
...
Computes the sum of a fieldset. The result is a single-field fieldset. A missing value in any field will result in a missing value in the corresponding place in the output fieldset. With n fields in the input fieldset, if xik is the ith value of the kth input field and yi is the ith value of the resulting field, the formula can be written :
fieldset
thickness
( fieldset )
fieldset thickness
( fieldset,number )
fieldset thickness
( fieldset,list )
fieldset thickness
( fieldset,fieldset )
...
A missing value in any field will result in a missing value in the corresponding place in the output fieldset.
The function computes :
Where f is the fieldset, p is the pressure and g the acceleration of gravity.
...
# x is a fieldset of n fields
xgrid = values(x)
field1_values = xgrid[1]
gridpoint1 = field1_values[1]
# or equivalently
gridpoint1 = xgrid[1][1]
fieldset
var
( fieldset )
Computes the variance of a fieldset. A missing value in any field will result in a missing value in the corresponding place in the output fieldset. With n fields in the input fieldset, if xik is the ith value of the kth input field and yi is the ith value of the resulting field, the formula can be written :
...
Note that the following lines are equivalent :
...
This function performs a vertical integration of the input fieldset, which must contain a range of model levels for the same parameter. A missing value in any field will result in a missing value in the corresponding place in the output fieldset. If the function is called with the fieldset as its single argument, it must also contain the logarithm of the surface pressure (lnsp ). If the function is called with two parameters, the first one is a fieldset containing an lnsp field, the second one is the multi-level fieldset.
The function computes :
Where f is the fieldset, p is the pressure and g the acceleration of gravity.
...