23 USE mo_kind,
ONLY : i4, dp
77 SUBROUTINE l11_runoff_acc(qAll, efecArea, L1_L11_Id, L11_areaCell, L11_L1_Id, TS, map_flag, qAcc)
79 use mo_constants,
only : hoursecs
85 real(dp),
intent(in),
dimension(:) :: qall
87 real(dp),
intent(in),
dimension(:) :: efecarea
89 integer(i4),
intent(in),
dimension(:) :: l1_l11_id
91 real(dp),
intent(in),
dimension(:) :: l11_areacell
93 integer(i4),
intent(in),
dimension(:) :: l11_l1_id
95 integer(i4),
intent(in) :: ts
97 logical,
intent(in) :: map_flag
99 real(dp),
intent(out),
dimension(:) :: qacc
125 do k = 1,
size(qall, 1)
126 qacc(l1_l11_id(k)) = qacc(l1_l11_id(k)) + qall(k) * efecarea(k)
129 qacc = qacc * 1000.0_dp / tst
134 do k = 1,
size(qacc, 1)
136 qacc(k) = qall(l11_l1_id(k))
140 qacc(:) = qacc(:) * l11_areacell(:) * 1000.0_dp / tst
179 subroutine add_inflow(nInflowGauges, InflowIndexList, InflowHeadwater, InflowNodeList, QInflow, qOut)
181 use mo_kind,
only : dp, i4
186 integer(i4),
intent(in) :: ninflowgauges
188 integer(i4),
intent(in),
dimension(:) :: inflowindexlist
190 logical,
intent(in),
dimension(:) :: inflowheadwater
192 integer(i4),
intent(in),
dimension(:) :: inflownodelist
194 real(dp),
intent(in),
dimension(:) :: qinflow
196 real(dp),
intent(inout),
dimension(:) :: qout
203 if (ninflowgauges .gt. 0)
then
204 do ii = 1, ninflowgauges
205 if (inflowheadwater(ii))
then
207 qout(inflownodelist(ii)) = qout(inflownodelist(ii)) + qinflow(inflowindexlist(ii))
210 qout(inflownodelist(ii)) = qinflow(inflowindexlist(ii))
255 SUBROUTINE l11_e_acc(qAll, efecArea, L1_L11_Id, L11_areaCell, L11_L1_Id, TS, map_flag, qAcc)
257 use mo_constants,
only : hoursecs
263 real(dp),
intent(in),
dimension(:) :: qall
265 real(dp),
intent(in),
dimension(:) :: efecarea
267 integer(i4),
intent(in),
dimension(:) :: L1_L11_Id
269 real(dp),
intent(in),
dimension(:) :: L11_areacell
271 integer(i4),
intent(in),
dimension(:) :: L11_L1_Id
273 integer(i4),
intent(in) :: TS
275 logical,
intent(in) :: map_flag
277 real(dp),
intent(out),
dimension(:) :: qAcc
303 do k = 1,
size(qall, 1)
304 qacc(l1_l11_id(k)) = qacc(l1_l11_id(k)) + qall(k) * efecarea(k)
306 qacc = qacc * 1000.0_dp / tst
311 do k = 1,
size(qacc, 1)
313 qacc(k) = qall(l11_l1_id(k))
316 qacc(:) = qacc(:) * l11_areacell(:) * 1000.0_dp / tst
349 fSealed_area_fraction, &
359 use mo_constants,
only : t0_dp
364 REAL(dp),
dimension(:),
INTENT(IN) :: fsealed_area_fraction
366 REAL(dp),
dimension(:),
INTENT(IN) :: fast_interflow
368 REAL(dp),
dimension(:),
INTENT(IN) :: slow_interflow
370 REAL(dp),
dimension(:),
INTENT(IN) :: baseflow
372 REAL(dp),
dimension(:),
INTENT(IN) :: direct_runoff
374 real(dp),
dimension(:),
intent(in) :: temp_air
376 real(dp),
dimension(:),
intent(in) :: mean_temp_air
378 REAL(dp),
dimension(:),
INTENT(inout) :: lateral_e
383 lateral_e = lateral_e + ( &
384 (baseflow * max(t0_dp + 5.0_dp, mean_temp_air + t0_dp) &
385 + (slow_interflow + fast_interflow) * max(t0_dp, temp_air + t0_dp)) &
386 * (1.0_dp - fsealed_area_fraction) &
387 + direct_runoff * max(t0_dp, temp_air + t0_dp - 1.5_dp) * fsealed_area_fraction &
422 SUBROUTINE l11_meteo_acc(meteo_all, efecArea, L1_L11_Id, L11_areaCell, L11_L1_Id, map_flag, meteo_acc)
429 real(dp),
intent(in),
dimension(:) :: meteo_all
431 real(dp),
intent(in),
dimension(:) :: efecarea
433 integer(i4),
intent(in),
dimension(:) :: l1_l11_id
435 real(dp),
intent(in),
dimension(:) :: l11_areacell
437 integer(i4),
intent(in),
dimension(:) :: l11_l1_id
439 logical,
intent(in) :: map_flag
441 real(dp),
intent(out),
dimension(:) :: meteo_acc
449 do k = 1,
size(meteo_all, 1)
450 meteo_acc(l1_l11_id(k)) = meteo_acc(l1_l11_id(k)) + meteo_all(k) * efecarea(k)
453 meteo_acc = meteo_acc / l11_areacell(:)
457 do k = 1,
size(meteo_acc, 1)
459 meteo_acc(k) = meteo_all(l11_l1_id(k))
Provides constants commonly used by mHM, mRM and MPR.
real(dp), parameter, public nodata_dp
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_meteo_acc(meteo_all, efecarea, l1_l11_id, l11_areacell, l11_l1_id, map_flag, meteo_acc)
meteo forcing accumulation at L11 for temperature routing.
subroutine, public l11_runoff_acc(qall, efecarea, l1_l11_id, l11_areacell, l11_l1_id, ts, map_flag, qacc)
total runoff accumulation at L11.
subroutine, public calc_l1_runoff_e(fsealed_area_fraction, fast_interflow, slow_interflow, baseflow, direct_runoff, temp_air, mean_temp_air, lateral_e)
calculate lateral temperature energy from runoff components.