-
Notifications
You must be signed in to change notification settings - Fork 13
/
README.netcdf4
40 lines (24 loc) · 1.17 KB
/
README.netcdf4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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.