Skip to content

Source reference

The SWAT+ Fortran source has a generated API reference, built with FORD and published at

swat-model.github.io/swatplus

It is rebuilt for every release tag; on 20 October 2026 it shows "SWAT+ Model Sources (62.0.1)". The reference contains:

  • every module, derived type, subroutine and function in src/;
  • call and caller graphs;
  • the source of each .f90 file;
  • the comment block at the top of each routine, searchable.

This site and the FORD reference

Use this site for input and output files, model theory, calibration and running the model. Use the FORD reference to find what a routine does, which variables it reads and writes, and where it is called from. The collapsed Sources block at the end of each page names the routines behind it, which are the starting points in FORD.

Local build

The FORD settings are in ford.md.in in the source repository; CMake fills in the version and writes ford.md:

cmake -B build -D TAG=$(git describe --tags --abbrev=0)
ford ford.md

The HTML is written to build/doc. FORD needs Graphviz for the call graphs.

Sources