Uploaded image for project: 'JASMIN CIS'
  1. JASMIN CIS
  2. JASCIS-313

Histogram over map doesn't weight by area

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.3
    • Fix Version/s: None
    • Component/s: Plotting
    • Labels:
      None

      Description

      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 correctly-weighted mean of this field is ~1.5, not the ~1.3333 suggested by the above plot.)

        Attachments

          Activity

            People

            Assignee:
            duncan.watson-parris@physics.ox.ac.uk Duncan Watson-Parris
            Reporter:
            kipling@atm.ox.ac.uk Zak Kipling
            Participants:
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated: