Professional Documents
Culture Documents
David Brito
Frank Braunschweig
Luis Fernandes
May 2016
This document is the MOHID Studio Quick Start Guide for SWAN. It contains a tutorial
on how to create a SWAN project with MOHID Studio.
Index
1 PREFACE 1
1.1 Copyright 1
1.2 Warranty 1
3.1 Introduction 4
3.2 Preparation 4
4.1 Introduction 25
4.2 Preparation 25
5.1 Introduction 49
6 FINAL REMARKS 55
Index of Figures
FIGURE 4-5: EXPLORER WINDOW AFTER CREATING WORKSPACE, SOLUTION AND DOMAIN. 28
FIGURE 4-6: IMPORTING THE BASE DATA 30
FIGURE 4-7: FILES AFTER IMPORTING 30
FIGURE 4-8: ADDING THE BASE DATA TO THE MAP 1/2 31
FIGURE 4-9: ADDING THE BASE DATA TO THE MAP 2/2 31
FIGURE 4-10: MAP WITH BASE DATA 32
FIGURE 4-11: CREATE CONSTANT SPACED GRID TOOL 32
FIGURE 4-12: CREATE CONSTANT SPACED GRID TOOL - 2 33
FIGURE 4-13: SELECTING THE DESTINATION OF THE GRID FILE 34
FIGURE 4-14: THE CONSTRUCT GRID DATA TOOL 35
FIGURE 4-15: STATUS MESSAGE OF THE CONSTRUCT GRID DATA TOOL 36
FIGURE 4-16: WINDOW AFTER CREATION OF THE BATHYMETRY 36
FIGURE 4-17: CREATING A NEW SIMULATION 37
FIGURE 4-18: EXPLORER WINDOW AFTER CREATING A NEW SIMULATION 38
FIGURE 4-19: TOOL TO CONVERT MOHID BATHYMETRY TO SWAN FORMAT LOAD 38
FIGURE 4-20: TOOL TO CONVERT MOHID BATHYMETRY TO SWAN FORMAT - LOAD. 38
FIGURE 4-21: TOOL TO CONVERT MOHID BATHYMETRY TO SWAN FORMAT – SIMULATION
INTERACTION. 39
FIGURE 4-22: TOOL TO CONVERT MOHID BATHYMETRY TO SWAN FORMAT FINISHED. 40
FIGURE 4-23: THE BATHYMETRY IN SWAN FORMAT IS NOW VISIBLE IN EXPLORER WINDOW. 40
FIGURE 4-24: SWAN_1.DAT IN THE FILE EDITOR 41
FIGURE 4-25: SWAN_1.DAT GENERAL OPTIONS. 42
FIGURE 4-26: SWAN_1.DAT COMPUTATIONAL GRID AND BATHYMETRY INPUT. 42
FIGURE 4-27: SWAN_1.DAT BOUNDARY AND INITIAL CONDITIONS. 43
FIGURE 4-28: SWAN_1.DAT PHYSICAL PROCESSES AND NUMERICAL OPTIONS. 44
FIGURE 4-29: SWAN_1.DAT OUTPUT OPTIONS. 45
FIGURE 4-30: SWAN_1.DAT SIMULATION TIMING AND FINAL FILE. 46
FIGURE 4-31: OUTPUT WINDOW FOR THE NEW SIMULATION. 48
FIGURE 4-32: OUTPUT WINDOW SHOWING SUCCESSFUL FINISH. 48
FIGURE 5-1: OPENING SWAN SIMULATIONS POWER POINT SHOW. STEP 1. 50
FIGURE 5-2: OPENING SWAN SIMULATIONS POWER POINT SHOW. STEP 2. 51
FIGURE 5-3: OPENING SWAN SIMULATIONS POWER POINT SHOW. STEP 3. 51
FIGURE 5-4: OPENING SWAM EXAMPLES PROJECT – STEP 1. 52
FIGURE 5-5: OPENING SWAM EXAMPLES PROJECT – STEP 2. 52
FIGURE 5-6: OPENING SWAM EXAMPLES PROJECT – STEP 3. 53
1 Preface
1.1 Copyright
SWAN Model used is v41.01, developed at Delft University of Technology and released
under GNU General Public License. SWAN v 41.01 binary and source code is available
in MOHID Studio Installation Folder. For any information about SWAN model please
visit SWAN's page: http://swanmodel.sourceforge.net/
1.2 Warranty
The warranty given by Action Modulers is limited as specified in your Software License
Agreement. Please note that numerical modeling software programs are very complex
systems and may not be free of errors, so you are advised to validate your work.
Action Modulers shall not be responsible for any damage arising out of the use of this
document, MOHID Studio, MOHID Water Modelling System, SWAN or any related
programs or documents.
This “Quick Start Tutorial for SWAN” is intended to help first-time users creating their
first projects, following a sample project, an implementation in the Tagus Estuary, near
Lisbon, Portugal.
It is suggested that you follow the tutorial, which progresses with increasing
complexity, trying to replicate the provided sample project. After finished exploring all
simulations with the samples, it is suggested that you revisit the tutorial applying the
model examples to your own study site.
After the first play-around you are invited to independently create a simple project
with constant wave input, generating the bathymetry, prepare the input files, run the
model and explore results as previously (in the same geographical area).
The tutorial then provides resources for other implementations as the offline
integration with MOHID Water and other real case implementations.
For each step, the required options to configure the model are explained in detail.
It is assumed that you have installed already MOHID Studio (following MOHID Studio’s
Installation Guide) and that you understand the functioning of the different windows,
environments and buttons (following MOHID Studio User Guide).
In order to complete all steps in this document, you must have a Professional or an
Evaluation License.
3.1 Introduction
The tutorial starts by providing a sample project (Tagus Sample similar to MOHID
Water sample) so you can get familiarized to MOHID Studio. You will use a previously
configured project and produce results with it.
3.2 Preparation
Download the demo project from the link below and store it in the “temp” directory
created in 2.
http://www.actionmodulers.com/Downloads/SWANSample.zip
Please do not “unzip” this file, since MOHID Studio is expecting a ZIP file.
Now your directory should look like shown in the next figure.
1
You can alternatively create this structure on a different disk (e.g. D:\)
Start MOHID Studio by selecting Start -> Action Modulers -> MOHID Studio 2016.
For this example, we have to create a new workspace. After MOHID Studio started,
please select Home -> Workspace -> Open from MOHID Studio’s main menu.
MOHID Studio’s Workspace Manager Window appears which allows you to create a
new work space. Choose “Start with an empty Workspace” and name it “SWAN Quick
Start Guide”.
Now we will import the previously configured example. Please select Project ->
Solution -> Manage.
In this window press the button “Import”, located on right. The window “Import
MOHID Solutions” will appear.
Select Solution Type “MOHID Studio” and under “Project File Name” browse for the
file previously downloaded and stored in the “temp” directory (“C:\SWAN Quick Start
Guide\Temp\SWANSample.zip”).
Once you are done, the “Import MOHID Solutions” window should look like the one
shown next.
Press the import button ( ) and wait until the import process is complete.
Figure 3-6: Message informing that the import process has finished
Close the message box and the “Import MOHID Solutions” window. In the “Solution
Management Window” (Project -> Solution -> Manage) you should see now the
imported solution, like shown next.
NOTE: If a solution with the same name of the solution to import already exists, the
newly imported solution is automatically renamed (example: SWAN Sample_1). Close
this window also.
Now we have to open the solution we just imported and associate it to the current
workspace, by selecting Project -> Solution -> Open.
The “Create or Open Solution” window appears with the solution “SWAN Sample”, like
shown in the next figure.
NOTE: The “Create or Open Solution” window looks very similar to the “Create
Workspace window”. The differences between workspaces and solutions are explained
in the user manual.
In this window select “Open an existing solution” and select the “SWAN Sample”. Press
“OK” to close the window.
This action will open the “SWAN Sample” solution in “Explorer” tab. Press on the
triangles ( ) to expand the tree view in the “Explorer”. You screen should now look
like shown in the next figure.
Figure 3-9: MOHID Studio’s Explorer window after importing and opening the “SWAN Sample Project”
Like all MOHID Studio solutions, this solution is divided into the following items:
For SWAN model, due to its limitation in path lengths, the special folders were
shortened:
In the middle of the explorer window you will find the “Modules”. By selecting any
item in the “Project Tree”, the “Modules” in the middle of the explorer window will be
updated. For example, if you select the simulation “Sim #3_Nonstat_ConstWave” your
window shows the SWAN data file associated with this simulation, as shown in the
next figure.
NOTE: The “Modules” are divided into 3 areas: Data Files, HDF Files and Time Series
Files. Details about these file types are explained in the user manual.
The project management is one of the core features of MOHID Studio. Another feature
is the internal GIS engine, which allows you to visualize all spatial data. Next we will
show how to visualize the digital terrain of the SWAN Tagus Sample.
Adding layers to the GIS engine can be done directly from the “Explorer”. To add the
digital terrain of the SWAN Tagus Sample, proceed in the following way:
In the Project Tree select the folder “DT” (1). This will fill the Data Files under
“Modules”. Select the file “TagusBathymetry.dat” (2) and right click it. In the popup
which appears select “Add to Map…” (3). Next screen shot shows these steps.
Just leave all default values as they are and press “OK”.
NOTE: If in this step appear a message complaining about the license, you don’t have a
valid license to proceed (MOHID Studio Professional). We encourage you to request a
temporary evaluation license. Check MOHID Studio’s Installation Guide for more
information.
Now switch to the “Map” tab to see the digital terrain in the map window. Your screen
should look like shown in the next figure.
Figure 3-13: MOHID Studio Map Window with Tagus Sample Bathymetry
To add a background map go to “Map” -> “Background Layers” -> “Tiles” (Figure 3-14).
A warning appears informing you that the coordinate system of the map has to be
changed to “Web Mercator Projections” (Figure 3-15). Click “Yes” to continue.
A window which lets you choose from a range of background layers will appear (Figure
3-16). Choose “Bing – Aerial” and OK to add the layer to the map.
Your main window now should look like the one in the next figure.
Figure 3-17: MOHID Studio the Tagus bathymetry and a background layer
Now we will run a simulation of the sample project. Switch to “Explorer” tab and in the
“Project Tree” select the simulation “Sim #3_Nonstat_ConstWave” (1) and then select
“Project” -> “Execute Models” -> “Run Now” (2). Figure 3-18 shows these two steps.
This simulation is nonstationary with an entering wave of 1.5m from the West.
A window appears to confirm the execution of the model (Figure 3-19). Press “Yes” to
continue.
The box window called “Model Controller” below the domains and simulations is filled
showing the progress bar of the simulation (Figure 3-20). To check more details on the
simulation status press “Output” button to be able to see what is the current status on
progress. The “Cancel” button in the window allows you to abort the simulation at any
time.
At the end of the simulation a window notifies the user that the model has finished.
To see the log file of the model run select “Yes”. A window with the log of the model
run will appear.
We recommend scrolling down this window until the end, so you can verify if the
model did end successfully (Figure 3-23).
During the simulation the model output files are created. When selecting the
simulation that just finished running (“Sim #3_Nonstat_ConstWave”), the “Modules”
section in the middle pane is filled with “HDF Files” and “Time Series” results (Figure
3-24).
HDF files contain model results for the entire computational grid at different time
instants of the simulation or one time instant (if stationary), similar to instantaneous
snapshots of the study area. These results can be plotted as animated maps in time.
Time series files contain results for predefined computational grid points with high
output frequency. These results can be plotted as time series graphs.
The way how these outputs can be configured will be explained later. More
information on how to visualize results can be found in the “MOHID Studio User
Guide”.
We will start with creating a time series plot of the significant wave height (the model
was configured to create a time series near the Tagus mouth called SWAN_1). For this
we double click on the file “SWAN_1_Hsig.srsw” in the “Time Series Files” list.
A window appears with a list of available time series. There is only significant wave
height available in “Hsig”, press “OK” (Figure 3-26).
After pressing ok MOHID Studio creates a new XY Graph window with a plot of the
selected series. Your screen should look like the one in the next figure.
Figure 3-27: MOHID Studio time series of significant wave height (Sim # 1)
This is the simulated significant wave height for the Tagus mouth where in the
simulation duration the incoming wave is about to approach the estuary.
Now we will add the significant wave height of the entire domain as animated layer to
the map window.
A window will appear which allows you to configure a set of options of what to display.
Select “significant wave height” in “Feature” field and press OK - Figure 3-29.
Now you have to switch to the “Map” tab. Your screen should look like the one shown
in the next figure.
The image presents the significant wave height at start where the imposed wave with
1.5m in the West boundary is represented by the red vertical line. Values in blue
represent zero significant wave height.
You can use the “Date & Time” controller, located in the lower left corner, to step
forward and backward in time (Figure 3-31).
The previous figure shows the significant wave height one hour after start where it
approaches the estuary.
To run a simulation that starts where “Sim #3_Nonstat_ConstWave” ends (using Sim
#3 as hot start) you may now run “Sim #4_Continuation” and do the same tasks (open
time series and ad layer to map). After 4h the wave reaches the estuary entrance but
does not enter the estuary because of the mouth shape.
To know more on how to customize the time series window (axis titles, series names
and colors, etc.) and map images (color scale, horizontal scale, etc.) check the “MOHID
Studio User Guide”.
With this we finished the first exercise. In the next exercise we will create a new
project from scratch.
4.1 Introduction
This section will show how to create a SWAN project to simulate wave dynamics in a
real study case. We will simulate the same area as in MOHID Water example (Tagus
Estuary), but rather than using a prepared project, we will go through all steps
required to set up the model.
4.2 Preparation
http://www.actionmodulers.com/Downloads/LandAreaPolygon.xy
http://www.actionmodulers.com/Downloads/TagusBathymetryPoints.xyz
Now your “temp” directory should look like shown in the next figure.
First we will create a new workspace for our project. Start MOHID Studio and select
Home -> Workspace -> Open from the main menu. The Workspace Manager Window
appears. Select “Start with an empty Workspace” and provide the name “My First
Workspace”. Your window should look like the one shown in Figure 4-1.
Create a new solution by selecting Project -> Solution -> New from the main menu.
The Create or Open Solution Window appears. Select “Create a new Solution” and
provide the name “My First Solution”. Your window should look like the one shown in
Figure 4-2.2
2
Even in a first approach it seems that a “Workspace” and a “Solution” are the same, they aren’t. You
will later understand the differences.
Click OK to close the window. You should now see the solution in the Explorer Window
-> Project Tree as shown in the next figure.
Now we select the solution in the Project Tree and select Project -> Domain -> New
from the main menu. The Domain window appears. As “Domain Name” use “SWAN
Tagus” and for the root directory select the following directory:
You can use the button to browse for the Root Directory. Here you can browse for
the directory where you like to store the files associated with the domain. In this
example we created a subdirectory “SWAN Tagus” in the directory created in 3.2.
Your window should now look like the one shown in Figure 4-4.
Leave all the other fields empty and press OK to close the window.
Now we have created the basic structure to create the actual files we need to run
SWAN. Your Explorer Window should look like shown in the next figure.
Figure 4-5: Explorer Window after creating workspace, solution and domain.
As stated before the folders names were shorten to be consistent with SWAN short
path lengths.
More information on how to manage solutions and domains can be found in “MOHID
Studio User Guide” in chapter 3.
4.4.1 Introduction
Now we will generate a bathymetry file. This file defines the horizontal domain
(computational grid and bathymetry values for each grid cell) and is the basic and most
essential information need to run SWAN simulation.
MOHID Studio is able to create regular and variable grids for MOHID Water and SWAN
models. In this example we will use a regular grid but the previous example was run
with a variable step grid.
The digital terrain data can be obtained from many sources (e.g. ETOPO, local data
provider), but it must be formatted into MOHID’s XYZ format. More information about
MOHID’s XYZ format can be found here:
http://www.mohid.com/wiki/index.php?title=XYZ_Points
For this exercise we downloaded already, during the preparation process, the file
“TagusBathymetryPoints.xyz”. You can open this file with any text editor to check the
format.
The polygon defining the areas where the model will not calculate any values can be
provided in MOHID’s XY format, MOHID Studio’s XML format or as ESRI Shapefile. For
this exercise we downloaded already, during the preparation process, the file
“LandAreaPolygon.xy”. You can open this file with any text editor to check the format.
More information about this XY format here:
http://www.mohid.com/wiki/index.php?title=Polygon
The computational grid will be constructed with a specific tool found inside MOHID
Studio.
Even not strictly required, we will copy the two previously downloaded files into the
directory structure of the solution we just created. Expand the “Project Tree” and
select the folder “DT (Digital Terrain)”. After selecting, right click it and choose “Import
File…” as shown in the next figure.
Browse to the directory (C:\SWAN Quick Start Guide\Temp) where you stored the files
“TagusBathymetryPoints.xyz” and “LandAreaPolygon.xy”, select the two files and click
Open. You should now see these files listed under Modules -> Data Files.
Under the Modules -> Data Files, select the file “TagusBathymetryPoints.xyz” and
select “Add to Map” from the context menu (Figure 4-8).
Now, when switching to the “Map” you should see an image similar to the one shown
in the next figure.
Open the Tool Box and double click on Grid -> Constant Spaced Grid. This will open the
“Constant Spaced Grid Tool” docked on the right of the main area. Your window
should look like the one shown in the next figure.
We will create a constant spaced horizontal grid with the parameters indicated in the
next table.
dX 0.003 Size of the grid cells along the X axis. Given in units of
the coordinate system (in this case º).
dY 0.003 Size of the grid cells along the Y axis. Given in units of
the coordinate system (in this case º).
After filling this options, your window should look like shown in the next figure.
Press the save button ( ) in the lower right corner of the tool window and to save
the grid file with the name “TagusGrid.grd” in the directory C:\SWAN Quick Start
Guide\Projects\SWAN Tagus\GD\DT.
When the tool closes, the grid remains loaded in the Map Window.
The base data for any SWAN (and MOHID Water model) is the digital terrain (or
bathymetry), which is provided in form of a Grid Data file. More information about
MOHID’s Grid Data format can be found here:
http://www.mohid.com/wiki/index.php?title=Grid_Data
MOHID Studio contains several tools to create and manipulate grid data files.
To create the grid data we will use the “Grid Data” -> “Construct from Points” tool.
Double click the tool to open it, as shown in the next figure:
We will know construct the bathymetry with the following options indicated in the
following table.
Grid Tagus Grid The grid which is to be used to create the grid data.
XYZ Points TagusBathymetryPoints The point dataset(s) which are to be used to fill the
grid. In this example we only have one, but you can
use multiple XYZ files.
Polygons LandAreaPolygon (check it!) The polygon(s) which define non compute areas (land
in the case of SWAN and MOHID Water). The model
will not compute any values in the cell covered by
these polygons.
XYZ Offset 10% Offset from the grid, in percentage, of the maximum
distance from the “XYZ Points” are considered when
using interpolation algorithms.
XYZ in NCA Leave uncheck If you want to consider a specific height in the non-
compute areas for the interpolation process near the
land-water interface.
Grid Data C:\SWAN Quick Start The name of the file which will be created. It’s
Guide\Projects\SWAN recommended to place this file inside the folder
Tagus\GD\DT\ GD\DT of your project.
TagusBathymetry_v01.dat
After filling all data, choose the process button ( ) to generate the bathymetry. This
process might take a couple of minutes and it finished with a status message.
Close the status message and the tool window (using the x in top right corner). Your
main window should now like the one in the following figure.
We will create a new SWAN simulation that will be automatically updated with the
bathymetry in next step.
In the Explorer Window select the domain “SWAN Tagus”, right click and select “Insert
Simulation”. A window with the properties of a new simulation will appear. In the
window you have to provide a name of the simulation, a small description and there is
only one module active (SWAN).
Without changing any option, press OK to close the window. A new simulation is
created and will appear in the project tree. When you select this simulation, the
module data file will appear.
SWAN grid data formats are slightly different from MOHID so a tool exists to convert
from MOHID bathymetry to SWAN and automatically update SWAN input file. In
toolbox select “SWAN”-> “Convert MOHID Bathymetry to SWAN” (Figure 4-19).
In this tool the user can select any of the grid data files loaded in to map (in this case
bathymetries). Select the “TagusBathymetry_v01” layer in “Bathymetry” section.
To automatically update the simulation just created, check the box “Update SWAN
simulation…” and select in “Explorer” tab the SWAN simulation “Sim #1” created in the
previous step – Figure 4-21. The process will create a bathymetry in SWAN format with
the same name as the original but with extension “.bty” in the GD\DT folder.
Figure 4-21: Tool to Convert MOHID Bathymetry to SWAN format – Simulation interaction.
Remark: In case of using the tool without the simulation interaction, if the user wants
to run SWAN model, the bathymetry output “Destination Folder” should be the
“GD\DT” folder of the SWAN project that will be implemented. This is needed since
SWAN model has a limited length for file paths and placing it inside the project folders
saves some characters.
Press the button ( ) to start the conversion. After a few seconds the window with
the result appears (Figure 4-22).
The new bathymetry with extension “.bty” is now available in the GD\DT folder of the
SWAN project “SWAN Tagus” - Figure 4-23. The file is a text file so can be opened by
double-clicking on the file name “TagusBathymetry_v01.bty” in “Data files”.
Figure 4-23: The bathymetry in SWAN format is now visible in Explorer window.
Now we finished the 4 steps to prepare the simulation and are almost ready to run our
first simulation. Close the tool “Convert MOHID to SWAN” by using the “x”.
Under “Modules” double click the file “SWAN_1.dat”, which will open in the file editor
(Figure 4-24).
On the first part of the file contains general options where the project name, water
level increase, minimum water depth, water density, wind and wave angle direction
convention (cartesian, nautical), etc. can be defined - Figure 4-25.
This simulation is nonstationary and 2D (MODE NONSTAT TWOD) and coordinate type
is spherical (geographic coordinate system – COORD SPHE).
The comment symbol is “$” and all text in front is highlighted in green.
For more information on the SWAN commands and parameters follow SWAN user
manual in the resources described on the start of this manual.
The coordinate type command (COORD) was updated by the convert tool used in the
previous step.
Below in the same file are the sections about the computational grid (CGRID
command) and bathymetry input (INPGRID BOT and READ BOT commands) where the
number of grid cells, the type of grid and the associated files with their format are
defined.
For more information on the SWAN commands and parameters follow SWAN user
manual in the resources described on the start of this manual.
These two commands were updated by the convert tool used in the previous step.
Further down in same file are located the definition for boundary and initial
conditions. The boundary condition is defined by command BOUNdspec and by default
in the file is written with:
Meaning that on side north of the domain it is imposed a constant wave (uniform in
the side and in this case also uniform in time) with 1.5m 8s and from North (0º in
nautical convention for angles).
BOUNdspec SEGM IJ 0 0 0 179 CONstant 1.5 To consider an imposed wave in a segment defined
8.0 270.0 by I and J grid values. The segment starts on (0, 0)
and ends on (0 179) – the complete west part of the
domain and is imposed a constant wave in the
segment and in time with 1.5m 8s and 270º (wave
from west towards east).
The initial condition is commented (command INIT HOTS) since this is a cold start
simulation. In case of continuation simulation (like for example in the previous
exercise) MOHID Studio upon creation automatically adds this command and uses the
previous simulation final file as the initial file for the new simulation. Do not change
this parameter.
For more information on the SWAN commands and parameters follow SWAN user
manual in the resources described on the start of this manual.
The processes that the model will solve and the numerical approach are defined in
next segment of the file (Figure 4-28).
In this example we use second generation mode where a constant breaker index is
used with JONSWAP formulation for bottom friction and triad wave-wave interactions.
For numerical discretization the first order Backward Space, Backward Time scheme is
used.
For more information on the SWAN commands and parameters follow SWAN user
manual in the resources described on the start of this manual.
Further below are the output definitions in terms of time series and maps Figure 4-29.
The outputs are formatted with the type of output, the group of output locations (e.g.
point, all computation points), the filename to output, the properties to output and
the timing start and frequency to output.
Remind that if a change is made to simulation timing (see next section) the output
timing should also be changed.
MOHID Studio updates automatically the output dates to simulation start date when
creating continuous simulations.
By default, MOHID Studio names the output files “SWAN_X.xxx” where X is the
simulation ID and xxx is the extension. At the end of the simulation the SWAN results
are converted to MOHID format (to HDF and time series). Spectral files are not
converted.
Time series locations are made using the definition of their location from the SWAN
data file. The default location for time series is not adapted to the study case so we
need to change the line:
To one location consistent with the system coordinates as show in Figure 4-29 and
Table 2.
Change the values to the following options (You should avoid using TABs).
POINT 'SWAN' -9.3323 38.6556 Defines one location for time series output. This
point is near Tagus estuary mouth.
Leave all other options unchanged. It will create a table with all computational domain
and a time series in Tagus mouth (results show in the first exercise).
For more information on the SWAN commands and parameters follow SWAN user
manual in the resources described on the start of this manual.
The last section of the file is the simulation duration, time step and final file location
(Figure 4-30).
The COMPUTE command allows to define the type of simulation and the simulation
start and end (e.g. in yyyyMMdd.hhmmss) and time step. By default MOHID Studio
creates 5h simulation. To be quicker to run we will change it to one hour as defined in
Table 3 and Figure 4-30.
The HOTFILE command creates the final results of the simulation. By default MOHID
Studio will always create this options naming it “SWAN_X.fin” where X is simulation ID
so that the crated fields can be used by continuation simulations (in new continuation
simulations MOHID Studio automatically defines the initial file the same as the final
results file of the previous simulation).
For more information on the SWAN commands and parameters follow SWAN user
manual in the resources described on the start of this manual.
Everything now is prepared to run the simulation. In the Explorer Window select the
simulation Sim #1 and then select the option “Project” -> “Run Now” from the main
menu (further details have been described earlier). In the message box which appears,
click “Yes” to start the run.
When the model finishes, a message box will pop, asking if you would like to see the
model results. Click “Yes” and a window like the one shown in Figure 4-31 will be
shown.
After any simulation, you should scroll down to the end of the window, checking the
final status message, as shown in the next figure.
You can now explore the results by adding layers to the map, as described in section
3.6.
5.1 Introduction
In Exercise 2 we created a new model setup from scratch using some basic data files.
The goal of the second exercise was to learn the basic steps you need to setup a simple
SWAN simulation.
SWAN model has hundreds of options, so sometimes it’s tricky to find the right option
for all the data files. In this exercise, Exercise 3, we will show how to open existing
online resources which you can use as guidance to setup you own model.
MOHID Studio’s Start-up page has on the right side a set of online resources, which we
update frequently. To access the start page, select Home -> Links -> Start.
This page is shown after start up but, by default, it closes after opening a work space.
You can change this behaviour in the lower left corner of the Start-up page.
We will now select a wide variety of SWAN samples, which contains different types of
simulations.
A power point presentation was created to guide the next simulations examples
(SWAN official test cases, a bibliography breakwater example and other real case in
Douro Estuary), that can be found in start page (available at MOHID Studio start or in
menu “Home” and “Start” (Figure 5-1). Press on the left tile list in the item “SWAN
Project Examples Presentation”.
The process asks for a destination for the file. Choose for instance “C:\SWAN Quick
Start Guide\” and press “Save” (Figure 5-2).
The download starts and after end, the power point automatically starts. Use the
power point to guide the next simulations of the “SWAN Examples”.
In the Startup Page check for the resource “SWAN Model Project Examples”, as
indicated in Figure 5-4.
A popup window will appear which asks for where to store this example (Figure 5-5).
Create a directory in C:\SWAN Quick Start Guide\Projects called “SWAN Examples” and
press OK.
The download of the sample will start automatically. Once the download is completed
and project opened (a message box informs you about this, please be patient) your
current workspace is closed and the download example is opened automatically. Your
window should now look like the one indicated next.
Inside this example you will find a set of simulations, showing different features of
SWAN model implementations. We recommend that you run and explore these
examples.
In order to create a simulation for you own site you can use these examples as
guidance. Basic steps are:
There is in MOHID Studio a set of tools created to convert between SWAN and MOHID
formats (that the converted MOHID bathymetry to SWAN was show in this tutorial)
present in MOHID Studio toolbox and under “SWAN”:
• A tool to convert MOHID bathymetry to SWAN format and has the options to
update the SWAN data file to ease simulation implementation
• A tool to convert SWAN bathymetry to MOHID format (e.g. if want to open
your own SWAN bathymetry created outside MOHID Studio)
• A tool to convert SWAN results to MOHID HDF and time series (this tool is used
internally after the SWAN simulation ends). It can be used to generate the files
to force SWAN wave results into MOHID Water.
• A tool to convert MOHID HDF results into SWAN format. It can be used to
generate the files to force MOHID Water bottom, level and currents results into
SWAN.
An explanation on how to use these tools can be found in MOHID Studio wiki:
http://wiki.actionmodulers.com/wiki/index.php?title=MOHID_Studio_-
_User_Guide_-_Tools_-_v.2.0#SWAN_Tools
6 Final Remarks
This quick start-guide to implement SWAN model intends to help first time users to
quickly get the model running but may also be a starting point for any new
implementation.
Any difficulties or need for more developed information should be addressed in the
SWAN channels mentioned at the start of this document.
We appreciate all feed-back that you may give us on the implementation of SWAN
projects with MOHID Studio so that MOHID Studio and this guide can improve with
time.