Skip to content

2D coord bounds handling #3401

@stephenworsley

Description

@stephenworsley

Currently, a 2D coordinate point is expected to have 4 bounds. There ought to be 8. Assuming the 2D variable is defined over lattitude and longitude, there should be 4 latbounds and 4 lonbounds. http://cfconventions.org/Data/cf-conventions/cf-conventions-1.7/cf-conventions.html#cell-boundaries
The current way these bounds are handled is incomplete. _discontiguity_in_bounds should be making more comparisons. It is currently comparing bounds[*,*,0] with bounds[*,*,1] and bounds[*,*,0] with bounds[*,*,3]. it should also be comparing bounds[*,*,1] with bounds[*,*,2] and bounds[*,*,2] with bounds[*,*,3]. These comparisons should be done for both latbounds and lonbounds.

It's also worth noting that it's possible to end up with a coordinate which has bounds in one dimension but not another. This is in fact the case for the gallery example https://scitools.org.uk/iris/docs/v1.9.2/examples/General/cross_section.html . It's unclear how such cases should be treated (they are currently unable to be handled by pcolor/pcolormesh. That is perhaps the correct approach, but in order for something like that to be possible, it seems like there would need to be some more thought put into the structure of bounds handling).

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions