intro story Coast / Estuary

Coast / Estuary

Coastal systems are among the most dynamic physical systems on earth and are subject to a large variety of forces. The morphodynamic changes occurring to coastlines worldwide are of great interest and importance. These changes occur as a result of the erosion of sediments, its subsequent transport as bed load or suspended load, and eventual deposition. 
 
Estuaries are partly enclosed water bodies that have an open connection to the coast. Estuaries generally have one or more branching channels, intertidal mudflats and/or salt marshes. Intertidal areas are of high ecological importance and trap sediments (sands, silts, clays and organic matter).
Within the Delft3D modelling package a large variation of coastal and estuarine physical and chemical processes can be simulated. These include waves, tidal propagation, wind- or wave-induced water level setup, flow induced by salinity or temperature gradients, sand and mud transport, water quality and changing bathymetry (morphology). Delft3D can also be used operationally e.g. storm, surge and algal bloom forecasting. 
 
On this discussion page you can post questions, research discussions or just share your experience about modelling coastal and/or estuarine systems with Delft3D FM. 
 

** PLEASE TAG YOUR POST! **

 

 

Sub groups
D-Flow Flexible Mesh
DELWAQ
Cohesive sediments & muddy systems

 

 

Message Boards

Delft3D-Wave calibration for very shallow water

EW
Erk Wøff, modified 6 Years ago.

Delft3D-Wave calibration for very shallow water

Youngling Posts: 1 Join Date: 12/9/11 Recent Posts
Hi,
I am currently trying to calibrate my stationary Delft-3D Wave model for small islands in the wadden sea. These islands get inundated during storm surges and I have buoy data for the area around these islands and buoy data on the island. While the model values for the area around the island are pretty good (water depth around 4 m during storm surge), the wave heights on the island (water depth around 2 m) get overestimated by Delft3D-Wave. I tried to calibrate the model by adjusting the values for depth-induced breaking and bottom friction, but nothing really worked as the values around the island also decrease.
My questions are:
Is there a way to reduce the wave heights in very shallow water without influencing wave heights in deeper water?
Is there any way to implement space varying bottom friction in Delft3d-Wave or do you have an example to implement space-varying bottom friction in SWAN code?

Sincerely,
Erk
Emiel Moerman, modified 6 Years ago.

RE: Delft3D-Wave calibration for very shallow water

Padawan Posts: 84 Join Date: 3/10/11 Recent Posts
Hi Erk,

Attached is a simple (windows) example to modify a line in the swan input file too include a spatially varying roughness field in Delft3D-WAVe. In SWAN it is available standard, in Delft3D-WAVE not yet (i.e. not possible by making using of the GUI).

The procedure uses the mod.exe programme, which is called from the swan.bat file. Spatially varying roughness is only possible for either Madsen of Collins formulations as far as I know. In the example Madsen was chosen. Make sure both swan.bat and mod.exe files are in the working directory.

In the example use is made of the “mod.exe –l” commando (it inserts on a line (l), instead of find and replace commando option “mod.exe –s”).

Hope it helps you out,

Kind regards,

Emiel

Attachments:

karunakar kintada, modified 5 Years ago.

RE: Delft3D-Wave calibration for very shallow water

