This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
On Tue, 30 Apr 2002, Unidata Support wrote: > > ------- Forwarded Message > > >To: address@hidden > >From: David Ovens <address@hidden> > >Subject: converting ETA 104 GRIB file to netCDF > >Organization: University of Washington > >Keywords: 200204302322.g3UNMna26603 netCDF gribtonc CDL ETA > > Hello, > > I need to convert the ETA 104 GRIB files to netCDF format. I am a > novice netCDF person. I tried using gribdump to put together a *.cdl > file like I have for some other models, and then tried using gribtonc, > but I don't get any of the gridded data in the netCDF file -- I just > get the data I entered in the cdl file. Do you have any suggestions? > > Thanks for any help. > David, The way I debug gribtonc is to run it from the command line with verbose mode, ie % gribtonc -vl - eta104.cdl eta104.nc < eta104.input One can also send it to a log file, % gribtonc -vl log eta104.cdl eta104.nc < eta104.input Usually the output gives enough information to solve the problem. At this time, I'm preparing for a workshop as a presenter so I will not have time to take a detail look at this problem until later next week. Keep me informed of your status, also I would appreciate a copy of a working cdl if you solve the problem. Thanks, Robb... > Here is my eta104.cdl file for sea-level pressure and Z at 500 mb: > > ======================================================================= > netcdf eta { // ETA 40km model in Polar Stereographic Projection > > dimensions: > > record = UNLIMITED ; // (reference time, forecast time) > level = 1 ; // isobaric levels for most parameters > > x = 147 ; > y = 110 ; > datetime_len = 21 ; // string length for datetime strings > nmodels = 3 ; // both 80km and 48km models > accum = 2 ; // time range for accumulations > nav = 1 ; // For navigation. Variables that use > // this dimension define a mapping between > // (x,y) indices and (lat,lon) coords. > > nav_len = 100 ; // max length for navigation character strings > > > variables: > > double reftime(record) ; // reference time of the model > reftime:long_name = "reference time" ; > reftime:units = "hours since 1992-1-1" ; > > double valtime(record) ; // forecast time ("valid" time) > valtime:long_name = "valid time" ; > valtime:units = "hours since 1992-1-1" ; > > :record = "reftime, valtime" ; // "dimension attribute" -- means > // (reftime, valtime) uniquely > // determine record > > char datetime(record, datetime_len) ; // derived from reftime > datetime:long_name = "reference date and time" ; > // units YYYY-MM-DD hh:mm:ssZ (ISO 8601) > > float valtime_offset(record) ; // derived as valtime-reftime > valtime_offset:long_name = "hours from reference time" ; > valtime_offset:units = "hours" ; > > float level(level) ; > level:long_name = "level" ; > level:units = "hectopascals" ; > > int model_id(nmodels) ; > model_id:long_name = "generating process ID number" ; > > // navigation variables all use nav dimension > > char nav_model(nav, nav_len) ; // navigation parameterization > nav_model:long_name = "navigation model name" ; > > int grid_type_code(nav) ; > grid_type_code:long_name = "GRIB-1 GDS data representation > type" ; > > char grid_type(nav, nav_len) ; > grid_type:long_name = "GRIB-1 grid type" ; > > char grid_name(nav, nav_len) ; > grid_name:long_name = "grid name" ; > > int grid_center(nav) ; > grid_center:long_name = "GRIB-1 originating center ID" ; > > int grid_number(nav) ; > grid_number:long_name = "GRIB-1 catalogued grid numbers" ; > grid_number:_FillValue = -9999 ; > > char earth_shape(nav, nav_len) ; > earth_shape:long_name = "assumed earth shape" ; > > char x_dim(nav, nav_len) ; > x_dim:long_name = "x dimension name" ; > > char y_dim(nav, nav_len) ; > y_dim:long_name = "y dimension name" ; > > int Nx(nav) ; > Nx:long_name = "number of points along x-axis" ; > > int Ny(nav) ; > Ny:long_name = "number of points along y-axis" ; > > float La1(nav) ; > La1:long_name = "latitude of first grid point" ; > La1:units = "degrees_north" ; > > float Lo1(nav) ; > Lo1:long_name = "longitude of first grid point" ; > Lo1:units = "degrees_east" ; > > byte ResCompFlag(nav) ; > ResCompFlag:long_name = "resolution and component flags" ; > > float Lov(nav) ; > Lov:long_name = "orientation of the grid" ; > Lov:units = "degrees_east" ; > > float Dx(nav) ; > Dx:long_name = "x-direction grid length" ; > Dx:units = "meters" ; > > float Dy(nav) ; > Dy:long_name = "y-direction grid length" ; > Dy:units = "meters" ; > > byte ProjFlag(nav) ; > ProjFlag:long_name = "projection center flag" ; > > float Latin1(nav) ; > Latin1:long_name = "first intersecting latitude" ; > Latin1:units = "degrees_north" ; > > float Latin2(nav) ; > Latin2:long_name = "second intersecting latitude" ; > Latin2:units = "degrees_north" ; > > float SpLat(nav) ; > SpLat:long_name = "latitude of the southern pole" ; > SpLat:units = "degrees_north" ; > > float SpLon(nav) ; > SpLon:long_name = "longitude of the southern pole" ; > SpLon:units = "degrees_east" ; > > // end of navigation variables > > // global attributes: > :history = "created by gribtonc from HDS broadcast" ; > :title = "NCEP Global Product Set" ; > :Conventions = "NUWG" ; > :version = 0.0 ; // still just a draft > > float Psl_et(record, y, x) ; > Psl_et:long_name = "mean sea level pressure (ETA model > reduction)" ; > Psl_et:units = "Pa" ; > Psl_et:_FillValue = -9999.f ; > Psl_et:navigation = "nav" ; > > float Z(record, level, y, x) ; > Z:long_name = "geopotential height" ; > Z:units = "gp m" ; > Z:_FillValue = -9999.f ; > Z:navigation = "nav" ; > > data: > > level = 500; > model_id = 83, 84, 89 ; > > // Navigation > nav_model = "GRIB1" ; > grid_type_code = 5 ; > grid_type = "Polar Stereographic" ; > grid_name = "AWIPS grid #104" ; > grid_center = 7 ; > grid_number = 104 ; > earth_shape = "oblate spheroid (IAU 1965)" ; > x_dim = "x" ; > y_dim = "y" ; > Nx = 147 ; > Ny = 110 ; > La1 = -0.2680 ; > Lo1 = -139.475006 ; > ResCompFlag = 8 ; > Lov = -105.0 ; > Dx = 90755 ; > Dy = 90755 ; > ProjFlag = 64 ; > } > ======================================================================= > > > -- > > David Ovens e-mail: address@hidden > (206) 685-8108 plan: Real-time MM5 forecasting for Pacific Northwest > Research Meteorologist > Dept of Atmospheric Sciences, Box 351640 > University of Washington > Seattle, WA 98195 > > > ------- End of Forwarded Message > > =============================================================================== Robb Kambic Unidata Program Center Software Engineer III Univ. Corp for Atmospheric Research address@hidden WWW: http://www.unidata.ucar.edu/ ===============================================================================