Re: 2D coordinate variables

John Caron (caron@ucar.edu)
Wed, 04 Jun 1997 12:22:24 -0600

John Sheldon wrote:
> 
> In the example from the Unidata web page:
> 
>          float u(record, z, x, y);
>                  u:z = "vpt, p";
>          float p(record, z, x, y);
>          float vpt(record, z, x, y);
> 
> the fact that "u", "p", and "vpt" are defined on the same grid doesn't
> tell you anything more than that.  But the referential attributes do,
> indeed, provide additional information! They tell you that coordinates for
> points along the z-dimension for variable "u" can be found in variables
> "vpt" or "p".  Suppose there were also a variable
> 
>          float wspeed(record, z, x, y);
> 
> The referential attributes assign special significance to the variables
> "vpt" and "p" that is not true of "wspeed".  Thus, there *is*
> additional information being provided!

Here is the crux of the matter. In mathematical notation, z just means
altitude, 
so using u(z) and wspeed(z) in the same netcdf file, but actually being
on different z levels makes sense.  Clearly you couldnt use a coordinate
variable (1d or 2d) to indicate that, and a coordinate reference comes
to the rescue.

However, if you have swallowed coordinate variables hook, line and
sinker, so that z actually means the coordinate grid, then you need to
define two different z's, one for wspeed and one for u.  Then the
generalization to 2d coordinate variables seems natural, and damn the
torpedoed "existing software". :^}