I also recommend you look at the "wgrib" package (wesley.wwb.noaa.gov/wgrib.html).
Further reading:
The ECMWF web site is
www.ecmwf.int.
The BADC site is www.badc.rl.ac.uk
and their ERA-pages
are there too.
My code relies on sources from http://www.atmos.washington.edu/misc/PBL_LIB.html which I found from an altavista search on +harmonic +grid. You need only the routines sphere2grid.f and fft99f.f from their package, to do it my way. You can do it all their way, but I fould that their interface was heavily wrapped up in their own way of doing things.
Having decided that the interface they use to their prog was not what I wanted, I decided that a direct interface to their routine "trggen" was needed... so I wrote t1062ll.f and the associated script t1062ll.pl. This converts ECMWF T106 grib output into lat-long values, and all you have to do now is work out which way is up!
Note that the output is on a regular-longitude (starts at 0 and goes upwards) by gaussian-latitue grid. The BADC file about gaussian grids may help, or you may just prefer the gaussian latitudes file (note: this is n80 specific). A question sometimes asked is: "Is the first gridbox centered at 0E, or is 0E the longitude of the boxes western edge?". The answer is, I think, that the values are not gridbox values but point values, since they have been converted from the spectral representation. Therefore each value is a point, existing therefore at the given longitude-latitude.
So: if you have "reduced resolution" (ie 2.5 x 2.5 degree) files, you want badc2pp.pro. If you have T106 data, you want n802pp.pro. There are some support procedures: readfromfile.pro read in data from a binary/text file, and gofilename2header.pro reads data (year, month, etc) from the filename and puts it into a header block.
There is, of course, absolutely not warranty as to the accuracy of the code. I guarantee that there are some bugs still in it, but I don't know what they are...
Support: users of the code are expected to work things out for themselves. I'm not going to answer your Perl questions for you. But I may be prepared to offer some limited advice if you have problems.
If you likeed this, you might like some of my other Perl scripts