using xdfopen on a .nc file

Lisa Murphy lmurphy at ATMOS.UMD.EDU
Mon Mar 27 16:44:09 EST 2006


Dear All,

My run of the Single column community climate model (SCAM) produced a netcdf
output file. SDFOPEN and OPEN didn't work so I opened it in GrADS by doing
an xdfopen on a data descriptor file (.ddf).  Under the grads website it
said to enter in the least amount of information into the ddf so that grads
pulls most of the information from the .nc file. So I tried it with just:

DSET /run_ctl_10yr.nc
XDEF lon 1 levels 23
YDEF lat 1 levels 35

The file opened and I was able to plot the data but when I tried to plot the
multiple level variables the vertical axis was upside down (1000mb was at
the top and 1mb at the bottom).

I tried creating another .ddf file by inputting zdef with the 26 levels in
the order in which you would put them if you were creating a regular control
file (not the order it appears when you do ncdump):

DSET /run_ctl_10yr.nc
XDEF lon 1 levels 23
YDEF lat 1 levels 35
ZDEF lev 26 levels 999.120684958666, 976.965519334695, 935.765736387855,
    872.828394498624, 792.798658152295, 701.239586497683, 604.275579011531,
    513.559441962607,  436.449217157429, 370.90429427665, 315.190036222099,
    267.831911732807, 227.576829588822, 193.359407868247, 164.273984606776,
    139.550908021003, 118.535909681669, 100.672811033688, 85.4888992285199,
    70.0591400000001, 53.1146000000002, 37.2302900000001, 23.94463,
    13.9672100000001, 7.38881300000002, 3.54463800000002

This gave the correct z-axis but the data wasn't right. I opened the same
file using the two .ddf files in the same grads session.  I set z=16 for
both files and then displayed the temperature.  The temperature was exactly
the same for the two .ddf files even though lev=139.551 in the first file
and lev=315.19 in the second file.  Could anybody tell me what I'm doing wrong??

Thank you!

Lisa



More information about the gradsusr mailing list