Hello all,
I've been following the discussion about coordinate mapping conventions with
interest. I have another proposal that I'd like to suggest.
It seems to me that support for components and data to coordinate mapping
can be solved by adding a small extension to the netCDF language. Why not
add support for something analogous to C structures. For instance, we might
have the following definition:
float u(lat,lon,depth);
float v(lat,lon,depth);
float w(lat,lon,depth);
struct velocity { u,v,w };
All components of the structure would have to have the same number and
size dimensions. Components of a structure could be addressed in the
same way as the C language, i.e. velocity.u, velocity.v, and
velocity.w. Also, a new function to retrieve the components of a
structure would be added; something like:
ncstructinq(int cdfid, int varid, char *name, int* ncomps,
int comps[]);
where:
cdfid = netCDF id
varid = variable id
name = variable name
ncomps = number of components
comps = vector of component ids
The problem of defining data to coordinate space transformations would also be
addressed by this extension. For instance, Rich Signell's example of
an ocean surface drifter could be handled by the following definition:
Dimensions: size = 1000
Variables:
float lat(size);
float lon(size);
struct position { lat, lon };
float temp(position);
Comments?
---------
Joe Sirott
JISAO
sirott@xxxxxxxxxxxxxxxxxxxxxxxxxx