Skip to content

Wavewatch3

To locally compile Wavewatch3 on DelftBlue, please follow the following steps:

### Building WW3 on DelftBlue with cmake, GCC 8.5, and OpenMPI ###


## 1. Load modules ##

module load 2022r2
module load openmpi
module load netcdf-c
module load netcdf-fortran
module load metis
module load cmake

## 2. Setup environment variables ##

# netcdf-c #
export NETCDF_DIR=/apps/arch/2022r2/software/linux-rhel8-skylake_avx512/gcc-8.5.0/netcdf-c-4.8.1-kz7m3osaphp3uut6i2tg5a5mdqf7q64m
export NETCDF_LIBDIR=/apps/arch/2022r2/software/linux-rhel8-skylake_avx512/gcc-8.5.0/netcdf-c-4.8.1-kz7m3osaphp3uut6i2tg5a5mdqf7q64m/lib
export NETCDF_INCDIR=/apps/arch/2022r2/software/linux-rhel8-skylake_avx512/gcc-8.5.0/netcdf-c-4.8.1-kz7m3osaphp3uut6i2tg5a5mdqf7q64m/include

# netcdf-fortran #
export NETCDF_DIR=/apps/arch/2022r2/software/linux-rhel8-skylake_avx512/gcc-8.5.0/netcdf-fortran-4.5.3-vjqc2vv2me65uouytdvu2sw4jlbqkjyi:$NETCDF_DIR
export NETCDF_LIBDIR=/apps/arch/2022r2/software/linux-rhel8-skylake_avx512/gcc-8.5.0/netcdf-fortran-4.5.3-vjqc2vv2me65uouytdvu2sw4jlbqkjyi/lib:$NETCDF_LIBDIR
export NETCDF_INCDIR=/apps/arch/2022r2/software/linux-rhel8-skylake_avx512/gcc-8.5.0/netcdf-fortran-4.5.3-vjqc2vv2me65uouytdvu2sw4jlbqkjyi/include:$NETCDF_INCDIR

# nc-config #
export WWATCH3_NETCDF=NC4
export NETCDF_CONFIG=/apps/arch/2022r2/software/linux-rhel8-skylake_avx512/gcc-8.5.0/netcdf-c-4.8.1-kz7m3osaphp3uut6i2tg5a5mdqf7q64m/bin/nc-config

# metis #
export METIS_PATH=/apps/arch/2022r2/software/linux-rhel8-skylake_avx512/gcc-8.5.0/metis-5.1.0-gn7fgt42l45tb242f46ttymhhh2agptl

# compilers #
export CC=gcc
export FC=gfortran


## 3. Compile with cmake ##

# More info at: https://github.com/NOAA-EMC/WW3/tree/develop/model #

cd /scratch/$USER/WW3/WW3-develop
mkdir build
cd build
cmake .. -DSWITCH=/scratch/$USER/WW3/WW3-develop/model/bin/switch_Ifremer2 -DCMAKE_INSTALL_PREFIX=install
make
make install