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

Coupling problems using Z-Layers

MH
Manu Hoffmann, modified 5 Years ago.

Coupling problems using Z-Layers

Youngling Posts: 7 Join Date: 4/10/15 Recent Posts
Hi everybody,

I am trying to get a water quality simulation of a lake running, using the z-model. I followed the instructions in the DelWAQ user manual in chapter 11.4 (adding the keyword "z-layers" in the *.hyd-file before the coupling). I also found the hints in the manual on the WAQ-input-file chapter 3.2 (adding "MULTIGRID\nZMODEL\nEND_MULTIGRID" in the *.inp-file before running the WAQ-simulation) but already when I am running the coupling routine, it seems to me that the information of the "z-layers"-keyword is not taken into account (no matter if I run the coupling from the GUI or via console).

Anyone already dealt with the same issues and can tell me in which files I need to include which keywords, to get the coupling of the z-model running?
I would really appreciate this!

Regards,
Manu
AM
Arjen Markus, modified 5 Years ago.

RE: Coupling problems using Z-Layers

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts
Hm, another way to do this - with less hassle on your side - is to use the builtin coupling. That way Delft3D-FLOW simply produces the hydrodynamic database suitable for Delft3D-WAQ. You have slightly less options to change the aggregation afterwards, but that is the way I would do it.

If that is not possible for you, can you at least tell what the symptoms are that make you think things are going wrong?
MH
Manu Hoffmann, modified 5 Years ago.

RE: Coupling problems using Z-Layers

Youngling Posts: 7 Join Date: 4/10/15 Recent Posts
Hey Arjen,

thank your for the fast answer. If you are talking about the option called "Online coupling for WAQ" in the FLOW-GUI, I already tried that via the menu and via console, but unfortunately it didn't work out. I am using the open-source-version of Delft3D. My *.mdf-file has the flag "Waqmod = #Y#" and the times for writing the communications-file specified (with "Flpp").

Running it via...

...the MENU gives me the error message "can't read "outfile": no such variable"

...console (in 32-bit mode) gives me the following, but no error message in the tri-diag-file:
--------------------------------------------------------------------------------
       Deltares, FLOW2D3D Version 6.01.00.2556, Jun  3 2013, 09:15:01
       flow2d3d.dll entry Flow2D3D::Run
--------------------------------------------------------------------------------

Part I    - Initialisation Time Dep. Data module...
            runid : run_1
Part II   - Creating intermediate files...
Part III  - Initialisation of the Execution module...
Part IV   - Reading complete MD-file...
Initializing communication with COUPLE ...
forrtl: severe (66): output statement overflows record, unit -5, file Internal Formatted Write


...console (in 64-bit mode) gives me the following, with the error "*** ERROR Z-model and Online Couple is not available" in the tri-diag-file:
--------------------------------------------------------------------------------
       Deltares, FLOW2D3D Version 6.01.08.3921, Jul 10 2014, 15:29:27
       flow2d3d.dll entry Flow2D3D::Run
--------------------------------------------------------------------------------

Part I    - Initialisation Time Dep. Data module...
            runid : run_1
Part II   - Creating intermediate files...
Part III  - Initialisation of the Execution module...
Part IV   - Reading complete MD-file...
Initializing communication with COUPLE ...
... continuing
--------------
FLOW: SEND call waiting for COUPLE
FLOW: SEND call finished
FLOW: CLOSE call waiting for COUPLE
forrtl: severe (153): allocatable array or pointer is not allocated


That's why I tried to do it the other way. I generated a communications-file as WAQ-input and added the line "geometry curvilinear-grid z-layers" in the *.hyd-file. But still the results in Quickplot look as if DelWAQ is ignoring the z-model and using sigma-layers: DelWAQ is calculating values for all active cells in the top layer as well as in the bottom layer, what doesn't make sense for my z-model of a lake with steep slopes.

Do you have any ideas how to solve this?
AM
Arjen Markus, modified 5 Years ago.

