Re: Routines for reading grib2 and BUFR [message #71486] |
Wed, 23 June 2010 02:43 |
jkeller
Messages: 35 Registered: October 2009
|
Member |
|
|
At this time your best bet is probably to use wgrib2
Thats what I'm currently doing to get my data into IDL.
> GRIB (and presumably GRIB2) and BUFR are two file formats that we plan
> to investigate for the next development cycle (IDL 8.1). It will be
> awhile yet but as we get to a Tech Preview for that release, I will
> post to the newsgroup and perhaps you can help us test it.
As I am waiting for that feature to be build-in for quite a while now,
I'd be glad if I could be of some help.
Sincerely
Jan
|
|
|
Re: Routines for reading grib2 and BUFR [message #71492 is a reply to message #71486] |
Tue, 22 June 2010 10:51  |
Kenneth P. Bowman
Messages: 585 Registered: May 2000
|
Senior Member |
|
|
In article
<7b5ab75b-f2de-43cc-bf67-de7766d90c15@j8g2000yqd.googlegroups.com>,
Klemens <jokulhlaup@web.de> wrote:
> Hi all,
>
> working with Eumetsat satellite data, I am looking for routines to
> read grib2 and BUFR (Binary Universal Form for the Representation of
> meteorological data) data directly in IDL. I have played around with
> the IDL grib routine, but it does now work properly for grib2 data. I
> know the NCL library, but since I am working in the Windows
> environment, it is not very comfortable. To read BUFR, I have not
> found anything, that seems to be applicable for me. May be there is
> somebody out there who faced the same problems and spent some effort
> to code something in IDL...
>
> Thank for your help in advance !
>
> Cheers,
>
> Klemens
At this time your best bet is probably to use wgrib2
http://www.cpc.noaa.gov/products/wesley/wgrib2/
to convert the files to binary, then read the binary
files using standard IDL I/O.
I have only done this with wgrib, not wgrib2, but it should
be very similar.
I have generally found that compiling wgrib is easy, even for
a non-C programmer like me. Just cc it to make an executable.
The approach that I use is:
1. Use wgrib to generate an inventory of the records in the file.
2. Parse the inventory file to identify records that you want to read
(create a subset of the inventory records). STRSPLIT is your friend.
3. Use wgrib to convert the grib file to a binary file, copying
only the records you selected in step 2.
4. Read the binary file into IDL using unformatted I/O.
All of this can be done within an IDL program (on a unix-based
system, I guess) by using SPAWN to run wgrib.
It is ugly, but it works. Good luck.
Ken
|
|
|
Re: Routines for reading grib2 and BUFR [message #71496 is a reply to message #71492] |
Tue, 22 June 2010 08:09  |
bokubo
Messages: 38 Registered: July 2006
|
Member |
|
|
On Jun 22, 1:53 am, Klemens <jokulhl...@web.de> wrote:
> Hi all,
>
> working with Eumetsat satellite data, I am looking for routines to
> read grib2 and BUFR (Binary Universal Form for the Representation of
> meteorological data) data directly in IDL. I have played around with
> the IDL grib routine, but it does now work properly for grib2 data. I
> know the NCL library, but since I am working in the Windows
> environment, it is not very comfortable. To read BUFR, I have not
> found anything, that seems to be applicable for me. May be there is
> somebody out there who faced the same problems and spent some effort
> to code something in IDL...
>
> Thank for your help in advance !
>
> Cheers,
>
> Klemens
GRIB (and presumably GRIB2) and BUFR are two file formats that we plan
to investigate for the next development cycle (IDL 8.1). It will be
awhile yet but as we get to a Tech Preview for that release, I will
post to the newsgroup and perhaps you can help us test it.
Best regards,
Bill Okubo, IDL Product Manager
|
|
|
|