Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/engines_gpl/waq/resources/process_lib/csvFiles/inputs.csv
Original file line number Diff line number Diff line change
Expand Up @@ -267,18 +267,23 @@ inpupr,inpuit,inpunm,inpude,inpudo,inpusx
"Age1 ","cTR1 ", 1,"N","x",1
"Age1 ","dTR1 ", 2,"N","x",1
"Age1 ","RcDecTR1 ", 3,"Y","x",1
"Age1 ","AgeThresh ", 4,"Y","x",1
"Age2 ","cTR2 ", 1,"N","x",1
"Age2 ","dTR2 ", 2,"N","x",1
"Age2 ","RcDecTR2 ", 3,"Y","x",1
"Age2 ","AgeThresh ", 4,"Y","x",1
"Age3 ","cTR3 ", 1,"N","x",1
"Age3 ","dTR3 ", 2,"N","x",1
"Age3 ","RcDecTR3 ", 3,"Y","x",1
"Age3 ","AgeThresh ", 4,"Y","x",1
"Age4 ","cTR4 ", 1,"N","x",1
"Age4 ","dTR4 ", 2,"N","x",1
"Age4 ","RcDecTR4 ", 3,"Y","x",1
"Age4 ","AgeThresh ", 4,"Y","x",1
"Age5 ","cTR5 ", 1,"N","x",1
"Age5 ","dTR5 ", 2,"N","x",1
"Age5 ","RcDecTR5 ", 3,"Y","x",1
"Age5 ","AgeThresh ", 4,"Y","x",1
"WFetch ","WindDir ", 1,"N","x",1
"WFetch ","WFetch_1 ", 2,"N","x",1
"WFetch ","WinDir_1 ", 3,"N","x",1
Expand Down
94 changes: 47 additions & 47 deletions src/engines_gpl/waq/resources/process_lib/csvFiles/items.csv

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ procid,procco,procfo,procnm
"AtmDep_Sal",123,"ATMDEP ","Atmospheric deposition salinity "
"AtmDep_Ecl",123,"ATMDEP ","Atmospheric deposition E-coli bacteria "
"AttribOut ",123,"ATTOUT ","Output segment attribute "
"Cascade ",123,"CASCAD "," Cascadal transformation "
"Cascade ",123,"CASCAD ","Cascadal transformation "
"Decay1 ",123,"DECTRA ","Decay of decayable tracer 1 "
"Decay2 ",123,"DECTRA ","Decay of decayable tracer 2 "
"Decay3 ",123,"DECTRA ","Decay of decayable tracer 3 "
Expand Down
Binary file modified src/engines_gpl/waq/resources/process_lib/proc_def.dat
Binary file not shown.
Binary file modified src/engines_gpl/waq/resources/process_lib/proc_def.def
Binary file not shown.
37 changes: 29 additions & 8 deletions src/engines_gpl/waq/waq_process/watage.f90
Original file line number Diff line number Diff line change
Expand Up @@ -60,30 +60,50 @@ subroutine watage (process_space_real, fl, ipoint, increm, num_cells, &
INTEGER(kind = int_wp) :: IPOINT(*), INCREM(*), num_cells, NOFLUX, &
IEXPNT(4, *), IKNMRK(*), num_exchanges_u_dir, num_exchanges_v_dir, num_exchanges_z_dir, num_exchanges_bottom_dir

INTEGER(kind = int_wp) :: IP1, IP2, IP3, IP4, IFLUX, ISEG
REAL(kind = real_wp) :: CONCWA, CONCTR, DECAYR, ARGUM, AGE, FDECAY
INTEGER(kind = int_wp) :: IP1, IP2, IP3, IP4, IP5, IFLUX, ISEG, count_conc
REAL(kind = real_wp) :: CONCWA, CONCTR, DECAYR, ARGUM, AGE, FDECAY, temp_conc, threshold

IP1 = IPOINT(1)
IP2 = IPOINT(2)
IP3 = IPOINT(3)
IP4 = IPOINT(4)
IP5 = IPOINT(5)
!
IFLUX = 0

!
! Determine the overall average concentration
!
count_conc = 0
temp_conc = 0.0
do iseg = 1, num_cells
if (btest(iknmrk(iseg), 0)) then
concwa = process_space_real(ip1)
temp_conc = temp_conc + concwa
count_conc = count_conc + 1
ip1 = ip1 + increm(1)
endif
end do
temp_conc = temp_conc / max( count_conc, 1)

ip1 = ipoint(1)

DO ISEG = 1, num_cells

IF (BTEST(IKNMRK(ISEG), 0)) THEN
!
CONCWA = process_space_real(IP1)
CONCTR = process_space_real(IP2)
DECAYR = process_space_real(IP3)
CONCWA = process_space_real(IP1)
CONCTR = process_space_real(IP2)
DECAYR = process_space_real(IP3)
THRESHOLD = max( 1.0e-20, process_space_real(IP4) * temp_conc )
!
IF (DECAYR < 1E-20) CALL write_error_message ('RCDECTR in WATAGE zero')

! Calculate age
!
IF (CONCWA <= 1.0E-20) THEN
IF (CONCWA <= THRESHOLD) THEN
AGE = -999.
ELSEIF (CONCTR <= 1.0E-20) THEN
ELSEIF (CONCTR <= THRESHOLD) THEN
AGE = -999.
ELSEIF (CONCTR > CONCWA) THEN
AGE = -999.
Expand All @@ -104,7 +124,7 @@ subroutine watage (process_space_real, fl, ipoint, increm, num_cells, &
!
! Output
!
process_space_real(IP4) = AGE
process_space_real(IP5) = AGE
FL(1 + IFLUX) = FDECAY
!
ENDIF
Expand All @@ -114,6 +134,7 @@ subroutine watage (process_space_real, fl, ipoint, increm, num_cells, &
IP2 = IP2 + INCREM (2)
IP3 = IP3 + INCREM (3)
IP4 = IP4 + INCREM (4)
IP5 = IP5 + INCREM (5)
!
end do
!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<testCases xmlns="http://schemas.deltares.nl/deltaresTestbench_v3">
<testCase name="e03_f02_c04_statistics" ref="dwaq_default">
<dependency version="2025-11-11T09:20:00" local_dir="f02_hongkong_c00_hydro">e03_waq/f02_hongkong/c00_hydro</dependency>
<path version="2025-11-17T08:09:54.514000">e03_waq/f02_hongkong/c04_statistics</path>
<path version="2025-12-05T12:32:32.206000">e03_waq/f02_hongkong/c04_statistics</path>
<maxRunTime>3000.0</maxRunTime>
<checks>
<file name="group2-test004.ada" type="NEFIS">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
</testCase>

<testCase name="e03_f18_c02a_z_layers_track_vs_alone" ref="dwaq_default">
<path version="2025-04-07T22:00:00">e03_waq/f18_waq_part_combined_run/c02a_z_layers_track_vs_alone</path>
<path version="2025-12-05T09:44:16.990000">e03_waq/f18_waq_part_combined_run/c02a_z_layers_track_vs_alone</path>
<maxRunTime>3000.0</maxRunTime>
<checks>
<!-- NOTE: the reference here is a run with delpar alone, delwaq takeover time was increased beyond the time of the run -->
Expand Down