Padawan Posts: 35 Join Date: 7/31/12 Recent Posts
Hi Emiel/Bert/Zijlemma,
i would like to know how small the coefficient values can be in Collins model (as in the swan code "float", sorry 'm no good in fortran).
The question is not in the perspective of physics, rather i'm looking for a domain with both locally generated and swell penetration of waves and extensive wave current interaction.
I'm looking it in calibration point of view. any help would be highly appreciated.
YK
Yahia Kala, modified 4 Years ago.

RE: Delft3D-Wave calibration for very shallow water

Youngling Posts: 12 Join Date: 7/11/13 Recent Posts
Emiel Moerman:
Hi Erk,

Attached is a simple (windows) example to modify a line in the swan input file too include a spatially varying roughness field in Delft3D-WAVe. In SWAN it is available standard, in Delft3D-WAVE not yet (i.e. not possible by making using of the GUI).

The procedure uses the mod.exe programme, which is called from the swan.bat file. Spatially varying roughness is only possible for either Madsen of Collins formulations as far as I know. In the example Madsen was chosen. Make sure both swan.bat and mod.exe files are in the working directory.

In the example use is made of the “mod.exe –l” commando (it inserts on a line (l), instead of find and replace commando option “mod.exe –s”).

Hope it helps you out,

Kind regards,

Emiel


Hi Emiel,

I found that this works file for the Madsen formulation, but using Collins gets me very weird results, even when I use a roughness grid with a constant value of 0.015 (same as default).

I have posted a swan.bat file which works with nested grids. Note that using a Ks < 0.05 (Madsen) results in output problems like the ones observed with Collins. It seems that lower roughness values don't get treated properly when it is done this way.

Thanks,
Yahia

Attachments:

CS
Curtis Swanepoel, modified 3 Years ago.

RE: Delft3D-Wave calibration for very shallow water

Youngling Posts: 11 Join Date: 4/4/16 Recent Posts
Hi there.

I can see you have posted this solution but I actually have no idea on how to incorporate it. I have nested grids and In the one grid i want to add a spatialy varying bottom roughness for the wave as it flows over the reef to the island.

Thanks
YK
Yahia Kala, modified 3 Years ago.

RE: Delft3D-Wave calibration for very shallow water

Youngling Posts: 12 Join Date: 7/11/13 Recent Posts
Hi Curtis,

As I understand it, you have two WAVE grids and you want to implement the spatially varying roughness on the nested grid. Your nested grid has a certain number of grid points in the (m,n) directions.

When you run Delft3D-WAVE with nested grids, it calls the SWAN batch file for each grid (starting with the first grid). The SWAN batch file does some file cleaning in the model folder, then copies the SWAN input file generated by Delft3D to a file called INPUT, which is read by the actual SWAN executable. We can create a new SWAN batch file and store it in the model run folder, so the model will run that instead of the default batch file in the installation folder. We can then tweak some of the commands to make it do what we want.

I have put together a swan batch file that you should put in your model run folder (see code below. Save the text in a file called swan.bat). I put some comments in the file ("rem" indicates that line is a comment) to explain the process. Here is a summary:
  • Files are checked and deleted before SWAN is run again.
  • The dummy file INPUT1 is checked. If it does not exist, the code runs SWAN normally and creates TEST1.
  • If TEST1 exists, that indicates the nested grid is being used. This is when the mod.exe commands are used to insert lines into the SWAN input file. The TEST1 dummy file is deleted. Then SWAN is run.



@echo off
@echo SWAN batchfile executed for Delft3D
@echo Performing wave computation for: %1.swn
@echo Using %D3D_HOME%\win32\swan\bin\swan_4072ABCDE_del_w32_i11_omp.exe

rem The following block checks for files to delete before running SWAN again.

if exist PRINT del PRINT
if exist INPUT del INPUT
if exist swaninit del swaninit
if exist Errfile del Errfile
if exist errpts del errpts
if exist %1.erf del %1.erf
if exist %1.erp del %1.erp
if not exist %1.swn goto error1
if not exist "%D3D_HOME%\win32\swan\bin\swan_4072ABCDE_del_w32_i11_omp.exe" goto error2

rem CODE TO IMPLEMENT SPATIALLY VARIABLE BOTTOM ROUGHNESS ****************

copy %1.swn test.swn
if not exist INPUT1 goto overallgrid rem INPUT1 is a dummy file
if exist INPUT1 goto nestedgrid

:overallgrid
@echo OVERALL GRID COMPUTATION *******************************************
rem code for overall grid
rem This grid does not have spatially varying roughness.

copy test.swn INPUT  rem used for SWAN run
copy test.swn INPUT1 rem dummy file used for if-statement
goto commonexit

:nestedgrid
@echo NESTED GRID COMPUTATION ********************************************
rem code for nested grid
rem make sure you are inserting into blank lines in the .swn file
rem so check the line numbers.

mod.exe -l "29" "INPGRID _" test.swn
rem the "141" and "201" refer to the roughness grid size
mod.exe -l "30" "FRICTION  CURV  0. 0. 141 201" test.swn
mod.exe -l "31" "READINP FRICTION  1.0 'roughnessgrid.dep' 4 0 FREE" test.swn
copy test.swn INPUT   rem Used for SWAN run.
del INPUT1            rem Deletes dummy file.
goto commonexit

:commonexit
rem Run the SWAN program now.
"%D3D_HOME%\win32\swan\bin\swan_4072ABCDE_del_w32_i11_omp.exe"
rem END OF CODE TO IMPLEMENT SPATIALLY VARIABLE BOTTOM ROUGHNESS *********

copy PRINT %1.prt
if exist errfile copy errfile %1.erf
if exist errpts copy errpts %1.erp
if exist swaninit del swaninit
goto finish
:error1
@echo
@echo     ****************************************************************
@echo                SWAN input file %1.swn does not exist
@echo     ****************************************************************
pause
goto finish
:error2
@echo
@echo     ****************************************************************
@echo                SWAN executable does not exist
@echo                (%D3D_HOME%\w32\wave\bin\swan4051AB.exe)
@echo     ****************************************************************
pause
goto finish
:finish
@echo on
rem exit

The thing about mod.exe is that you need to specify which line numbers in your SWAN input file you need to use for inserting the 3 lines related to reading the roughness grid. You will have to do some test runs without the mod.exe commands and see which lines in your SWAN input file (for the nested grid) you can safely insert the roughness grid information (find empty lines in the input block). Make sure you are not replacing other input information. Also, make sure you are using the Madsen formulation, as it is the only one I got to work reliably (as of last year).

You can find the default swan.bat file somewhere in your Delft3D installation folder to see what it looks like. Check the paths to the swan executable file to see if they match those in the batch file I posted.

If you have any questions, feel free to message me privately.

Cheers,
Yahia
CS
Curtis Swanepoel, modified 3 Years ago.

RE: Delft3D-Wave calibration for very shallow water

Youngling Posts: 11 Join Date: 4/4/16 Recent Posts
Thank you very much for your help Yahia.

An important note if anybody else has the same issue.
We had to modify our swan file to use the line:

mod.exe -s "FRIC JON 0.0670" "FRICTION MADSEN kn=0.05" test.swn

after the mod.exe commands and change it in the wave gui to use the default jonswap values. otherwise I got the error

error in iteration fw: Madsen formulation

After these changes the simulation ran fine.

Cheers
ML
Mario Luiz Mascagni, modified 1 Year ago.

RE: Delft3D-Wave calibration for very shallow water

Youngling Posts: 8 Join Date: 11/24/11 Recent Posts

Hello fellows

 

I am a user of the SWAN program and the Delft3d suite as well.

 

I am in a project where it is important to calibrate waves and currents separately in Delft3d for future coupling.

 

As mentioned in the discussions above, in SWAN it is quite simple to implement a roughness grid, but this function is not yet implemented in the Delft3d Wave module.

 

The solution presented by Emiel Moerman using the mod.exe file seems to work on Microsoft platforms, but for my bad luck in this case, I am Linux user.

 

Well I really need to run Delft3d-Wave with space-varying bottom friction on Linux, so I've created a roughness grid that works well enough on SWAN, but for running it on Delft3d-Wave, I doubt the binary mod.exe file would works on Linux.

 

Does anyone have any idea how to run Delft3d-Wave with space-varying bottom friction on Linux?

 

Any hints would be very much appreciated.

 

Thanks a lot

Mario

YK
Yahia Kala, modified 1 Year ago.

RE: Delft3D-Wave calibration for very shallow water

Youngling Posts: 12 Join Date: 7/11/13 Recent Posts

Hi Mario,

 

The mod.exe is a simple program that inserts/replaces lines in the temporary SWAN input file that is generated by D3D-WAVE. You can achieve the same thing in Linux by writing some commands (in your FLOW/WAVE bash scripts) to insert the same lines as you would with mod.exe. I remember doing this a few years ago by just using bash script commands but unfortunately I don't have the scripts anymore. I hope this helps.

 

Cheers,

Yahia

ML
Mario Luiz Mascagni, modified 1 Year ago.

RE: Delft3D-Wave calibration for very shallow water

Youngling Posts: 8 Join Date: 11/24/11 Recent Posts

Hi Yahia,

 

Thank you for your prompt response.

I'm trying to edit the swan.sh file at this point to add the codes so as to generate the swan's INPUT file with the bottom roughness grid. As soon as I manage it I will post the performed changes in the swan.sh here.

Thanks again!

ML
Mario Luiz Mascagni, modified 1 Year ago.

RE: Delft3D-Wave calibration for very shallow water

Youngling Posts: 8 Join Date: 11/24/11 Recent Posts

Hello again Yahia,

 

As I do not have much time to waste in this project and my programming skills are actually pretty bad, I made some very simple and dirty changes at swan.sh that requires manual modification of the code each time a new different grid is configured.

 

See below the changes I made:

$> cp $1.swn INPUT;
$> cat INPUT | sed "/DIFFRAC/i \ INPgrid Friction CURVlinear 0. 0. 287 204\n \ READinp FRiction 1.0 'cw_gr1.rgh' 4 0 FREE\n\ $\n\ $" >> INPUT;
$> mpirun -np $NHOSTS ${SWANEXEC} INPUT;

 

Well, with these modifications at the swan.sh file, the model is apparently running smoothly, but I'm still in doubt if Delft3d-Wave is actually using the bottom roughness grid I created. To test it, I am printing the INPUT files on the terminal after each output time-step and so far the dynamic INPUT files contains the lines that I added in swan.sh.

 

However, the only way I could think to test for sure, was to extrapolate the values in the roughness grid to see if there is a difference in the final wave propagation results. So I'm planning to create a new bottom roughness grid, with values for madsen et al. = 150 (100X higher than the default) and see what happens.

 

Do you have any other quicker ideas to test?

 

Find attached the swan.sh_original and the new swan.sh, for any one who might interest.

 

Cheers