SURFEX v8.1
General documentation of Surfex
soil.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 soil( IO, KK, PK, PEK, DMI, PVEG, PCS, PFROZEN1, PFFG_NOSNOW, PFFV_NOSNOW )
7 ! ##########################################################################
8 !
9 !!**** *SOIL*
10 !!
11 !! PURPOSE
12 !! -------
13 !
14 ! Calculates the coefficients related to the soil (i.e., CG, CT,
15 ! C1, C2, WGEQ) and to the snow canopy (i.e., Cs, ps, psng, psnv, and psnz0)
16 !
17 !
18 !!** METHOD
19 !! ------
20 !
21 ! Direct calculation
22 !
23 !! EXTERNAL
24 !! --------
25 !
26 ! None
27 !!
28 !! IMPLICIT ARGUMENTS
29 !! ------------------
30 !!
31 !!
32 !!
33 !! REFERENCE
34 !! ---------
35 !!
36 !! Noilhan and Planton (1989)
37 !! Belair (1995)
38 !!
39 !! AUTHOR
40 !! ------
41 !! S. Belair * Meteo-France *
42 !!
43 !! MODIFICATIONS
44 !! -------------
45 !! Original 13/03/95
46 !! 20/03/96 (Masson) error in the threshold for PCG
47 !! 04/09/98 (Masson) error in C1 normalization
48 !! 16/09/98 (Masson) frozen water in the soil
49 !! 07/10/98 (Masson) new C1 formulation
50 !! 26/11/98 (Boone) C1 option (old vs new formulations)
51 !! 15/03/99 (Boone) Soil ice modifiactions: scale C1sat,
52 !! use surface ice-weighted CG, GB method
53 !! for dry conditions uses ZWWILT for MAX
54 !! 25/03/99 (Boone) Added Johansen (1975)/Peters-Lidard
55 !! option to explicitly compute CG
56 !! 25/05/08 (Decharme) Added flood properties
57 !! 22/06/10 (Chauvin) XWGMIN added as a limit value of ZWG2
58 !! Modification of the formula for DMI%XWGEQ
59 !! to solve numerical problem
60 !! 10/10 (Decharme) The previous computation of WGEQ as ( 1.-ZX(JJ)**(IP%XPCOEF(JJ)*8.) )
61 !! can introduced some model explosions for heavy clay soil
62 !! 12/14 (LeMoigne) EBA scheme update
63 !-------------------------------------------------------------------------------
64 !
65 !* 0. DECLARATIONS
66 ! ------------
67 !
71 !
72 USE modd_csts, ONLY : xpi, xci, xrholi, xday, xcl, xrholw, xcondi
73 USE modd_isba_par, ONLY : xcondwtr, xwgmin
74 USE modd_surf_par, ONLY : xundef
75 USE modd_deepsoil, ONLY : lphysdomc
76 !
77 !
78 USE yomhook ,ONLY : lhook, dr_hook
79 USE parkind1 ,ONLY : jprb
80 !
81 IMPLICIT NONE
82 !
83 !* 0.1 declarations of arguments
84 !
85 TYPE(isba_options_t), INTENT(INOUT) :: IO
86 TYPE(isba_k_t), INTENT(INOUT) :: KK
87 TYPE(isba_p_t), INTENT(INOUT) :: PK
88 TYPE(isba_pe_t), INTENT(INOUT) :: PEK
89 TYPE(diag_misc_isba_t), INTENT(INOUT) :: DMI
90 !
91 REAL, DIMENSION(:), INTENT(IN) :: PVEG
92 !
93 REAL, DIMENSION(:), INTENT(OUT) :: PCS, PFROZEN1
94 ! soil and snow coefficients
95 ! PCS = heat capacity of the snow
96 ! PFROZEN1 = fraction of ice in superficial
97 ! soil
98 !
99 REAL, DIMENSION(:), INTENT(IN) :: PFFG_NOSNOW, PFFV_NOSNOW
100 !
101 !* 0.2 declarations of local variables
102 !
103 REAL, DIMENSION(SIZE(PVEG)) :: ZLAMS, &
104 ! conductivity of snow
105 !
106  zcw1max, zx2, zy1, zy2, &
107  zlymy1, zza, zzb, zdelta, &
108  za, zb, &
109 ! temporary variables for the
110 ! calculation of DMI%XC1 in the case
111 ! where PWG < PWWILT (i.e., dry soils)
112 !
113  zx, &
114 ! temporary variable for the
115 ! calculation of DMI%XWGEQ
116  zwsat, &
117 ! Wsat when ice is present in ground
118  zwsat1, &
119 ! Wsat when ice is present in surface
120 ! ground layer
121  zwwilt, &
122 ! Wwilt when ice is present in ground
123  zc1sat
124 ! C1sat scaled due to soil ice
125 !
126 !
127 ! Thermal conductivity option:
128 ! Johansen (1975) parameters (as presented by Peters-
129 ! Lidard, 1998, JAS). Used to compute CG.
130 !
131 REAL, DIMENSION(SIZE(PVEG)) :: ZFROZEN2, ZUNFROZEN2, ZCONDSAT, ZSATDEG, ZKERSTEN, &
132  ZCOND, ZHCAP
133 ! ZFROZEN2 = fraction of total soil layer frozen
134 ! ZUNFROZEN2 = unfrozen fraction available to liquid
135 ! ZCONDSAT = saturated conductivity (water)
136 ! ZSATDEG = degree of saturation
137 ! ZKERSTEN = Kersten number
138 ! ZCOND = soil thermal conductivity (explicitly
139 ! includes soil, water and ice)
140 ! ZHCAP = Soil heat capacity
141 !
142 REAL, DIMENSION(SIZE(PVEG)) :: ZWG2
143 ! ZWG2 = adjusted root-zone soil water content
144 !
145 REAL, DIMENSION(SIZE(PVEG)) :: ZCF !heat capacity of the flood
146 REAL, DIMENSION(SIZE(PVEG)) :: ZFF !Fraction of floodplain at the surface without snow
147 !
148 INTEGER :: JJ
149 REAL(KIND=JPRB) :: ZHOOK_HANDLE
150 !-------------------------------------------------------------------------------
151 !
152 IF (lhook) CALL dr_hook('SOIL',0,zhook_handle)
153 zwwilt(:) = 0.
154 !
155 zfrozen2(:) = 0.
156 zunfrozen2(:)= 0.
157 zcondsat(:) = 0.
158 zsatdeg(:) = 0.
159 zkersten(:) = 0.
160 zcond(:) = 0.
161 zhcap(:) = 0.
162 !
163 zlams(:) = 0.
164 zx(:) = 0.
165 zcw1max(:) = 0.
166 zy1(:) = 0.
167 zx2(:) = 0.
168 zy2(:) = 0.
169 zlymy1(:) = 0.
170 zza(:) = 0.
171 zzb(:) = 0.
172 zdelta(:) = 0.
173 za(:) = 0.
174 zb(:) = 0.
175 !
176 zcf(:) = xundef
177 !
178 pcs(:) = xundef
179 !
180 !-------------------------------------------------------------------------------
181 !
182 !* 1. FROZEN WATER FRACTION IN THE SOIL
183 ! ---------------------------------
184 !
185 pfrozen1(:) = 0.
186 WHERE (pek%XWGI(:,1) + pek%XWG(:,1) .NE. 0.)
187  pfrozen1(:) = pek%XWGI(:,1) / (pek%XWGI(:,1) + pek%XWG(:,1))
188 END WHERE
189 !
190 DO jj=1,SIZE(kk%XWSAT,1)
191 !
192  zwsat(jj) = max(kk%XWSAT(jj,1) - pek%XWGI(jj,2),xwgmin)
193 !
194  zwsat1(jj) = max(kk%XWSAT(jj,1) - pek%XWGI(jj,1),xwgmin)
195 !
196  zwwilt(jj) = kk%XWWILT(jj,1) * (zwsat1(jj) / kk%XWSAT(jj,1))
197 !
198 ENDDO
199 !-------------------------------------------------------------------------------
200 !
201 !* 2. THE HEAT CAPACITY OF BARE-GROUND
202 ! --------------------------------
203 !
204 IF(io%CSCOND == 'NP89')THEN
205 !
206 ! Actually, all the 'C' coefficients in
207 ! ISBA do not represent heat capacities,
208 ! but rather the inverse. So in the
209 ! following formulation, CG is large
210 ! when W2 is small, thus leading to small
211 ! values for the heat capacity. In other
212 ! words, a small amount of energy will
213 ! result in great temperature variations
214 ! (for dry soils).
215 !
216 !
217 ! Now calculate the thermal inertia of the soil weighted
218 ! by soil ice content (including the soil ice thermal inertia):
219 !
220  dmi%XCG(:) = (1.-pek%XWGI(:,2)) * kk%XCGSAT(:) * ( zwsat(:)/pek%XWG(:,2) ) **( 0.5*kk%XBCOEF(:,1)/log(10.) ) &
221  + pek%XWGI(:,2) * 2. * sqrt(xpi/(xcondi*xci*xrholi*xday))
222 !
223 !
224 ELSE
225 !
226 ! Method of Johansen (1975) as presented by
227 ! Peters-Lidard (JAS: 1998) for thermal
228 ! Conductivity of soil. Explicit calculation for
229 ! now (as opposed to implicit method of
230 ! Noilhan and Planton 1989). NP89 uses the
231 ! method of McCumber and Pielke (1981)
232 ! with parameters of Clapp and Hornberger (1978).
233 !
234  DO jj=1,SIZE(pek%XWG,1)
235 !
236 ! Total fraction of soil frozen:
237 !
238  zfrozen2(jj) = pek%XWGI(jj,2)/(pek%XWGI(jj,2) + pek%XWG(jj,2))
239 !
240 ! Unfrozen fraction:
241 !
242  zunfrozen2(jj) = (1.0-zfrozen2(jj))*kk%XWSAT(jj,1)
243 !
244 ! Saturated thermal conductivity:
245 !
246  zcondsat(jj) = (kk%XCONDSLD(jj,1)**(1.0-kk%XWSAT(jj,1)))* (xcondi**(kk%XWSAT(jj,1)-zunfrozen2(jj)))* &
247  (xcondwtr**zunfrozen2(jj))
248 !
249 ! Degree of saturation of soil:
250 !
251  zsatdeg(jj) = max(0.1, (pek%XWGI(jj,2)+pek%XWG(jj,2))/kk%XWSAT(jj,1))
252 !
253 ! Kersten number:
254 !
255  zkersten(jj) = log10(zsatdeg(jj)) + 1.0
256 !
257 ! Put in a smooth transition from thawed to frozen soils:
258 ! simply linearly weight Kersten number by frozen fraction
259 ! in soil:
260 !
261  zkersten(jj) = (1.0-zfrozen2(jj))*zkersten(jj) + &
262  zfrozen2(jj) *zsatdeg(jj)
263 !
264 ! Thermal conductivity of soil:
265 !
266  zcond(jj) = zkersten(jj)*(zcondsat(jj)-kk%XCONDDRY(jj,1)) + kk%XCONDDRY(jj,1)
267 !
268 ! Heat capacity of soil:
269 !
270  zhcap(jj) = (1.0-kk%XWSAT(jj,1)) * kk%XHCAPSOIL(jj,1) + &
271  pek%XWG (jj,2) * xcl * xrholw + &
272  pek%XWGI(jj,2) * xci * xrholi
273 !
274 ! Explicit CG calculation:
275 !
276  dmi%XCG(jj) = 2.*sqrt(xpi/zcond(jj)/zhcap(jj)/xday)
277 !
278  ENDDO
279 !
280 ENDIF
281 !
282 ! Cg must be smaller than 2.E-5
283 !
284 dmi%XCG(:) = min( dmi%XCG(:), io%XCGMAX )
285 !
286 !-------------------------------------------------------------------------------
287 !
288 !* 4. THE HEAT CAPACITY OF THE SNOW AND FLOOD
289 ! ---------------------------------------
290 !
291 WHERE (kk%XFF(:) > 0.)
292  zcf(:) = 2.0 * sqrt( xpi/(xcondwtr*xrholw*xcl*xday) )
293 END WHERE
294 !
295 IF(pek%TSNOW%SCHEME == 'D95' .OR. (pek%TSNOW%SCHEME == 'EBA' .AND. io%LGLACIER) )THEN
296 !
297  WHERE (pek%XPSN(:) > 0.)
298  zlams(:) = xcondi * (pek%TSNOW%RHO(:,1)/xrholw)**1.885 ! first calculate the
299 ! ! conductivity of snow
300  pcs(:) = 2.0 * sqrt( xpi/(zlams(:)*pek%TSNOW%RHO(:,1)*xci*xday) )
301  END WHERE
302 !
303 !-------------------------------------------------------------------------------
304 !
305 !* 5. GRID-AVERAGED HEAT CAPACITY
306 ! ---------------------------
307 !
308 ! With contribution from the ground, vegetation, flood and snow areas
309 ! for composite (Force-Restore) snow scheme option:
310 !
311  dmi%XCT(:) = 1. / ( (1.-pveg(:))*(1.-pek%XPSNG(:)-kk%XFFG(:)) / dmi%XCG(:) &
312  + pveg(:) *(1.-pek%XPSNV(:)-kk%XFFV(:)) / pek%XCV(:) &
313  + kk%XFF(:) / zcf(:) &
314  + pek%XPSN(:) / pcs(:) )
315 
316 !
317 ELSE
318 !
319  DO jj=1,SIZE(pveg)
320 !
321  zff(jj) = pveg(jj)*pffv_nosnow(jj) + (1.-pveg(jj))*pffg_nosnow(jj)
322 !
323 ! With contribution from the ground and vegetation for explicit
324 ! (ISBA-ES) snow scheme option:
325 !
326  dmi%XCT(jj) = 1. / ( (1.-pveg(jj))*(1.-pffg_nosnow(jj)) / dmi%XCG(jj) &
327  + pveg(jj) *(1.-pffv_nosnow(jj)) / pek%XCV(jj) &
328  + zff(jj) / zcf(jj) )
329  ENDDO
330 !
331 ENDIF
332 !
333 !
334 !-------------------------------------------------------------------------------
335 !
336 !* 6. COEFFICIENT C1
337 ! --------------
338 ! Scale the C1SAT coefficient as a function
339 ! of the soil ice content
340 !
341 zc1sat(:) = pk%XC1SAT(:)*sqrt(zwsat1(:)/kk%XWSAT(:,1))
342 !
343 !
344 ! The coefficient C1 is calculated two
345 ! different ways depending on the humidity
346 ! of the soil
347 !
348 WHERE (pek%XWG(:,1) > zwwilt(:))
349 ! ! First situation: humid soil
350 ! Then the calculation follows eq. (19)
351 ! of Noilhan and Planton(1989)
352 !
353  dmi%XC1(:) = zc1sat(:) * ( zwsat1(:)/pek%XWG(:,1) )**( 0.5*kk%XBCOEF(:,1) + 1 )
354 !
355 END WHERE
356 !
357 !
358 ! Calculate C1 coefficient for dry soil.
359 ! The default option is the continuous
360 ! formulation of Giard and Bazile. The
361 ! alternate approach is a discontinuous
362 ! formulation by Giordani (1993) and
363 ! Braud et al. (1993). This method
364 ! is perhaps more accurate from a physical
365 ! standpoint, as it is an explicit function
366 ! of temperature, whereas the continuous method
367 ! assumes a constant temperature.
368 !
369 IF(io%CC1DRY=='GB93')THEN
370 !
371  DO jj=1,SIZE(pek%XWG,1)
372 !
373  IF (pek%XWG(jj,1) <= zwwilt(jj)) THEN
374 !
375 ! ! Second situation: dry soil
376 ! We use the Gaussian formulation of
377 ! Giordanni (1993) and Braud et al. (1993)
378 !
379 !* maximum of C1 curve (computed with true Wwilt)
380 !
381  zcw1max(jj) = ( 1.19*zwwilt(jj)-5.09 )*pek%XTG(jj,1) + (-146.4*zwwilt(jj)+1786.)
382 !
383 !* Giordanni (1993) and Braud et al. (1993)
384 !
385  za(jj) = (-1.815e-2*pek%XTG(jj,1)+6.41)*zwwilt(jj) + (6.5e-3*pek%XTG(jj,1)-1.4)
386  zb(jj) = za(jj)*zwwilt(jj)
387  zdelta(jj) = ( zb(jj)*zb(jj) ) / ( 2.*log( zcw1max(jj) ) )
388 !
389  dmi%XC1(jj) = zcw1max(jj)*(1. - 2.*pveg(jj)*( 1.-pveg(jj) )) &
390  *exp( -(pek%XWG(jj,1)-zb(jj))*(pek%XWG(jj,1)-zb(jj)) / (2.*zdelta(jj)) )
391 !
392  ENDIF
393 !
394  ENDDO
395 !
396 ELSE
397 !
398  DO jj=1,SIZE(pek%XWG,1)
399 !
400  IF (pek%XWG(jj,1) <= zwwilt(jj)) THEN
401 !
402 !* maximum of C1 curve (computed with true Wwilt)
403 !
404  zcw1max(jj) = ( 1.19*zwwilt(jj)-5.09 )*pek%XTG(jj,1) + (-146.4*zwwilt(jj)+1786.)
405 !
406 !* C1 value at Wg = zero
407 !
408  zy1(jj) = 10.
409 !
410 !* C1 value at Wg = wwilt
411 !
412  zx2(jj) = zwwilt(jj)
413  zy2(jj) = zc1sat(jj)*(zwsat1(jj)/zwwilt(jj))**( 0.5*kk%XBCOEF(jj,1) + 1)
414 !
415 !* correction of maximum of C1 curve for frozen soils
416 !
417  zcw1max(jj) = max(max(zcw1max(jj),zy2(jj)),zy1(jj))
418 !
419 !* Giard-Bazile formulation (resolution of a second order equation)
420 !
421  zlymy1(jj) = log( zcw1max(jj)/zy1(jj))
422  zza(jj) = - log( zy2(jj)/zy1(jj))
423  zzb(jj) = 2. * zx2(jj) * zlymy1(jj)
424  zdelta(jj) = 4. * (zlymy1(jj)+zza(jj)) * zlymy1(jj) * zx2(jj)**2
425 !
426  za(jj) = (-zzb(jj)+sqrt(zdelta(jj))) / (2.*zza(jj))
427 !
428  zb(jj) = za(jj)**2 / zlymy1(jj)
429 !
430 !
431  dmi%XC1(jj) = zcw1max(jj) * exp( - (pek%XWG(jj,1)-za(jj))**2 / zb(jj) )
432 !
433  ENDIF
434 !
435  ENDDO
436 !
437 ENDIF
438 !-------------------------------------------------------------------------------
439 !
440 !* 6. COEFFICIENT C2
441 ! --------------
442 ! Including vertical diffusion limiting factor for surface soil ice:
443 !
444 IF(io%CKSAT=='SGH' .OR. io%CKSAT=='EXP')THEN
445 !
446 ! Adjusted root-zone soil water content
447 !
448  DO jj=1,SIZE(pek%XWG,1)
449  zwg2(jj)=pek%XWG(jj,2)*(pk%XCONDSAT(jj,2)/pk%XCONDSAT(jj,1))**(1./(2.*kk%XBCOEF(jj,1)+3))
450  ENDDO
451  zwg2(:)=max(zwg2(:),xwgmin)
452 !
453 ELSE
454 !
455  zwg2(:)=pek%XWG(:,2)
456 !
457 ENDIF
458 !
459 DO jj=1,SIZE(zwsat)
460 !
461 !Including vertical diffusion limiting factor for surface soil ice:
462 !
463  dmi%XC2(jj) = (pk%XC2REF(jj)*zwg2(jj) / ( zwsat(jj)-zwg2(jj) + 0.01 )) &
464  *(1.0-(pek%XWGI(jj,1)/(kk%XWSAT(jj,1)-xwgmin)))
465 !
466 !-------------------------------------------------------------------------------
467 !
468 !* 7. EQUILIBRIUM VOLUMETRIC WATER CONTENT WGEQ
469 ! -----------------------------------------
470 !
471  zx(jj) = zwg2(jj)/zwsat(jj)
472 !
473  dmi%XWGEQ(jj) = zwg2(jj) - zwsat(jj)*kk%XACOEF(jj) * zx(jj)**kk%XPCOEF(jj) &
474  *( 1.-exp(kk%XPCOEF(jj)*8.*log(zx(jj))))
475 !
476 ENDDO
477 !-------------------------------------------------------------------------------
478 !
479 !* 8. SPECIAL CASE OF POLAR REGIONS
480 ! -----------------------------
481 !
482 IF (lphysdomc) THEN
483  dmi%XCT(:) = 9.427757e-6 ! corresponds to a density of 350kg/m3 for snow
484 ENDIF
485 IF (lhook) CALL dr_hook('SOIL',1,zhook_handle)
486 !
487 !-------------------------------------------------------------------------------
488 !
489 END SUBROUTINE soil
real, save xpi
Definition: modd_csts.F90:43
real, parameter xundef
real, save xcondi
Definition: modd_csts.F90:82
integer, parameter jprb
Definition: parkind1.F90:32
real, save xci
Definition: modd_csts.F90:65
real, save xday
Definition: modd_csts.F90:45
real, save xcl
Definition: modd_csts.F90:65
logical lhook
Definition: yomhook.F90:15
real, save xrholi
Definition: modd_csts.F90:81
subroutine soil(IO, KK, PK, PEK, DMI, PVEG, PCS, PFROZEN1, PFFG_N
Definition: soil.F90:7
real, save xrholw
Definition: modd_csts.F90:64