[MITgcm-devel] NetCDF is cool

Martin Losch mlosch at awi-bremerhaven.de
Mon Sep 27 04:41:29 EDT 2004


Hi Ed,

I finally found some time to have a look at the MNC package. I am 
really impressed. Works nice for me. I still have to learn how to add 
output, but for a dumb user (like me) it's great.

May I make a suggestion regarding coordinate variables. You have 
probably thought about this long ago, and I may not put forward 
anything new. If that's so, tell me and I'll shut up.
You probably know about this coordinate and record variable stuff so I 
might be carrying coal to Newcastle, forgive me: A netcdf-variable is 
called a coordinate variable, when it has the same name as the 
corresponding dimension, e.g. if you call your netcdf-dimension 'X', 
you can call a variable X(of length X) and this is then a coordinate 
variable (I get my infromation from the NetCDF 3.3 or 3.5 user manual, 
I forget). The cool thing about this is that tools such as ncview ( 
http://meteora.ucsd.edu:80/~pierce/ncview_home_page.html ), usually 
recognize these coordinate variables and 1. do not display them and 2. 
use the information to display other non-coordinate variables. For 
example:
netcdf-dimension x,y,time (time being a record dimension)
coordinate-variables x(x), y(y), time(time)
record-variable theta(time,y,x)
will then be displayed automatically with the correct coordinates by 
ncview, ncbrowse, ferret and whatever tools there are. At the same time 
a variabe time(time,y,x) would be (and is) treated as a coordinate 
variable, and not displayed. This happens with variabe T and dimension 
T in the state.*.nc file. I realize that you cannot use coordinate 
variables properly because of the general orthogonal horizontal 
coordinates that should also take into account the cube-sphere case, 
but giving the record-dimension andthe temperature variable the same 
name T is a bit unfortunate for the above reasons.
What do you think?

Martin




More information about the MITgcm-devel mailing list