Coupling problems using Z-Layers - Delwaq - Delft3D
Home_intro
intro story DELWAQ
DELWAQDELWAQ is the engine of the D-Water Quality and D-Ecology programmes of the Delft3D suite. It is based on a rich library from which relevant substances and processes can be selected to quickly put water and sediment quality models together. The processes library covers many aspects of water quality and ecology, from basic tracers, dissolved oxygen, nutrients, organic matter, inorganic suspended matter, heavy metals, bacteria and organic micro-pollutants, to complex algae and macrophyte dynamics. High performance solvers enable the simulation of long periods, often required to capture the full cycles of the processes being modelled. The finite volume approach underlying DELWAQ allows it to be coupled to both the structured grid hydrodynamics of the current Delft3D-FLOW engine and the upcoming D-Flow Flexible Mesh engine (1D-2D-3D) of the Delft3D Flexible Mesh Suite (or even other models such as TELEMAC). 'DELWAQ in open source' is our invitation to all leading experts to collaborate in further development and research in the field of water quality, ecology and morphology using Delft3D. Feel free to post your DELWAQ related questions or comments in this dedicated forum space. If you are new to DELWAQ, the tutorial (in the user manual) is a good place to start. A list of DELWAQ related publications is available here. ** PLEASE TAG YOUR POST! ** | Sub groups
|
Message Boards
Coupling problems using Z-Layers
Manu Hoffmann, modified 6 Years ago.
Coupling problems using Z-Layers
Youngling Posts: 7 Join Date: 4/10/15 Recent PostsI 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
Arjen Markus, modified 6 Years ago.
RE: Coupling problems using Z-Layers
Jedi Knight Posts: 223 Join Date: 1/26/11 Recent PostsIf that is not possible for you, can you at least tell what the symptoms are that make you think things are going wrong?
Manu Hoffmann, modified 6 Years ago.
RE: Coupling problems using Z-Layers
Youngling Posts: 7 Join Date: 4/10/15 Recent Poststhank 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?
Arjen Markus, modified 6 Years ago.
RE: Coupling problems using Z-Layers
Jedi Knight Posts: 223 Join Date: 1/26/11 Recent PostsManu Hoffmann, modified 6 Years ago.
RE: Coupling problems using Z-Layers
Youngling Posts: 7 Join Date: 4/10/15 Recent Postsmy 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.
Arjen Markus, modified 6 Years ago.
RE: Coupling problems using Z-Layers
Jedi Knight Posts: 223 Join Date: 1/26/11 Recent PostsManu Hoffmann, modified 6 Years ago.
RE: Coupling problems using Z-Layers
Youngling Posts: 7 Join Date: 4/10/15 Recent Posts(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)
Attachments:
Arjen Markus, modified 6 Years ago.
RE: Coupling problems using Z-Layers
Jedi Knight Posts: 223 Join Date: 1/26/11 Recent PostsManu Hoffmann, modified 6 Years ago.
RE: Coupling problems using Z-Layers
Youngling Posts: 7 Join Date: 4/10/15 Recent Postsnow 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:
Arjen Markus, modified 6 Years ago.
RE: Coupling problems using Z-Layers
Jedi Knight Posts: 223 Join Date: 1/26/11 Recent PostsOne 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?
Manu Hoffmann, modified 6 Years ago.
RE: Coupling problems using Z-Layers
Youngling Posts: 7 Join Date: 4/10/15 Recent Poststhe 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?
Arjen Markus, modified 6 Years ago.
RE: Coupling problems using Z-Layers
Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts- 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.
Manu Hoffmann, modified 6 Years ago.
RE: Coupling problems using Z-Layers (Answer)
Youngling Posts: 7 Join Date: 4/10/15 Recent Postsas 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.
Arjen Markus, modified 6 Years ago.
RE: Coupling problems using Z-Layers (Answer)
Jedi Knight Posts: 223 Join Date: 1/26/11 Recent PostsBecause of this confusion, I will make an issue that we clarify the documentation on this point.
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?
Attachments:
Anonymous Anonymous, modified 5 Years ago.
RE: Coupling problems using Z-Layers
Jedi Master Posts: 333 Join Date: 7/30/20 Recent PostsI 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
Arjen Markus, modified 5 Years ago.
RE: Coupling problems using Z-Layers
Jedi Knight Posts: 223 Join Date: 1/26/11 Recent PostsHave 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.
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
Arjen Markus, modified 5 Years ago.
RE: Coupling problems using Z-Layers
Jedi Knight Posts: 223 Join Date: 1/26/11 Recent PostsDo 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.
Anonymous Anonymous, modified 5 Years ago.
RE: Coupling problems using Z-Layers
Jedi Master Posts: 333 Join Date: 7/30/20 Recent PostsThank 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
Arjen Markus, modified 5 Years ago.
RE: Coupling problems using Z-Layers
Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts4) 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