RE: Coupling problems using Z-Layers

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts
Hm, obviously you have encountered a number of bugs, not sure yet what their nature is. Could you send me the model input files, so that I can have a closer look at this?
MH
Manu Hoffmann, modified 5 Years ago.

RE: Coupling problems using Z-Layers

Youngling Posts: 7 Join Date: 4/10/15 Recent Posts
oh, that would explain things...

my infiles cover a three year period and most are spacially distributed. therefore they sum up to almost 2GB. but i will prepare a smaller set of infiles for a short test period, i just need a little time to do that.
AM
Arjen Markus, modified 5 Years ago.

RE: Coupling problems using Z-Layers

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts
No problem ;). I will just wait for your files.
MH
Manu Hoffmann, modified 5 Years ago.

RE: Coupling problems using Z-Layers

Youngling Posts: 7 Join Date: 4/10/15 Recent Posts
so, here are the infiles except for the meteorological input, i.e. the files for discharge location and dicharge timeseries, the open discharge boundary and the initial conditions file. i am using a regular rectangular grid with 64*174 cells and 50 layers. one possible error source might be the initial-conditions file, because it sets initial conditions for temperature, velocities and tracers for all cells of the grid and doesn't distinguish between active and inactive cells. i already wondered if my problem has to do anything with this...

(in the timeseries i left only three records on the beginning and in the end. the middle part was cut out and dots were inserted instead to symbolize continuity. in the initial conditions file i only wrote one line for each new block/substance and gave the number of repetitions in a comment)
AM
Arjen Markus, modified 5 Years ago.

RE: Coupling problems using Z-Layers

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts
Thanks for these files, but I am missing the .mdf and .grd files at least to try and reproduce your problem. Could you add these as well?
MH
Manu Hoffmann, modified 5 Years ago.

RE: Coupling problems using Z-Layers

Youngling Posts: 7 Join Date: 4/10/15 Recent Posts
hey arjen,

now i prepared and attached the whole data set for the first week of 2011. only the lines of the initial conditions file ("ic.ini") need to be expanded to blocks: each line needs to be printed 174 times. then the initial conditions for the tracer don't make a lot of sense, but that shouldn't affect the core of the problem which is the coupling to WAQ.

i am looking forward to your comments!

Attachments:

AM
Arjen Markus, modified 5 Years ago.

RE: Coupling problems using Z-Layers

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts
With this set of files I have been able to produce the converted files for Delft3D-WAQ without any problem (that is, I needed to edit the FLOW input files a bit) but the whole procedure was smooth enough.

One thing to note: with z-layers layer 1 -- in FLOW -- is the bottom layer and in WAQ it still is the top layer, just as for sigma-layers. I checked the .atr file for the attributes of each segment and that showed an expected variation per layer. I also checked it via QuickPlot: again the layout of the layers depends nicely on the layer index (with the above proviso).

So that raises the question: where is the problem coming from that you encounter?

I chose "Export WAQ output" with no particular horizontal or vertical aggregation. Did you do the same?
MH
Manu Hoffmann, modified 5 Years ago.

RE: Coupling problems using Z-Layers

