[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java and choosing a parameter table to use



Charles:

Since the current Java netcdf library "understands" GRIB2, and if your
desired application is in Java, you might consider using the Netcdf
Tools (link in the Java NetCDF page, as well as tutorial for NCML
which is a "must read" before doing down this path) to create some
NCML
that would allow you to effectively change the names/units/etc.  If
you then aim your
application at the .ncml file, it's just like reading from the .nc
file except you get
all the "new" meta data.

Click on the "NCML" tab in the toosui.jar file, and first point it at
your original .nc file.
Edit the variables (check the tutorial about assigning new names) and then when
you're done, save it (as an .ncml file).

I've used this a lot to "restructure" netcdf files that were not in CF
compliant form.  I have
also encountered some very obtuse hdf5 files that could not be munged
into anything
usable, however.

tom

On 3/30/07, Ross,Charles H - PGPW-5 <address@hidden> wrote:




Hello all,



I hope this isn't a remedial question but I'm not a java expert and I'm
stumped.



I have a grib2 file (a GFS212 40KM grid).  I have no problem converting it
into a netcdf file using the following command:



java -Xmx512m ucar.nc2.iosp.grib.Grib2Netcdf 2007033006_gfs_40.grib
20070330_0600_in.nc

  I do not like how this file is parameterized (both variable names and
units) and would like to change this.  I see all the different tab files
available in the resources/grib/tables/ directory.  How would I go about
using another tab file (or one of my own) instead of what is default by
using the above command?

I have no problems using parameter tables using "gribtonc" (with grib1
files) with the –g option.  But this has me guessing.

Thanks as always for any help!!

-Charles



Charles Ross
Meteorologist
Bonneville Power Administration


  905 NE 11th Ave.
Portland , OR 97232

503-230-3159





--
Tom Whittaker
University of Wisconsin-Madison
Space Science & Engineering Center (SSEC)
Cooperative Institute for Meteorological Satellite Studies (CIMSS)
1225 W. Dayton Street
Madison, WI  53706  USA
ph: +1 608 262 2759

===============================================================================
To unsubscribe decoders, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
===============================================================================