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.
Wilfrid,The bad news is gribtonc decoder has been deprecated but the good news is there is a much easier decoder software. Your process of converting grib2 files to netcdf files is the hard way.
Look at page: http://www.unidata.ucar.edu/software/netcdf-java/There is a tutorial on the page, it provides a section on grid datasets. There is a program called ToolsUI to look at the data and display the data from it's raw format, ie grib2. It would be worth your time to download and run ToolsUI on your data sets.
There is also a low level converter located at: http://www.unidata.ucar.edu/software/decoders/The netcdf-java package is build ontop of the Grib-java decoder and hides the messing grib details from the user.
Hopefully this helps, Robb... On Tue, 4 Aug 2009, Wilfrid Schroeder wrote:
Hi Robb, I found your contact information online, I was wondering if you could help me with an error message I am getting when using the "gribtonc" decoder. The idea is to convert grib1 files into netcdf ones to use as input for a transport model designed to track volcanic emissions. I am using 1deg GFS grib2 data from NCEP (ftpprd.ncep.noaa.gov server, directory: /pub/data/nccf/com/gfs/prod), which I convert to grib1 using NCEP's "cnvgrib" tool and then I run UCAR's "gribtonc" to create the input netcdf file for the model. The conversion of grib2 to grib1 appears to be ok, and the installation of "gribtonc" passed the installation test suggesting it is also ok. However, when I run "gribtonc" I get the following : $ gribtocdl gfs.t06z.pgrbf00.grib1 > template.cdl $ gribtonc template.cdl 2009070906_gfs.nc < gfs.t06z.pgrbf00.grib1 -l log Segmentation fault $ more log Aug 04 09:59:05 gribtonc[29991]: Error parsing units: ln(kPa) Aug 04 09:59:05 gribtonc[29991]: 2009070906_gfs.nc: can't get units attribute for variable ln_pres For testing purposes I replaced the file "template.cdl" with a customized one that selects only the variables of interest (T, u, v, z) but the problem persisted. Any thoughts on the error message above? Thanks, Wilfrid
=============================================================================== Robb Kambic Unidata Program Center Software Engineer III Univ. Corp for Atmospheric Research address@hidden WWW: http://www.unidata.ucar.edu/ ===============================================================================