On Tue, Mar 5, 2013 at 11:54 PM, Bert Jagers <
bert....@deltares.nl> wrote:
> If one would start with a UGRID standard from scratch I would strongly
> promote to require only the nodal coordinates.
...
> Now, using the CF conventions already
> include options using coordinates and bounds to geometrically
> non-rectangular grid cells (see
>
http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.6/cf-conventions.html#cell-boundaries
> subsections "Bounds for 2-D coordinate variables with 4-sided cells" and
> "Bounds for multi-dimensional coordinate variables with p-sided cells" and
> example "Example 7.2. Cells in a non-rectangular grid". Following these
> conventions, one would define the location of a quantity using one lat,lon
> pair and associated bounds. Hence to be compliant with CF, the current text
> mixes both approaches.
Bert, thanks for clarifying the motivation here -- that really helps.
I had missed the DF required both the bounds of the cells AND a
lat-lon point -- frankly I think that's very odd. Also there examples
defined the grid, and cells, but didn't have a data variable on them,
so it wasn't clear to me how it would be used.
> Now for the time being UGRID does not become an integral part of the CF
> conventions. This makes it sometimes more difficult, but also offers a bit
> of extra freedom, and I would propose to use it to state the following:
>
> * The UGRID-0.9 conventions require the use of node_coordinates; combined
> with the topological connectivity is defines the basic framework of the
> grid.
> * Although UGRID conventions are not yet a part of the CF conventions, we
> highly recommend files also to be CF compliant. This can be indicated by
> specifying a global Conventions = "UGRID-0.9 CF-1.6" attribute (or similar
> depending on the exact CF and UGRID version one claims to comply to.
> Following the CF conventions, it is recommended to store as well lat,lon
> coordinates and bounds for data at edges and faces as shown in the examples.
Sounds good.
However, we'd have to see what the CF people think, but it seems to me
that if we add UGRID to CF, we are by definition changing CF, and in
that case, we could define that it's perfectly compliant not to have
point locations for cell variables -- i.e. if the cells are defined
properly, either via UGRID or the existing cell definitions, then the
point location is optional.
Maybe not one would go for that, but it seems to be the CF is
currently requiring unnecessary and, in fact, misleading information.
> However, their
> combination may cause redundant coordinate specification requirements and
> resulting consistency issues. If we require all coordinates to be specified
> then we should also come up with a way to verify consistency.
Does the CF checker do that? i.e. check if the stated requirement:
"""
The boundary variables lat_bnds and lon_bnds associate a gridpoint
(j,i) with the cell determined by the vertices
(lat_bnds(j,i,n),lon_bnds(j,i,n)), n=0,..,3. The gridpoint location,
(lat(j,i),lon(j,i)), should be contained within this region.
"""
Anyway, I'm less concerned about potential inconstancy/error in files
than I I am about mis-interpetetion. WE talked a bit about plotting
results in a GIS, for instance. In the quad-cell example in the CF
doc, the cell data should be interpreted as associated with a set of
polygons in the GIS data model. However, there are point coordinates,
associated with the data, so a not-very-smart reader cold well
interpret the data as point data, which would be wrong.
A reader that dealt properly with such a file would need to understand
the cell definitions (or face in the case of UGRID) and thus shouldn't
use, and wouldn't need, the point coordinates.
> * Get proposed bounds conventions for 1D networks and 2D flexible/mixed
> meshes adopted within CF.
Is the 1-D network spec different than 1-D cells in CF? Does it need to be?
> The example of bounds for 2D triangular meshes is
> already consistent with the CF formulation for bounds.
Similar, though I think different -- in UGRID, we define the node
locations, then define the faces in terms of the nodes -- in CF the
cell boundaries are defined directly in lat-lon space (such that
shared node coordinates are repeated).
As it happens, I like this difference, I think it gives us more
freedom to do things a new way (i.e not have phantom coordinates
points just to satisfy CF)
> Triggered by Charles' mail I realize that we have a difficult issue here. Since UGRID is currently a separate
> entity from CF, a file that would use cell_methods = "face: mean" cannot be CF compliant unless the CF
> conventions also accept this formulation.
True, but I'm realizing that our faces are different than CF cells
anyway -- so maybe we should define:
face_methods = face:mean
Instead, rather than try to re-use the existing cell_methods
then we can add whatever face_methods people need, similarly to adding
standard names...
(by the way, I'd love to have standard names for boundary conditions
at some point...if that's at all possible)
> However, UGRID not being part of CF, the CF Conventions don't
> have a formal definition of concepts like "face" and "edge". I will try to contact Jonathan Gregory on this ...
Good idea, thanks.
> That is one of the gray shades: knowing it's the right file can be implemented as an assumption (end-user's > judgement), a simple check on a keyword in source or similar global attribute, or a formal check on the
> metadata of all the variables. Some FE users believe in mathematical purity and hence strict formal
> definition of the function space is the only way forward: making assumptions on the consuming side is
> considered a sin. On the other hand, there is a huge community that would like to see basic interoperability
> first, and then grow from there as needed. My personal opinion is that the current proposal satisfies most
> needs of the main community without blocking a way forward for a more formal function space extension to > the standard.
Absolutely!
> A TIN is a Triangulated Irregular Network with elevation data at its nodes
Ah thanks -- I hadn't realized that a TIN was specifically used for
elevation -- you could presumably use it for any conceptual "surface",
but they don't seem to use them to store values on the faces, only the
nodes, in any case.
> I wouldn't encourage it either, but it's a consequence of being compatible with CF and one may prefer to
> include this redundant data (for the time being) because of compatibility with existing tools (e.g. GIS tools
> may then at least be able to show the value, and if they support the bounds attribute they may also show
> face data as patches).
Here's where I'm not sure we agree -- if a given tool understands the
bounds then they can do the right thing -- if it doesn't it may
display values on the coordinate points, but I'm not sure I'd want
that.
And no existing tools (i think!) are going to understand the mesh
definition we are proposing anyway.
Updated examples forthcoming....