https://www2.mmm.ucar.edu/wrf/bench/benchdata_v3911.html
#! /bin/bash
# https://support.hdfgroup.org/ftp/lib-external/szip/2.1.1/src/szip-2.1.1.tar.gz
# https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.2/src/hdf5-1.10.2.tar.bz2
# ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.6.1.tar.gz
# ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-fortran-4.4.4.tar.gz
# https://www2.mmm.ucar.edu/wrf/src/WRFV3.9.1.1.TAR.gz
# https://www2.mmm.ucar.edu/wrf/src/WPSV3.9.1.TAR.gz
# tcsh time jasper
export CURDIR=$(realpath $(dirname $0))
export PREFIX=$CURDIR/../run
export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
export CPPFLAGS="-I$PREFIX/include"
export LDFLAGS="-L$PREFIX/lib"
. /opt/intel/bin/compilervars.sh intel64
tar xf szip-2.1.1.tar.gz; cd szip-2.1.1/
./configure --prefix=$PREFIX; make -j 8; make install
cd $CURDIR
tar xf hdf5-1.10.2.tar.bz2; cd hdf5-1.10.2/
CC=mpiicc FC=mpiifort CXX=mpiicpc ./configure --prefix=$PREFIX --with-szlib=$PREFIX --enable-fortran
make -j 8; make install
cd $CURDIR
tar xf netcdf-4.6.1.tar.gz; cd netcdf-4.6.1/
CC=icc FC=ifort ./configure --prefix=$PREFIX --disable-dap; make -j 8; make install
cd $CURDIR
tar xf netcdf-fortran-4.4.4.tar.gz; cd netcdf-fortran-4.4.4/
CC=icc FC=ifort ./configure --prefix=$PREFIX; make -j 8; make install
export NETCDF=$PREFIX
export HDF5=$PREFIX
cd $PREFIX
tar xf $CURDIR/WRFV3.9.1.1.TAR.gz
cd WRFV3
echo "15\n\n" |./configure
./compile -j 8 em_real
cd $PREFIX
tar xf $CURDIR/WPSV3.9.1.TAR.gz
cd WPS
echo "19\n" | ./configure
./compile