NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: Grib<-->NetCDF via GrADS

Hi,

> 
> Some time ago, I talked with Russ Rew at Unidata about whether there
> was a utility for converting Grib data to netCDF, but the answer at
> that time was "no", at least not something that was general.  One
> concern was how to reconstitute 3D fields from the 2D slabs in Grib.
> 
> I recently learned of your "lats4d" GrADS script which, among other
> things, converts Grib data to netCDF.  I took a look at what lats4d
> produced and it looked pretty good!  I'm not sure how you solved the
> 2D-to-3D reconstitution, or if there are limitations on the variety
> of Grib files that lats4d will accept, but this certainly looks like
> a very useful capability.
>

Here is how it works. Given a GRIB file you have to create a grads
control (ctl) and grib map (gmp) files providing the necessary
metadata for GrADS to be able to read the GRIB file (I believe this is
the 2D-to-3D reconstruction you are referring to).  Usually GRIB files
produced by the NCEP re-analysis already come with these ctl and gmp
files. If not, there is a very nice perl utility called grib2ctl.pl which
automatically greates this metadata for you; see

     http://wesley.wwb.noaa.gov/grib2ctl.html

I have used grib2ctl for both NCEP and ECMWF GRIB files. 

> I am CC-ing Russ on this, but I was also wondering if you planned on
> passing this on to Unidata as "contributed" software?

I'd be more than glad to share this script with others. However, I am
still in the process  of improving LATS4D, so it may be better for
Russ to refer to the LATS4D page:

    http://dao.gsfc.nasa.gov/software/grads/lats4d/

BTW, lats4d can convert GRIB-->NetCDF/COARDS as well as
NetCDF/COARDS-->GRIB. More generally, it can convert any GrADS
redalble format (IEEE, GRIB, NetCDF or HDF-SDS) to GRIB, NetCDF, or
HDF-SDS. Although it uses GrADS, there is a sh(1) script which hides
this fact from you. You don't need to learn GrADS to use lats4d, but
you must have GrADS version 1.7beta9 or later installed on your
system.

I am trying to CC: this message to the netcdfgroup, although
most of my recent postings are being rejected since I have
no idea which e-mail address I am registered under.

  Cheers!

        Arlindo.

-- 
Arlindo da Silva
arlindo@xxxxxxxxxxxxxxxxxxxxx




  • 1999 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: