⇐ ⇒

[CF-metadata] bounds

From: Brian Eaton <eaton>
Date: Thu, 19 Jun 2003 19:00:03 -0600

Hi Jonathan,

On Thu, Jun 12, 2003 at 06:27:37PM +0100, Jonathan Gregory wrote:
> ...
> > Why not restrict the new representation to the contiguous case and retain
> > the current representation (y,x,4) for the non-contiguous case?
>
> That is what I am proposing, I think, except that contiguous doesn't seem the
> right word to me.
>
> Let me try some different words. When there is an underlying x-y arrangement
> of cells, the bounds should be (y,x,2,2) and you can use them to test
> contiguousness. When there is not, you wouldn't know which cells are adjacent

We are definitely in a state of terminological (but not terminal, I hope)
confusion. If we were using terms the same way then by my proposal when
the (y,x,2,2) representation of cell bounds is used there is no need to
test contiguousness because that's the only case to which it applies.
However, since contiguity implies redundancy in cell boundary arrays the
relations that express the redundancy can be written down and a validation
can be done.

I consider the case of contiguous cells to be unambiguous (I've defined the
redundancy relations below). I'm suspicious that our terminological
confusion stems from trying to classify grids by an "underlying x-y
arrangement". We do not resort to such language in the current CF document
when describing the use of 2-D lat/lon arrays for grid coordinates. So why
do we need it for cell bounds? I think our discussion of horizontal
coordinate systems in the current CF document is successful mainly because
we stuck to talking about latitude and longitude coordinates, and netcdf
primitives like variables and dimensions, and didn't try defining grids
according to the properties of some underlying coordinate system.

The following proposal is a reworking of yours, using language closer to
what's in the current document, and including my proposed restriction of
using the (y,x,2,2) representation for contiguous grids only.

(1) For a 1D coordinate variable x(N) with bounds xbnd(N,2), define an
    ordering for the 2nd index, namely that the bounds should be ordered in
    the same sense as the coordinates, e.g., if x(0) < x(1) then
    xbnd(i,0) <= xbnd(i,1) for 0 <= i <= N-1.

(2) If 1D cells corresponding to coordinates x(i) and x(i+1) are
    contiguous, then the cell bounds should exactly satisfy
    xbnd(i,1) = xbnd(i+1,0)

(3) In the case where the horizontal grid is described by two-dimensional
    coordinate variables lat(N,M) and lon(N,M), and the associated cells
    are 4 sided and contiguous, then the boundary variables are given in
    the form latbnd(N,M,2,2) and lonbnd(N,M,2,2) rather than in variables
    that use only a single dimension for the cell vertices. The contiguity
    of the cells implies the following equalities:

    For 0 < j < N and 0 < i < M

    bnd(j,i,0,0) = bnd(j-1,i,1,0) = bnd(j-1,i-1,1,1) = bnd(j,i-1,0,1)

    bnd(j,i,1,0) = bnd(j,i-1,1,1) = bnd(j+1,i-1,0,1) = bnd(j+1,i,0,0)

    bnd(j,i,1,1) = bnd(j+1,i,0,1) = bnd(j+1,i+1,0,0) = bnd(j,i+1,1,0)

    bnd(j,i,0,1) = bnd(j,i+1,0,0) = bnd(j-1,i+1,1,0) = bnd(j-1,i,1,1)

    where bnd stands for either latbnd or lonbnd. There are also
    relationships for the edge cells which should be written down.

(4) In all other cases of horizontal grids the boundary arrays should use
    the current CF convention of a single vertex index with the added
    restriction that the vertices must be traversed anticlockwise in the
    lon-lat plane as viewed from above.

Brian
Received on Thu Jun 19 2003 - 19:00:03 BST

This archive was generated by hypermail 2.3.0 : Tue Sep 13 2022 - 23:02:40 BST

⇐ ⇒