4/2009 General Installation Edit the file "makefile" and select the desired options: # netcdf3: write netcdf files with netcdf-3 library # netcdf4: write netcdf files with netcdf-4 library # regex: regular expression package used by (match,not), POSIX-2 # tigge: enable -tigge option for tigge names # mysql: write to mysql files # # the flags are stored in wgrib2/config.h # USE_NETCDF4=1 USE_NETCDF3=0 USE_REGEX=1 USE_TIGGE=1 USE_MYSQL=0 On some machines, you will have to define the C compiler and C preprocessor. On the NCEP's AIX, I have to define them by export CC=/usr/vacpp/bin/xlC_r export CPP=/usr/bin/cpp Then you have to run gnu make. (gmake on some machines, make on others) make - on linux gmake - on AIX INSTALLING on windows XP On the cygwin development system, you need to install many packages. Please install the jasper library because the included jasper source code has some problems compiling. Once the makefile points to the pre-compiled jasper headers/library, the code can be compiled. See makefile_sys_jasper. INSTALLING on FreeBSD Try make -f makefile_all_libs_new INSTALLING on Apple OS-X Has been done. No details. INSTALLING on AIX Define CC and CPP environment variables. Use gmake. export CC=/usr/vacpp/bin/xlC_r export CPP=/usr/bin/cpp Optional Packages You can edit the makefile to include optional packages. 1 means include the package and 0 means don't include the package. Comments on Netcdf The makefile is set up to use either netcdf v3 or netcdf v4. Netcdf-4 makes wgrib2 much bigger, so don't install it unless you really have to. The source code for netcdf-4 (and necessary hdf5) is also very big and will have to be downloaded separately. The netcdf-3 library is included with this distribution. The library is compiled in enable-C-only mode which is not be that useful for fortran code. Don't use try to link other codes to this library. The netcdf-4 library has to be downloaded with the HDF5 library. The libraries are compiled in enable-C-only mode. Static vs Dynamic Libraries The various libraries can be created in both dynamic and static versions. I've tried to make the add-on libraries static. Problems 1) compiling jasper (jpeg2000) 2) compiling netcdf 3) missing libraries (png, jpeg, z) 4) netcdf may need compile options for 64-bit machines These are problems best addressed by someone who knows the system. For example if you have Linux distribution, XYZ, you would be wise to consult a computer savy person familiar with XYZ.