From: Chris Barker [mailto:chris....@noaa.gov
> > wrote:
>> From our point of view UGRID is an "on disc" serialised form of
>> the mesh. We will never use it in this form, rather it will be loaded
>> and converted to an "in memory" representation which we will use.
> This is the intent of UGRID. However, for the most part, for non-
> periodic meshes, it intentionally maps pretty well to at least some "in
> memory" representations.
> So if it could be extended a bit more to better map a periodic grid to
> an "typical" in-memory representation, that might be worth doing.
I understand the desire to have on-disc and in-memory representations
being as similar as possible. The problem we have in our case is that
the additional information we are attempting to convey, the domain
size, is not part of the mesh description itself. Instead it is a
separate but related piece of information inferred from it. We are just
trying to ensure there is enough information in the UGRID file to make
We can't simply store it as separate width and height fields as that
would only work for strictly rectangular meshes, which we may not have. Any mesh with ragged edges, a hexagon/pentagon mesh for instance, would fail with simple width and height.
The proposed solution should be general enough to cover all potential
use cases. David Ham's area of the wrap-around cells for instance.
The advantage of the proposed solution is that it does not change any
existing usage. Anyone with a non-periodic mesh will notice no
difference and on-disc and in-memory representations will be quite
It just makes work for those of us working with periodic meshes and
that is probably just the price we have to pay for doing something
Furthermore, even people using periodic meshes don't need to worry
about this issue if they don't care about the width of the wrap-around
Having written all of the above I can think of an alternative which I
present to the group for consideration.
Instead of an additional special node to hold the notional n+1 location
of the wrap-around node we could mark the wrap-around edge as special
and give it a length.
I think this would allow us to calculate all the properties we could want
of the wrap-around space such as extent and area. However it retains the
number of nodes of the non-periodic version.
Matthew Hambley - Dark Lord of the LFRic build system
Senior Scientific Software Engineer
Met Office Hadley Centre, Exeter, UK
...I have a ticket for that