Calculation is performed using spherical geometry

cell_areas_m2(extent, dim)

Arguments

extent

a vector representing the spatial extent of the matrix (xmin, xmax, ymin, ymax)

dim

the dimensions of the matrix (nlat, nlon)

Value

a matrix having dimension dim and values representing the area occupied by each cell