5.13.2
mHM
The mesoscale Hydrological Model
Loading...
Searching...
No Matches
mo_mpr_runoff.f90
Go to the documentation of this file.
1!> \file mo_mpr_runoff.f90
2!> \brief \copybrief mo_mpr_runoff
3!> \details \copydetails mo_mpr_runoff
4
5!> \brief multiscale parameter regionalization for runoff generation
6!> \details This contains the routine for multiscale parameter regionalization of the runoff parametrization.
7!> \authors Stephan Thober, Rohini Kumar
8!> \date Dec 2012
9!> \copyright Copyright 2005-\today, the mHM Developers, Luis Samaniego, Sabine Attinger: All rights reserved.
10!! mHM is released under the LGPLv3+ license \license_note
11!> \ingroup f_mpr
13
14 use mo_kind, only : i4, dp
15
16 implicit none
17
18 private
19
20 public :: mpr_runoff
21
22 ! ----------------------------------------------------------------------------
23
24contains
25
26 ! ----------------------------------------------------------------------------
27
28 ! NAME
29 ! mpr_runoff
30
31 ! PURPOSE
32 !> \brief multiscale parameter regionalization for runoff parameters
33
34 !> \details Perform the multiscale parameter regionalization for runoff
35 !> global parameters (see mhm_parameter.nml). These are the following five
36 !> parameters:
37 !> - param(1) = interflowStorageCapacityFactor
38 !> - param(2) = interflowRecession_slope
39 !> - param(3) = fastInterflowRecession_forest
40 !> - param(4) = slowInterflowRecession_Ks
41 !> - param(5) = exponentSlowInterflow
42
43 ! INTENT(IN)
44 !> \param[in] "integer(i4), dimension(:) :: LCOVER0" land cover at level 0
45 !> \param[in] "logical, dimension(:, :) :: mask0" mask at Level 0
46 !> \param[in] "real(dp), dimension(:) :: SMs_FC0" [-] soil mositure deficit from field
47 !> \param[in] "real(dp), dimension(:) :: slope_emp0" empirical quantile values F(slope)
48 !> \param[in] "real(dp), dimension(:) :: KsVar_H0" [-] relative variability of saturated
49 !> \param[in] "real(dp), dimension(5) :: param" global parameters
50 !> \param[in] "integer(i4), dimension(:) :: cell_id0" Cell ids of hi res field
51 !> \param[in] "integer(i4), dimension(:) :: upp_row_L1" Upper row of hi res block
52 !> \param[in] "integer(i4), dimension(:) :: low_row_L1" Lower row of hi res block
53 !> \param[in] "integer(i4), dimension(:) :: lef_col_L1" Left column of hi res block
54 !> \param[in] "integer(i4), dimension(:) :: rig_col_L1" Right column of hi res block
55 !> \param[in] "integer(i4), dimension(:) :: nL0_in_L1" Number of L0 cells within a L1 cell
56 !> \param[in] "real(dp) :: c2TSTu" unit transformations
57
58 ! INTENT(OUT)
59 !> \param[out] "real(dp), dimension(:) :: L1_HL1" [10^-3 m] Threshhold water depth
60 !> \param[out] "real(dp), dimension(:) :: L1_K0" [10^-3 m] Recession coefficient
61 !> \param[out] "real(dp), dimension(:) :: L1_K1" [10^-3 m] Recession coefficient
62 !> \param[out] "real(dp), dimension(:) :: L1_alpha" [1] Exponent for the upper reservoir
63
64 ! HISTORY
65 !> \authors Stephan Thober, Rohini Kumar
66
67 !> \date Dec 2012
68
69 ! Modifications:
70 ! Stephan Thober Jan 2013 - updated calling sequence for upscaling operators
71 ! Stephan Thober Dec 2013 - made header conform with mo_template
72 ! Robert Schweppe Jun 2018 - refactoring and reformatting
73
74 subroutine mpr_runoff(LCOVER0, mask0, SMs_FC0, slope_emp0, KsVar_H0, param, cell_id0, upp_row_L1, low_row_L1, &
75 lef_col_L1, rig_col_L1, nL0_in_L1, L1_HL1, L1_K0, L1_K1, L1_alpha)
76
79
80 implicit none
81
82 ! global parameters
83 real(dp), dimension(5), intent(in) :: param
84
85 ! [-] soil mositure deficit from field
86 real(dp), dimension(:), intent(in) :: sms_fc0
87
88 ! empirical quantile values F(slope)
89 real(dp), dimension(:), intent(in) :: slope_emp0
90
91 ! [-] relative variability of saturated
92 real(dp), dimension(:), intent(in) :: ksvar_h0
93
94 ! land cover at level 0
95 integer(i4), dimension(:), intent(in) :: lcover0
96
97 ! mask at Level 0
98 logical, dimension(:, :), intent(in) :: mask0
99
100 ! Cell ids of hi res field
101 integer(i4), dimension(:), intent(in) :: cell_id0
102
103 ! Upper row of hi res block
104 integer(i4), dimension(:), intent(in) :: upp_row_l1
105
106 ! Lower row of hi res block
107 integer(i4), dimension(:), intent(in) :: low_row_l1
108
109 ! Left column of hi res block
110 integer(i4), dimension(:), intent(in) :: lef_col_l1
111
112 ! Right column of hi res block
113 integer(i4), dimension(:), intent(in) :: rig_col_l1
114
115 ! Number of L0 cells within a L1 cell
116 integer(i4), dimension(:), intent(in) :: nl0_in_l1
117
118 ! [10^-3 m] Threshhold water depth
119 real(dp), dimension(:), intent(out) :: l1_hl1
120
121 ! [10^-3 m] Recession coefficient
122 real(dp), dimension(:), intent(out) :: l1_k0
123
124 ! [10^-3 m] Recession coefficient
125 real(dp), dimension(:), intent(out) :: l1_k1
126
127 ! [1] Exponent for the upper reservoir
128 real(dp), dimension(:), intent(out) :: l1_alpha
129
130 ! temporal variable
131 real(dp), dimension(size(SMs_FC0, 1)) :: tmp
132
133
134 !-----------------------------
135 ! FAST INTERFLOW
136 !-----------------------------
137 ! HL1 = f(soil properties; No reference found)
138 ! Based on the saturation deficit from the field capacity status
139 ! seems more reasonable and intutative.
140 ! NOTE: This value for the sandy soils will have higher value of HL1, as compared to
141 ! to clayey soil and so these soils can hold larger amount of amount.
142 tmp = merge(param(1) * sms_fc0, nodata_dp, cell_id0 .ne. nodata_i4)
143 l1_hl1 = upscale_arithmetic_mean(nl0_in_l1, upp_row_l1, low_row_l1, &
144 lef_col_l1, rig_col_l1, cell_id0, mask0, nodata_dp, tmp)
145
146 ! 1/K0 = f(terrain slope) [Booij, et. al.(2005), JoH]
147 ! Steeper slopes resists (1/K0) fast water flows lesser as
148 ! compared to that on the flater slope areas.
149 ! Assuming that above relationship holds for all kind of land cover classes
150
151 ! In the forested area surface resistance to fast interflow is higher as compared
152 ! to the permeable land surface
153
154 tmp = merge(param(2) * (2.0_dp - slope_emp0), nodata_dp, cell_id0 .ne. nodata_i4)
155 tmp = merge(tmp * param(3), tmp, lcover0 .eq. 1)
156 l1_k0 = upscale_arithmetic_mean(nl0_in_l1, upp_row_l1, low_row_l1, &
157 lef_col_l1, rig_col_l1, cell_id0, mask0, nodata_dp, tmp)
158
159 ! To avoid numerical error in fully impervious areas (K0 == 0)
160 ! minimum value of K0 is 1-day
161 l1_k0 = merge(1.0_dp, l1_k0, l1_k0 .lt. 1.0_dp)
162
163 ! ------------------------------------------------------------------
164 ! SLOW INTERFLOW
165 ! ------------------------------------------------------------------
166 ! K1 = f(terrian slope, Booij, et. al.(2005), JoH)
167 ! = f(soil properties, LC & New modification)
168 ! K1 = K0 + K1(soil-Ks)
169
170 tmp = merge(param(2) * (2.0_dp - slope_emp0) + param(4) * (1.0_dp + ksvar_h0), &
171 nodata_dp, cell_id0 .ne. nodata_i4)
172 l1_k1 = upscale_arithmetic_mean(nl0_in_l1, upp_row_l1, low_row_l1, &
173 lef_col_l1, rig_col_l1, cell_id0, mask0, nodata_dp, tmp)
174
175 ! minimum value of K1 is 1-day
176 l1_k1 = merge(2.0_dp, l1_k1, l1_k1 .lt. 2.0_dp)
177
178
179 ! alpha = f(soil type; variabitity of Ks)
180 ! Lower the alpha (exponent of slow interflow) means lower amount of
181 ! water released from the storage to contribute for slow interflow.
182 ! For instance sandy soils will have lower value of alpha as comapred to
183 ! the clayey soils.
184 ! This assumption is quite realistic in physical sense...
185 tmp = merge(param(5) * (1.0_dp / ksvar_h0) * (1.0_dp / (1.0_dp + sms_fc0)), &
186 nodata_dp, cell_id0 .ne. nodata_i4)
187 l1_alpha = upscale_arithmetic_mean(nl0_in_l1, upp_row_l1, low_row_l1, lef_col_l1, &
188 rig_col_l1, cell_id0, mask0, nodata_dp, tmp)
189
190 ! constraints and unit transformation
191 l1_k0 = merge(l1_k1, l1_k0, l1_k0 .gt. l1_k1)
192
193
194 end subroutine mpr_runoff
195
196end module mo_mpr_runoff
Provides constants commonly used by mHM, mRM and MPR.
real(dp), parameter, public nodata_dp
integer(i4), parameter, public nodata_i4
multiscale parameter regionalization for runoff generation
subroutine, public mpr_runoff(lcover0, mask0, sms_fc0, slope_emp0, ksvar_h0, param, cell_id0, upp_row_l1, low_row_l1, lef_col_l1, rig_col_l1, nl0_in_l1, l1_hl1, l1_k0, l1_k1, l1_alpha)
multiscale parameter regionalization for runoff parameters
Module containing upscaling operators.
real(dp) function, dimension(size(nl0_cells_in_l1_cell, 1)), public upscale_arithmetic_mean(nl0_cells_in_l1_cell, l1_upper_rowid_cell, l1_lower_rowid_cell, l1_left_colonid_cell, l1_right_colonid_cell, l0_cellid, mask0, nodata_value, l0_finescale_data)
aritmetic mean