...
R
is the radius of the Earthφ
i is the latitude of the i-th grid cell
is the size of the grid cells in latitudeΔ
φiΔλ
i is the size of the i-th grid cell in longitude.
Using this and supposing The function then supposes that Δφi
is constant and the weighted average of field f
over an area can be written the area is computed as:
Mathdisplay |
---|
average_over_area = \frac {\sum_{i}f_{i} A_{i}}{\sum_{i}A_{i}} = \frac {\sum_{i}f_{i}cos\phi_{i}\Delta\lambda_{i}}{\sum_{i}cos\phi_{i}\Delta\lambda_{i}} |
This formula is only used for regular latitude-longitude and Gaussian grids. For all other grid types integrate()
simply returns the mathematical average of the values (just like the average()
function).
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.
...