SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
hydro_sgh.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 ! #########
6  SUBROUTINE hydro_sgh (HISBA,HRUNOFF,HRAIN,HHORT,PTSTEP, &
7  pd_g,pdzg,pwsat,pwfc,pwwilt,pwg,pwgi, &
8  kwg_layer,ppg,ppg_melt,pmuf, &
9  pcondsat,pbcoef,pmpotsat, &
10  pksat_ice,pd_ice,pfsat,phorton,pdunne, &
11  pfflood,ppiflood,piflood,ppflood, &
12  prunoffb,prunoffd,pcg,psoilwght, &
13  oflood,klayer_hort,klayer_dun )
14 !
15 ! #####################################################################
16 !
17 !!**** *HYDRO_SGH*
18 !!
19 !! PURPOSE
20 !! =======
21 !
22 ! 1. Determine the Horton runoff that take account of a spatial subgri
23 ! exponential distribution of the precipitation and of the surface ksat.
24 ! 1. Determine the surface saturated fraction (dt92 or Topmodel).
25 ! 3. Determine the Dunne runoff (dt92 or Topmodel).
26 ! 4. Determine the infiltration rate.
27 ! 5. Determine the flooplains interception and infiltration rate.
28 !
29 !! MODIFICATIONS
30 !! -------------
31 !!
32 !! 03/16 (B. Decharme) Limit flood infiltration
33 !!
34 !-------------------------------------------------------------------------------
35 !
36 !* 0. DECLARATIONS
37 ! ===================
38 !
39 !
40 USE modd_csts, ONLY : xrholw, xday, xcl, xci, xrholi
41 USE modd_isba_par, ONLY : xwgmin, xsphsoil, xdrywght
42 USE modd_surf_par, ONLY : xundef
43 USE modd_sgh_par, ONLY : xhort_depth
44 !
45 #ifdef TOPD
46 USE modd_coupling_topd, ONLY : lcoupl_topd, xas_nature, xatop, nmaskt_patch
47 #endif
48 !
49 USE modi_hydro_dt92
50 !
52 !
53 USE yomhook ,ONLY : lhook, dr_hook
54 USE parkind1 ,ONLY : jprb
55 !
56 IMPLICIT NONE
57 !
58 !* 0.1 declarations of arguments
59 !
60 !
61 !
62  CHARACTER(LEN=*),INTENT(IN) :: hisba ! hydrology/soil:
63 ! ! '2-L' = single column
64 ! ! '3-L' = root zone/baseflow layer
65 ! ! 'DIF' = N-layer diffusion: Richard's Eq.
66 ! ! (Boone and Etchevers 2001)
67 !
68  CHARACTER(LEN=*), INTENT(IN) :: hrunoff ! surface runoff formulation
69 ! ! 'WSAT'
70 ! ! 'DT92'
71 ! ! 'SGH ' Topmodel
72 !
73 !
74  CHARACTER(LEN=*), INTENT(IN) :: hrain ! Rainfall spatial distribution
75  ! 'DEF' = No rainfall spatial distribution
76  ! 'SGH' = Rainfall exponential spatial distribution
77  !
78 !
79  CHARACTER(LEN=*), INTENT(IN) :: hhort ! Horton runoff
80  ! 'DEF' = no Horton runoff
81  ! 'SGH' = Horton runoff
82 !
83 LOGICAL, INTENT(IN) :: oflood ! Flood scheme
84 !
85 REAL, INTENT(IN) :: ptstep
86 ! timestep of the integration
87 !
88 REAL, DIMENSION(:,:), INTENT(IN) :: pwg,pwgi
89 ! PWG = layer average liquid volumetric water content (m3 m-3)
90 ! PWGI = layer average frozen volumetric water content (m3 m-3)
91 !
92 INTEGER, DIMENSION(:),INTENT(IN) :: kwg_layer
93 ! KWG_LAYER = Number of soil moisture layers (DIF option)
94 !
95 REAL, DIMENSION(:,:), INTENT(IN) :: pd_g,pdzg,pwsat,pwfc,pwwilt
96 REAL, DIMENSION(:,:), INTENT(IN) :: pcondsat
97 ! PD_G = layer depth (m)
98 ! PDZG= layer thickness (m)
99 ! PCONDSAT = surface saturated hydraulic conductivity
100 ! PWSAT = soil porosity (m3 m-3)
101 !
102 REAL, DIMENSION(:,:), INTENT(IN) :: pbcoef,pmpotsat
103 ! PMPOTSAT = matric potential at saturation (m) (BC parameters)
104 ! PBCOEF = slope of the retention curve (-) (BC parameters)
105 !
106 REAL, DIMENSION(:,:),INTENT(IN) :: psoilwght ! ISBA-DIF: weights for vertical
107 ! ! integration of soil water and properties
108 INTEGER, INTENT(IN) :: klayer_hort! DIF optimization
109 INTEGER, INTENT(IN) :: klayer_dun ! DIF optimization
110 !
111 REAL, DIMENSION(:), INTENT(INOUT):: pfsat
112 ! PFSAT = satured fraction
113 !
114 REAL, DIMENSION(:), INTENT(INOUT):: ppg
115 REAL, DIMENSION(:), INTENT(IN) :: ppg_melt, pmuf
116 ! PPG = water reaching the ground
117 ! PPG_MELT = snowmelt reaching the ground
118 ! PMUF = wet fraction reached by rain
119 !
120 REAL, DIMENSION(:), INTENT(IN) :: pksat_ice, pd_ice
121 ! PKSAT_ICE = hydraulic conductivity at saturation (m s-1)
122 ! on frozen soil depth (Horton calculation)
123 ! PD_ICE = depth of the soil column for
124 ! fraction of frozen soil calculation (m)
125 !
126 REAL, DIMENSION(:), INTENT(OUT) :: pdunne, phorton
127 ! PDUNNE = Dunne runoff
128 ! PHORTON = Horton runoff
129 !
130 REAL, DIMENSION(:), INTENT(IN ) :: pfflood
131 REAL, DIMENSION(:), INTENT(IN ) :: ppiflood
132 ! PPIFLOOD = Floodplain potential infiltration [kg/m²/s]
133 ! = Floodplain mass
134 REAL, DIMENSION(:), INTENT(INOUT) :: piflood, ppflood
135 ! PIFLOOD = Floodplain infiltration [kg/m²/s]
136 ! PPFLOOD = Floodplain interception [kg/m²/s]
137 !
138 REAL, DIMENSION(:), INTENT(IN) :: prunoffb ! slope of the runoff curve
139 REAL, DIMENSION(:), INTENT(IN) :: prunoffd
140 ! PRUNOFFD = depth over which sub-grid runoff calculated (m)
141 !
142 REAL, DIMENSION(:), INTENT(IN) :: pcg
143 ! PCG = soil heat capacity to compute thermal penetration depth
144 !
145 !* 0.2 declarations of local variables
146 !
147 REAL, PARAMETER :: zeice = 6.0 ! Ice vertical diffusion impedence factor
148 !
149 REAL, DIMENSION(SIZE(PPG)) :: zpg_ini, zfrozen, zimax_ice, zimax, &
150  zhort_r, zhort_m, zsoilmax, zif_max,&
151  zpifldmax
152 ! ZFROZEN = frozen soil fraction for runoff
153 ! ZIMAX_ICE = maximum infiltration rate for frozen soil
154 ! ZIMAX = maximum infiltration rate for unfrozen soil
155 ! ZPIFLDMAX = maximum floodplains infiltration during 1 day (kg/m2/s)
156 !
157 REAL, DIMENSION(SIZE(PPG)) :: zwg2_avg, zwgi2_avg, zwsat_avg, zwwilt_avg
158 ! Average water and ice content
159 ! values over the soil depth D2 (for calculating surface runoff)
160 !
161 REAL, DIMENSION(SIZE(PD_G,1),SIZE(PD_G,2)) :: zwsat, zwfc, zfrz
162 !
163 REAL, DIMENSION(SIZE(PPG)) :: zpg_work, zruisdt, znl_hort, zdepth
164 !
165 REAL, DIMENSION(SIZE(PPG)) :: zrunoff_topd
166 !
167 REAL :: zeffice, zlog10, zlog, zs, zd_h
168 !
169 REAL :: ztdiurn, zsoilheatcap
170 ! ZTDIURN = thermal penetration depth for restore (m)
171 ! ZSOILHEATCAP = Total soil volumetric heat capacity [J/(m3 K)]
172 !
173 INTEGER :: ini, inl, jj, jl, idepth
174 REAL(KIND=JPRB) :: zhook_handle
175 !
176 !-------------------------------------------------------------------------------
177 !
178 !allocate
179 !
180 IF (lhook) CALL dr_hook('HYDRO_SGH',0,zhook_handle)
181 !
182 !initialize
183 !
184 zfrozen(:) = 0.0
185 zimax_ice(:) = 0.0
186 zimax(:) = 0.0
187 !
188 zwsat(:,:) = 0.0
189 zwfc(:,:) = 0.0
190 !
191 zlog10 = log(10.0)
192 !
193 !HRUNOFF = DT92 ZFSAT calculation
194 zwg2_avg(:) = 0.0
195 zwgi2_avg(:) = 0.0
196 zwsat_avg(:) = 0.0
197 zwwilt_avg(:) = 0.0
198 !
199 !HHORT=SGH
200 zhort_r(:) = 0.0
201 zhort_m(:) = 0.0
202 !
203 !PIFLOOD calculation
204 zsoilmax(:) = 0.0
205 zif_max(:) = 0.0
206 zpifldmax(:) = 0.0
207 !
208 !HRUNOFF = DT92 DUNNE calculation
209 zpg_work(:) = 0.0
210 zruisdt(:) = 0.0
211 !
212 !HRUNOFF = TOPD DUNNE calculation
213 zrunoff_topd(:) = 0.0
214 !
215 !to limit numerical artifacts
216 zpg_ini(:) = ppg(:) + ppg_melt(:)
217 !
218 !
219 ini=SIZE(pd_g,1)
220 inl=maxval(kwg_layer(:))
221 !
222 !-------------------------------------------------------------------------------
223 !
224 !* 1. Surface saturated fraction
225 ! -----------------------------
226 !
227 IF( hrunoff=='DT92' .OR. hrunoff == 'TOPD' )THEN
228 !
229 ! Calculate the layer average water content for the sub-grid
230 ! surface runoff computation: use PRUNOFFD as the depth over which
231 ! runoff is calculated.
232 !
233 ! First, determine a weight for each layer's contribution
234 ! to thickness averaged water content and soil properties for runoff.
235 !
236  IF (hisba == 'DIF') THEN
237 !
238 ! Vertically averaged soil properties and moisture for surface runoff computation:
239 !
240  DO jl=1,klayer_dun
241  DO jj=1,ini
242  idepth=kwg_layer(jj)
243  IF(jl<=idepth)THEN
244  zwg2_avg(jj) = zwg2_avg(jj) + psoilwght(jj,jl)*pwg(jj,jl)/max(1.e-6,prunoffd(jj))
245  zwgi2_avg(jj) = zwgi2_avg(jj) + psoilwght(jj,jl)*pwgi(jj,jl)/max(1.e-6,prunoffd(jj))
246  zwsat_avg(jj) = zwsat_avg(jj) + psoilwght(jj,jl)*pwsat(jj,jl)/max(1.e-6,prunoffd(jj))
247  zwwilt_avg(jj) = zwwilt_avg(jj) + psoilwght(jj,jl)*pwwilt(jj,jl)/max(1.e-6,prunoffd(jj))
248  ENDIF
249  ENDDO
250  ENDDO
251 !
252  ELSE
253 !
254  zwg2_avg(:) = pwg(:, 2)
255  zwgi2_avg(:) = pwgi(:,2)
256  zwsat_avg(:) = pwsat(:,1)
257  zwwilt_avg(:) = pwwilt(:,1)
258 !
259  ENDIF
260 !
261  IF(hhort=='SGH')THEN
262  !runoff over frozen soil explicitly calculated
263  zwgi2_avg(:)=0.0
264  ENDIF
265 !
266  DO jj=1,ini
267  zs=min(1.0,(zwg2_avg(jj)+zwgi2_avg(jj)-zwwilt_avg(jj))/(zwsat_avg(jj)-zwwilt_avg(jj)))
268  pfsat(jj) = 1.0-(1.0-max(0.0,zs))**(prunoffb(jj)/(prunoffb(jj)+1.))
269  ENDDO
270 !
271 ENDIF
272 !
273 !* 2. Horton runoff
274 ! ----------------
275 !
276 IF(hhort=='SGH'.OR.oflood)THEN
277 !
278  IF(hisba == 'DIF')THEN
279 !
280 ! no subgrid frozen soil fraction of the grid cells
281  zfrozen(:) = 0.0
282 !
283  DO jl=1,klayer_hort
284  DO jj=1,ini
285 !
286 ! Modify soil porosity as ice assumed to become part
287 ! of solid soil matrix (with respect to liquid flow):
288  zwsat(jj,jl) = max(xwgmin, pwsat(jj,jl)-pwgi(jj,jl))
289  zwfc(jj,jl) = pwfc(jj,jl)*zwsat(jj,jl)/pwsat(jj,jl)
290 !
291 ! Impedance Factor from (Johnsson and Lundin 1991).
292  zfrz(jj,jl) = exp(zlog10*(-zeice*(pwgi(jj,jl)/(pwgi(jj,jl)+pwg(jj,jl)))))
293 !
294  ENDDO
295  ENDDO
296 !
297 ! Calculate infiltration MAX using green-ampt approximation (derived form)
298  zimax(:) = infmax_func(pwg,zwsat,zfrz,pcondsat,pmpotsat,pbcoef,pdzg,pd_g,klayer_hort)
299 !
300  ELSE
301 !
302  DO jj=1,ini
303 !
304 ! Total soil volumetric heat capacity [J/(m3 K)]:
305 !
306  zsoilheatcap = xcl*xrholw*pwg(jj,2) + &
307  xci*xrholi*pwgi(jj,2) + &
308  xsphsoil*xdrywght*(1.0-pwsat(jj,1))
309 !
310 ! Soil thickness which corresponds to the diurnal surface temperature
311 ! wave penetration depth as T2 is the average temperature for this layer:
312 !
313  ztdiurn = min(pd_g(jj,2), 4./(zsoilheatcap*pcg(jj)))
314 !
315 ! Effective frozen depth penetration
316 !
317  zeffice=pd_g(jj,2)*pwgi(jj,2)/(pwgi(jj,2)+pwg(jj,2))
318 !
319 ! Modify soil porosity as ice assumed to become part
320 ! of solid soil matrix (with respect to liquid flow):
321 !
322  zwsat(jj,1) = max(xwgmin, pwsat(jj,1)-pwgi(jj,2))
323 !
324 ! calculate the subgrid frozen soil fraction of the grid cells
325 !
326  zfrozen(jj) = min(1.,zeffice/max(pd_ice(jj),ztdiurn))
327 !
328 ! Impedance Factor from (Johnsson and Lundin 1991).
329 !
330  zfrz(jj,1) = exp(zlog10*(-zeice*min(1.,zeffice/ztdiurn)))
331 !
332 ! Calculate infiltration MAX on frozen soil as Johnsson and Lundin (1991).
333 ! The max infiltration is equal to the unsaturated conductivity function at a
334 ! water content corresponding to the total porosity less the ice-filled volume.
335 !
336  zs =min(1.,zwsat(jj,1)/pwsat(jj,1))
337  zimax_ice(jj)=zfrz(jj,1)*pksat_ice(jj)*(zs**(2*pbcoef(jj,1)+3.))
338 !
339 ! Calculate infiltration MAX on unfrozen soil using green-ampt approximation
340 !
341  zs =min(1.,pwg(jj,2)/zwsat(jj,1))
342  zd_h =min(0.10,pd_g(jj,2))
343  zimax(jj)=pcondsat(jj,1)*(pbcoef(jj,1)*pmpotsat(jj,1)*(zs-1.0)/zd_h+1.0)
344 !
345  ENDDO
346 !
347  ENDIF
348 !
349 ENDIF
350 !
351 IF(hhort=='SGH')THEN
352 !
353 ! calculate the Horton runoff generated by the rainfall rate
354 !
355  IF(hrain=='SGH')THEN
356 !
357  WHERE(ppg(:)>0.)
358  zhort_r(:) = (1.- zfrozen(:))* ppg(:)/((zimax(:)*xrholw*pmuf(:)/ppg(:)) + 1.) & !unfrozen soil
359  + zfrozen(:) * ppg(:)/((zimax_ice(:)*xrholw*pmuf(:)/ppg(:)) + 1.) !frozen soil
360  END WHERE
361 !
362  ELSE
363 !
364  zhort_r(:) = (1.- zfrozen(:))* max(0.,ppg(:)-zimax(:)*xrholw) & !unfrozen soil
365  + zfrozen(:) * max(0.,ppg(:)-zimax_ice(:)*xrholw) !frozen soil
366 !
367  ENDIF
368 !
369 ! calculate the Horton runoff generated by the snow melt
370 !
371  zhort_m(:) = (1.- zfrozen(:))* max(0.,ppg_melt(:)-zimax(:)*xrholw) & !unfrozen soil
372  + zfrozen(:) * max(0.,ppg_melt(:)-zimax_ice(:)*xrholw) !frozen soil
373 !
374 ! calculate the total Horton runoff
375 !
376  WHERE(pfflood(:)<=pfsat(:))
377  phorton(:) = (1. - pfsat(:)) * (zhort_r(:) + zhort_m(:))
378  ELSEWHERE
379  phorton(:) = (1. - pfflood(:)) * (zhort_r(:) + zhort_m(:))
380  ENDWHERE
381 !
382 ELSE
383 !
384  phorton(:) = 0.0
385 !
386 ENDIF
387 !
388 ! calculate all water reaching the ground
389 !
390 ppg(:) = ppg(:) + ppg_melt(:)
391 !
392 !
393 !* 3. Dunne runoff and flood interception
394 ! --------------------------------------
395 !
396 ! Interception by the flooplains
397 !
398 IF(oflood)THEN
399  ppflood(:)=pfflood(:)*max(0.0,ppg(:))
400 ELSE
401  ppflood(:)=0.0
402 ENDIF
403 !
404 IF(hrunoff=='SGH ')THEN
405 !
406 ! calculate the Dunne runoff with TOPMODEL
407 !
408  pdunne(:) = max(ppg(:),0.0) * max(pfsat(:)-pfflood(:),0.0)
409 !
410 ELSEIF (hrunoff=='DT92' .OR. hrunoff=='TOPD')THEN
411 !
412 !* Dumenil et Todini (1992) RUNOFF SCHEME
413 ! ---------------------------------------
414 !
415 ! surface runoff done only on the Fsat-Fflood fraction
416 !
417  zpg_work(:) = ppg(:) - phorton(:) - ppflood(:)
418 !
419 #ifdef TOPD
420  IF ( lcoupl_topd.AND.hrunoff == 'TOPD' )THEN
421  !
422  DO jj=1,SIZE(nmaskt_patch)
423  IF (nmaskt_patch(jj)/=0) THEN
424  IF ( xatop(nmaskt_patch(jj))/=0. .AND. xas_nature(nmaskt_patch(jj))/=xundef ) THEN
425  zrunoff_topd(jj) = max(ppg(jj),0.0) * max(xas_nature(nmaskt_patch(jj)),0.0)
426  ENDIF
427  ENDIF
428  ENDDO
429  !
430  ENDIF
431 #endif
432  !
433  CALL hydro_dt92(ptstep, &
434  prunoffb, zwwilt_avg, &
435  prunoffd, zwsat_avg, &
436  zwg2_avg, zwgi2_avg, &
437  zpg_work, zruisdt )
438 !
439  pdunne(:) = zruisdt(:)*prunoffd(:)*xrholw/ptstep
440  !
441 #ifdef TOPD
442  IF (lcoupl_topd.AND.hrunoff == 'TOPD') THEN
443  pdunne(:) = zrunoff_topd(:) + pdunne(:)*(1-xatop(nmaskt_patch(:)))
444  ENDIF
445 #endif
446  !
447  IF(oflood)THEN
448  WHERE(pfflood(:)>=pfsat(:).AND.pfflood(:)>0.0)pdunne(:) = 0.0
449  ENDIF
450  !
451 ELSE
452 !
453 ! Default case (no subgrid runoff)
454 !
455  pfsat(:) = 0.0
456  pdunne(:) = 0.0
457 !
458 ENDIF
459 !
460 ! calculate the infiltration rate after runoff
461 !
462 ppg(:) = ppg(:) - pdunne(:) - phorton(:) - ppflood(:)
463 !
464 ! Supress numerical artifacts:
465 !
466 WHERE (zpg_ini(:)<0.0)
467  ppg(:) = zpg_ini(:)
468  phorton(:) = 0.0
469  pdunne(:) = 0.0
470  ppflood(:) = 0.0
471 ENDWHERE
472 !
473 !* 4. infiltration rate from floodplains (à revoir pour DF !!!)
474 ! -------------------------------------
475 !
476 IF(oflood)THEN
477 !
478 ! calculate the maximum flood infiltration
479 !
480  zpifldmax(:) = min(ppiflood(:),xrholw/xday) ! no more than 1 meter of water per days
481 !
482  zif_max(:) = max(0.,(1.- zfrozen(:))) * zimax(:)*xrholw & !unfrozen soil
483  + zfrozen(:) * zimax_ice(:)*xrholw !frozen soil
484 !
485  IF(hisba == 'DIF')THEN
486  zdepth(:)=0.0
487  DO jl=1,klayer_hort
488  DO jj=1,ini
489  IF(zdepth(jj)<xhort_depth)THEN
490  zsoilmax(jj) = zsoilmax(jj)+max(0.0,zwfc(jj,jl)-pwg(jj,jl))*pdzg(jj,jl)*xrholw/ptstep
491  zdepth(jj) = pd_g(jj,jl)
492  ENDIF
493  ENDDO
494  ENDDO
495  ELSE
496  DO jj=1,ini
497  zwsat(jj,1) = max(xwgmin, pwsat(jj,1)-pwgi(jj,2))
498  zsoilmax(jj) = max(0.0,zwsat(jj,1)-pwg(jj,2))*pd_g(jj,2)*xrholw/ptstep
499  ENDDO
500  ENDIF
501 !
502  zsoilmax(:) = min(zsoilmax(:),zif_max(:))
503 !
504  piflood(:) = max(0.0,(pfflood(:)-pfsat(:))) * min(zpifldmax(:),zsoilmax(:))
505 !
506 ELSE
507 !
508  piflood(:)=0.0
509 !
510 ENDIF
511 !
512 !calculate the infiltration rate
513 !
514 ppg(:) = ppg(:) + piflood(:)
515 !
516 !-------------------------------------------------------------------------------
517 !
518 IF (lhook) CALL dr_hook('HYDRO_SGH',1,zhook_handle)
519 !
520 END SUBROUTINE hydro_sgh
subroutine soil(HC1DRY, HSCOND, HSNOW_ISBA, OGLACIER, PSNOWRHOM, PVEG, PCGSAT, PCGMAX, PC1SAT, PC2REF, PACOEF, PPCOEF, PCV, PPSN, PPSNG, PPSNV, PFFG, PFFV, PFF, PCG, PC1, PC2, PWGEQ, PCT, PCS, PFROZEN1, PTG, PWG, PWGI, PHCAPSOILZ, PCONDDRYZ, PCONDSLDZ, PBCOEF, PWSAT, PWWILT, HKSAT, PCONDSAT, PFFG_NOSNOW, PFFV_NOSNOW)
Definition: soil.F90:6
subroutine hydro_dt92(PTSTEP, PRUNOFFB, PWWILT, PRUNOFFD, PWSAT, PWG2, PWGI2, PPG, PRUISDT)
Definition: hydro_dt92.F90:6
subroutine hydro_sgh(HISBA, HRUNOFF, HRAIN, HHORT, PTSTEP, PD_G, PDZG, PWSAT, PWFC, PWWILT, PWG, PWGI, KWG_LAYER, PPG, PPG_MELT, PMUF, PCONDSAT, PBCOEF, PMPOTSAT, PKSAT_ICE, PD_ICE, PFSAT, PHORTON, PDUNNE, PFFLOOD, PPIFLOOD, PIFLOOD, PPFLOOD, PRUNOFFB, PRUNOFFD, PCG, PSOILWGHT, OFLOOD, KLAYER_HORT, KLAYER_DUN)
Definition: hydro_sgh.F90:6