On Fri, Dec 16, 2011 at 6:42 PM, Lisa Welp-Smith <span dir="ltr"><<a href="mailto:lwelp@ucsd.edu">lwelp@ucsd.edu</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Responding to Arlindo and Jim: Here is the ncdump output. Below I've<br>
also copied the sdfopen results. You might be right about the<br>
dimensions, but I'm not sure how to deal with that.<br>
<br></blockquote><div><br></div><div>You have 2 different time coordinates in this file: *time* and *mtime*. GrADS finds *time* first, and disregards the second one (*mtime*). There are a couple of ways of dealing with this. The simplest way is to create a DDF file, say "s85_v3.2_monthly.ddf" containing 2 lines:</div>
<div><br></div><div>DSET <a href="http://s85_v3.2_monthly.nc" target="_blank">s85_v3.2_monthly.nc</a></div><div>TDEF mtime 324 LINEAR 1jan2001 1mo</div><div><br></div><div>In GrADS, you open this file with</div><div><br>
</div><div>ga-> xdfopen s85_v3.2_monthly.ddf</div><div><br></div><div>This should give you all the variables indexed by *mtime* (but not *time* as grads allows only 1 time axis oer file.) Another possibility is to write a full blown control file, see the User's Guide: <a href="http://grads.iges.org/grads/gadoc/descriptorfile.html">http://grads.iges.org/grads/gadoc/descriptorfile.html</a></div>
<div><br></div><div> Good Luck,</div><div><br></div><div> Arlindo</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
% ncdump -h <a href="http://s85_v3.2_monthly.nc" target="_blank">s85_v3.2_monthly.nc</a><br>
netcdf s85_v3.2_monthly {<br>
dimensions:<br>
nv = 2 ;<br>
nchar = 20 ;<br>
lon = 72 ;<br>
lat = 48 ;<br>
time = 9862 ;<br>
proc = 8 ;<br>
rt = 3 ;<br>
spec = 1 ;<br>
mtime = 324 ;<br>
variables:<br>
float lon(lon) ;<br>
lon:long_name = "longitude" ;<br>
lon:standard_name = "longitude" ;<br>
lon:units = "degrees_east" ;<br>
lon:point_spacing = "even" ;<br>
float lat(lat) ;<br>
lat:long_name = "latitude" ;<br>
lat:standard_name = "latitude" ;<br>
lat:units = "degrees_north" ;<br>
lat:point_spacing = "even" ;<br>
int time(time) ;<br>
time:long_name = "time" ;<br>
time:units = "seconds since 2000-01-01" ;<br>
time:bounds = "time_bounds" ;<br>
int time_bounds(time, nv) ;<br>
int dt(time) ;<br>
dt:units = "seconds" ;<br>
dt:long_name = "time intervals" ;<br>
double year(time) ;<br>
year:long_name = "time as fractional year" ;<br>
int proc(proc) ;<br>
char lproc(proc, nchar) ;<br>
lproc:long_name = "flux components" ;<br>
int rt(rt) ;<br>
char lrt(rt, nchar) ;<br>
lrt:long_name = "region type" ;<br>
int spec(spec) ;<br>
char lspec(spec, nchar) ;<br>
lspec:long_name = "tracer species" ;<br>
float dxyp(lat, lon) ;<br>
dxyp:long_name = "area per grid cell" ;<br>
dxyp:units = "m2" ;<br>
dxyp:standard_name = "area" ;<br>
float area(rt, lat, lon) ;<br>
area:long_name = "land/ocean area per grid cell" ;<br>
area:units = "m2" ;<br>
int mtime(mtime) ;<br>
mtime:long_name = "output time" ;<br>
mtime:units = "seconds since 2000-01-01" ;<br>
double myear(mtime) ;<br>
myear:long_name = "output time (fractional year)" ;<br>
float co2flux_land(mtime, lat, lon) ;<br>
co2flux_land:long_name = "Land-atmosphere co2 flux" ;<br>
co2flux_land:units = "PgC/yr" ;<br>
co2flux_land:cell_methods = "lon: lat: sum" ;<br>
co2flux_land:cell_measures = "area: dxyp" ;<br>
float co2flux_ocean(mtime, lat, lon) ;<br>
co2flux_ocean:long_name = "Ocean-atmosphere co2 flux" ;<br>
co2flux_ocean:units = "PgC/yr" ;<br>
co2flux_ocean:cell_methods = "lon: lat: sum" ;<br>
co2flux_ocean:cell_measures = "area: dxyp" ;<br>
float co2flux_subt(mtime, lat, lon) ;<br>
co2flux_subt:long_name = "Subtracted co2 flux" ;<br>
co2flux_subt:units = "PgC/yr" ;<br>
co2flux_subt:cell_methods = "lon: lat: sum" ;<br>
co2flux_subt:cell_measures = "area: dxyp" ;<br>
float co2flux_excl(mtime, lat, lon) ;<br>
co2flux_excl:long_name = "Spin-up/down co2 flux" ;<br>
co2flux_excl:units = "PgC/yr" ;<br>
co2flux_excl:cell_methods = "lon: lat: sum" ;<br>
co2flux_excl:cell_measures = "area: dxyp" ;<br>
float taper(time) ;<br>
<br>
// global attributes:<br>
:title = "Jena inversion results" ;<br>
:history = "Inversion code by Christian Roedenbeck" ;<br>
:institution = "MPI Biogeochemistry, Jena" ;<br>
:references =<br>
"<a href="http://www.bgc-jena.mpg.de/~christian.roedenbeck/download-CO2/" target="_blank">http://www.bgc-jena.mpg.de/~christian.roedenbeck/download-CO2/</a>" ;<br>
:Conventions = "CF-1.1" ;<br>
:species = "co2" ;<br>
:yrfi = 1983 ;<br>
:yrfe = 2009 ;<br>
:dirname =<br>
"OUTPUTi12.079_1983-2009_fg.co2.S19b_M85j_Std18" ;<br>
:filename = "<a href="http://mu1.0_070_flux_monthly.nc" target="_blank">mu1.0_070_flux_monthly.nc</a>" ;<br>
:c0 = 342.5f ;<br>
:valid_period = "1985-2008 (inclusive)" ;<br>
:yrfi_valid = 1985 ;<br>
:yrfe_valid = 2008 ;<br>
:yrfi_taper = 1985 ;<br>
:yrfe_taper = 2008 ;<br>
}<br>
<br>
---------------------------------------------------<br>
ga-> sdfopen <a href="http://s85_v3.2_monthly.nc" target="_blank">s85_v3.2_monthly.nc</a><br>
Scanning self-describing file: <a href="http://s85_v3.2_monthly.nc" target="_blank">s85_v3.2_monthly.nc</a><br>
SDF file <a href="http://s85_v3.2_monthly.nc" target="_blank">s85_v3.2_monthly.nc</a> is open as file 1<br>
LON set to -180 175<br>
LAT set to -90 90<br>
LEV set to 0 0<br>
Time values set: 1983:1:1:0 1983:1:1:0<br>
E set to 1 1<br>
ga-> q file<br>
File 1 : Jena inversion results<br>
Descriptor: <a href="http://s85_v3.2_monthly.nc" target="_blank">s85_v3.2_monthly.nc</a><br>
Binary: <a href="http://s85_v3.2_monthly.nc" target="_blank">s85_v3.2_monthly.nc</a><br>
Type = Gridded<br>
Xsize = 72 Ysize = 48 Zsize = 1 Tsize = 9862 Esize = 1<br>
Number of Variables = 4<br>
dt 0 t time intervals<br>
year 0 t time as fractional year<br>
dxyp 0 y,x area per grid cell<br>
taper 0 t taper<br>
ga-><br>
<div><div></div><div class="h5"><br>
<br>
On 12/16/11 2:19 PM, Lisa Welp-Smith wrote:<br>
> Hello,<br>
><br>
> I'm trying to open some netcdf files using 'sdfopen', but only a few<br>
> of the variables contained in the files are actually loaded into<br>
> grads. There are no error messages when using 'sdfopen'. 'ncdump'<br>
> shows that many more variables are in the netcdf files than what I get<br>
> listed using 'q file'.<br>
><br>
> I'm using:<br>
> GrADS v2.0.a7.1 little-endian readline printim grib2 netcdf hdf4-sds<br>
> hdf5 geotiff<br>
> NetCDF interface enabled<br>
> netcdf "3.6.2" of May 2 2008 13:36:26<br>
><br>
> And I'm running it on Ubuntu 11.04.<br>
><br>
> Any ideas what the problem may be? I was worried it was my 'udunits'<br>
> library for a while, but think that has been resolved.<br>
><br>
> Lisa<br>
><br>
<br>
<br>
--<br>
Lisa Welp<br>
Carbon Dioxide Research Group<br>
Scripps Institution of Oceanography<br>
9500 Gilman Dr. Mail Box 0244<br>
La Jolla, CA 92093-0244<br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><br>