67subroutine mpr(mask0, geoUnit0, soilId0, Asp0, gridded_LAI0, LCover0, slope_emp0, y0, Id0, upper_bound1, lower_bound1, &
68 left_bound1, right_bound1, n_subcells1, fSealed1, alpha1, degDayInc1, degDayMax1, degDayNoPre1, fAsp1, &
69 HarSamCoeff1, PrieTayAlpha1, aeroResist1, surfResist1, fRoots1, kFastFlow1, kSlowFlow1, kBaseFlow1, &
70 kPerco1, karstLoss1, soilMoistFC1, soilMoistSat1, soilMoistExp1, jarvis_thresh_c1, tempThresh1, &
71 unsatThresh1, sealedThresh1, wiltingPoint1, maxInter1, petLAIcorFactor, &
72 No_Count1, bulkDens1, latticeWater1, COSMICL31, &
88 logical,
dimension(:, :),
intent(in) :: mask0
90 integer(i4),
dimension(:),
intent(in) :: geounit0
92 integer(i4),
dimension(:, :),
intent(in) :: soilid0
94 real(dp),
dimension(:),
intent(in) :: asp0
96 real(dp),
dimension(:, :),
intent(in) :: gridded_lai0
98 integer(i4),
dimension(:, :),
intent(in) :: lcover0
100 real(dp),
dimension(:),
intent(in) :: slope_emp0
102 integer(i4),
dimension(:),
intent(in) :: id0
104 integer(i4),
dimension(:),
intent(in) :: upper_bound1
106 integer(i4),
dimension(:),
intent(in) :: lower_bound1
108 integer(i4),
dimension(:),
intent(in) :: left_bound1
110 integer(i4),
dimension(:),
intent(in) :: right_bound1
112 integer(i4),
dimension(:),
intent(in) :: n_subcells1
114 real(dp),
dimension(:),
intent(in) :: y0
116 real(dp),
dimension(:, :, :),
intent(inout) :: fsealed1
118 real(dp),
dimension(:, :, :),
intent(inout) :: soilmoistexp1
120 real(dp),
dimension(:, :, :),
intent(inout) :: jarvis_thresh_c1
122 real(dp),
dimension(:, :, :),
intent(inout) :: soilmoistsat1
124 real(dp),
dimension(:, :, :),
intent(inout) :: soilmoistfc1
126 real(dp),
dimension(:, :, :),
intent(inout) :: wiltingpoint1
128 real(dp),
dimension(:, :, :),
intent(inout) :: froots1
130 real(dp),
dimension(:, :, :),
intent(inout) :: tempthresh1
132 real(dp),
dimension(:, :, :),
intent(inout) :: degdaynopre1
134 real(dp),
dimension(:, :, :),
intent(inout) :: degdaymax1
136 real(dp),
dimension(:, :, :),
intent(inout) :: degdayinc1
138 real(dp),
dimension(:, :, :),
intent(inout) :: fasp1
140 real(dp),
dimension(:, :, :),
intent(inout) :: harsamcoeff1
142 real(dp),
dimension(:, :, :),
intent(inout) :: prietayalpha1
144 real(dp),
dimension(:, :, :),
intent(inout) :: aeroresist1
146 real(dp),
dimension(:, :, :),
intent(inout) :: surfresist1
148 real(dp),
dimension(:, :, :),
intent(inout) :: sealedthresh1
150 real(dp),
dimension(:, :, :),
intent(inout) :: unsatthresh1
152 real(dp),
dimension(:, :, :),
intent(inout) :: kfastflow1
154 real(dp),
dimension(:, :, :),
intent(inout) :: kslowflow1
156 real(dp),
dimension(:, :, :),
intent(inout) :: kbaseflow1
158 real(dp),
dimension(:, :, :),
intent(inout) :: alpha1
160 real(dp),
dimension(:, :, :),
intent(inout) :: kperco1
162 real(dp),
dimension(:, :, :),
intent(inout) :: karstloss1
164 real(dp),
dimension(:, :, :),
intent(inout) :: maxinter1
166 real(dp),
dimension(:, :, :),
intent(inout) :: petlaicorfactor
168 real(dp),
dimension(:, :, :),
intent(inout) :: no_count1
170 real(dp),
dimension(:, :, :),
intent(inout) :: bulkdens1
172 real(dp),
dimension(:, :, :),
intent(inout) :: latticewater1
174 real(dp),
dimension(:, :, :),
intent(inout) :: cosmicl31
177 real(dp),
dimension(:),
intent(in),
optional,
target :: parameterset
180 real(dp),
dimension(:),
pointer :: param
182 real(dp),
dimension(:, :, :),
allocatable :: thetas_till
184 real(dp),
dimension(:, :, :),
allocatable :: thetafc_till
186 real(dp),
dimension(:, :, :),
allocatable :: thetapw_till
189 real(dp),
dimension(:, :, :),
allocatable :: ks
192 real(dp),
dimension(:, :, :),
allocatable :: db
193 real(dp),
dimension(:, :),
allocatable :: thetas
194 real(dp),
dimension(:, :),
allocatable :: thetafc
195 real(dp),
dimension(:, :),
allocatable :: thetapw
198 real(dp),
dimension(:,:,:),
allocatable :: latwat_till
199 real(dp),
dimension(:,:,:),
allocatable :: cosmic_l3_till
200 real(dp),
dimension(:,:),
allocatable :: latwat
201 real(dp),
dimension(:,:),
allocatable :: cosmic_l3
206 real(dp),
dimension(:),
allocatable :: ksvar_h0
210 real(dp),
dimension(:),
allocatable :: ksvar_v0
214 real(dp),
dimension(:),
allocatable :: sms_fc0
217 real(dp),
dimension(size(Id0, 1)) :: k2_0
220 real(dp),
dimension(:),
allocatable :: k2_1
223 real(dp),
dimension(size(Id0, 1)) :: fasp0
238 integer(i4) :: istart
244 integer(i4) :: istart2
253 real(dp),
dimension(size(fSealed1, dim = 1)) :: fforest1
256 real(dp),
dimension(size(fSealed1, dim = 1)) :: fperm1
259 if (
present(parameterset))
then
260 param => parameterset
267 do iilc = 1,
size(lcover0, 2)
297 fperm1(:) = 1.0_dp - fsealed1(:, 1, iilc) - fforest1(:)
309 fforest1, fsealed1(:, 1, iilc), fperm1, &
310 tempthresh1(:, 1, iilc), degdaynopre1(:, 1, iilc), &
311 degdayinc1(:, 1, iilc), degdaymax1(:, 1, iilc) &
314 call error_message(
'***ERROR: Process description for process "snow pack" does not exist! mo_multi_param_reg')
320 msoil =
size(
soildb%is_present, 1)
321 mlc = maxval(lcover0(:, iilc), (lcover0(:, iilc) .ne.
nodata_i4))
340 allocate(thetas_till(msoil, mtill, mlc))
341 allocate(thetafc_till(msoil, mtill, mlc))
342 allocate(thetapw_till(msoil, mtill, mlc))
343 allocate(thetas(msoil, mhor))
344 allocate(thetafc(msoil, mhor))
345 allocate(thetapw(msoil, mhor))
346 allocate(ks(msoil, mhor, mlc))
347 allocate(db(msoil, mhor, mlc))
351 allocate( latwat_till(msoil, mtill, mlc))
352 allocate(cosmic_l3_till(msoil, mtill, mlc))
353 allocate( latwat(msoil, mhor ))
354 allocate( cosmic_l3(msoil, mhor ))
355 latwat_till = 0.000001_dp
356 cosmic_l3_till = 0.000001_dp
357 cosmic_l3 = 0.000001_dp
365 allocate(ksvar_h0(
size(id0, 1)))
366 allocate(ksvar_v0(
size(id0, 1)))
367 allocate( sms_fc0(
size(id0, 1)))
422 call error_message(
'***ERROR: Process description for process "soil moisture parametrization"', &
423 'does not exist! mo_multi_param_reg')
429 id0, soilid0, lcover0(:, iilc), &
430 thetas_till, thetafc_till, thetapw_till, thetas, &
431 thetafc, thetapw, ks, db, ksvar_h0, ksvar_v0, sms_fc0)
452 lcover0(:, iilc), soilid0, &
454 thetas_till, thetafc_till, thetapw_till, &
455 thetas, thetafc, thetapw, &
458 upper_bound1, lower_bound1, left_bound1, right_bound1, n_subcells1, &
459 soilmoistexp1(:, :, iilc), soilmoistsat1(:, :, iilc), soilmoistfc1(:, :, iilc), &
460 wiltingpoint1(:, :, iilc), froots1(:, :, iilc), &
462 latwat_till, cosmic_l3_till, latwat, cosmic_l3, &
463 bulkdens1(:,:,iilc), latticewater1(:,:,iilc), cosmicl31(:,:,iilc) &
466 deallocate(thetas_till)
467 deallocate(thetafc_till)
468 deallocate(thetapw_till)
476 deallocate( latwat_till )
477 deallocate( cosmic_l3_till )
479 deallocate( cosmic_l3 )
489 id0, n_subcells1, upper_bound1, lower_bound1, left_bound1, right_bound1, &
490 aeroresist1(:, :, iilc))
496 lcover0(:, iilc), gridded_lai0, mask0, id0, &
497 upper_bound1, lower_bound1, left_bound1, &
498 right_bound1, n_subcells1, petlaicorfactor(:, :, iilc))
511 call mpr_runoff(lcover0(:, iilc), mask0, sms_fc0, slope_emp0, &
512 ksvar_h0, param(istart : iend), id0, upper_bound1, lower_bound1, &
513 left_bound1, right_bound1, n_subcells1, unsatthresh1(:, 1, 1), kfastflow1(:, 1, iilc), &
514 kslowflow1(:, 1, iilc), alpha1(:, 1, iilc))
516 call error_message(
'***ERROR: Process description for process "interflow" does not exist! mo_multi_param_reg')
528 param(istart : iend), &
530 sms_fc0, ksvar_v0, id0, &
531 n_subcells1, upper_bound1, lower_bound1, left_bound1, right_bound1, &
532 karstloss1(:, 1, 1), kperco1(:, 1, iilc) &
536 call error_message(
'***ERROR: Process description for process "percolation" does not exist! mo_multi_param_reg')
555 call error_message(
'***ERROR: Process description for process "runoff_generation" does not exist! mo_multi_param_reg')
569 left_bound1, right_bound1, id0, mask0,
nodata_dp, fasp0)
575 left_bound1, right_bound1, id0, mask0,
nodata_dp, fasp0)
576 harsamcoeff1 = param(iend)
581 mask0,
nodata_dp, id0, n_subcells1, upper_bound1, lower_bound1, left_bound1, right_bound1, &
582 prietayalpha1(:, :, 1))
588 nodata_dp, id0, n_subcells1, upper_bound1, lower_bound1, left_bound1, right_bound1, &
589 surfresist1(:, :, 1))
591 call error_message(
'***ERROR: Process description for process "pet correction" does not exist! mo_multi_param_reg')
606 allocate(k2_1(
size(kbaseflow1, 1)))
608 left_bound1, right_bound1, id0, mask0,
nodata_dp, k2_0)
610 do iilc = 1,
size(lcover0, 2)
611 kbaseflow1(:, 1, iilc) = k2_1
618 if (
processmatrix(7, 1) .gt. 0) kbaseflow1 = merge(kslowflow1, kbaseflow1, kbaseflow1 .lt. kslowflow1)
621 call error_message(
'***ERROR: Process description for process "baseflow Recession" does not exist! mo_multi_param_reg')
635 no_count1 = param(istart)
640 no_count1 = param(istart)
642 call error_message(
'***ERROR: Process description for process "Neutron count" does not exist! mo_multi_param_reg')
651 gridded_lai0, n_subcells1, upper_bound1, lower_bound1, left_bound1, right_bound1, id0, mask0, &
1204 left_bound1, right_bound1, aerodyn_resistance1)
1213 real(dp),
dimension(:, :),
intent(in) :: LAI0
1216 integer(i4),
dimension(:),
intent(in) :: LCover0
1219 real(dp),
dimension(6),
intent(in) :: param
1222 logical,
dimension(:, :),
intent(in) :: mask0
1225 integer(i4),
dimension(:),
intent(in) :: Id0
1228 integer(i4),
dimension(:),
intent(in) :: n_subcells1
1231 integer(i4),
dimension(:),
intent(in) :: upper_bound1
1234 integer(i4),
dimension(:),
intent(in) :: lower_bound1
1237 integer(i4),
dimension(:),
intent(in) :: left_bound1
1240 integer(i4),
dimension(:),
intent(in) :: right_bound1
1243 real(dp),
dimension(:, :),
intent(out) :: aerodyn_resistance1
1247 real(dp),
dimension(:),
allocatable :: maxLAI
1249 real(dp),
dimension(:),
allocatable :: zm
1251 real(dp),
dimension(:),
allocatable :: canopy_height0
1253 real(dp),
dimension(:),
allocatable :: zm_zero, zh_zero, displace
1257 real(dp),
dimension(:, :),
allocatable :: aerodyn_resistance0
1261 allocate(zm(
size(lcover0, dim = 1))) ; zm =
nodata_dp
1262 allocate(zm_zero(
size(lcover0, dim = 1))) ; zm_zero =
nodata_dp
1263 allocate(zh_zero(
size(lcover0, dim = 1))) ; zh_zero =
nodata_dp
1264 allocate(displace(
size(lcover0, dim = 1))) ; displace =
nodata_dp
1265 allocate(canopy_height0(
size(lcover0, dim = 1))) ; canopy_height0 =
nodata_dp
1266 allocate(aerodyn_resistance0(
size(lcover0, dim = 1),
size(lai0, 2))) ; aerodyn_resistance0 =
nodata_dp
1267 allocate(maxlai(
size(lcover0, dim = 1))) ; maxlai =
nodata_dp
1271 canopy_height0 = merge(param(1), canopy_height0, lcover0 == 1)
1272 canopy_height0 = merge(param(2), canopy_height0, lcover0 == 2)
1276 maxlai = maxval(lai0, dim=2)
1278 do tt = 1,
size(lai0, 2)
1281 canopy_height0 = merge((param(3) * lai0(:, tt) / maxlai), canopy_height0, lcover0 == 3)
1287 zm = merge(canopy_height0 + zm, zm, ((abs(zm -
nodata_dp) .GT.
eps_dp) .AND. (zm .LT. canopy_height0)))
1290 displace = param(4) * canopy_height0
1291 zm_zero = param(5) * canopy_height0
1292 zh_zero = param(6) * zm_zero
1295 aerodyn_resistance0(:, tt) = log((zm - displace) / zm_zero) * log((zm - displace) / zh_zero) / (
karman**2.0_dp)
1297 left_bound1, right_bound1, id0, mask0,
nodata_dp, aerodyn_resistance0(:, tt))
subroutine, public mpr_smhorizons(param, processmatrix, iflag_soil, nhorizons_mhm, horizondepth, lcover0, soilid0, nhorizons, ntillhorizons, thetas_till, thetafc_till, thetapw_till, thetas, thetafc, thetapw, wd, db, dbm, rzdepth, mask0, cell_id0, upp_row_l1, low_row_l1, lef_col_l1, rig_col_l1, nl0_in_l1, l1_beta, l1_sms, l1_fc, l1_pw, l1_froots, latwat_till, cosmic_l3_till, latwat, cosmic_l3, l1_bulkdens, l1_latticewater, l1_cosmicl3)
upscale soil moisture horizons
subroutine, public mpr(mask0, geounit0, soilid0, asp0, gridded_lai0, lcover0, slope_emp0, y0, id0, upper_bound1, lower_bound1, left_bound1, right_bound1, n_subcells1, fsealed1, alpha1, degdayinc1, degdaymax1, degdaynopre1, fasp1, harsamcoeff1, prietayalpha1, aeroresist1, surfresist1, froots1, kfastflow1, kslowflow1, kbaseflow1, kperco1, karstloss1, soilmoistfc1, soilmoistsat1, soilmoistexp1, jarvis_thresh_c1, tempthresh1, unsatthresh1, sealedthresh1, wiltingpoint1, maxinter1, petlaicorfactor, no_count1, bulkdens1, latticewater1, cosmicl31, parameterset)
Regionalizing and Upscaling process parameters.