Graphical User Interface for SWAN

How to operate SWAN with GUI

Many practical consultants that use SWAN to compute the wave field in coastal regions are hindered by the primitive mode of input and output of SWAN (rather abstract text files and numerical files; no graphics). Generating and verifying the input therefore requires skill and time of a well-informed operator. The output of SWAN is not graphical, forcing the use of additional software to visualise the computational results. This requires extra investment in software and manpower. To avoid these problems for standard operational use, DHH developed the SWAN Graphical User Interface (GUI).

Supported by help-screens, the GUI guides the user interactively through the process of building up a model in a simple and natural way. First he is asked to select a bottom file, the contents of which are then shown on the screen, first in numerical form and then also graphically (colors and depth contours). He then chooses a computational grid by clicking and dragging the corners of a suggested grid. The user does not have to enter any x- and y-coordinate values, often a tedious and error-prone process that is now avoided. Instead, the location, size and resolution of the computational grid is shown graphically on the screen. The location of selected output locations (point and click) is similarly indicated on the map. If needed, the x- and y-coordinates of output points can be given numerically.

The user then instructs the SWAN model to carry out the wave computation, after which the results will be shown as graphics on the screen: 2-dimensional color maps of significant wave height and period and vector plots for the wave direction over the entire computational region (optionally superimposed on other maps). In addition, the 1- and 2-dimensional spectra are shown graphically for the selected output points. It is very easy to return to the input screen to change one or more input data, and make a new computation. The effect of variations in coastal lay-out and wave conditions can thus be established efficiently and effectively with graphics that are clear and user-friendly. The results are directly available in their graphical form to be copied into reports. All information generated by the GUI is also available in numerical form for further processing (i.e., to more advanced 3-D graphics) or further refinements with advanced options of SWAN (e.g., adding diffraction).

Experienced users

The GUI generates command files for SWAN, which can be modified with any simple ASCII editor to access the extended SWAN facilities and run SWAN without the GUI. The experienced user can thus use the GUI to prepare a first version of the command file to which he can add other commands as he needs them. The GUI then serves to graphically define (drag and drop) the computational grid, output points and obstacles.
An example is the use of obstacles: the location can be defined using the GUI, and other properties can be added later to the OBSTACLE command.


For many beginning users, SWAN, with its many options, is too complicated to get started effectively. One of the great advantages of the GUI is that the user does not need to consult the lengthy SWAN documentation. Instead he is guided, almost intuitively, in an interactive way through the process of building up a model. The graphical input that is used avoids the need to enter instructions through files, so that the user can fully concentrate on the wave problem and not be side-tracked by the intricacies of building rather abstract text files.

Computing options

The GUI has been developed for standard use of SWAN. This implies that the most commonly used options of SWAN are available and that all other options can be added efficiently outside the GUI. The options available in the GUI are:

  • 1-D and 2-D computations in geographic space, with full 2-D spectra (no directional limitations).
  • arbitrary bathymetry without currents (rectangular grid, arbitrary orientation, resolution in x-direction may differ from y-direction; independent of computational grid).
  • fully-blocking obstacles of arbitrary lay-out.
  • geographically constant incident waves (significant wave height, period and direction; directions independent of grid orientations).
  • stationary conditions.
  • geographically constant wind (velocity and direction).
  • 3rd- generation formulation of wave generation by wind, quadruplet and triad wave-wave interactions, white-capping, bottom friction, surf breaking.
  • arbitrary rectangular computational grid (size, location, orientation and resolution independent of computational grid)
  • output color maps of significant wave height, period and direction over entire computational region.
  • output graphics of 1-D and 2-D spectra in 11 user-selected locations.
  • input and output numerically available (including GUI-generated command files for SWAN).

Package offer from DHH

The Graphical User Interface is delivered together with the newest SWAN version with graphics extension, the SWAN course and the post-processing package OPGraph. See more information about the Swan Support Package.

  ©: Nico Booij (2012)