Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

    • R is the radius of the Earth
    • φi is the latitude of the i-th grid cell
    • Δφi is the size of the grid cells in latitude
    • Δλ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.

...