		     Compiling wgrib2 with netcdf-4

9/2013:

It has been a long time since I compiled wgrib2 with netcdf4.
To get the makefile working with the new netcdf4 and hdf5 src
code required a couple of days of working.

Configuration:

In the makefile, change the configuration to 

USE_NETCDF3=0
USE_NETCDF4=1


Then you have to set the environment variables to the C and F90 compilers
and run gnu make.

(bash example)

export CC=gcc               (set the C compiler)
export FC=gfortran          (set the f90 compiler)
make                        (on some machines this gnu make could be called gmake)

The make will respond with an error message that you need to get the netcdf4 source code.
You can get the source code using wget.

make                        (on some machines this gnu make could be called gmake)

The make will respond with another error message that you need to get the hdf5 source code.
You can get the source code using wget.

make                        (third time is a charm)


This has been tested with gcc/gfortran and clang/gfortran on Ubuntu 12.04 (64 bits) and
with gcc/fortran on Redhat 5 and 6 (64-bits).

Notes: UCAR has a web page with help in compiling netcdf.
