area_weighted_mean
- 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.
- Parameters:
lon (ndarray) – Longitude (M) angles [degree].
lat (ndarray) – Latitude (N) angles [degree].
data ()ndarray) – Data array (N x M).
- Returns:
Area weighted mean.
- Return type: