[gradsusr] reading in a netCDF file...ncdump

Jennifer Adams jma at cola.iges.org
Fri Mar 12 19:35:27 EST 2010


Hi, Joe --
The problem with your netcdf file is that your lat and lon coordinate  
variables are 2-dimensional. GrADS does not handle this kind of grid  
easily. You can bring it in on an abstract grid:
xdef 349 linear 1 1
ydef 277 linear 1 1
but then you won't be able to draw your data on a map. Your only  
recourse is to write a PDEF file to tell grads exactly how to map the  
grid points to a regular grid.

As for your other problem with sdfopen and xdfopen not being  
recognized commands, it is probably related to the configuration of  
the build you're using. Type 'q config' and check the output carefully  
to see what features are enabled in your build.
--Jennifer


On Mar 12, 2010, at 3:06 PM, joseph.pollina at noaa.gov wrote:

>
> The following is the output when I ncdump the netCDF file:
>
> dimensions:
>         y = 277 ;
>         x = 349 ;
>         level = 29 ;
>         time = UNLIMITED ; // (1 currently)
> variables:
>         float level(level) ;
>                 level:units = "millibar" ;
>                 level:actual_range = 1000.f, 100.f ;
>                 level:long_name = "Level" ;
>                 level:positive = "down" ;
>                 level:GRIB_id = 100s ;
>                 level:GRIB_name = "hPa" ;
>                 level:axis = "Z" ;
>                 level:coordinate_defines = "point" ;
>         float lat(y, x) ;
>                 lat:long_name = "latitude" ;
>                 lat:units = "degrees_north" ;
>                 lat:standard_name = "latitude" ;
>                 lat:axis = "Y" ;
>                 lat:coordinate_defines = "point" ;
>         float lon(y, x) ;
>                 lon:units = "degrees_east" ;
>                 lon:long_name = "longitude" ;
>                 lon:standard_name = "longitude" ;
>                 lon:axis = "X" ;
>                 lon:coordinate_defines = "point" ;
>         double time(time) ;
>                 time:units = "hours since 1800-1-1 00:00:0.0" ;
>                 time:long_name = "time" ;
>                 time:actual_range = 1569072., 1569069. ;
>                 time:delta_t = "0000-00-00 03:00:00" ;
>                 time:standard_name = "time" ;
>                 time:axis = "T" ;
>                 time:coordinate_defines = "point" ;
>         float xdist(x) ;
>                 xdist:long_name = "eastward distance from southwest  
> corner of domain in projection coordinates" ;
>                 xdist:units = "m" ;
>         float ydist(y) ;
>                 ydist:long_name = "northward distance from southwest  
> corner of domain in projection coordinates" ;
>                 ydist:units = "m" ;
>         float mslet(time, level, y, x) ;
>                 mslet:long_name = "Mean Sea Level (ETA model)  
> Pressure          " ;
>                 mslet:valid_range = -9.e+16f, 9.e+16f ;
>                 mslet:actual_range = -9.e+15f, 9.e+15f ;
>                 mslet:units = "Pa" ;
>                 mslet:missing_value = -9.96921e+36f ;
>                 mslet:_FillValue = -32767.f ;
>                 mslet:precision = 2s ;
>                 mslet:least_significant_digit = 1s ;
>                 mslet:var_desc = "Mean Sea Level (ETA model)  
> Pressure          " ;
>                 mslet:dataset = "NARR" ;
>                 mslet:level_desc = "È^Ô\räô·)º¼ä¤ô·Lf¼£Éã\b" ;
>                 mslet:statistic = "Composite" ;
>                 mslet:parent_stat = "Other" ;
>                 mslet:standard_name = "Default" ;
>         int Lambert_Conformal ;
>                 Lambert_Conformal:grid_mapping_name =  
> "lambert_conformal_conic" ;
>                 Lambert_Conformal:standard_parallel = 50., 50. ;
>                 Lambert_Conformal:longitude_of_central_meridian =  
> -107. ;
>                 Lambert_Conformal:latitude_of_projection_origin =  
> 50. ;
>                 Lambert_Conformal:false_easting = 5632642.22547 ;
>                 Lambert_Conformal:false_northing = 4612545.65137 ;
>
> // global attributes:
>                 :Conventions = "CF-1.0" ;
>                 :title = "Composite Value" ;
>                 :history = "dummy file: created in web ap" ;
>                 :comments = "Data is from North American Regional  
> Reanalysis\n",
>                         "(8x/day).  It consists of most variables  
> interpolated to\n",
>                         "pressure surfaces from model (sigma)  
> surfaces." ;
>                 :institution = "National Centers for Environmental  
> Prediction" ;
>                 :platform = "Model" ;
>                 :references = "http://wwwt.emc.ncep.noaa.gov/mmb/rreanl/index.html 
> \n",
>                         "http://www.esrl.noaa.gov/psd/data/gridded/data.narr.html 
> " ;
>                 :description = "Computed from the web page http://www.esrl.noaa.gov/psd/narr/ 
>  at NOAA/ESRL PSD: monthly mean composite" ;
> data:
>
>  level = 1000, 975, 950, 925, 900, 875, 850, 825, 800, 775, 750,  
> 725, 700,
>     650, 600, 550, 500, 450, 400, 350, 300, 275, 250, 225, 200, 175,  
> 150,
>     125, 100 ;
>
>  time = 51080.1711899228 ;
> }
>
> Joe
>
>
>
> ----- Original Message -----
>
>
> From: <joseph.pollina at noaa.gov>
>
> Date: Friday, March 12, 2010 2:53 pm
>
> Subject: reading in a netCDF file from NARR
>
>
> > I have been trying to read in a netCDF file that was creasted
> > using the NARR monthly composite site.  I've tried sdfopen and I
> > tried using xdfopen with a descriptor file, however, I'm not sure
> > if I configured the descriptor file correctly.  I've even tried
> > the narropen.gs script on the script library page, but again, not
> > sure if I am inputting the correct variables.  I was wondering if
> > anyone has any clue as to how to get this file open.
> > Also, for some reason, sdfopen and xdfopen is not recognized as a
> > command in grads.2.0.a7.1...at least at school, but xdfopen seems
> > to work ok at my office at work, not sure why that would be as
> > well (they are both the same versions).
> > Any help would be GREATLY appreciated.
> > Joe
> >
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Calverton, MD 20705
jma at cola.iges.org



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100312/ffb4a9d3/attachment-0003.html 


More information about the gradsusr mailing list