General functions for manipulating geographical data.

typhon.geographical.area_weighted_mean(lon, lat, data)[source]

Calculate the mean of gridded data on a sphere.

Data points on the Earth’s surface are often represented as a grid. As the grid cells do not have a constant area they have to be weighted when calculating statistical properties (e.g. mean).

This function returns the weighted mean assuming a perfectly spherical globe.

  • lon (ndarray) – Longitude (M) angles [degree].
  • lat (ndarray) – Latitude (N) angles [degree].
  • data ()ndarray) – Data array (N x M).

Area weighted mean.

Return type: