cedadev/cf-checker

Problem with checking points lie within cell boundary for monotonic decreasing coord var

Opened this issue · 5 comments

(7.1) states that points specified by a coordinate or auxiliary coordinate variable should lie within, or on the boundary, of the cells specified by the associated boundary variable.

Checker is not determining whether the interval end points are ordered consistently with the associated coordinate variable. So if the associated coordinate variable is:

  1. monotonically increasing --> var_bounds[i][0] <= var <= var_bounds[i][1]
    or
  2. monotonically decreasing --> var_bounds[i][0] => var => var_bounds[i][1]

It would be worth checking whether any refinement for longitude is needed, e.g. could you have value -180 with bounds [179, -179]?

The scenario you describe will flag an error as -180 is not within the bounds or am I missing the point?

I am saying that it would be worth checking whether it should be permitted, as it would seem like a possibly reasonable description of a grid cell if a longitude coordinate from -180 to 180 is in use. (I haven't checked the conventions document myself.)

Ah Ok - yes the conventions do state that values must lie on or within the cell boundaries so this should be flagged as an error.

Release 3.1.1 checks that values are within the cell bounds either increasing or decreasing. With the current code setup it is non-trivial to do a cross check that the bounds are consistent with the associated coordinate variable increasing/decreasing. This will be fixed a the next release.