5.13.3-dev0
mHM
The mesoscale Hydrological Model
Loading...
Searching...
No Matches
mo_mrm_routing.f90
Go to the documentation of this file.
1!> \file mo_mrm_routing.f90
2!> \brief \copybrief mo_mrm_routing
3!> \details \copydetails mo_mrm_routing
4
5!> \brief Performs runoff routing for mHM at level L11.
6!> \details This module performs flood routing at a given time step through the stream network at level L11 to the sink cell.
7!! The Muskingum flood routing algorithm is used.
8!> \changelog
9!! - Stephan Thober Aug 2015
10!! - adapted to mRM
11!! - Sebastian Mueller Jun 2020
12!! - outsourcing helper functions
13!> \authors Luis Samaniego
14!> \date Dec 2012
15!> \copyright Copyright 2005-\today, the mHM Developers, Luis Samaniego, Sabine Attinger: All rights reserved.
16!! mHM is released under the LGPLv3+ license \license_note
17!> \ingroup f_mrm
19
20 ! This module performs runoff flood routing for mHM.
21
22 ! Written Luis Samaniego, Dec 2012
23
24 USE mo_kind, ONLY : i4, dp
25
26 IMPLICIT NONE
27
28 PRIVATE
29
30 PUBLIC :: mrm_routing
31
32 ! ------------------------------------------------------------------
33
34CONTAINS
35
36 ! ------------------------------------------------------------------
37
38 ! NAME
39 ! mRM_routing
40
41 ! PURPOSE
42 !> \brief route water given runoff
43
44 !> \details This routine first performs mpr for the routing variables
45 !> if required, then accumulates the runoff to the routing resolution
46 !> and eventually routes the water in a third step. The last step is
47 !> repeated multiple times if the routing timestep is smaller than
48 !> the timestep of the hydrological timestep
49
50 ! INTENT(IN)
51 !> \param[in] "logical :: read_states" whether states are derived from restart file
52 !> \param[in] "integer(i4) :: processCase" Process switch for routing
53 !> \param[in] "real(dp), dimension(:) :: global_routing_param" routing parameters
54 !> \param[in] "real(dp), dimension(:) :: L1_total_runoff" total runoff from L1 grid cells
55 !> \param[in] "real(dp), dimension(:) :: L1_areaCell" L1 cell area
56 !> \param[in] "integer(i4), dimension(:) :: L1_L11_Id" L1 cell ids on L11
57 !> \param[in] "real(dp), dimension(:) :: L11_areaCell" L11 cell area
58 !> \param[in] "integer(i4), dimension(:) :: L11_L1_Id" L11 cell ids on L1
59 !> \param[in] "integer(i4), dimension(:) :: L11_netPerm" L11 routing order
60 !> \param[in] "integer(i4), dimension(:) :: L11_fromN" L11 source grid cell order
61 !> \param[in] "integer(i4), dimension(:) :: L11_toN" L11 target grid cell order
62 !> \param[in] "integer(i4) :: L11_nOutlets" L11 number of outlets/sinks
63 !> \param[in] "integer(i4) :: timestep" simulation timestep in [h]
64 !> \param[in] "real(dp) :: tsRoutFactor" factor between routing timestep and
65 !> hydrological timestep
66 !> \param[in] "integer(i4) :: nNodes" number of nodes
67 !> \param[in] "integer(i4) :: nInflowGauges" number of inflow gauges
68 !> \param[in] "integer(i4), dimension(:) :: InflowGaugeIndexList" index list of inflow gauges
69 !> \param[in] "logical, dimension(:) :: InflowGaugeHeadwater" flag for headwater cell of inflow gauge
70 !> \param[in] "integer(i4), dimension(:) :: InflowGaugeNodeList" gauge node list at L11
71 !> \param[in] "real(dp), dimension(:) :: InflowDischarge" inflowing discharge at discharge gauge at
72 !> current day
73 !> \param[in] "integer(i4) :: nGauges" number of recording gauges
74 !> \param[in] "integer(i4), dimension(:) :: gaugeIndexList" index list for outflow gauges
75 !> \param[in] "integer(i4), dimension(:) :: gaugeNodeList" gauge node list at L11
76 !> \param[in] "logical :: map_flag" flag indicating whether routing resolution
77 !> iscoarser than hydrologic resolution
78 !> \param[in] "real(dp), dimension(:) :: L11_length" L11 link length
79 !> \param[in] "real(dp), dimension(:) :: L11_slope" L11 slope
80 !> \param[in] "real(dp), dimension(:) :: L11_FracFPimp" L11 fraction of flood plain with impervios
81 !> cover
82
83 ! INTENT(INOUT)
84 !> \param[inout] "real(dp), dimension(:) :: L11_C1" L11 muskingum parameter 1
85 !> \param[inout] "real(dp), dimension(:) :: L11_C2" L11 muskingum parameter 2
86 !> \param[inout] "real(dp), dimension(:) :: L11_qOut" total runoff from L11 grid cells
87 !> \param[inout] "real(dp), dimension(:, :) :: L11_qTIN" L11 inflow to the reach
88 !> \param[inout] "real(dp), dimension(:, :) :: L11_qTR" L11 routed outflow
89 !> \param[inout] "real(dp), dimension(:) :: L11_qMod" modelled discharge at each grid cell
90 !> \param[inout] "real(dp), dimension(:) :: GaugeDischarge" modelled discharge at each gauge
91
92 ! HISTORY
93 !> \authors Stephan Thober
94
95 !> \date Aug 2015
96
97 ! Modifications:
98 ! Stephan Thober Sep 2015 - using arguments instead of global variables
99 ! Stephan Thober Sep 2015 - added variables for routing resolution higher than hydrologic resolution
100 ! Stephan Thober May 2016 - added check whether gauge is actually inside modelling domain before copying simulated runoff
101 ! Stephan Thober Nov 2016 - implemented second routing process i.e. adaptive timestep
102 ! Robert Schweppe Jun 2018 - refactoring and reformatting
103
104 subroutine mrm_routing( &
105 read_states, processCase, global_routing_param, L1_total_runoff, L1_areaCell, L1_L11_Id, &
106 L11_areaCell, L11_L1_Id, L11_netPerm, L11_fromN, L11_toN, L11_nOutlets, timestep, tsRoutFactor, &
107 nNodes, nInflowGauges, InflowGaugeIndexList, InflowGaugeHeadwater, InflowGaugeNodeList, &
108 InflowDischarge, nGauges, gaugeIndexList, gaugeNodeList, map_flag, L11_length, L11_slope, &
109 L11_FracFPimp, sink_cells, L11_C1, L11_C2, L11_qOut, L11_qTIN, L11_qTR, L11_qMod, GaugeDischarge &
110 )
111
112 use mo_constants, only : t0_dp
114 use mo_mrm_mpr, only : reg_rout
116 ! use mo_mrm_riv_temp_class, only : riv_temp_type
117
118 implicit none
119
120 ! whether states are derived from restart file
121 logical, intent(in) :: read_states
122 ! Process switch for routing
123 integer(i4), intent(in) :: processcase
124 ! routing parameters
125 real(dp), dimension(:), intent(in) :: global_routing_param
126 ! total runoff from L1 grid cells
127 real(dp), dimension(:), intent(in) :: l1_total_runoff
128 ! L1 cell area
129 real(dp), dimension(:), intent(in) :: l1_areacell
130 ! L1 cell ids on L11
131 integer(i4), dimension(:), intent(in) :: l1_l11_id
132 ! L11 cell area
133 real(dp), dimension(:), intent(in) :: l11_areacell
134 ! L11 cell ids on L1
135 integer(i4), dimension(:), intent(in) :: l11_l1_id
136 ! L11 routing order
137 integer(i4), dimension(:), intent(in) :: l11_netperm
138 ! L11 source grid cell order
139 integer(i4), dimension(:), intent(in) :: l11_fromn
140 ! L11 target grid cell order
141 integer(i4), dimension(:), intent(in) :: l11_ton
142 ! L11 number of outlets/sinks
143 integer(i4), intent(in) :: l11_noutlets
144 ! simulation timestep in [h]
145 integer(i4), intent(in) :: timestep
146 ! factor between routing timestep and hydrological timestep
147 real(dp), intent(in) :: tsroutfactor
148 ! number of nodes
149 integer(i4), intent(in) :: nnodes
150 ! number of inflow gauges
151 integer(i4), intent(in) :: ninflowgauges
152 ! index list of inflow gauges
153 integer(i4), dimension(:), intent(in) :: inflowgaugeindexlist
154 ! flag for headwater cell of inflow gauge
155 logical, dimension(:), intent(in) :: inflowgaugeheadwater
156 ! gauge node list at L11
157 integer(i4), dimension(:), intent(in) :: inflowgaugenodelist
158 ! inflowing discharge at discharge gauge at current day
159 real(dp), dimension(:), intent(in) :: inflowdischarge
160 ! number of recording gauges
161 integer(i4), intent(in) :: ngauges
162 ! index list for outflow gauges
163 integer(i4), dimension(:), intent(in) :: gaugeindexlist
164 ! gauge node list at L11
165 integer(i4), dimension(:), intent(in) :: gaugenodelist
166 ! flag indicating whether routing resolution iscoarser than hydrologic resolution
167 logical, intent(in) :: map_flag
168 ! L11 link length
169 real(dp), dimension(:), intent(in) :: l11_length
170 ! L11 slope
171 real(dp), dimension(:), intent(in) :: l11_slope
172 ! L11 fraction of flood plain with impervios cover
173 real(dp), dimension(:), intent(in) :: l11_fracfpimp
174 ! [-] sink nodes
175 integer(i4), dimension(:), intent(in) :: sink_cells
176 ! L11 muskingum parameter 1
177 real(dp), dimension(:), intent(inout) :: l11_c1
178 ! L11 muskingum parameter 2
179 real(dp), dimension(:), intent(inout) :: l11_c2
180 ! total runoff from L11 grid cells
181 real(dp), dimension(:), intent(inout) :: l11_qout
182 ! L11 inflow to the reach
183 real(dp), dimension(:, :), intent(inout) :: l11_qtin
184 ! L11 routed outflow
185 real(dp), dimension(:, :), intent(inout) :: l11_qtr
186 ! modelled discharge at each grid cell
187 real(dp), dimension(:), intent(inout) :: l11_qmod
188 ! modelled discharge at each gauge
189 real(dp), dimension(:), intent(inout) :: gaugedischarge
190
191 integer(i4) :: s11, e11 ! only for riv temp routing
192 integer(i4) :: gg
193 integer(i4) :: tt
194 ! number of routing loops
195 integer(i4) :: rout_loop
196 ! variable for accumulation
197 real(dp), dimension(size(L11_qMod, dim = 1)) :: l11_qacc
198 real(dp), dimension(:), allocatable :: l11_e_acc
199
200 if ( riv_temp_pcs%active ) then
201 ! allocate accumulated temperature energy
202 allocate(l11_e_acc(size(l11_qmod, dim = 1)))
203 l11_e_acc = 0._dp ! init to zero
204 ! get shortcuts for start end ending of current L11-domain
205 s11 = riv_temp_pcs%s11
206 e11 = riv_temp_pcs%e11
207 end if
208
209 if (is_start) is_start = .false.
210
211 ! this is using the sealed fraction for determining the routing parameters
212 ! MPR has already been done
213 if (processcase .eq. 1_i4 .AND. (.not. read_states)) then
214 ! for a single node model run
215 if (nnodes .GT. 1) then
216 call reg_rout(global_routing_param, &
217 l11_length, l11_slope, l11_fracfpimp(: nnodes - l11_noutlets), &
218 real(timestep, dp), l11_c1(: nnodes - l11_noutlets), l11_c2(: nnodes - l11_noutlets))
219 end if
220 end if
221
222 ! =====================================================================
223 ! NOW, EXECUTE ROUTING
224 ! ====================================================================
225 ! calculate number of routing loops
226 rout_loop = max(1_i4, nint(1._dp / tsroutfactor))
227
228 ! runoff accumulation from L1 to L11 level
229 call l11_runoff_acc( &
230 l1_total_runoff, l1_areacell, l1_l11_id, &
231 l11_areacell, l11_l1_id, timestep, & ! Intent IN
232 map_flag, & ! Intent IN
233 l11_qout & ! Intent OUT
234 )
235 ! add inflow
236 call add_inflow( &
237 ninflowgauges, &
238 inflowgaugeindexlist, &
239 inflowgaugeheadwater, &
240 inflowgaugenodelist, &
241 inflowdischarge, & ! Intent IN
242 l11_qout & ! Intent INOUT
243 )
244 ! for a single node model run
245 if(nnodes .GT. 1) then
246 l11_qacc = 0._dp
247 ! routing multiple times if timestep is smaller than 1
248 do tt = 1, rout_loop
249 ! routing of water within river reaches
250 call l11_routing( &
251 nnodes, &
252 nnodes - l11_noutlets, &
253 l11_netperm, &
254 l11_fromn, & ! Intent IN
255 l11_ton, & ! Intent IN
256 l11_c1, & ! Intent IN
257 l11_c2, & ! Intent IN
258 l11_qout, & ! Intent IN
259 ninflowgauges, & ! Intent IN
260 inflowgaugeheadwater, & ! Intent IN
261 inflowgaugenodelist, & ! Intent IN
262 sink_cells, & ! Intent IN
263 l11_qtin, & ! Intent INOUT
264 l11_qtr, & ! Intent INOUT
265 l11_qmod & ! Intent OUT
266 )
267 ! accumulate values of individual subtimesteps
268 l11_qacc = l11_qacc + l11_qmod
269 ! do the temperature routing
270 if ( riv_temp_pcs%active ) then
271 call riv_temp_pcs%L11_routing_E( &
272 nnodes - l11_noutlets, &
273 l11_netperm, &
274 l11_fromn, & ! Intent IN
275 l11_ton, & ! Intent IN
276 l11_c1, & ! Intent IN
277 l11_c2, & ! Intent IN
278 ninflowgauges, & ! Intent IN
279 inflowgaugeheadwater, & ! Intent IN
280 inflowgaugenodelist, & ! Intent IN
281 sink_cells, & ! Intent IN
282 l11_qtr(:, 1), & ! Intent IN
283 l11_qmod & ! Intent IN
284 )
285 end if
286 end do
287 ! calculate mean over routing period (timestep)
288 l11_qmod = l11_qacc / real(rout_loop, dp)
289 else
291 if ( riv_temp_pcs%active ) riv_temp_pcs%river_temp(s11 : e11) = &
292 max(riv_temp_pcs%delta_T, riv_temp_pcs%netNode_E_out(s11 : e11) / l11_qout - t0_dp)
293 end if
294
295 !----------------------------------------------------------------------
296 ! FOR STORING the optional arguments
297 !
298 ! FOR RUNOFF
299 ! NOTE:: Node ID for a given gauging station is stored at gaugeindex's
300 ! index in runoff. In consequence the gauges in runoff are
301 ! ordered corresponing to gauge%Q(:,:)
302 !----------------------------------------------------------------------
303 do gg = 1, ngauges
304 gaugedischarge(gaugeindexlist(gg)) = l11_qmod(gaugenodelist(gg))
305 end do
306
307 end subroutine mrm_routing
308
309 ! ------------------------------------------------------------------
310
311 ! NAME
312 ! L11_routing
313
314 ! PURPOSE
315 !> \brief Performs runoff routing for mHM at L11 upscaled network
316 !> (\ref fig_routing "Routing Network").
317 !> \details
318 !> Hydrograph routing is carried out with the Muskingum algorithm
319 !> \cite CMM1988. This simplification of the St. Venant
320 !> equations is justified in mHM because the potential areas of
321 !> application of this model would hardly exhibit abruptly
322 !> changing hydrographs with supercritical flows. The discharge
323 !> leaving the river reach located on cell \f$ i \f$ \f$
324 !> Q_{i}^{1}(t) \f$ at time step \f$ t \f$ can be determined by
325 !> \f[ Q_{i}^{1}(t) = Q_{i}^{1}(t-1)
326 !> + c_{1} \left( Q_{i}^{0}(t-1) - Q_{i}^{1}(t-1) \right)
327 !> + c_{2} \left( Q_{i}^{0}(t) - Q_{i}^{0}(t-1) \right) \f]
328 !> with
329 !> \f[ Q_{i}^{0}(t) = Q_{i'}(t) + Q_{i'}^{1}(t) \f]
330 !> \f[ c_{1}= \frac{\Delta t} { \kappa (1- \xi ) + \frac{\Delta t}{2} } \f]
331 !> \f[ c_{2}= \frac{ \frac{\Delta t}{2} - \kappa \xi} { \kappa (1- \xi)
332 !> + \frac{\Delta t}{2} } \f]
333 !> where
334 !> \f$ Q_{i}^{0} \f$ and \f$ Q_{i}^{1} \f$ denote the discharge
335 !> entering and leaving the river reach located on cell \f$ i \f$
336 !> respectively.
337 !> \f$ Q_{i'} \f$ is the contribution from the upstream cell \f$
338 !> i'\f$.
339 !> \f$ \kappa \f$ Muskingum travel time parameter.
340 !> \f$ \xi \f$ Muskingum attenuation parameter.
341 !> \f$ \Delta t \f$ time interval in hours.
342 !> \f$ t \f$ Time index for each \f$ \Delta t \f$ interval.
343 !> To improve performance, a routing sequence "netPerm" is
344 !> required. This permutation is determined in the mo_init_mrm
345 !> routine.
346
347 !> \details TODO: add description
348
349 ! INTENT(IN)
350 !> \param[in] "integer(i4) :: nNodes" number of network nodes = nCells1
351 !> \param[in] "integer(i4) :: nLinks" number of stream segment (reaches)
352 !> \param[in] "integer(i4), dimension(:) :: netPerm" routing order of a given domain (permutation)
353 !> \param[in] "integer(i4), dimension(:) :: netLink_fromN" from node
354 !> \param[in] "integer(i4), dimension(:) :: netLink_toN" to node
355 !> \param[in] "real(dp), dimension(:) :: netLink_C1" routing parameter C1 (\cite CMM1988 p. 25-41)
356 !> \param[in] "real(dp), dimension(:) :: netLink_C2" routing parameters C2 (id)
357 !> \param[in] "real(dp), dimension(:) :: netNode_qOUT" Total outflow from cells (given domain) L11 at time
358 !> tt in [m3 s-1]
359 !> \param[in] "integer(i4) :: nInflowGauges" [-] number of inflow points
360 !> \param[in] "logical, dimension(:) :: InflowHeadwater" [-] if to consider headwater cells of inflow
361 !> gauge
362 !> \param[in] "integer(i4), dimension(:) :: InflowNodeList" [-] L11 ID of inflow points
363
364 ! INTENT(INOUT)
365 !> \param[inout] "real(dp), dimension(:, :) :: netNode_qTIN" [m3 s-1] Total inputs at t-1 and t
366 !> \param[inout] "real(dp), dimension(:, :) :: netNode_qTR" [m3 s-1] Transformed outflow leaving
367 !> node I (Muskingum)
368
369 ! INTENT(OUT)
370 !> \param[out] "real(dp), dimension(nNodes) :: netNode_Qmod" [m3 s-1] Simulated routed discharge
371
372 ! HISTORY
373 !> \authors Luis Samaniego
374
375 !> \date Dec 2005
376
377 ! Modifications:
378 ! Luis Samaniego Feb 2008 - routing module (cells)
379 ! Rohini Kumar Aug 2011 - vector version of mHM-UFZ
380 ! Nov 2011 - parallel version
381 ! Luis Samaniego Jan 2013 - modularization, documentation
382 ! Robert Schweppe Jun 2018 - refactoring and reformatting
383
384 subroutine l11_routing(nNodes, nLinks, netPerm, netLink_fromN, netLink_toN, netLink_C1, netLink_C2, netNode_qOUT, &
385 nInflowGauges, InflowHeadwater, InflowNodeList, sink_cells, netNode_qTIN, netNode_qTR, netNode_Qmod)
386 implicit none
387
388 ! number of network nodes = nCells1
389 integer(i4), intent(in) :: nNodes
390 ! number of stream segment (reaches)
391 integer(i4), intent(in) :: nLinks
392 ! routing order of a given domain (permutation)
393 integer(i4), dimension(:), intent(in) :: netPerm
394 ! from node
395 integer(i4), dimension(:), intent(in) :: netLink_fromN
396 ! to node
397 integer(i4), dimension(:), intent(in) :: netLink_toN
398 ! routing parameter C1 (\cite CMM1988 p. 25-41)
399 real(dp), dimension(:), intent(in) :: netLink_C1
400 ! routing parameters C2 (id)
401 real(dp), dimension(:), intent(in) :: netLink_C2
402 ! Total outflow from cells (given domain) L11 at time tt in [m3 s-1]
403 real(dp), dimension(:), intent(in) :: netNode_qOUT
404 ! [-] number of inflow points
405 integer(i4), intent(in) :: nInflowGauges
406 ! [-] if to consider headwater cells of inflow gauge
407 logical, dimension(:), intent(in) :: InflowHeadwater
408 ! [-] L11 ID of inflow points
409 integer(i4), dimension(:), intent(in) :: InflowNodeList
410 ! [-] sink nodes
411 integer(i4), dimension(:), intent(in) :: sink_cells
412 ! [m3 s-1] Total inputs at t-1 and t
413 real(dp), dimension(:, :), intent(inout) :: netNode_qTIN
414 ! [m3 s-1] Transformed outflow leaving node I (Muskingum)
415 real(dp), dimension(:, :), intent(inout) :: netNode_qTR
416 ! [m3 s-1] Simulated routed discharge
417 real(dp), dimension(nNodes), intent(out) :: netNode_Qmod
418
419 integer(i4) :: g, i, k, iNode, tNode
420 ! current routing state (2)
421 integer(i4), parameter :: IT = 2
422 ! past routing state (1)
423 integer(i4), parameter :: IT1 = 1
424
425 ! Entry value for the auxiliary vectors
426 ! netNode_qTIN(iNode,:)
427 ! netNode_qTR(iNode,:)
428 ! which store current and past states of
429 ! incoming and outgoing of discharge at iNode
430 !--------------------------------------------------------------------------
431 ! Muskingum Flood Routing
432 !--------------------------------------------------------------------------
433 ! initialize total input at point time IT in all nodes
434 netnode_qtin(:, it) = 0.0_dp
435 !--------------------------------------------------------------------------
436 ! Links in sequential mode .... with single node
437 !--------------------------------------------------------------------------
438 ! ST - decent parallelization has to be done!!!
439 !!$OMP parallel
440 !!$OMP do private(g, i, inode, tnode)
441 do k = 1, nlinks
442 ! get LINK routing order -> i
443 i = netperm(k)
444 inode = netlink_fromn(i)
445 tnode = netlink_ton(i)
446
447 ! accumulate all inputs in iNode
448 netnode_qtin(inode, it) = netnode_qtin(inode, it) + netnode_qout(inode)
449
450 ! routing iNode
451 netnode_qtr(inode, it) = netnode_qtr(inode, it1) &
452 + netlink_c1(i) * (netnode_qtin(inode, it1) - netnode_qtr(inode, it1)) &
453 + netlink_c2(i) * (netnode_qtin(inode, it) - netnode_qtin(inode, it1))
454
455 ! check if the inflow from upstream cells should be deactivated
456 if (ninflowgauges .GT. 0) then
457 do g = 1, ninflowgauges
458 ! check if downstream Node (tNode) is inflow gauge and headwaters should be ignored
459 if ((tnode == inflownodelist(g)) .AND. (.NOT. inflowheadwater(g))) netnode_qtr(inode, it) = 0.0_dp
460 end do
461 end if
462
463 ! add routed water to downstream node
464 netnode_qtin(tnode, it) = netnode_qtin(tnode, it) + netnode_qtr(inode, it)
465 end do
466 !!$OMP end do
467 !!$OMP end parallel
468
469 !--------------------------------------------------------------------------
470 ! add runoff to sinks
471 !--------------------------------------------------------------------------
472 do k = 1, size(sink_cells)
473 tnode = sink_cells(k)
474 netnode_qtin(tnode, it) = netnode_qtin(tnode, it) + netnode_qout(tnode)
475 end do
476 !--------------------------------------------------------------------------
477 ! save modeled discharge at time step tt then shift flow storages
478 ! (NOTE aggregation to daily values to be done outside)
479 !--------------------------------------------------------------------------
480 ! !!$OMP parallel
481 ! store generated discharge
482 netnode_qmod(1 : nnodes) = netnode_qtin(1 : nnodes, it)
483 ! backflow t-> t-1
484 netnode_qtr(1 : nnodes, it1) = netnode_qtr(1 : nnodes, it)
485 netnode_qtin(1 : nnodes, it1) = netnode_qtin(1 : nnodes, it)
486 ! !!$OMP end parallel
487
488 end subroutine l11_routing
489
490END MODULE mo_mrm_routing
Global variables for mRM only.
real(dp), dimension(:, :), allocatable, public l11_qtin
integer(i4), dimension(:), allocatable, public l11_netperm
real(dp), dimension(:), allocatable, public l11_qout
integer(i4), dimension(:), allocatable, public l11_l1_id
integer(i4), dimension(:), allocatable, public l1_l11_id
type(riv_temp_type), public riv_temp_pcs
This is a container for the river temperature routing process (pcs)
type(sink_cells_t), dimension(:), allocatable sink_cells
sink cell ids for each domain
integer(i4), dimension(:), allocatable, public l11_fromn
real(dp), dimension(:), allocatable, public l11_length
real(dp), dimension(:), allocatable, public l11_qmod
integer(i4), dimension(:), allocatable, public l11_ton
real(dp), dimension(:), allocatable, public l11_c1
real(dp), dimension(:), allocatable, public l11_slope
integer(i4), dimension(:), allocatable, public l11_noutlets
real(dp), dimension(:, :), allocatable, public l11_qtr
real(dp), dimension(:), allocatable, public l11_areacell
real(dp), dimension(:), allocatable, public l11_c2
Perform Multiscale Parameter Regionalization on Routing Parameters.
subroutine, public reg_rout(param, length, slope, ffpimp, ts, c1, c2)
Regionalized routing.
Performs pre-processing for routing for mHM at level L11.
subroutine l11_e_acc(qall, efecarea, l1_l11_id, l11_areacell, l11_l1_id, ts, map_flag, qacc)
temperature energy accumulation at L11.
subroutine, public add_inflow(ninflowgauges, inflowindexlist, inflowheadwater, inflownodelist, qinflow, qout)
Adds inflow discharge to the runoff produced at the cell where the inflow is occurring.
subroutine, public l11_runoff_acc(qall, efecarea, l1_l11_id, l11_areacell, l11_l1_id, ts, map_flag, qacc)
total runoff accumulation at L11.
Performs runoff routing for mHM at level L11.
subroutine l11_routing(nnodes, nlinks, netperm, netlink_fromn, netlink_ton, netlink_c1, netlink_c2, netnode_qout, ninflowgauges, inflowheadwater, inflownodelist, sink_cells, netnode_qtin, netnode_qtr, netnode_qmod)
Performs runoff routing for mHM at L11 upscaled network (Routing Network).
subroutine, public mrm_routing(read_states, processcase, global_routing_param, l1_total_runoff, l1_areacell, l1_l11_id, l11_areacell, l11_l1_id, l11_netperm, l11_fromn, l11_ton, l11_noutlets, timestep, tsroutfactor, nnodes, ninflowgauges, inflowgaugeindexlist, inflowgaugeheadwater, inflowgaugenodelist, inflowdischarge, ngauges, gaugeindexlist, gaugenodelist, map_flag, l11_length, l11_slope, l11_fracfpimp, sink_cells, l11_c1, l11_c2, l11_qout, l11_qtin, l11_qtr, l11_qmod, gaugedischarge)
route water given runoff