-
Notifications
You must be signed in to change notification settings - Fork 12
Compiling the code
Note
This page is a stub. The build options below are taken from build_glm.sh in the GLM 4
source, but the prerequisite lists and platform-specific notes still need to be written.
Once you have downloaded the code,
the bundle is built from the glm-source directory:
cd glm-source
./build_glm.sh
Automated builds of this repository are performed by the GitHub Actions workflow at
.github/workflows/compile.yml, which is the authoritative reference for a known-good build
environment.
build_glm.sh accepts the following arguments:
| Option | Purpose |
|---|---|
--help |
List available options |
--auto-prereq |
Attempt to install prerequisites automatically |
--with-aed / --without-aed
|
Build with or without the AED water quality libraries |
--with-aed-plus / --without-aed-plus
|
Build with or without the additional AED modules |
--with-lib / --without-lib
|
Build GLM as a linked library |
--no-gui |
Build without plotting/display support |
--debug |
Build with debugging enabled |
--mdebug |
Build with mixing debug output |
--checks |
Enable runtime checks |
--fence |
Enable memory fencing |
A compiler is selected with one of --gfort, --ifort, --ifx, --clang or --flang.
Build configuration is otherwise controlled by build_env.inc and build_aedlibs.inc in
glm-source. Use clean.sh to remove build artefacts.
- The prerequisite packages for each supported platform (notably NetCDF and the Fortran compiler).
- Which compiler versions are currently known to work, and known-bad combinations.
- Building on Windows.

Background
Getting started
- Downloading
- Running the model
glm4.nmlconfiguration file- Tutorials & examples
- Navigating GLM outputs
Advanced use
- Command line options
- Restarting a simulation
- Customising the WQ setup
- Adding a new example lake
- Using GLM in R
- Using GLM in Python
Developer guide