0D driver - fabm-model/fabm GitHub Wiki
FABM's 0d driver allows you to run FABM models in a "fully-mixed box", under arbitrary (time-varying) environmental forcing.
To build the 0d driver from source, you will need:
- The FABM source code
- CMake 3.13 or later
- A supported Fortran compiler
- 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.
- 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 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.