Youngling Posts: 7 Join Date: 4/10/15 Recent Posts
now i am a little surprised. i switched on the option "online coupling for WAQ" in the "output/storage" dialog (apparently i am using at least another verion of the FLOW-GUI, because i don't find any option named "export WAQ output"). but even with this small sample for me it's all the same: after manipulating the initial conditions file and setting the end date of the simulation to 07/01/2011 00:00:00 i get the same error messages like before.

the problem for me was the coupling to WAQ. i already ran FLOW in the stand-alone mode and everything worked fine. so i am really curious in what what kind of output you produced and how you did that. did you use the online coupling to WAQ (mdf-flag "Waqmod = #Y#")? if that's the case, what else do i have to change in order to prepare the online coupling? are there any more keywords that need to be added in the mdf-file? and what other files do i need to prepare for the WAQ-input?
AM
Arjen Markus, modified 5 Years ago.

RE: Coupling problems using Z-Layers

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts
I have attached my MDF file. The differences with yours are:
- The keyword Waqmod is missing from mine, yours has "Waqmod = #Y#
- I have instead: Waqagg = #active only# and "Ilagg = 1 1 1 ..."

I will have to consult a FLOW expert as to what exactly these options mean - I mostly deal with WAQ and the coupling procedure itself.
MH
Manu Hoffmann, modified 5 Years ago.

RE: Coupling problems using Z-Layers (Answer)

Youngling Posts: 7 Join Date: 4/10/15 Recent Posts
thanks you for your support Arjen! now i know what i did wrong: i was confused by the different output options of FLOW and the options for coupling FLOW to WAQ. my mistake was that i thought the coupling to WAQ is done via a communications-file, that can be switched on in the FLOW-GUI in the output section. it seems like this option does not work out for the coupling when you're using z-layers...

as i see it now, there exist three options how to do the coupling:

a) offline-coupling (see FLOW-manual B.18 "Creating D-Water Quality Input Files"):
thats what you did. here first the FLOW-model is run and the input for WAQ written is written to the various com(munication)-files. this option is initialised by adding and specifying the keywords "Flwq" (start/stop-times and the timestep for the coupling output), "WaqAgg" (horizontal aggregation) and "ilAggr" (vertical aggregation) to the mdf-file. after the FLOW-run was finished, the WAQ-model can be run in a seperate step.

b) online- or built-in-coupling (see WAQ-manual 11.1 "Built-in cooupling with Delft3D-FLOW):
FLOW and WAQ are run alternatingly and the coupling is done automatically. this option is only working for sigma-layers and cannot be used with a z-model! it can be switched on in the GUI in the section "ouput/storage" what adds "Waqmod = #Y#" to the mdf-file.

c) via a simple communications-file as it can be switched on in FLOW-GUI and is initialised by the mdf-keyword "Flpp"; this might work out using sigma-layers but for my z-model it didn't.

be careful: options a) and c) look quite similar but they are not!
for me option a) was the only possible way to realize the coupling of my z-model.
AM
Arjen Markus, modified 5 Years ago.

RE: Coupling problems using Z-Layers (Answer)

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts
That is right - they represent different stages of the historical development of Delft3D. Z-layers are a newer development (but not so new) and there was a separate coupling program for such models. Now, however, we find that the builtin coupling (the actual "name" for option a) is much more desirable and practical.

Because of this confusion, I will make an issue that we clarify the documentation on this point.
DK
Danker Kolijn, modified 5 Years ago.

RE: Coupling problems using Z-Layers

Youngling Posts: 10 Join Date: 11/4/14 Recent Posts
Dear Arjan,

I've been trying to follow the advice in this thread with limited success. I also have a model with z-layers where I am using the FLOW, WAQ output option.

I plan to incrementally increase the complexity of my model:

continuity --> salinity --> temperature --> suspended sediment --> nutrients --> DO --> algae

I'm currently using the WAQ output from my FLOW model and I'm having trouble incorporating the temperature and salinity output .tem file into my WAQ inp. file. I've tried a few times to modify the input text file with, however the model does not generate the expected temperatures and salinity.

SEG_FUNCTIONS
'Temperature_Flow' ; name of segment function
ALL
BINARY_FILE 'com-Holetown.tem' ; binary file

Perhaps i've specified something wrong in PLCT? I've attached my model, perhaps you can spot the issue?
CT
Christophe Thiange, modified 5 Years ago.

RE: Coupling problems using Z-Layers

Jedi Knight Posts: 125 Join Date: 11/15/12 Recent Posts
Hi Danker,

I think the issue here is that you named the segment function 'Temperature_Flow' instead of 'Temp', which is the name used by D-WAQ for temperature.

