gotm-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
To install GOTM-FABM-ERSEM, we suggest you use the following script below
1#!/bin/bash
2BRANCH="master"
3CMAKE_FLAG=""
4while getopts ":b:f:" flag; do
5 case "${flag}" in
6 b) BRANCH=${OPTARG};;
7 f) CMAKE_FLAG=${OPTARG};;
8 esac
9done
10
11CPU="$(nproc)"
12
13echo "Cloning ERSEM"
14git clone https://github.com/pmlmodelling/ersem.git
15
16echo "Cloning FABM"
17git clone https://github.com/fabm-model/fabm.git
18
19echo "Cloning GOTM"
20git clone https://github.com/gotm-model/code.git gotm
21cd gotm && git checkout v6.0 && git submodule update --init --recursive && cd ..
22
23echo "Checking out branch: $BRANCH"
24cd ersem && git checkout $BRANCH && cd ..
25
26echo "Building GOTM-FABM-ERSEM"
27mkdir build && cd build
28cmake ../gotm -DFABM_BASE=../fabm -DFABM_ERSEM_BASE=../ersem $CMAKE_FLAG
29make install -j $CPU
If you experience NetCDF issues when running make install
, see tips
and tricks/troubleshooting.
Now you should have a GOTM executable with FABM and ERSEM support at
~/local/gotm/bin/gotm
.