SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
isba_snow_agr.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 isba_snow_agr( HSNOW_ISBA, OMEB, &
7  pexns, pexna, pta, pqa, pzref, puref, pdircoszw, pvmod, &
8  pz0eff, pz0, pz0h, prr, psr, &
9  pemis, palb, ppsn, ppsng, ppsnv, &
10  prn, ph, ple, plei, pleg, plegi, plev, ples, pler, &
11  pletr, pevap, psubl, pgflux, plvtt, plstt, &
12  pustar, &
13  ples3l, plel3l, pevap3l, &
14  pswnet_v, pswnet_g, plwnet_v, plwnet_g, ph_v, ph_g, &
15  plev_v_c, pletr_v_c, ples_v_c, &
16  pqs3l, palb3l, &
17  prnsnow, phsnow, phpsnow, &
18  pswnetsnow, pswnetsnows, plwnetsnow, &
19  pgfluxsnow, pgsfcsnow, pustarsnow, &
20  pzgrndflux, pflsn_cor, pgrndflux, plesl, &
21  pemisnow, &
22  psnowtemp, pts_rad, pts, pri, pqs, phu, &
23  pcd, pcdn, pch, psnowhmass, &
24  prn_isba, ph_isba, pleg_isba, plegi_isba, plev_isba, &
25  pletr_isba, pustar_isba, pler_isba, ple_isba, &
26  plei_isba, pgflux_isba, pmeltadv, ptg, &
27  pemist, palbt, ple_flood, plei_flood, &
28  pffg, pffv, pff, ppalphan, ptc, omeb_litter, plelitter, &
29  plelitteri )
30 ! ##########################################################################
31 !
32 !
33 !!**** *ISBA_SNOW_AGR* aggregates snow free and snow fluxes
34 !!
35 !! PURPOSE
36 !! -------
37 !
38 !!** METHOD
39 !! ------
40 !
41 !! EXTERNAL
42 !! --------
43 !!
44 !! IMPLICIT ARGUMENTS
45 !! ------------------
46 !!
47 !!
48 !! REFERENCE
49 !! ---------
50 !!
51 !! Noilhan and Planton (1989)
52 !!
53 !! AUTHOR
54 !! ------
55 !! V. Masson * Meteo-France *
56 !! (following A. Boone)
57 !!
58 !! MODIFICATIONS
59 !! -------------
60 !! Original 10/03/95
61 !! B. Decharme 01/2009 Floodplains
62 !! B. Decharme 01/2010 Effective surface temperature (for diag)
63 !! B. Decharme 09/2012 Bug total sublimation flux: no PLESL
64 !! B. Decharme 04/2013 Bug wrong radiative temperature
65 !! Sublimation diag flux
66 !! Qs for 3l or crocus (needed for coupling with atm)
67 !! A. Boone 11/2014 MEB
68 !-------------------------------------------------------------------------------
69 !
70 !* 0. DECLARATIONS
71 ! ------------
72 USE modd_surf_par, ONLY : xundef
73 !
74 !
75 USE yomhook ,ONLY : lhook, dr_hook
76 USE parkind1 ,ONLY : jprb
77 !
78 IMPLICIT NONE
79 !
80 !* 0.1 declarations of arguments
81 ! -------------------------
82 !
83 !
84 !* general variables
85 ! -----------------
86 !
87  CHARACTER(LEN=*), INTENT(IN) :: hsnow_isba ! 'DEF' = Default F-R snow scheme
88 ! ! (Douville et al. 1995)
89 ! ! '3-L' = 3-L snow scheme (option)
90 ! ! (Boone and Etchevers 2000)
91 !
92 LOGICAL, INTENT(IN) :: omeb ! True = patch with multi-energy balance
93 ! ! False = patch with classical ISBA
94 !
95 !* surface and atmospheric parameters
96 ! ----------------------------------
97 !
98 REAL, DIMENSION(:), INTENT(IN) :: pexns ! Exner function at the surface
99 REAL, DIMENSION(:), INTENT(IN) :: pexna ! Exner function
100 REAL, DIMENSION(:), INTENT(IN) :: pta ! air temperature
101 REAL, DIMENSION(:), INTENT(IN) :: pqa ! air specific humidity
102 REAL, DIMENSION(:), INTENT(IN) :: pzref ! reference height of the first atmospheric level
103 REAL, DIMENSION(:), INTENT(IN) :: puref ! reference height of the wind
104 REAL, DIMENSION(:), INTENT(IN) :: pdircoszw ! Cosinus of the angle between the normal to the surface and the vertical
105 REAL, DIMENSION(:), INTENT(IN) :: pvmod ! module of the horizontal wind
106 REAL, DIMENSION(:), INTENT(IN) :: pz0eff ! effective roughness length
107 REAL, DIMENSION(:), INTENT(IN) :: pz0 ! roughness length for momentum
108 REAL, DIMENSION(:), INTENT(IN) :: pz0h ! roughness length for heat
109 REAL, DIMENSION(:), INTENT(IN) :: prr ! Rain rate (in kg/m2/s)
110 REAL, DIMENSION(:), INTENT(IN) :: psr ! Snow rate (in kg/m2/s)
111 !
112 !* surface parameters
113 ! ------------------
114 !
115 REAL, DIMENSION(:), INTENT(IN) :: palb ! albedo
116 REAL, DIMENSION(:), INTENT(IN) :: pemis ! emissivity
117 ! 'D95' : represents aggregated (snow + flood + snow-flood-free) albedo and emissivity
118 ! '3-L' : represents flood + snow-flood-free albedo and emissivity
119 ! 'MEB+3-L' : represents aggregated (snow + flood + snow-flood-free) albedo and emissivity
120 !
121 !
122 !* snow fractions
123 ! --------------
124 !
125 REAL, DIMENSION(:), INTENT(IN) :: ppsn ! fraction of the grid covered
126 ! ! by snow
127 REAL, DIMENSION(:), INTENT(IN) :: ppsng ! fraction of the the bare
128 ! ! ground covered by snow
129 REAL, DIMENSION(:), INTENT(IN) :: ppsnv ! fraction of the the veg.
130 ! ! covered by snow
131 REAL, DIMENSION(:), INTENT(IN) :: ppalphan ! fraction of the the explicit veg.
132 ! ! canopy buried by snow
133 !
134 !
135 !* ISBA-SNOW3L variables/parameters:
136 ! ---------------------------------
137 !
138 ! Prognostic variables:
139 !
140 REAL, DIMENSION(:), INTENT(IN) :: palb3l ! Snow albedo
141 REAL, DIMENSION(:), INTENT(IN) :: pqs3l ! Surface humidity
142 !
143 ! Diagnostics:
144 !
145 REAL, DIMENSION(:), INTENT(IN) :: pzgrndflux ! snow/soil-biomass interface flux (W/m2)
146 REAL, DIMENSION(:), INTENT(IN) :: pflsn_cor ! snow/soil-biomass correction flux (W/m2)
147 !
148 REAL, DIMENSION(:), INTENT(INOUT) :: pgrndflux ! snow/soil-biomass interface flux (W/m2)
149 !
150 REAL, DIMENSION(:), INTENT(INOUT) :: phpsnow ! heat release from rainfall (W/m2)
151 REAL, DIMENSION(:), INTENT(INOUT) :: psnowhmass ! snow heat content change from mass changes (J/m2)
152 REAL, DIMENSION(:), INTENT(INOUT) :: prnsnow ! net radiative flux from snow (W/m2)
153 REAL, DIMENSION(:), INTENT(INOUT) :: pswnetsnow ! net shortwave snow radiative flux (W/m2)
154 REAL, DIMENSION(:), INTENT(INOUT) :: pswnetsnows! net shortwave snow radiative flux in sfc layer (W/m2)
155 REAL, DIMENSION(:), INTENT(INOUT) :: plwnetsnow ! net longwave snow radiative flux (W/m2)
156 REAL, DIMENSION(:), INTENT(INOUT) :: phsnow ! sensible heat flux from snow (W/m2)
157 REAL, DIMENSION(:), INTENT(INOUT) :: pgfluxsnow ! net heat flux from snow (W/m2)
158 REAL, DIMENSION(:), INTENT(INOUT) :: pgsfcsnow ! heat flux from snow sfc to sub sfc layers (W/m2)
159 REAL, DIMENSION(:), INTENT(INOUT) :: pswnet_v ! net shortwave radiation of vegetation canopy
160 REAL, DIMENSION(:), INTENT(INOUT) :: pswnet_g ! net shortwave radiation of (below snow) surface
161 REAL, DIMENSION(:), INTENT(INOUT) :: plwnet_v ! net longwave radiation of vegetation canopy
162 REAL, DIMENSION(:), INTENT(INOUT) :: plwnet_g ! net longwave radiation of (below snow) surface
163 REAL, DIMENSION(:), INTENT(IN) :: pustarsnow ! friction velocity
164 REAL, DIMENSION(:), INTENT(OUT) :: plesl ! Evaporation (liquid) from wet snow (W/m2)
165 REAL, DIMENSION(:), INTENT(IN) :: pemisnow ! snow surface emissivity
166 REAL, DIMENSION(:), INTENT(OUT) :: pts_rad ! effective radiative temperature
167 ! of the natural surface (K)
168 REAL, DIMENSION(:), INTENT(OUT) :: pts ! effective surface temperature
169 REAL, DIMENSION(:), INTENT(IN) :: psnowtemp ! snow layer sfc temperature (K)
170 REAL, DIMENSION(:), INTENT(IN) :: ples3l ! sublimation from ISBA-ES(3L)
171 REAL, DIMENSION(:), INTENT(IN) :: plel3l ! evaporation heat flux of water in the snow (W/m2)
172 REAL, DIMENSION(:), INTENT(INOUT) :: pevap3l ! evaporation flux over snow from ISBA-ES (kg/m2/s)
173 REAL, DIMENSION(:), INTENT(IN) :: plvtt, plstt
174 !
175 !
176 ! Prognostic variables:
177 !
178 REAL, DIMENSION(:), INTENT(IN) :: ptg ! soil sfc layer average temperatures (K)
179 REAL, DIMENSION(:), INTENT(IN) :: ptc ! canopy air temperature (K)
180 !
181 !
182 !* diagnostic variables
183 ! --------------------
184 !
185 REAL, DIMENSION(:), INTENT(INOUT) :: pemist ! total surface emissivity
186 REAL, DIMENSION(:), INTENT(INOUT) :: palbt ! total surface albedo
187 !
188 !* surface fluxes
189 ! --------------
190 !
191 REAL, DIMENSION(:), INTENT(IN) :: plev_v_c ! MEB: total evapotranspiration (no snow) from
192 ! ! vegetation canopy overstory [W/m2]
193 REAL, DIMENSION(:), INTENT(IN) :: ples_v_c ! MEB: total (intercepted) snow sublimation from
194 ! ! vegetation canopy overstory [W/m2]
195 REAL, DIMENSION(:), INTENT(IN) :: pletr_v_c! MEB: transpiration from overstory canopy
196 ! ! vegetation [W/m2]
197 REAL, DIMENSION(:), INTENT(INOUT) :: prn ! net radiation
198 REAL, DIMENSION(:), INTENT(INOUT) :: ph ! sensible heat flux
199 REAL, DIMENSION(:), INTENT(INOUT) :: ph_v ! sensible heat flux from explicit veg canopy
200 REAL, DIMENSION(:), INTENT(INOUT) :: ph_g ! sensible heat flux from surface (below snow)
201 REAL, DIMENSION(:), INTENT(INOUT) :: ple ! total latent heat flux
202 REAL, DIMENSION(:), INTENT(OUT) :: plei ! sublimation latent heat flux
203 REAL, DIMENSION(:), INTENT(INOUT) :: plegi ! latent heat of sublimation over frozen soil
204 REAL, DIMENSION(:), INTENT(INOUT) :: pleg ! latent heat of evaporation
205 REAL, DIMENSION(:), INTENT(IN) :: plelitteri! sublimation of water in litter reservoir
206 REAL, DIMENSION(:), INTENT(IN) :: plelitter !sublimation of water in litter reservoir
207 LOGICAL, INTENT(IN) :: omeb_litter !True = litter option activated
208 ! ! over the ground
209 REAL, DIMENSION(:), INTENT(INOUT) :: plev ! latent heat of evaporation
210 ! ! over the vegetation
211 REAL, DIMENSION(:), INTENT(INOUT) :: ples ! latent heat of sublimation
212 ! ! over the snow
213 REAL, DIMENSION(:), INTENT(INOUT) :: pler ! latent heat of the fraction
214 ! ! delta of water retained on the
215 ! ! foliage of the vegetation
216 REAL, DIMENSION(:), INTENT(INOUT) :: pletr ! evapotranspiration of the rest
217 ! ! of the vegetation
218 REAL, DIMENSION(:), INTENT(INOUT) :: pevap ! total evaporative flux (kg/m2/s)
219 REAL, DIMENSION(:), INTENT(INOUT) :: psubl ! sublimation flux (kg/m2/s)
220 REAL, DIMENSION(:), INTENT(INOUT) :: pgflux ! flux through the ground
221 REAL, DIMENSION(:), INTENT(INOUT) :: pustar ! friction velocity
222 REAL, DIMENSION(:), INTENT(INOUT) :: pmeltadv ! advection heat flux from snowmelt (W/m2)
223 !
224 ! The following surface fluxes are from snow-free portion of grid
225 ! box when the ISBA-ES option is ON. Otherwise, they are equal
226 ! to the same variables without the _ISBA extension.
227 !
228 REAL, DIMENSION(:), INTENT(OUT) :: prn_isba ! net radiation
229 REAL, DIMENSION(:), INTENT(OUT) :: ph_isba ! sensible heat flux
230 REAL, DIMENSION(:), INTENT(OUT) :: pleg_isba ! latent heat of evaporation (ground)
231 REAL, DIMENSION(:), INTENT(OUT) :: plegi_isba ! latent heat of sublimation (ground)
232 REAL, DIMENSION(:), INTENT(OUT) :: plev_isba ! latent heat of evaporation (vegetation)
233 REAL, DIMENSION(:), INTENT(OUT) :: pletr_isba ! latent heat of evaporation (transpiration)
234 REAL, DIMENSION(:), INTENT(OUT) :: pustar_isba! friction velocity
235 REAL, DIMENSION(:), INTENT(OUT) :: pler_isba ! latent heat of evaporation (plant interception)
236 REAL, DIMENSION(:), INTENT(OUT) :: ple_isba ! total latent heat flux
237 REAL, DIMENSION(:), INTENT(OUT) :: plei_isba ! sublimation latent heat flux
238 REAL, DIMENSION(:), INTENT(OUT) :: pgflux_isba! flux through the ground
239 !
240 REAL, DIMENSION(:), INTENT(IN) :: pffg,pffv,pff
241 REAL, DIMENSION(:), INTENT(INOUT) :: ple_flood, plei_flood ! Flood evaporation
242 !
243 REAL, DIMENSION(:), INTENT(INOUT) :: pri ! grid-area Ridcharson number
244 REAL, DIMENSION(:), INTENT(INOUT) :: pqs ! grid-area Surface humidity
245 REAL, DIMENSION(:), INTENT(INOUT) :: phu ! grid-area near surface humidity
246 REAL, DIMENSION(:), INTENT(INOUT) :: pch ! grid-area drag coefficient for heat
247 REAL, DIMENSION(:), INTENT(INOUT) :: pcd ! grid-area drag coefficient for momentum
248 REAL, DIMENSION(:), INTENT(INOUT) :: pcdn ! grid-area neutral drag coefficient for momentum
249 !
250 !
251 !* 0.2 declarations of local variables
252 !
253 REAL, DIMENSION(SIZE(PTA)) :: zwork
254 !
255 REAL(KIND=JPRB) :: zhook_handle
256 !
257 !-------------------------------------------------------------------------------
258 !
259 IF (lhook) CALL dr_hook('ISBA_SNOW_AGR',0,zhook_handle)
260 !
261 zwork(:) = 0.
262 !
263 IF(omeb)THEN
264 !
265 ! Snow free (ground-based snow) diagnostics: canopy and ground blended (W m-2):
266 ! NOTE that the effects of snow cover *fraction* are implicitly *included* in these fluxes
267 ! so do NOT multiply by snow fraction.
268 
269  prn_isba(:) = pswnet_v(:) + pswnet_g(:) + plwnet_v(:) + plwnet_g(:)
270  ph_isba(:) = ph_v(:) + ph_g(:)
271  IF (omeb_litter) THEN
272  pleg_isba(:) = plelitter(:)
273  plegi_isba(:) = plelitteri(:)
274  pleg(:) = plelitter(:)
275  plegi(:) = plelitteri(:)
276  ELSE
277  pleg_isba(:) = pleg(:)
278  plegi_isba(:) = plegi(:)
279  ENDIF
280  plei_isba(:) = plegi(:) + plei_flood(:) + ples(:) + ples_v_c(:)
281  plev_isba(:) = plev_v_c(:)
282  pletr_isba(:) = pletr_v_c(:)
283  pustar_isba(:) = pustar(:) ! NOTE for now, this is same as total Ustar (includes snow)
284 ! LER does not include intercepted snow sublimation
285  pler_isba(:) = plev_v_c(:) - pletr_v_c(:)
286 ! LE includes intercepted snow sublimation
287  ple_isba(:) = pleg_isba(:) + plegi_isba(:) + plev_isba(:) + ple_flood(:) + ples_v_c(:) + plei_flood(:)
288  pgflux_isba(:) = prn_isba(:) - ph_isba(:) - ple_isba(:)
289 !
290  pemist(:) = pemis(:)
291 !
292 ! Effective surface temperature (for diag): for MEB:
293 
294  zwork(:) = ppalphan(:)*ppsn(:)
295  pts(:) = (1.0 - zwork(:))*ptc(:) + zwork(:)*psnowtemp(:)
296 !
297 ! Total heat FLUX into snow/soil/vegetation surface:
298 !
299  pgflux(:) = prn(:) - ph(:) - ple(:) + phpsnow(:)
300 !
301 ELSE
302 !
303 ! * 2. Using an explicit snow scheme option with composite soil/veg ISBA:
304 ! ------------------------------------------------------------------
305 !
306  IF(hsnow_isba == '3-L' .OR. hsnow_isba == 'CRO')THEN
307 !
308 ! Save fluxes from Force-Restore snow/explicit snow-free
309 ! portion of grid box (vegetation/soil):
310 !
311  prn_isba(:) = prn(:)
312  ph_isba(:) = ph(:)
313  pleg_isba(:) = pleg(:)
314  plegi_isba(:) = plegi(:)
315  plev_isba(:) = plev(:)
316  pletr_isba(:) = pletr(:)
317  pustar_isba(:) = pustar(:)
318  pler_isba(:) = pler(:)
319  ple_isba(:) = ple(:)
320  pgflux_isba(:) = pgflux(:)
321 !
322  plei_isba(:) = plegi(:)+plei_flood(:)+ples(:)
323 !
324 ! Effective surface temperature (for diag):
325 !
326  pts(:) = (1.-ppsn(:))*ptg(:)+ppsn(:)*psnowtemp(:)
327 !
328 ! Effective surface radiating temperature:
329 !
330  palbt(:) = palb(:)*(1.-ppsn(:)) + ppsn(:)*palb3l(:)
331  pemist(:) = pemis(:)*(1.-ppsn(:)) + ppsn(:)*pemisnow(:)
332 !
333  pts_rad(:) = ( ((1.-ppsn(:))*pemis(:)*ptg(:)**4 + &
334  ppsn(:) *pemisnow(:)*psnowtemp(:)**4 &
335  )/pemist(:) )**(0.25)
336 !
337 ! Calculate actual fluxes from snow-free natural
338 ! portion of surface: NET flux from surface is the sum of
339 ! fluxes from snow free and snow covered portions
340 ! of natural portion of grid box when *ISBA-ES* in force.
341 ! when NOT in use, then these fluxes equal those above.
342 !
343  prn(:) = (1.-ppsn(:)) * prn(:) + ppsn(:) * prnsnow(:)
344  ph(:) = (1.-ppsn(:)) * ph(:) + ppsn(:) * phsnow(:)
345 !
346  pleg(:) = (1.-ppsng(:)-pffg(:)) * pleg(:)
347  plegi(:) = (1.-ppsng(:)-pffg(:)) * plegi(:)
348  plev(:) = (1.-ppsnv(:)-pffv(:)) * plev(:)
349  pletr(:) = (1.-ppsnv(:)-pffv(:)) * pletr(:)
350  pler(:) = (1.-ppsnv(:)-pffv(:)) * pler(:)
351 !
352 ! Total evapotranspiration flux (kg/m2/s):
353 !
354  pevap(:) = (plev(:) + pleg(:))/plvtt(:) + plegi(:)/plstt(:) + ple_flood(:)/plvtt(:) + &
355  plei_flood(:)/plstt(:) + ppsn(:) * pevap3l(:)
356 !
357 ! ISBA-ES/SNOW3L fluxes:
358 !
359  ples(:) = ppsn(:) * ples3l(:)
360  plesl(:) = ppsn(:) * plel3l(:)
361  prnsnow(:) = ppsn(:) * prnsnow(:)
362  phsnow(:) = ppsn(:) * phsnow(:)
363  pgfluxsnow(:) = ppsn(:) * pgfluxsnow(:)
364  psnowhmass(:) = ppsn(:) * psnowhmass(:) ! (J m-2)
365  phpsnow(:) = ppsn(:) * phpsnow(:)
366  pgsfcsnow(:) = ppsn(:) * pgsfcsnow(:)
367  pswnetsnow(:) = ppsn(:) * pswnetsnow(:)
368  pswnetsnows(:)= ppsn(:) * pswnetsnows(:)
369  pevap3l(:) = ppsn(:) * pevap3l(:)
370 !
371 ! Total heat flux between snow and soil
372 !
373  pgrndflux(:) = ppsn(:) * (pzgrndflux(:)+pflsn_cor(:))
374  pmeltadv(:) = ppsn(:) * pmeltadv(:)
375 !
376 ! Total evaporative flux (W/m2) :
377 !
378  ple(:) = pleg(:) + plev(:) + ples(:) + plesl(:) + plegi(:) + ple_flood(:) + plei_flood(:)
379 !
380 ! Total sublimation flux (W/m2) :
381 !
382  plei(:) = ples(:) + plegi(:) + plei_flood(:)
383 !
384 ! Total sublimation flux (kg/m2/s):
385 !
386  psubl(:) = plei(:)/plstt(:)
387 !
388 ! Total FLUX into snow/soil/vegetation surface:
389 !
390  pgflux(:) = prn(:) - ph(:) - ple(:) + phpsnow(:)
391 !
392 ! surface humidity:
393 !
394  pqs(:) = (1.-ppsn(:)) * pqs(:) + ppsn(:) * pqs3l(:)
395 !
396 ! near-surface humidity :
397 !
398  phu(:) = (1.-ppsn(:)) * phu(:) + ppsn(:)
399 !
400 ! Momentum fluxes:
401 !
402  pustar(:) = sqrt( (1.-ppsn(:)) * pustar(:)**2 + ppsn(:) * pustarsnow(:)**2 )
403 !
404 ! Richardson number and Drag coeff:
405 !
406  CALL comput_ri_drag
407 !
408  ELSE
409 !
410  pts(:) = ptg(:)
411  pts_rad(:) = ptg(:)
412  palbt(:) = palb(:)
413  pemist(:) = pemis(:)
414 !
415 ! Total sublimation flux (W/m2) :
416  plei(:) = ples(:) + plegi(:) + plei_flood(:)
417 !
418 ! Total sublimation flux (kg/m2/s):
419  psubl(:) = plei(:)/plstt(:)
420 !
421  ENDIF
422 !
423 ENDIF
424 !
425 IF (lhook) CALL dr_hook('ISBA_SNOW_AGR',1,zhook_handle)
426 !
427 !-------------------------------------------------------------------------------
428  CONTAINS
429 !-------------------------------------------------------------------------------
430 !
431 SUBROUTINE comput_ri_drag
432 !
433 USE modd_surf_atm, ONLY : ldrag_coef_arp, lrrgust_arp, &
434  xrrscale, xrrgamma, xutilgust
435 !
436 USE modi_surface_ri
437 USE modi_surface_aero_cond
438 USE modi_surface_cd
439 USE modi_surface_cdch_1darp
440 USE modi_wind_threshold
441 !
442 !* 0.2 declarations of local variables
443 !
444 REAL, DIMENSION(SIZE(PTA)) :: zfp, zrrcor, zvmod, zac, zra
445 !
446 REAL(KIND=JPRB) :: zhook_handle
447 !
448 !-------------------------------------------------------------------------------
449 !
450 IF (lhook) CALL dr_hook('ISBA_SNOW_AGR:COMPUT_RI_DRAG',0,zhook_handle)
451 !
452 ! * Richardson number
453 !
454  CALL surface_ri(pts, pqs, pexns, pexna, pta, pqa, &
455  pzref, puref, pdircoszw, pvmod, pri)
456 !
457 ! * Wind check
458 !
459 zvmod = wind_threshold(pvmod,puref)
460 !
461 ! * Drag coefficient for heat and momentum
462 !
463 IF (ldrag_coef_arp) THEN
464  CALL surface_cdch_1darp(pzref, pz0eff, pz0h, zvmod, pta, ptg, &
465  pqa, pqs, pcd, pcdn, pch )
466 ELSE
467  CALL surface_aero_cond(pri, pzref, puref, zvmod, pz0, pz0h, zac, zra, pch)
468  CALL surface_cd(pri, pzref, puref, pz0eff, pz0h, pcd, pcdn)
469 ENDIF
470 !
471 IF (lrrgust_arp) THEN
472  zfp(:)=max(0.0,prr(:)+psr(:))
473  zrrcor(:)=sqrt(1.0+((((zfp(:)/(zfp(:)+xrrscale))**xrrgamma)*xutilgust)**2) &
474  /(pcd(:)*zvmod(:)**2))
475  pcd = pcd * zrrcor
476  pch = pch * zrrcor
477  pcdn = pcdn * zrrcor
478 ENDIF
479 !
480 IF (lhook) CALL dr_hook('ISBA_SNOW_AGR:COMPUT_RI_DRAG',1,zhook_handle)
481 !
482 END SUBROUTINE comput_ri_drag
483 !
484 !-------------------------------------------------------------------------------
485 !
486 END SUBROUTINE isba_snow_agr
real function, dimension(size(pwind)) wind_threshold(PWIND, PUREF)
subroutine surface_ri(PTG, PQS, PEXNS, PEXNA, PTA, PQA, PZREF, PUREF, PDIRCOSZW, PVMOD, PRI)
Definition: surface_ri.F90:6
subroutine comput_ri_drag
subroutine surface_aero_cond(PRI, PZREF, PUREF, PVMOD, PZ0, PZ0H, PAC, PRA, PCH)
subroutine isba_snow_agr(HSNOW_ISBA, OMEB, PEXNS, PEXNA, PTA, PQA, PZREF, PUREF, PDIRCOSZW, PVMOD, PZ0EFF, PZ0, PZ0H, PRR, PSR, PEMIS, PALB, PPSN, PPSNG, PPSNV, PRN, PH, PLE, PLEI, PLEG, PLEGI, PLEV, PLES, PLER, PLETR, PEVAP, PSUBL, PGFLUX, PLVTT, PLSTT, PUSTAR, PLES3L, PLEL3L, PEVAP3L, PSWNET_V, PSWNET_G, PLWNET_V, PLWNET_G, PH_V, PH_G, PLEV_V_C, PLETR_V_C, PLES_V_C, PQS3L, PALB3L, PRNSNOW, PHSNOW, PHPSNOW, PSWNETSNOW, PSWNETSNOWS, PLWNETSNOW, PGFLUXSNOW, PGSFCSNOW, PUSTARSNOW, PZGRNDFLUX, PFLSN_COR, PGRNDFLUX, PLESL, PEMISNOW, PSNOWTEMP, PTS_RAD, PTS, PRI, PQS, PHU, PCD, PCDN, PCH, PSNOWHMASS, PRN_ISBA, PH_ISBA, PLEG_ISBA, PLEGI_ISBA, PLEV_ISBA, PLETR_ISBA, PUSTAR_ISBA, PLER_ISBA, PLE_ISBA, PLEI_ISBA, PGFLUX_ISBA, PMELTADV, PTG, PEMIST, PALBT, PLE_FLOOD, PLEI_FLOOD, PFFG, PFFV, PFF, PPALPHAN, PTC, OMEB_LITTER, PLELITTER, PLELITTERI)
subroutine surface_cd(PRI, PZREF, PUREF, PZ0EFF, PZ0H, PCD, PCDN)
Definition: surface_cd.F90:6
subroutine surface_cdch_1darp(PZREF, PZ0EFF, PZ0H, PVMOD, PTA, PTG, PQA, PQS, PCD, PCDN, PCH)