
Type: Improvement

Status: Open

Priority: Minor

Resolution: Unresolved

Affects Version/s: 1.3

Fix Version/s: None

Component/s: Plotting

Labels:None
If I plot a histogram of a variable whose dimensions are latitude and longitude on a regular grid, no weighting is done to take account of the meridians becoming closer (and hence the grid cells smaller) towards the poles.
For example (this requires the GenericModelData plugin to work):
cat <<EOF >halves.grid
gridtype = lonlat
xsize = 36
ysize = 18
xfirst = 0
xinc = 10
yfirst = 85
yinc = 10
EOF
cdo f nc setclonlatbox,2,0,360,30,30 setname,test const,1,halves.grid halves.nc
cis plot test:halves.nc::::GenericModelDataByVariableName type histogram2d
The histogram shows that "1" is about twice as frequent as "2", although they in fact cover approximately the same area of the globe. (On a perfect sphere, the band between 30S and 30N represents precisely half the surface area. Consistent with this, "cdo infov fldmean halves.nc" shows that a correctlyweighted mean of this field is ~1.5, not the ~1.3333 suggested by the above plot.)
For example (this requires the GenericModelData plugin to work):
cat <<EOF >halves.grid
gridtype = lonlat
xsize = 36
ysize = 18
xfirst = 0
xinc = 10
yfirst = 85
yinc = 10
EOF
cdo f nc setclonlatbox,2,0,360,30,30 setname,test const,1,halves.grid halves.nc
cis plot test:halves.nc::::GenericModelDataByVariableName type histogram2d
The histogram shows that "1" is about twice as frequent as "2", although they in fact cover approximately the same area of the globe. (On a perfect sphere, the band between 30S and 30N represents precisely half the surface area. Consistent with this, "cdo infov fldmean halves.nc" shows that a correctlyweighted mean of this field is ~1.5, not the ~1.3333 suggested by the above plot.)