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

Re: netCDF to GRIB converter



Hi Rosemary,

> NRL is looking for a converter to translate from netCDF to GRIB.  Do any of
> you have one or know where we could get hold of source code to do this?

You can use GrADS to read in netCDF data and write it out as GRIB.
Arlindo da Silva wrote a script named lats4d for this purpose:

  http://dao.gsfc.nasa.gov/grads_listserv/msg01894.html

Also see the LATS library:

  http://www-pcmdi.llnl.gov/software/lats/README.test.html

NCAR's NCL (NCAR Command Language) can also do this, and rumors are
that it will soon be freely available.

However, keep in mind that it's not possible, in general, to convert
from netCDF to GRIB, because GRIB can only represent horizontal
2-dimensional slices on a grid.  NetCDF can represent data of
arbitrary dimensionality, vertical cross-sections, arrays of character
data, and metadata (such as attributes and named dimensions) that GRIB
is incapable of representing, so expect to lose information in going
from netCDF to GRIB.

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu