# Re: Coordinate Systems Proposals

John Sheldon (jps@gfdl.gov)
Tue, 15 Jul 1997 11:01:27 -0400 (EDT)

```Hi Brian-

Let me shorten up the email history a bit for those "listening in"...

I had some questions about the following:

dimensions:
i = 5;
j = 6;

variables:
float temp(i,j);
temp:coordinates = "lat, lon";
float lat(i,j);
float lon(i,j);

As the developer of an application which reads and generates 3-D
visualizations, I couldn't figure out how to map the coordinates in
variables "lat" and "lon" to the data point in temp. (Obviously, I
could guess, but that wasn't very objective.)

> > So...if we were to upgrade our Explorer module to handle the example
> > described above (ie, "curvilinear coordinates"), what should we store
> > in the X-array, and in the Y-array?  That is, suppose we want to plot
> > "temp(3,4)" as a color coded ball in a 2-D visualization.  If
> > "lat(3,4)=46" and "lon(3,4)=19" how do we know which one is latitude
> > (or "Y") and which one is longitude (or "X")?  Are "lat" and "lon"
> > keywords?
>
> Your question is really about how to interpret the coordinates.  The same

Actually, my question was more fundamental than an interpretation of
the coordinates.  (I can wire in a projection module later if I want to
display the data on a globe.)  At first, I usually just render the data
in a cartesian "box".  That is, I'm willing to take the lat's and lon's
and just treat them as "distances" along 2 axes, but I would like the
visualization to reflect the fact that, eg, the lon and lat spacing
differ, so that I can get something close to a "correct" aspect ratio.
What's the rule that tell me that lat(2,3) is the y-axis coordinate for
temp(2,3)?

> question exists in the simple case of rectilinear grids, e.g., in the case
>     dimensions:
> 	lat = 5;
> 	lon = 6;
>     variables:
> 	float temp(lat,lon);
> 	float lat(lat);
> 	float lon(lon);
>
> You still don't know that lat(lat) contains the latitude values if there
> are no name conventions.  Following COARDS you know that lat(lat) contains
> the latitude values if it has units of e.g., degrees_north.  The situation
> has not changed just because the grid is no longer rectilinear.  Basically
> the interpretation of the coordinates is a separate issue from how to
> identify which variables are the coordinates.

The older, rectilinear case really is unambiguous, at least in terms of
getting some nominal coordinates for the data points.  The data array
is dimensioned (lat,lon), so it's obvious which axis the coordinate
variables "lat" and "lon" apply to.

I have a feeling we've beaten just about all the life out of this issue
by now.  Unfortunately, I haven't yet seen the rule(s) that would
enable a piece of software to place a data array in a 3-D
visualization.  Hopefully, this will come in time...

John
```