-
Notifications
You must be signed in to change notification settings - Fork 12
Using GLM as a linked library
Note
This page is a stub and needs input from the maintainers. GLM 4 can be built as a library rather than a standalone executable, but the public API and a worked example are not yet documented here.
GLM can be compiled as a linked library, so that it can be driven from another program rather than run as a standalone executable. This is used for coupling GLM to external frameworks and for embedding it in larger modelling workflows.
Pass --with-lib to the build script (see
Compiling the code):
cd glm-source
./build_glm.sh --with-lib
Use --without-lib to build the standalone executable only.
In the 4.x line the AED coupling is provided through
libaed-api, a restructured interface
introduced in GLM 4. This replaces the direct coupling used in the GLM 3.x line, and is the
reason current glm-aed builds are not compatible with the archived
GLM3 repository.
- The public entry points exposed by the library build, and their calling conventions.
- A minimal worked example of driving GLM from an external program.
- How simulation state and time-stepping are controlled by the caller.
- Whether the library build supports the AED coupling, or hydrodynamics only.

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