NOAA / NCEP GRIB2

Eric Altshuler ela at COLA.IGES.ORG
Tue Feb 12 19:02:28 EST 2008


Oliver,

You should disregard the README.ncep and makefile.ncep. These are only for building wgrib2 in the NCEP environment, not for general users.

When I built wgrib2, I first looked into the 4 external libraries that are required: netcdf, zlib, libpng and jasper. On most linux systems, except old ones, zlib is already installed as part of the system software and is probably the current version (1.2.3). libpng may also be installed but probably an old version. When I built wgrib2, first I built the latest versions of libpng (1.2.24), jasper (1.900.1) and netcdf (3.6.2). These packages are included in wgrib2.tgz (although libpng version is 1.2.23). On most systems it is easy to build these libraries. In the 'grib2' directory, gunzip and untar each library package (except zlib). For libpng and jasper, just do

./configure
make

in their respective directories. For netcdf, do

./configure --enable-c-only
make check

in the netcdf-3.6.2 directory.

Next, go to the 'g2clib-1.0.5' directory and do:

make -f makefile_png

Finally, go to ../wgrib2. If you have a 64-bit machine, edit makefile_png and change /usr/lib to /usr/lib64. Then do:

make -f makefile_png

Each makefile_png already has the correct include and library paths for the netcdf, libpng and jasper libs. The zlib library is loaded from the system location /usr/lib(64). If all goes well, you should wind up with a wgrib2 executable.

Best regards,

Eric L. Altshuler
Assistant Research Scientist
Center for Ocean-Land-Atmosphere Studies
4041 Powder Mill Road, Suite 302
Calverton, MD 20705-3106
USA

E-mail: ela at cola.iges.org
Phone: (301) 902-1257
Fax: (301) 595-9793


----- Original Message -----
From: "Oliver König" <oliver at WINDFINDER.COM>
To: GRADSUSR at LIST.CINECA.IT
Sent: Tuesday, February 12, 2008 12:21:50 AM (GMT-0500) America/New_York
Subject: Re: NOAA / NCEP GRIB2

Hello,
I want to compile wgrib2 for Grads 2 and then process GFS gribfiles from
NCEP/NOAA. I downloaded ftp://ftp.cpc.ncep.noaa.gov/wd51we/wgrib2/wgrib2.tgz

What is the right way to compile wgrib2?

There are makefiles in grib2/ and there are makefiles in grib2/wgrib2/? Which
ones do I have to use in which order?

I don't understand the README.ncep at all!
# Compiling wgrib2 on blue is different .. using NCO compiled libraries
# (0) make sure you have a fresh copy from ftpprd
# (1) tar -xvf wgrib2.tar
# (2) cd grib2/g2clib-1.0.2
# (3) make -f makefile.ncep
# (4) cd ../wgrib2
# (5) compile.ncep

What does "Compiling wgrib2 on blue is different" mean? And what is "NCO
compiled libraries"? and what is meant by "make sure you have a fresh copy
from ftpprd"? What is makefile_ncep good for?

http://sidata.org/grads/gadoc/supplibs.html says: "Be sure to use
the --disable-netcdf configure option when building for GrADS version 2.0."

Please help. thank you!

Regards,
--
Oliver König



More information about the gradsusr mailing list