[gradsusr] problem reading netcdf file
Sara A. Rauscher
rauscher at lanl.gov
Wed Aug 31 13:33:56 EDT 2011
Hi-
I am having trouble getting grads to read output from CAM. I am using
grads version 2 -
Config: v2.0.a9 little-endian readline printim grib2 netcdf hdf4-sds
hdf5 opendap-grids,stn geotiff shapefile
When I open the file with sdfopen, it will not read the variable name.
When I do "q file", grads doesn't read the variable name:
ga-> q file
File 1 :
Descriptor: test.nc
Binary: test.nc
Type = Gridded
Xsize = 144 Ysize = 96 Zsize = 1 Tsize = 1 Esize = 1
Number of Variables = 1
0 t,y,x Sea level pressure
I've tried creating DDFs to use xdfopen but this doesn't work either.
This is a really simple file (see ncdump below) and I can read it with
ncview, NCL, etc.
thanks
sara
The ncdump of the netcdf file ("test.nc") looks like this
netcdf test {
dimensions:
lat = 96 ;
lon = 144 ;
time = UNLIMITED ; // (1 currently)
variables:
double lat(lat) ;
lat:long_name = "latitude" ;
lat:units = "degrees_north" ;
double lon(lon) ;
lon:long_name = "longitude" ;
lon:units = "degrees_east" ;
double time(time) ;
time:long_name = "time" ;
time:units = "days since 0001-07-01 00:00:00" ;
time:calendar = "leap" ;
time:bounds = "time_bnds" ;
float PSL(time, lat, lon) ;
PSL:units = "Pa" ;
PSL:long_name = "Sea level pressure" ;
PSL:cell_methods = "time: mean" ;
// global attributes:
:Conventions = "CF-1.0" ;
:source = "CAM" ;
:case = "test1" ;
:title = ;
:logname = "rauscher" ;
:host = "nid04099" ;
:Version = "$Name$" ;
:revision_Id = "$Id$" ;
:initial_file = "/global/homes/r/rauscher/cam_mpas/fv/test.nc" ;
:topography_file = "bnd_topo" ;
:history = "Wed Aug 31 10:28:36 2011: ncatted -a
calendar,time,o,c,leap test.nc\n",
"Wed Aug 31 10:28:17 2011: ncra -v PSL
test1.cam2.h0.0002-01.nc test1.cam2.h0.0002-02.nc
test1.cam2.h0.0002-03.nc test1.cam2.h0.0002-04.nc
test1.cam2.h0.0002-05.nc test1.cam2.h0.0002-06.nc
test1.cam2.h0.0002-07.nc test1.cam2.h0.0002-08.nc
test1.cam2.h0.0002-09.nc test1.cam2.h0.0002-10.nc
test1.cam2.h0.0002-11.nc test1.cam2.h0.0002-12.nc
test1.cam2.h0.0003-01.nc test1.cam2.h0.0003-02.nc
test1.cam2.h0.0003-03.nc test1.cam2.h0.0003-04.nc
test1.cam2.h0.0003-05.nc test1.cam2.h0.0003-06.nc
test1.cam2.h0.0003-07.nc test1.cam2.h0.0003-08.nc
test1.cam2.h0.0003-09.nc test1.cam2.h0.0003-10.nc
test1.cam2.h0.0003-11.nc test1.cam2.h0.0003-12.nc
test1.cam2.h0.0004-01.nc test1.cam2.h0.0004-02.nc
test1.cam2.h0.0004-03.nc test1.cam2.h0.0004-04.nc
test1.cam2.h0.0004-05.nc test1.cam2.h0.0004-06.nc
test1.cam2.h0.0004-07.nc test1.cam2.h0.0004-08.nc
test1.cam2.h0.0004-09.nc test1.cam2.h0.0004-10.nc
test1.cam2.h0.0004-11.nc test1.cam2.h0.0004-12.nc
test1.cam2.h0.0005-01.nc test1.cam2.h0.0005-02.nc
test1.cam2.h0.0005-03.nc test1.cam2.h0.0005-04.nc
test1.cam2.h0.0005-05.nc test1.cam2.h0.0005-06.nc
test1.cam2.h0.0005-07.nc test1.cam2.h0.0005-08.nc
test1.cam2.h0.0005-09.nc test1.cam2.h0.0005-10.nc
test1.cam2.h0.0005-11.nc test1.cam2.h0.0005-12.nc test.nc" ;
:nco_openmp_thread_number = 1 ;
}
--
Sara A. Rauscher
(505) 606-0512
T-3 Fluid Dynamics
MS B216
Los Alamos National Lab
Los Alamos, NM 87545 USA
More information about the gradsusr
mailing list