[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grib to netcdf conversion question
- Subject: Re: grib to netcdf conversion question
- Date: Tue, 13 Feb 2007 08:50:12 -0700 (MST)
On Mon, 12 Feb 2007, John Kelley wrote:
Mr. Ross,
Are you dealing with GRIB or GRIB2 GFS files?
Sincerely,
John Kelley
NOAA/National Ocean Service
Hello all,
I'm trying to convert model grib files into GFE/IFPS compatible file
formats using the Unidata Converter suite. So far I'm having no luck and
am seeking input from anyone who may be able to help.
Here's what I've done so far...
1. I'm using a GFS grib file for input.
2. Create a .cdl file:
$ gribtocdl -v -g awips.tbl 2007021212_gfs.grib >
gfs_2007021212.cdl
* I'm using a awips.tbl file that I found while browsing the
unidata archives
3. Create the nc file:
$ gribtonc -l - -g awips.tbl gfs_2007021212.cdl awips.nc <
2007021212_gfs.grib
Hi,
if the 2007021212_gfs.grib is in awips format then no Unidata decoder can
convert it to netCDF directly because we don't suppport AWIPS. Also the
gribtonc decoder is being deprecated for the the Java Grib Libraries. To
use the Java Grib libraries:
One needs to download the toolsUI.jar from the netCDF java page,
http://www.unidata.ucar.edu/software/netcdf-java/
set the classpath and run Grib2Netcdf
#/bin/csh -f
set CP="<yourpathtoo>toolsUI-2.2.18.jar"
java -Xmx512m -classpath $CP ucar.nc2.iosp.grib.Grib2Netcdf INPUT OUTPUT.NC
Don't forget to add the INPUT grib file and OUTPUT.NC names.
robb...
ps if the conversion didn't work, you can look at the data with the
ToolUI program by:
java -Xmx512m -classpath $CP ucar.nc2.ui.ToolsUI
My output here is interesting and may be problematic. Here is a
sample:
-------------
Feb 12 21:37:59 gribtonc[13996]: YHHD99 KWBC 121200, awips.nc nav. mismatch
Nx: 129 != 65
Feb 12 21:37:59 gribtonc[13996]: YHHD99 KWBC 121200, awips.nc nav. mismatch
Ny: 85 != 65
Feb 12 21:37:59 gribtonc[13996]: YHHD99 KWBC 121200, awips.nc nav. mismatch
La1: 7.838 != -20.826
Feb 12 21:37:59 gribtonc[13996]: YHHD99 KWBC 121200, awips.nc nav. mismatch
Lo1: -141.028 != -150
Feb 12 21:37:59 gribtonc[13996]: YHHD99 KWBC 121200, awips.nc nav. mismatch
Dx: 95250 != 381000
Feb 12 21:37:59 gribtonc[13996]: YHHD99 KWBC 121200, awips.nc nav. mismatch
Dy: 95250 != 381000
Feb 12 21:37:59 gribtonc[13996]: YHHD30 KWBC 121200, awips.nc nav. mismatch
Nx: 129 != 65
Feb 12 21:37:59 gribtonc[13996]: YHHD30 KWBC 121200, awips.nc nav. mismatch
Ny: 85 != 65
Feb 12 21:37:59 gribtonc[13996]: YHHD30 KWBC 121200, awips.nc nav. mismatch
La1: 7.838 != -20.826
Feb 12 21:37:59 gribtonc[13996]: YHHD30 KWBC 121200, awips.nc nav. mismatch
Lo1: -141.028 != -150
Feb 12 21:37:59 gribtonc[13996]: YHHD30 KWBC 121200, awips.nc nav. mismatch
Dx: 95250 != 381000
Feb 12 21:37:59 gribtonc[13996]: YHHD30 KWBC 121200, awips.nc nav. mismatch
Dy: 95250 != 381000
Feb 12 21:37:59 gribtonc[13996]: YUHD85 KWBC 121200, awips.nc nav. mismatch
Nx: 129 != 65
-------------
4. Even though I'm getting hundreds (thousands) of mismatch statements I
do get a large .nc file.
From there I'm tried to put it into my designated input directory in the
GFE/IFPS but do not see it available when I run the program.
Obviously I'm doing something wrong.
Can anyone out there help me? Thanks in advance for any
comments/suggestions, etc, I really appreciate it!
-Charles
-------------------
Charles Ross
Meteorologist
Bonneville Power Administration
905 NE 11th Ave.
Portland , OR 97232
503-230-3159
address@hidden
===============================================================================
Robb Kambic Unidata Program Center
Software Engineer III Univ. Corp for Atmospheric Research
address@hidden WWW: http://www.unidata.ucar.edu/
===============================================================================