Skip to content

Numerical solver for the shallow water equations

Notifications You must be signed in to change notification settings

martinclaus/swm

Repository files navigation

Welcome to SWM

The SWM is a shallow water model developed at the GEOMAR Helmholtz Centre for Ocean Research Kiel within the research group of Richard Greatbatch. Project maintenance is done by Martin Claus and Willi Rath.

The Model

Here might be a good place for a list of features

Installation

A very brief list of what to do:

  • download the model source code
  • extract it
  • run the configure script (if UDUNITS and/or NETCDF libraries are installed in a non-standard-location, set the UDDIR and/or NETDIR variables or set CPPFLAGS and LDFLAGS)
  • adjust Makefile if needed

Setup

Again a very brief list:

  • adjust header files
  • run make
  • prepare input datasets
  • adjust namelists
  • run the model

Run as Docker container

You may run the model as a docker container. Readily build docker images are available at Docker hub as martinclaus/swm.

To run the model for a specific configuration, you must have the model.h and model.namelist file within the same directory. The absolut path to this directory is called ABS_CONF_PATH here. This directory must be mounted as the volume /run to be available inside the container. Since this directory is the only mounted volume inside the container, both input and output must located within that directory.

docker run -v ABS_CONF_PATH:/run martinclaus/swm:latest

The resources available to the container can be limited when running the container, see the Docker docs. For limiting the CPU usage there are basically two options, --cpus and --cpuset-cpus. The former limits the available CPU resources a container can use while the latter controls which physical cores are available to the container. Since the code uses shared-memory parallelism it is strongly recommended to use --cpuset-cpus. Note that using all available cores will lead to a performance penalty.

docker run -v ABS_CONF_PATH:/run --cpuset-cpus 0-1 martinclaus/swm:latest

Documentation

Todo

List of Applications

And some more!