fabm0d-ersem

To run the install script, you will need to have netCDF installed. An example of how to do this is here:

1#!/bin/bash
2
3echo "Installing netCDF"
4sudo apt update
5sudo apt install libnetcdff-dev cmake

To install FABM0d-GOTM-ERSEM we suggest you use the following script below

 1#!/bin/bash
 2
 3BRANCH="master"
 4CMAKE_FLAG=""
 5while getopts ":b:f:" flag; do
 6    case "${flag}" in
 7        b) BRANCH=${OPTARG};;
 8        f) CMAKE_FLAG=${OPTARG};;
 9    esac
10done
11
12CPU="$(nproc)"
13
14echo "Cloning ERSEM"
15git clone https://github.com/pmlmodelling/ersem.git
16
17echo "Cloning FABM"
18git clone https://github.com/fabm-model/fabm.git
19
20echo "Cloning GOTM"
21git clone https://github.com/gotm-model/code.git gotm
22# Od driver needs a stable version of GOTM, currently that is v6
23cd gotm && git checkout v6.0 && git submodule update --init --recursive && cd ..
24
25echo "Checking out branch: $BRANCH"
26cd ersem && git checkout $BRANCH && cd ..
27
28echo "Building FABM-GOTM-ERSEM"
29mkdir build && cd build
30cmake ../fabm/src/drivers/0d -DGOTM_BASE=../gotm -DFABM_ERSEM_BASE=../ersem $CMAKE_FLAG
31make install -j $CPU