Tutorial 7: Creating a Custom Configuration
For this tutorial, we assume that you have played around with the Examples, and have reviewed the previous Tutorials. Here, creating your own simulation, separate from the Examples, is described.
The recommended approach is:
· Create a gridded 2D bathy/topo surface, covering the area you wish to simulate. The grid can be of any resolution, but the finer the better. If you wish to overlay a satellite image or some other custom raster, create that image with the same spatial extents as your 2D bathy/topo surface.
· Using the provided configuration scripts (or custom versions thereof), specify basic simulation parameters, such as model grid size (does not need to be the same as the 2D bathy/topo surface), Courant number, constant friction factor, boundary conditions, etc.
· Upload the script-generated input files into the “Upload Custom Configuration Files here:” section of the “Start Here” panel. Click “Start Simulation” to load and…





Hey Uwe-
Yeah, I am trying to migrate away from Matlab, but it is hard for someone who has been using it for so long...
The easiest replace option would be Python, and perhaps when/if @Mathieu Soulayrol gets them working, he can share with you.
But to the data structures.
Easiest is the json control file, which you can edit by hand. The below would be the minimum required to get a simulation started: {
"WIDTH": 919.00000000,
"HEIGHT": 799.00000000,
"dx": 1.00000000,
"dy": 1.00000000,
"Courant_num": 0.20000000,
"NLSW_or_Bous": 1.00000000,
"base_depth": 15.00000000,
"g": 9.81000000,
"Theta": 2.00000000,
"friction": 0.00100000,
"isManning": 0.00000000,
"dissipation_threshold": 0.15000000,
"whiteWaterDecayRate": 0.02000000,
"timeScheme": 2.00000000,
"Bcoef": 0.06666667,
"tridiag_solve": 2.00000000,
"west_boundary_type": 0.00000000,
"east_boundary_type": 0.00000000,
"south_boundary_type": 1.00000000,
"north_boundary_type": 2.00000000,
}
and you would change the WIDTH, HEIGHT, dx, dy, and boundary types to match your problem. WIDTH and HEIGHT are the dimensions of the input bathy/topo grid. Take a look at the Matlab configuration script for descriptions of the other variables. The bathy input file contains just the bathy grid, with no metadata or axis information (which is given in the control file). You should have your bathy grid stored in a 2D matrix, with dimensions HEIGHT by WIDTH. Save that matrix as an ascii text file, with a line break at the end of each row.
For the waves, the model expects a discrete amplitude spectrum, given as a listing of the individual wave components. The wave input file is a formatted ascii file, with the format: [NumberOfWaves] 2121
=================================
0.00497907 17.3077 -1.57075 5.11891
0.00509694 17.3077 -1.57075 5.69109
0.00520456 17.3077 -1.57075 0.797858
...
Here, the value after the [NumberOfWaves] represents the total number of individual wave components you wish to generate. So, to generate a monochromatic wave, this would be 1. The data columns are:
Column 1: Wave component amplitude (m)
Column 2: Wave period (sec)
Column 3: Wave direction (rad)
Column 4: Wave phase (rad)
If you have a small number of wave components you wish to generate, you can easily create & edit this file my hand.