Is there some existing practice that I could consider adopting for
specifying the lower and upper subscript limits of a dimension?
netCDF says all subscript ranges are 1:n for Fortran, 0:n-1 for C.
However, several languages allow one to declare, e.g. Dow_Jones(1982:1987).
--------------------
I have been using attributes, e.g. for field Ex declared "real ex(0:50,0:90)":
...
dimensions:
xg = 51, yg = 91; // logically, (0:50), (0:90)
...
variables:
float Ex(yg, xg) ; // subscript order per C, not fortran.
Ex:dims = 0, 50, 0, 90 ; // indicates (0:50,0:90)
...
If I could put an attribute on dimension xg, I could use add_offset, say.
--------------------
Anyway, we are soon to adopt some convention in new software that will be
used by other people. This seems a good time to ask what convention other
people have cobbled together for this functionality.
----------------------------------------------------------------------
Bruce Langdon L-472 langdon@xxxxxxxx
Physics Department Fax: (510) 423-9969
Lawrence Livermore National Laboratory langdon@xxxxxxxxxxxx
Livermore, CA 94550 (510) 422-5444