SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
isba_fluxes.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 ! ######spl
6  SUBROUTINE isba_fluxes(HISBA, HSNOW_ISBA, OTEMP_ARP, &
7  ptstep, psodelx, &
8  psw_rad, plw_rad, pta, pqa, &
9  prhoa, pexns, pexna, pcps, plvtt, plstt, &
10  pveg, phug, phui, phv, &
11  pleg_delta, plegi_delta, pdelta, pra, &
12  pf5, prs, pcs, pcg, pct, psnowswe, ptsm, pt2m, &
13  ppsn, ppsnv, ppsng, pfrozen1, &
14  palbt, pemist, pqsat, pdqsat, psnow_thrufal, &
15  prn, ph, ple, pleg, plegi, plev, &
16  ples, pler, pletr, pevap, &
17  pgflux, pmeltadv, pmelt, &
18  psoilcondz, pd_g, pdzg, ptg, &
19  psr, ppsnv_a, &
20  pffg, pffv, pff, pffrozen, &
21  ple_flood, plei_flood, psnowtemp )
22 ! ##########################################################################
23 !
24 !!**** *ISBA_FLUXES*
25 !!
26 !! PURPOSE
27 !! -------
28 !
29 ! Calculates the simple snowpack schemes melt and the surface fluxes.
30 !
31 !
32 !!** METHOD
33 !! ------
34 !
35 ! 1- snow melt latent heat, liquid rate (DEF option)
36 ! 2- derive the surface fluxes.
37 !
38 !! EXTERNAL
39 !! --------
40 !!
41 !! none
42 !!
43 !! IMPLICIT ARGUMENTS
44 !! ------------------
45 !!
46 !!
47 !! REFERENCE
48 !! ---------
49 !!
50 !! Noilhan and Planton (1989)
51 !! Belair (1995)
52 !! Douville et al. (1995)
53 !! Boone et al. (2000)
54 !!
55 !! AUTHOR
56 !! ------
57 !!
58 !! S. Belair * Meteo-France *
59 !!
60 !! MODIFICATIONS
61 !! -------------
62 !! Original 14/03/95
63 !! (J.Stein) 15/11/95 use the wind components in the flux computation
64 !! (J.Noilhan) 15/03/96 use the potential temperature instead of the
65 !! temperature for the heat flux computation
66 !! (J.Stein) 27/03/96 use only H and LE in the soil scheme
67 !! (A.Boone V.Masson) 05/10/98 splits e_budget in two for CO2
68 !! (A.Boone) 03/10/99 explicit latent heat of sublimation calculated
69 !! (A.Boone) 08/11/00 snow melt changes herein
70 !! (A.Boone) 06/05/02 Updates, ordering.
71 !! Introduction of snow melt timescale to 'DEF' snow option
72 !! (P.LeMoigne) 01/07/05 expression of latent heat flux as a function of
73 !! w'theta' instead of w'T' (divison by surface exner)
74 !! (P.LeMoigne) 28/07/05 dependence on qs for cp
75 !! (A. Dziedzic and PLM) 10/2006 EBA snow option
76 !! (B. Decharme)01/2009 Floodplains
77 !! (R. Hamdi) 01/09 Cp and L are not constants (As in ALADIN)
78 !! (B. Decharme)09/2009 Close the energy budget with the D95 snow scheme
79 !! (A.Boone) 03/2010 Add delta fnctions to force LEG ans LEGI=0
80 !! when hug(i)Qsat < Qa and Qsat > Qa
81 !! (A.Boone) 11/2011 Add RS_max limit to Etv
82 !! (B. Decharme)07/2012 Error in restore flux calculation (only for diag)
83 !! (B. Decharme)10/2012 Melt rate with D95 computed using max(XTAU,PTSTEP)
84 !! (A.Boone) 02/2013 Split soil phase changes into seperate routine
85 !! (B. Decharme)04/2013 Pass soil phase changes routines in hydro.F90
86 !! (B. Decharme)04/2013 Delete PTS_RAD because wrong diagnostic
87 !! (B. Decharme)10/14 "Restore" flux computed in e_budget
88 !-------------------------------------------------------------------------------
89 !
90 !* 0. DECLARATIONS
91 ! ------------
92 !
93 USE modd_csts, ONLY : xstefan, xcpd, xlstt, xlvtt, xcl, xtt, xpi, xday, &
94  xci, xrholi, xlmtt, xrholw, xg, xcl, xcondi
95 USE modd_surf_par, ONLY : xundef
96 USE modd_isba_par, ONLY : xwgmin, xsphsoil, xdrywght, xrs_max
97 USE modd_snow_par, ONLY : xtau_smelt
98 !
99 USE mode_thermos
100 !
102 !
103 USE yomhook ,ONLY : lhook, dr_hook
104 USE parkind1 ,ONLY : jprb
105 !
106 IMPLICIT NONE
107 !
108 !* 0.1 declarations of arguments
109 !
110  CHARACTER(LEN=*), INTENT(IN) :: hisba ! type of soil (Force-Restore OR Diffusion)
111 ! ! '2-L'
112 ! ! '3-L'
113 ! ! 'DIF' ISBA-DF
114 !
115  CHARACTER(LEN=*), INTENT(IN) :: hsnow_isba ! 'DEF' = Default F-R snow scheme
116 ! ! (Douville et al. 1995)
117 ! ! '3-L' = 3-L snow scheme (option)
118 ! ! (Boone and Etchevers 2001)
119 !
120 LOGICAL, INTENT(IN) :: otemp_arp ! True = time-varying force-restore soil temperature (as in ARPEGE)
121  ! False = No time-varying force-restore soil temperature (Default)
122 !
123 !
124 REAL, INTENT (IN) :: ptstep ! model time step (s)
125 !
126 !
127 REAL, DIMENSION(:), INTENT(IN) :: psodelx ! Pulsation for each layer (Only used if LTEMP_ARP=True)
128 !
129 REAL, DIMENSION(:), INTENT (IN) :: psw_rad, plw_rad, pta, pqa, prhoa
130 ! PSW_RAD = incoming solar radiation
131 ! PLW_RAD = atmospheric infrared radiation
132 ! PTA = near-ground air temperature
133 ! PQA = near-ground air specific humidity
134 ! PRHOA = near-ground air density
135 !
136 REAL, DIMENSION(:), INTENT(IN) :: pexns, pexna
137 REAL, DIMENSION(:), INTENT(IN) :: pveg
138 REAL, DIMENSION(:), INTENT(IN) :: phug, phui, phv, pdelta, pra, prs, pf5
139 REAL, DIMENSION(:), INTENT(IN) :: ppsn, ppsnv, ppsng, pfrozen1
140 REAL, DIMENSION(:), INTENT(IN) :: palbt, pemist
141 REAL, DIMENSION(:), INTENT(IN) :: pqsat, pdqsat
142 REAL, DIMENSION(:), INTENT(IN) :: pleg_delta, plegi_delta
143 ! PVEG = fraction of vegetation
144 ! PHUG = relative humidity of the soil
145 ! PHV = Halstead coefficient
146 ! PF5 = water stress numerical correction factor (based on F2)
147 ! PDELTA = fraction of the foliage covered
148 ! by intercepted water
149 ! PRA = aerodynamic surface resistance for
150 ! heat transfers
151 ! PRS = surface stomatal resistance
152 ! PPSN = grid fraction covered by snow
153 ! PPSNV = fraction of the vegetation covered
154 ! by snow
155 ! PPSNG = fraction of the ground covered by
156 ! snow
157 ! PFROZEN1 = fraction of ice in near-surface
158 ! ground
159 ! PALBT = area averaged albedo
160 ! PEMIST = area averaged emissivity
161 ! PQSAT = stauration vapor humidity at 't'
162 ! PDQSAT= stauration vapor humidity derivative at 't'
163 ! PLEG_DELTA = soil evaporation delta fn
164 ! PLEGI_DELTA = soil evaporation delta fn
165 !
166 REAL, DIMENSION(:), INTENT (IN) :: pcs, pcg, pct, pt2m, ptsm, psnowswe
167 ! PCT = area-averaged heat capacity (K m2 J-1)
168 ! PCS = heat capacity of the snow (K m2 J-1)
169 ! PCG = heat capacity of the soil (K m2 J-1)
170 ! PT2M = mean surface (or restore) temperature at start
171 ! of time step (K)
172 ! PTSM = surface temperature at start
173 ! of time step (K)
174 ! PSNOWSWE = equivalent water content of
175 ! the snow reservoir (kg m-2)
176 !
177 REAL, DIMENSION(:), INTENT(IN) :: psnow_thrufal
178 ! PSNOW_THRUFAL = rate that liquid water leaves snow pack:
179 ! ISBA-ES [kg/(m2 s)]
180 REAL, DIMENSION(:), INTENT(IN) :: psr
181 ! PSR = snow precipitation rate [kg/(m2 s)]
182 REAL, DIMENSION(:), INTENT(IN) :: ppsnv_a
183 ! PPSNV_A = vegetation covered by snow EBA scheme
184 !
185 REAL, DIMENSION(:,:), INTENT(IN) :: pd_g, psoilcondz
186 ! PD_G = Depth of bottom of Soil layers (m)
187 ! PSOILCONDZ= ISBA-DF Soil conductivity profile [W/(m K)]
188 !
189 REAL, DIMENSION(:,:), INTENT(IN) :: pdzg
190 ! PDZG = Layer thickness (DIF option)
191 !
192 REAL, DIMENSION(:), INTENT(IN) :: pcps, plvtt, plstt
193 ! PCPS = heat capacity at surface
194 !
195 REAL, DIMENSION(:), INTENT(IN) :: pffv !Floodplain fraction over vegetation
196 REAL, DIMENSION(:), INTENT(IN) :: pff !Floodplain fraction at the surface
197 REAL, DIMENSION(:), INTENT(IN) :: pffg !Efective floodplain fraction
198 REAL, DIMENSION(:), INTENT(IN) :: pffrozen !fraction of frozen flood
199 !
200 REAL, DIMENSION(:,:), INTENT(INOUT) :: ptg
201 ! PTG = soil temperature profile (K)
202 !
203 REAL, DIMENSION(:), INTENT(OUT) :: ple_flood, plei_flood !Floodplains latent heat flux [W/mē]
204 REAL, DIMENSION(:), INTENT(OUT) :: psnowtemp ! snow layer temperatures (K)
205 !
206 REAL, DIMENSION(:), INTENT(OUT) :: prn, ph, ple, pleg, plev, ples
207 REAL, DIMENSION(:), INTENT(OUT) :: pler, pletr, pevap, pgflux, pmeltadv, pmelt
208 ! PRN = net radiation at the surface
209 ! PH = sensible heat flux
210 ! PLE = latent heat flux
211 ! PLEG = latent heat flux from the soil surface
212 ! PLEV = latent heat flux from the vegetation
213 ! PLES = latent heat flux from the snow
214 ! PLER = direct evaporation from the fraction
215 ! delta of the foliage
216 ! PLETR = transpiration of the remaining
217 ! part of the leaves
218 ! PEVAP = total evaporative flux (kg/m2/s)
219 ! PGFLUX = ground flux
220 ! PMELTADV = heat advection by melting snow
221 ! (acts to restore temperature to
222 ! melting point) (W/m2)
223 ! PMELT = melting rate of snow (kg m-2 s-1)
224 !
225 REAL, DIMENSION(:), INTENT(OUT) :: plegi
226 ! PLEGI = sublimation component of the
227 ! latent heat flux from the soil surface
228 !
229 !* 0.2 declarations of local variables
230 !
231 REAL :: zksoil ! coefficient for soil freeze/thaw
232 !
233 REAL, DIMENSION(SIZE(PTA)) :: zzhv, ztn, zdt
234 ! ZZHV = for the calculation of the latent
235 ! heat of evapotranspiration
236 !! ZTN = average temperature used in
237 ! the calculation of the
238 ! melting effect
239 ! ZDT = temperature change (K)
240 !
241 REAL, DIMENSION(SIZE(PTA)) :: zpsn, zpsnv, zpsng, zfrac
242 ! ZPSN, ZPSNV, ZPSNG = snow fractions corresponding to
243 ! dummy arguments PPSN, PPSNG, PPSNV
244 ! if HSNOW_ISBA = 'DEF' (composite
245 ! or Force-Restore snow scheme), else
246 ! they are zero for explicit snow case
247 ! as snow fluxes calculated outside of
248 ! this routine using the
249 ! HSNOW_ISBA = '3-L' option.
250 !
251 REAL, DIMENSION(SIZE(PTA)) :: znextsnow
252 ! ZNEXTSNOW = Future snow reservoir to close the
253 ! energy budget (see hydro_snow.f90)
254 !
255 REAL, DIMENSION(SIZE(PTA)) :: zcondavg
256 ! ZCONDAVG = average thermal conductivity of surface
257 ! and sub-surface layers (W m-1 K-1)
258 !
259 !
260 !* 0.2 local arrays for EBA scheme
261 !
262 REAL :: zeps1
263 !
264 !* 0.3 declarations of local parameters
265 !
266 INTEGER :: jj
267 !
268 REAL, DIMENSION(SIZE(PTA)) :: zwork1, zwork2, zwork3
269 !
270 REAL(KIND=JPRB) :: zhook_handle
271 !-------------------------------------------------------------------------------
272 !
273 !-------------------------------------------------------------------------------
274 !
275 !* 0. Initialization
276 ! --------------
277 IF (lhook) CALL dr_hook('ISBA_FLUXES',0,zhook_handle)
278 !
279 IF (hsnow_isba == 'EBA') zeps1=1.0e-8
280 !
281 pmelt(:) = 0.0
282 pler(:) = 0.0
283 !
284 ztn(:) = 0.0
285 zdt(:) = 0.0
286 !
287 ! If ISBA-ES option in use, then snow covered surface
288 ! fluxes calculated outside of this routine, so set
289 ! the local snow fractions here to zero:
290 !
291 IF(hsnow_isba == '3-L' .OR. hsnow_isba == 'CRO' .OR. hisba == 'DIF')THEN
292  zpsn(:) = 0.0
293  zpsng(:) = 0.0
294  zpsnv(:) = 0.0
295 ELSE
296  zpsn(:) = ppsn(:)
297  zpsng(:) = ppsng(:)+pffg(:)
298  zpsnv(:) = ppsnv(:)+pffv(:)
299  zfrac(:) = ppsng(:)
300 ENDIF
301 !
302 !-------------------------------------------------------------------------------
303 !
304 !* 1. FLUX CALCULATIONS
305 ! -----------------
306 !
307 DO jj=1,SIZE(ptg,1)
308 ! temperature change
309  zdt(jj) = ptg(jj,1) - ptsm(jj)
310 !
311 ! net radiation
312 !
313  prn(jj) = (1. - palbt(jj)) * psw_rad(jj) + pemist(jj) * &
314  (plw_rad(jj) - xstefan * (ptsm(jj)** 3)*(4.*ptg(jj,1) - 3.*ptsm(jj)))
315 !
316 ! sensible heat flux
317 !
318  ph(jj) = prhoa(jj) * pcps(jj) * (ptg(jj,1) - pta(jj)*pexns(jj)/pexna(jj)) &
319  / pra(jj) / pexns(jj)
320 !
321  zwork1(jj) = prhoa(jj) * (1.-pveg(jj))*(1.-zpsng(jj)) / pra(jj)
322  zwork2(jj) = pqsat(jj)+pdqsat(jj)*zdt(jj)
323 ! latent heat of sublimation from
324 ! the ground
325 !
326  plegi(jj) = zwork1(jj) * plstt(jj) * ( phui(jj) * zwork2(jj) - pqa(jj)) * pfrozen1(jj) * plegi_delta(jj)
327 !
328 ! total latent heat of evaporation from
329 ! the ground
330 !
331  pleg(jj) = zwork1(jj) * plvtt(jj) * ( phug(jj) * zwork2(jj) - pqa(jj)) * (1.-pfrozen1(jj)) * pleg_delta(jj)
332 !
333  zwork2(jj) = prhoa(jj) * (zwork2(jj) - pqa(jj))
334  zwork3(jj) = zwork2(jj) / pra(jj)
335 ! latent heat of evaporation from
336 ! the snow canopy
337 !
338  ples(jj) = plstt(jj) * zpsn(jj) * zwork3(jj)
339 !
340 ! latent heat of evaporation from
341 ! evaporation
342 !
343  plev(jj) = plvtt(jj) * pveg(jj)*(1.-zpsnv(jj)) * phv(jj) * zwork3(jj)
344 !
345 ! latent heat of evapotranspiration
346 !
347  zzhv(jj) = max(0., sign(1.,pqsat(jj) - pqa(jj)))
348  pletr(jj) = zzhv(jj) * (1. - pdelta(jj)) * plvtt(jj) * pveg(jj)*(1-zpsnv(jj)) &
349  * zwork2(jj) *( (1/(pra(jj) + prs(jj))) - ((1.-pf5(jj))/(pra(jj) + xrs_max)) )
350 !
351 !
352  pler(jj) = plev(jj) - pletr(jj)
353 !
354 ! latent heat of free water (floodplains)
355 !
356  ple_flood(jj) = plvtt(jj) * (1.-pffrozen(jj)) * pff(jj) * zwork3(jj)
357 !
358  plei_flood(jj) = plstt(jj) * pffrozen(jj) * pff(jj) * zwork3(jj)
359 !
360 ! total latent heat of evaporation
361 ! without flood
362 !
363  ple(jj) = pleg(jj) + plev(jj) + ples(jj) + plegi(jj)
364 !
365 ! heat flux into the ground
366 ! without flood
367 !
368  pgflux(jj) = prn(jj) - ph(jj) - ple(jj)
369 !
370 ! heat flux due to snow melt
371 ! (ISBA-ES/SNOW3L)
372 !
373  pmeltadv(jj) = psnow_thrufal(jj)*xcl*(xtt - ptg(jj,1))
374 !
375 ! restore heat flux in FR mode,
376 ! or surface to sub-surface heat
377 ! flux using the DIF mode.
378 !
379 !
380  pevap(jj) = ((plev(jj) + pleg(jj))/plvtt(jj)) + ((plegi(jj) + ples(jj))/plstt(jj))
381 ! total evaporative flux (kg/m2/s)
382 ! without flood
383 !
384 ENDDO
385 !
386 !-------------------------------------------------------------------------------
387 !
388 IF(hsnow_isba == 'D95')THEN
389  DO jj=1,SIZE(ptg,1)
390  ple(jj) = ple(jj) + ple_flood(jj) + plei_flood(jj)
391  pgflux(jj) = pgflux(jj) - ple_flood(jj) - plei_flood(jj)
392  pevap(jj) = pevap(jj) + ple_flood(jj)/plvtt(jj) + plei_flood(jj)/plstt(jj)
393  ENDDO
394 ENDIF
395 !
396 !-------------------------------------------------------------------------------
397 !
398 !* 3. SNOWMELT LATENT HEATING EFFECTS ('DEF' option)
399 ! ----------------------------------------------
400 !
401 IF( (hsnow_isba == 'D95' .OR. hsnow_isba == 'EBA') .AND. hisba /= 'DIF' )THEN
402 ! temperature tn
403 !
404  IF (hsnow_isba == 'D95') THEN
405 !
406  ztn(:) = (1.-pveg(:))*ptg(:,1) + pveg(:)*pt2m(:)
407 !
408 ! Only diag
409  psnowtemp(:) = ztn(:)
410 !
411 !
412 ! melting rate
413 ! there is melting only if T > T0 and
414 ! of course when SNOWSWE > 0.
415 !
416  WHERE ( ztn(:) > xtt .AND. psnowswe(:) > 0.0 )
417  pmelt(:) = zpsn(:)*(ztn(:)-xtt) / (pcs(:)*xlmtt*max(xtau_smelt,ptstep))
418  END WHERE
419 !
420 ! close the energy budget: cannot melt
421 ! more than the futur available snow
422 !
423  znextsnow(:) = psnowswe(:) + ptstep * (psr(:) - ples(:) / plstt(:))
424 !
425  WHERE ( pmelt(:) > 0.0 )
426 !
427  pmelt(:)=min(pmelt(:),znextsnow(:)/ptstep)
428  znextsnow(:) = znextsnow(:) - ptstep * pmelt
429 !
430 ! removes very small fraction
431  zfrac(:) = snow_frac_ground(znextsnow(:))
432  WHERE(zfrac(:)<1.0e-4)
433  pmelt(:) = pmelt(:) + znextsnow(:) / ptstep
434  ENDWHERE
435 !
436  ENDWHERE
437 !
438  ELSEIF (hsnow_isba == 'EBA') THEN
439 !
440  pmelt(:)=min( psnowswe(:)/ptstep + psr(:) - ples(:)/plstt(:) , &
441  max(0.0,(ptg(:,1)-xtt)) / max(zeps1,pct*ptstep) / xlmtt )
442 !
443  ENDIF
444 !
445 ! new temperature Ts(t) after melting
446 ! (cooling due to the melting of the
447 ! snow)
448 !
449  ptg(:,1) = ptg(:,1) - pct(:)*xlmtt*pmelt(:)*ptstep
450 !
451 ENDIF
452 !
453 !
454 IF (lhook) CALL dr_hook('ISBA_FLUXES',1,zhook_handle)
455 !-------------------------------------------------------------------------------
456 END SUBROUTINE isba_fluxes
457 
458 
459 
460 
461 
462 
463 
464 
465 
466 
467 
real function, dimension(size(pwsnow)) snow_frac_ground(PWSNOW)
subroutine isba_fluxes(HISBA, HSNOW_ISBA, OTEMP_ARP, PTSTEP, PSODELX, PSW_RAD, PLW_RAD, PTA, PQA, PRHOA, PEXNS, PEXNA, PCPS, PLVTT, PLSTT, PVEG, PHUG, PHUI, PHV, PLEG_DELTA, PLEGI_DELTA, PDELTA, PRA, PF5, PRS, PCS, PCG, PCT, PSNOWSWE, PTSM, PT2M, PPSN, PPSNV, PPSNG, PFROZEN1, PALBT, PEMIST, PQSAT, PDQSAT, PSNOW_THRUFAL, PRN, PH, PLE, PLEG, PLEGI, PLEV, PLES, PLER, PLETR, PEVAP, PGFLUX, PMELTADV, PMELT, PSOILCONDZ, PD_G, PDZG, PTG, PSR, PPSNV_A, PFFG, PFFV, PFF, PFFROZEN, PLE_FLOOD, PLEI_FLOOD, PSNOWTEMP)
Definition: isba_fluxes.F90:6