Skip to content

0D driver

Jorn Bruggeman edited this page Jan 11, 2024 · 13 revisions

FABM box model

FABM's 0d driver allows you to run FABM models in a "fully-mixed box", under arbitrary (time-varying) environmental forcing.

Prerequisites

To build the 0d driver from source, you will need:

  1. The FABM source code
  2. CMake 3.13 or later
  3. A supported Fortran compiler
  4. The source code of the General Ocean Turbulence Model (GOTM), which is used for input-output, time integration and calculation of density and solar radiation. You will need the latest stable release of GOTM; the developers' version (master branch) will not work. Make sure you download the GOTM source code including submodules.
  5. If you build with NetCDF output support (the default; see also the FABM_USE_NetCDF option below), you will need the NetCDF library with its Fortran library interfaces. For Windows, this is included with GOTM.

Building

Building is done with CMake, which recognizes the following arguments:

CMake setting value
Source directory <FABMDIR>/src/drivers/0d
Additional required arguments GOTM_BASE=<GOTMDIR>
Optional arguments FABM_USE_NetCDF=OFF to disable NetCDF support (ON by default)

In a terminal window, the following usualy suffices to build:

mkdir build
cd build
cmake <FABMDIR>/src/drivers/0d -DGOTM_BASE=<GOTMDIR>
cmake --build . --target install

This creates a executable at ~/local/fabm/0d/bin/fabm0d on Linux and Mac, and at %LOCALAPPDATA%\fabm\0d\bin\fabm0d.exe on Windows.