Christophe
AM
Arjen Markus, modified 5 Years ago.

RE: Coupling problems using Z-Layers

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts
I agee with Christophe - Delft3D-WAQ depends on the names of the various process parameters and substances for its processes. Therefore temperature should be called "TEMP" (the case does not matter, "Temp" and "teMP" would also do).

Have you checked the .lsp file? This contains information about which parameters (constants, timeseries, "parameters" in the Delft3D-WAQ sense - scalar fields that are constant in time and segment functions - scalar fields that vary in time) are used for what process and which parameters are not used.

I could not download the zip file, which may be due to some hiccup in the network I am using. Maybe I will succeed later.
DK
Danker Kolijn, modified 5 Years ago.

RE: Coupling problems using Z-Layers

Youngling Posts: 10 Join Date: 11/4/14 Recent Posts
Christophe & Arjen,

Thank you very much for the quick reply. I have changed the .inp file but I still didn't get the satisfactory results I was hoping for. I'm hoping to recreate the temperature output from FLOW in WAQ. Perhaps i'm turning on some wrong processes in the PLCT where I now have a combination of WAQ computed processes and FLOW inputs.

I read an earlier post by Christophe that "Temperature and heat exchange (Temperatur)" should be switched off when using FLOW input otherwise WAQ is computing temperature. Is there anything else I should know, such as (de)activating the dispersion processes? I assumed these would come directly from the FLOW output.

Many thanks again,

Danker
AM
Arjen Markus, modified 5 Years ago.

RE: Coupling problems using Z-Layers

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts
A lot is taken care of by Delft3D-WAQ, but you have give it some information about where to find the data and what to do and in a sense what not to do.

Do you have an up-to-date set of files for us to look at? The zip file you attached earlier will be out of date I guess.
CT
Christophe Thiange, modified 5 Years ago.

RE: Coupling problems using Z-Layers

Jedi Knight Posts: 125 Join Date: 11/15/12 Recent Posts
I could have look at your zipped case. You selected water temperature as a substance to be modelled, this is why your segment function is ignored. Just remove water temperature from your substances. Any other process needing Temp as input will then get it from your segment function.
DK
Danker Kolijn, modified 5 Years ago.

RE: Coupling problems using Z-Layers

Youngling Posts: 10 Join Date: 11/4/14 Recent Posts
Christophe,

Thank you for clearing that up. It seems that this has resolved my issue. Furthermore, I found that I may have had some issues setting up my scenario. A note for other users.......be sure you don't make the mistakes I did. I found that:

1) When setting up my aggregated grid in DIDO it was best to use Import --> MDF-FLOW (Delft 3D) because this ensured that all boundaries, dry points, etc. from my FLOW scenario were properly implemented in WAQ
2) It is easiest to use direct coupling in FLOW by enabling export WAQ input option in GUI
3) don't forget for z-layer models to modify .hyd file from "geometry curvilinear-grid" to "geometry curvilinear-grid z-layers" on line 3
4) For temperature and salinity from FLOW you require to modify .inp file

Also, as an aside I found that when using NestHD2 to create FLOW inputs for a nested z-layer WQ model domain it is important to set the min/max salinity and temperature slightly above the modeled results. NestHD2 will otherwise replace any values above or below these thresholds with the constant value specified..... therefore changing your .bct and .bcc input of your FLOW, which will then affect your WQ model input (in my case making it incorrect).

many thanks again,

Danker
AM
Arjen Markus, modified 5 Years ago.

RE: Coupling problems using Z-Layers

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts
This point:

4) For temperature and salinity from FLOW you require to modify .inp file

is not quite accurate. The user-interface allows you to select the output files from Delft3D-FLOW with temperature and salinity directly. This is safer than editing the input file yourself, as that will be overwritten by the GUI. The receipe for this:
- Select the parameter in the Parameters window
- Select Edit data and from the menu select Properties/Details and in that dialogue window "Scalar Field"
- Then you can import a swgment function file