# Understanding cosine-weighting?

I am studying a paper where they use a method to calculate the vertical distribution of water content (ice, water vapor, cloud water) from the amount of ice on the martian surface.

In the paper they use a technique called cosine-weighting, a type of area-weighting technique. From what I understand, the cosine-weighting technique is usually used to account for the convergence of the meridions toward higher latitudes: it lessens the impact of high-latitude grid points that represent a small area of the globe.

I have seen on the internet several maps using this technique and I understand the overall purpose but I want to understand the math behind it and how to applies to the variables used in the paper.

Here is the paper in question:

Heavens, N. G., Kleinböhl, A., Chaffin, M. S., Halekas, J. S., Kass, D. M., Hayne, P. O., et al. (2018). Hydrogen escape from Mars enhanced by deep convection in dust storms. Nature Astronomy, 2(2), 126. https://www.nature.com/articles/s41550-017-0353-4

And here is the part that interests me:

A lower bound on the vertical distribution of water content was derived from MCS retrievals during each orbit (the second half of each OPE to match the timing of the flux calculations) by diagnosing then ratio of the saturation vapour pressure over ice to the retrieved pressure and the altitude above the areoid for all points satisfying:

1. water ice opacity > 10^(-4) km^(-1);
2. water ice opacity > dust opacity;
3. and altitude above the areoid > 30 km.

When explicitly calculated, the hygropause altitude in an individual retrieval was diagnosed from the altitude of the point above the highest point satisfying conditions (1) and (2).

Saturation vapour pressure was calculated using the Goff-Gratch equation based on the retrieved temperature (note that a typical uncertainty in retrieved temperature of 1K is equivalent to a 20% uncertainty in saturated vapour pressure at 180K). This calculation generated a set of profiles of water vapour volume mixing ratio as a function of altitude on the dayside and nightside of each orbit. A matching set of cloud water diagnoses was made from the water ice opacity data meeting conditions (1-3) above. Cloud water was estimated to be the product of the mass mixing ratio of water ice and m/m_(H2O), the ratio between the mean molecular mass of the atmosphere and the mean molecular mass of H2O (approximated as 44/18).

This datum was then averaged over each dayside or nightside OPE quarter. It was first binned in 1 km altitude bins. The cloud water profile was estimated from the cos latitude (ϕ)-weighted median of saturated water vapour diagnoses in the altitude bin, which was further multiplied by the ratio of the sum of cos ϕ weights of retrievals with diagnoses in that altitude bin to the sum of cos ϕ weights of all retrievals. Using the median reduces the positive bias in estimating saturated vapour pressure when clouds are out of equilibrium with an undersaturated atmosphere or when temperature uncertainty is high. The cloud water profile was estimated from the cos ϕ-weighted mean of cloud water diagnoses in the altitude bin, which was further multiplied by the ratio of the sum of cos ϕ weights of retrievals with diagnoses in that altitude bin to the sum of cos ϕ weights of all retrievals in the relevant half of the orbit. This ratio estimates the fractional sampling of the water ice diagnoses. The total water content is the sum of the cloud water and water vapour. The resulting estimates of cloud water, water vapour and total water content therefore place a lower bound on water content because the method assumes that water is associated with observed significant cloud ice and that water content everywhere else is zero.

Zonal average water vapour was estimated by binning all points in the sampled retrievals by latitude and altitude. Points meeting conditions (1-3) above were assigned the diagnosed water vapour mixing ratios. Points meeting condition (1) and (3), but not (2) were excluded from the average because their water vapour concentration is indeterminate. Points that met conditions (2) and (3) were assigned zero values. Points where water ice opacity was not reported, where temperature was reported and at higher altitude than points where water ice opacity was reported were likewise assigned zero values following the standard MCS zonal averaging methodology.