comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: experience with idl_grib package?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: experience with idl_grib package? [message #60224] Mon, 12 May 2008 08:15 Go to next message
wgallery is currently offline  wgallery
Messages: 32
Registered: December 1998
Member
On May 8, 2:45 pm, sarale <sara.le...@gmail.com> wrote:
> Dear group users,
> I am rather new to IDL and completely new to the GRIB data format. I
> have tried to figure out how to read GRIB data into IDL and have found
> several packages on the web, seemingly all based on the rather old
> wgrib c programme. The latest package I found at ITTs webpage by Andy
> Pursch (http://www.ittvis.com/codebank/search.asp?FID=488), and it was
> easy to install and seems to be running fine. My problem, however, is
> that the documentation is quite poor and I cannot understand the
> obejct structure created. For example, I cannot see how to identify
> which parameter is in each "record", or what time of day it
> represents. Also, I work with ECMWF data which apparently use
> different parameter codes than the official WMO. Can anybody help with
> some good advice on how to advance?
> Yours sincerly,
> Sara.

Sara,

I use the NCAR Command Language (ncl) package from NCAR (http://
www.ncl.ucar.edu/overview.shtml) to convert grib files to NetCDF
format. I find NetCDF files much easier to use, with good support in
IDL. After converting to NetCDF you can use ncdump (http://
www.unidata.ucar.edu/software/netcdf/docs/ncdump-man-1.html) to get a
summary of the file contents or use David Fanning new IDL NetCDF file
browser (http://www.dfanning.com/fileio_tips/ncdf_browser.html) to
view the contents.

Note that the resulting NetCDF file will be two or three times larger
than the grib file.

ncl is available for most platforms, including Linux and Window
(cygwin). The two ncl programs you want to use are:
1: ncl_filedump: like ncdump, dumps a summary of the grib file
2: ncl_convert2nc: converts a grib (grib1 or grib2) file to NetCDF
format.



I have used ncl_convert2nc on ECMWF files with good results.

Good luck,

Bill Gallery
Atmospheric and Environmental Research, Inc.
Lexington, MA
Re: experience with idl_grib package? [message #60385 is a reply to message #60224] Wed, 14 May 2008 02:31 Go to previous message
sarale is currently offline  sarale
Messages: 2
Registered: May 2008
Junior Member
On 12 Maj, 17:15, Bill Gallery <wgall...@aer.com> wrote:
> On May 8, 2:45 pm, sarale <sara.le...@gmail.com> wrote:
>
>> Dear group users,
>> I am rather new to IDL and completely new to the GRIB data format. I
>> have tried to figure out how to read GRIB data into IDL and have found
>> several packages on the web, seemingly all based on the rather old
>> wgrib c programme. The latest package I found at ITTs webpage by Andy
>> Pursch (http://www.ittvis.com/codebank/search.asp?FID=488), and it was
>> easy to install and seems to be running fine. My problem, however, is
>> that the documentation is quite poor and I cannot understand the
>> obejct structure created. For example, I cannot see how to identify
>> which parameter is in each "record", or what time of day it
>> represents. Also, I work with ECMWF data which apparently use
>> different parameter codes than the official WMO. Can anybody help with
>> some good advice on how to advance?
>> Yours sincerly,
>> Sara.
>
> Sara,
>
> I use the NCAR Command Language (ncl) package from NCAR (http://www.ncl.ucar.edu/overview.shtml) to convert grib files to NetCDF
> format. I find NetCDF files much easier to use, with good support in
> IDL. After converting to NetCDF you can use ncdump ( http://www.unidata.ucar.edu/software/netcdf/docs/ncdump-man- 1.html) to get a
> summary of the file contents or use David Fanning new IDL NetCDF file
> browser (http://www.dfanning.com/fileio_tips/ncdf_browser.html) to
> view the contents.
>
> Note that the resulting NetCDF file will be two or three times larger
> than the grib file.
>
> ncl is available for most platforms, including Linux and Window
> (cygwin). The two ncl programs you want to use are:
> 1: ncl_filedump: like ncdump, dumps a summary of the grib file
> 2: ncl_convert2nc: converts a grib (grib1 or grib2) file to NetCDF
> format.
>
> I have used ncl_convert2nc on ECMWF files with good results.
>
> Good luck,
>
> Bill Gallery
> Atmospheric and Environmental Research, Inc.
> Lexington, MA

Dear Bill,
Thank you very much for your answer.
I have looked up the NetCDF format and I see that indeed there are
some built-in procedures for handling it in IDL. But I cannot find any
procedures that readily handle the imported data as geographic data -
i.e. allwoing me to e.g. extract data for a sub-area of the original
map. I can get the information about the dimensions on one hand and
the data array on the other hand, but I would imagine that there were
some kind of "handles" ready to further manipulate the data - are
there?
I have by now "cracked" the GRIB code and understood the data
structure returned by the IDL_GRIB procedures, but I am reluctant to
start writing procedures for handling the data before I make sure
there isn't already such code available (assuming that I am not the
only one in need of this type of operations and that there are better
programmers than me out there...). It would seem worth the trouble
installing the NetCDF library to convert GRIB to NetCDF if that would
provide me with more data handling procedures than merely reading
metadata and data.
Maybe I have too high expectations as to what IDL can do?
Sara.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Modification of Linestyle (dots, dashes too far apart)
Next Topic: experience with idl_grib package?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 14:54:29 PDT 2025

Total time taken to generate the page: 0.54970 seconds