DINEOF for Windows


Jump to: navigation, search

The DINEOF can be build under Windows using MinGW and MSYS (http://www.mingw.org/). The official MinGW compilers support only Fortran 77, therefore we are using the MinGW compiler from http://gcc.gnu.org/wiki/GFortranBinariesWindows which includes gcc and gfortran 4.3.0.



mingw-get install gcc fortran mingw32-make msys-base

All commands below are entred in a MSYS shell (click on msys.bat in C:\MinGW\msys\1.0). If you don't have wget, you can use your web browser for downloading. The MSYS home directory is in C:\MinGW\msys\1.0\home\<your username>

Start MSYS shell and set PATH

export PATH=/c/MinGW/bin:$PATH
which gfortran gcc make

Compiling NetCDF

Download and decompress netcdf:

wget http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-3.6.3.tar.gz
tar -zxvf netcdf.tar.gz 
cd netcdf-3.6.3
./configure --disable-cxx --prefix $HOME/netcdf > config.log
make > make.log
make check > check.log
make install

Compiling ARPACK

ARPACK can be downloaded from http://www.caam.rice.edu/software/ARPACK/. If you use wget, you can download them with:

wget http://www.caam.rice.edu/software/ARPACK/SRC/patch.tar.gz
wget http://www.caam.rice.edu/software/ARPACK/SRC/arpack96.tar.gz

In UTIL/second.f, we removed the line 'EXTERNAL ETIME'. Otherwise you will see error messages complaining about undefined reference to `etime_'.

cd $HOME
which make gfortran
tar -xzvf arpack96.tar.gz
tar -xzvf patch.tar.gz
mv UTIL/second.f UTIL/second.f.bak
grep -v EXTERNAL UTIL/second.f.bak > UTIL/second.f
make FC=gfortran FFLAGS= MAKE=make ARPACKLIB=$HOME/ARPACK/libarpack.a lib

Compiling DINEOF

Download, extract dineof and go into the dineof folder. You can either modify the makefile variables OS, FORT, NETCDF_INC, NETCDF_LIB and ARPACK_LIB in the files Makefile and Compiler/mingw-gfortran.mk or define these variables at the command line:

make OS=mingw FORT=gfortran NETCDF_INC=$HOME/netcdf/include NETCDF_LIB=$HOME/netcdf/lib ARPACK_LIB=$HOME/ARPACK STATIC=ON
Personal tools