Editing the WQ run information#
Tip
This page contains additional information on the generic D-Water Quality module, not direclty related to the HydroMT-delwaq plugin.
In order to run the D-Water Quality module of DELWAQ, an input file is used to set up all the relevant run information such as substances and processes to include, run time information, data and model parameters
to use etc. This is set up in a .inp file. A template of such a file
, for an WQ run, is shown below.
The input file is separated into 10 input blocks each requiring different type of information. You can find more info on what is expected where in the DELWAQ input file documentation. In short, the ten blocks are:
B1: Identification, selected substances
B2: Timers, integration, monitoring
B3: Grid and values of the volumes
B4: Hydrodynamic data
B5: Open boundary conditions
B6: Loads and withdrawals
B7: Process steering
B8: Initial conditions
B9: Model output
B10: Statistical output
With hydroMT, different files were prepared containing information that can be directly linked and included in this input file. These are:
The different files in the config folder: each filename has a prefix containing the block number it should be inserted in (ex: B1_timestamp.inc).
Emission and other grid data stored in staticdata folder
Time-dependant data such as hydrological fluxes stored in dynamicdata folder.
Depending on their format (binary or ASCII), the files can be included in the input file using the following syntax.
For ASCII files: keyword INCLUDE + path/to/ascii
INCLUDE 'config\B1_timestamp.inc'
For binary files: keywords ALL BINARY_FILE + path/to/binary
ALL BINARY_FILE 'dynamicdata\hydrology.bin'
In the template below, all (mandatory) files produced by HydroMT have been added and linked. Some explanations on the specificities of the settings for the D-Water Quality linked to one-substance D-Emissions models:
In block 1, you can see that we are going to model TN as a tracer for simplification (less expert processes to define). The generic name for a tracer in DELWAQ is cTR1:
;Nr Name
1 cTR1
The boundary conditions and initial concentrations of our substance cTR1 needs to be defined in block 5 and 8 respectively and can be initialized with zero:
ITEM BD_1 CONCENTRATIONS cTR1 DATA 0.0
#5
INITIALS cTR1 DEFAULTS 0.0
#8
The link of our tracer TRA with D-Emissions output and to the relevant process is activated in block 7 of the input file (1st line), the 2nd line is added to map all of the emitted tracer Tra to a conservative tracer substance cTR1 (Note: not used in this tutorial, but EM also supports to simulate a decayable tracer dTR1, which requires to also define decay rates):
CONSTANTS Active_EM_TRA DATA 1
CONSTANTS TratocTR1 DATA 1.0
999 80 ';'
;DELWAQ_VERSION_4.910 ; Delwaq version number
;PRINT_OUTPUT_OPTION_2 ; Debug level
; TEMPLATE FILE FOR EMISSION DISAGGREGATION
; First input block
'Demo Emission Model linked to WFLOW '
' '
' '
INCLUDE 'config\B1_timestamp.inc'
1 0
;Nr Name
1 cTR1 ;
#1;
;###############################################################################
; Second input block
86400 'DDHHMMSS' 'DDHHMMSS' ; system clock
15.73 ; integration option
BAL_NOLUMPPROCESSES
BAL_NOLUMPLOADS
BAL_NOLUMPTRANSPORT
BAL_NOSUPPRESSSPACE
BAL_NOSUPPRESSTIME
INCLUDE 'config\B2_timers.inc'
1 ; Monitoring areas in this file
INCLUDE 'config\B2_nrofmon.inc'
INCLUDE 'config\B2_stations.inc'
INCLUDE 'config\B2_monareas.inc'
2 ; No monitoring cross areas
INCLUDE 'config\B2_outputtimes.inc'
#2;
;###############################################################################
; Third input block
; Name of coordinates file - conforming to UGRID conventions
UGRID 'config\B3_waqgeom.nc'
INCLUDE 'config\B3_nrofseg.inc'
2 ; grid layout not used
; 0 ; constant property arrays
; 0 ; time varying property arrays
INCLUDE 'config\B3_attributes.inc'
-2 ; volumes in external file
'dynamicdata\volume.dat'
#3;
;###############################################################################
; Fourth input block
;
INCLUDE 'config\B4_nrofexch.inc'
0 ; # of dispersion arrays
0 ; # of velocity arrays
1 ; first form is used for input
1 ; exchange pointers in this file
INCLUDE 'config\B4_pointer.inc'
1 ; dispersions in this file
1.0 1.0 1.0 ; scale factors in 3 directions
0.0 0.0 0.0 ; values in 3 directions
1 ; areas in this file
2 ; constant, defaults
1.0 1.0 ; scale and value
0
-2 ; flows in binary file
'dynamicdata\flow.dat'
0 ; constant length
1.0 ; scale factor
1.0 1.0 1.0 ; values in 3 directions
#4;
;###############################################################################
; Fifth input block, water quality calculation
INCLUDE 'config\B5_boundlist.inc'
0 ; no Tatcher-Harleman time lags
ITEM BD_1 CONCENTRATIONS cTR1 DATA 0.0
#5;
;###############################################################################
; Sixth input block, Dry Waste Loads block
; Number of loads (dummy value)
0 ; Number of loads
#6;
;###############################################################################
; Seventh input block
CONSTANTS 'Nothreads' DATA 1 ; Multicore
CONSTANTS Only_Active DATA 1
CONSTANTS Active_EM_TRA DATA 1
CONSTANTS TratocTR1 DATA 1.0
CONSTANTS MaxIter DATA 100000
CONSTANTS Tolerance DATA 1E-12
CONSTANTS Dry_THresh DATA 0.0
CONSTANTS 'iteration report' DATA 0.0
; geometry
PARAMETERS Surf ALL BINARY_FILE 'staticdata\surface.dat'
#7
;###############################################################################
; Eighth input block
INITIALS cTR1 DEFAULTS 0.0
#8
;###############################################################################
; Ninth input block
1 ; Conditions follow in this file
1 ; Monitor-file
0 ; Grid-file
1 ; His
1 ; Map
; Binary/Nefis and History/Map
1 ; switch on binary History file
1 ; switch on binary Map file
1 ; switch off Nefis History file
1 ; switch off Nefis Map file
#9
;###############################################################################
; Tenth input block
period 'year2018'
suffix ' yr18'
start-time '2017/12/31-00:00:00'
stop-time '2018/12/31-00:00:00'
end-period
output-operation 'STADSC'
substance 'cTR1'
suffix ''
end-output-operation
#10