I have liked very much the wgrib program by Wesley Ebisuzaky for reading grib1 messages, so I have written a simple "wrapper" around that code to be used as a library in some of my C programs. My code is GPL and Wesley code is in public domain. As the library is used only internally at our lab, I attach the code to this e-mail. External interfaces are listed in grib.h, and at the end of grib.c a simple example "printout the grib" code is included. The code has been written mainly to read lat/lon data from global model runs, so there is not too much interface to other projections and suffer by all the limitations herited from wgrib. Feel free to use this code as You like. I have written a more complete interface to grib, but in C++, based on the same "Ebisuzaki" codebase. I add to the e-mail also this piece of code, but it is an overshoot (but is Ok to write GRIB files ;-)) Graziano. -- \ | / (@ @) -------------------------o00-(_)-00o----------------------------- LaMMA - Laboratorio per la Meteorologia e la Modellistica Ambientale Laboratory for Meteorology and Environmental Modelling Via Madonna del Piano, 50019 Sesto Fiorentino (FI) tel: + 39 055 4483049 fax: + 39 055 444083 web: www.lamma.rete.toscana.it e-mail: giuliani@xxxxxxxxxxxxxxxxxxxxx
Attachment:
griblib_c++.tar.gz
Description: application/gunzip
Attachment:
griblib.tar.gz
Description: application/gunzip
netcdfgroup
archives: