SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
isba_fluxes_meb.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_fluxes_meb( &
7  prhoa, &
8  psigma_f,psigma_fn, &
9  pemis_n, &
10  prnet_v,prnet_g,prnet_n, &
11  pswnet_v,pswnet_g,pswnet_n, &
12  plwnet_v,plwnet_g,plwnet_n, &
13  plwnet_v_dtv,plwnet_v_dtg,plwnet_v_dtn, &
14  plwnet_g_dtv,plwnet_g_dtg,plwnet_g_dtn, &
15  plwnet_n_dtv,plwnet_n_dtg,plwnet_n_dtn, &
16  pthrma_ta,pthrmb_ta,pthrma_tc,pthrmb_tc, &
17  pthrma_tg,pthrmb_tg,pthrma_tv,pthrmb_tv,pthrma_tn,pthrmb_tn, &
18  pqsat_g,pqsat_v,pqsati_n, &
19  pff,ppsn,ppsna,ppsncv,pfrozen1,pffrozen, &
20  pleg_delta,plegi_delta,phug,phugi,phvg,phvn, &
21  pflxc_c_a,pflxc_g_c,pflxc_vg_c,pflxc_vn_c,pflxc_n_c,pflxc_n_a, &
22  pflxc_mom,pflxc_v_c,phvgs,phvns, &
23  ptg,ptv,ptn, &
24  pdqsat_g,pdqsat_v,pdqsati_n, &
25  ptc,pqc,pta_ic,pqa_ic, &
26  pdelta_v, &
27  pdeltat_g,pdeltat_v,pdeltat_n, &
28  psw_up,psw_rad,plw_rad, &
29  prnet,plw_up, &
30  ph_c_a,ph_v_c,ph_g_c,ph_n_c,ph_n_a,ph_n,ph, &
31  ple_c_a,ple_v_c,ple_g_c,ple_n_c, &
32  pevap_c_a,plev_v_c,pevap_g_c,pevap_n_c,pevap_n_a, &
33  pevap,psubl,pletr_v_c,pler_v_c,pleg,plegi, &
34  ple_flood,plei_flood,ples,plel, &
35  pevapn,ples_v_c,pletr,pler,plev,ple,plei,pts_rad,pemis,plstt )
36 ! ##########################################################################
37 !
38 !!**** *ISBA_FLXUES_MEB*
39 !!
40 !! PURPOSE
41 !! -------
42 !
43 ! Calculates the implicit fluxes for implicit or explicit atmospheric
44 ! coupling and fluxes needed by hydrology, soil and snow routines.
45 ! finally, compute soil phase changes.
46 !
47 !
48 !!** METHOD
49 !! ------
50 !
51 !! EXTERNAL
52 !! --------
53 !!
54 !! none
55 !!
56 !! IMPLICIT ARGUMENTS
57 !! ------------------
58 !!
59 !!
60 !!
61 !! REFERENCE
62 !! ---------
63 !!
64 !! Noilhan and Planton (1989)
65 !! Belair (1995)
66 !! * to be done * (2011)
67 !!
68 !! AUTHOR
69 !! ------
70 !!
71 !! A. Boone * Meteo-France *
72 !! P. Samuelsson * SMHI *
73 !! S. Gollvik * SMHI *
74 !!
75 !! MODIFICATIONS
76 !! -------------
77 !! Original 22/01/11
78 !!
79 !-------------------------------------------------------------------------------
80 !
81 !* 0. DECLARATIONS
82 ! ------------
83 !
84 USE modd_isba_par, ONLY : xemissoil, xemisveg
85 USE modd_csts, ONLY : xlvtt, xlstt, xstefan
86 !
87 USE modi_isba_emis_meb
88 !
89 USE yomhook ,ONLY : lhook, dr_hook
90 USE parkind1 ,ONLY : jprb
91 !
92 IMPLICIT NONE
93 !
94 !* 0.1 declarations of arguments
95 !
96 REAL, DIMENSION(:), INTENT(IN) :: prhoa
97 ! PRHOA = reference level air density (kg m-3)
98 !
99 REAL, DIMENSION(:), INTENT(IN) :: pswnet_v, pswnet_g, pswnet_n
100 ! PSWNET_G = Understory-ground net SW radiation explicit term (W m-2)
101 ! PSWNET_V = Vegetation canopy net SW radiation explicit term (W m-2)
102 ! PSWNET_N = Ground-based snow net SW radiation explicit term (W m-2)
103 !
104 REAL, DIMENSION(:), INTENT(IN) :: psigma_f, psigma_fn, pemis_n
105 !
106 REAL, DIMENSION(:), INTENT(IN) :: plwnet_v_dtv, plwnet_v_dtg, plwnet_v_dtn
107 ! PLWNET_V_DTV, PLWNET_V_DTG, PLWNET_V_DTN = Vegetation canopy net LW radiation
108 ! derivatives w/r/t surface temperature(s) (W m-2 K-1)
109 !
110 REAL, DIMENSION(:), INTENT(IN) :: plwnet_g_dtv, plwnet_g_dtg, plwnet_g_dtn
111 ! PLWNET_G_DTV, PLWNET_G_DTG, PLWNET_G_DTN = Understory-ground net LW radiation
112 ! derivatives w/r/t surface temperature(s) (W m-2 K-1)
113 !
114 REAL, DIMENSION(:), INTENT(IN) :: plwnet_n_dtv, plwnet_n_dtg, plwnet_n_dtn
115 ! PLWNET_N_DTV, PLWNET_N_DTG, PLWNET_N_DTN = Ground-based snow net LW radiation
116 ! derivatives w/r/t surface temperature(s) (W m-2 K-1)
117 !
118 REAL, DIMENSION(:), INTENT(IN) :: pthrma_ta, pthrmb_ta, pthrma_tc, pthrmb_tc, &
119  pthrma_tg, pthrmb_tg, pthrma_tv, pthrmb_tv, pthrma_tn, pthrmb_tn
120 ! PTHRMA_TA (J kg-1 K-1)
121 ! PTHRMB_TA = linear transform coefficinets for atmospheric
122 ! thermal variable for lowest atmospheric level. (J kg-1)
123 ! Transform T to dry static energy or enthalpy.
124 ! PTHRMA_TC (J kg-1 K-1)
125 ! PTHRMB_TC = linear transform coefficinets for atmospheric
126 ! thermal variable for canopy air (J kg-1)
127 ! Transform T to dry static energy or enthalpy.
128 ! PTHRMA_TG,V,N (J kg-1 K-1)
129 ! PTHRMB_TG,V,N = linear transform coefficinets for atmospheric
130 ! thermal variable for surfaces (G, V, and N) (J kg-1)
131 ! Transform T to dry static energy or enthalpy.
132 !
133 REAL, DIMENSION(:), INTENT(IN) :: pqsat_g, pqsat_v, pqsati_n
134 ! PQSAT_G = saturation specific humidity for understory surface (kg kg-1)
135 ! PQSAT_V = saturation specific humidity for the vegetation canopy (kg kg-1)
136 ! PQSATI_N = saturation specific humidity over ice for the snowpack (kg kg-1)
137 !
138 REAL, DIMENSION(:), INTENT(IN) :: pff, ppsn, ppsna, ppsncv, pfrozen1, pffrozen, plstt
139 ! PFF = total flooded fraction (-)
140 ! PPSN = fraction of snow on ground and understory vegetation (-)
141 ! PPSNA = fraction of vegetation canopy buried by ground-based snowpack (-)
142 ! PPSNCV = fraction of vegetation canopy covered by intercepted snow (-)
143 ! PFROZEN1 = frozen fraction of surface ground layer (-)
144 ! PFFROZEN = frozen fraction of flooded zone (-)
145 ! PLSTT = effecitve latent heat of sublimation (J/kg)
146 !
147 !
148 REAL, DIMENSION(:), INTENT(IN) :: pleg_delta, plegi_delta, phugi, phug, phvg, phvn
149 ! PHUG = relative humidity of the soil (-)
150 ! PHVG = Halstead coefficient of non-buried (snow) canopy vegetation (-)
151 ! PHVN = Halstead coefficient of paritally-buried (snow) canopy vegetation (-)
152 !
153 REAL, DIMENSION(:), INTENT(IN) :: pflxc_c_a, pflxc_g_c, pflxc_vg_c, pflxc_vn_c, pflxc_n_c, pflxc_n_a, &
154  pflxc_v_c, pflxc_mom
155 ! PFLXC_C_A = Flux form heat transfer coefficient: canopy air to atmosphere (kg m-2 s-1)
156 ! PFLXC_G_C = As above, but for : ground-understory to canopy air (kg m-2 s-1)
157 ! PFLXC_VG_C = As above, but for : non-snow buried canopy to canopy air (kg m-2 s-1)
158 ! PFLXC_VN_C = As above, but for : partially snow-buried canopy air to canopy
159 ! air (kg m-2 s-1)
160 ! PFLXC_V_C = As above, but for : bulk vegetation canopy to canopy air (kg m-2 s-1)
161 ! PFLXC_N_C = As above, but for : ground-based snow to atmosphere (kg m-2 s-1)
162 ! PFLXC_N_A = As above, but for : ground-based snow to canopy air (kg m-2 s-1)
163 ! PFLXC_MOM = flux form drag transfer coefficient: canopy air to atmosphere (kg m-2 s-1)
164 !
165 REAL, DIMENSION(:,:), INTENT(IN) :: ptn
166 ! PTN = Ground-based snow temperature profile (K)
167 !
168 REAL, DIMENSION(:), INTENT(IN) :: ptv
169 ! PTV = Vegetation canopy temperature (K)
170 !
171 REAL, DIMENSION(:,:), INTENT(IN) :: ptg
172 ! PTG = Soil temperature profile (K)
173 !
174 REAL, DIMENSION(:), INTENT(IN) :: pdqsat_g, pdqsat_v, pdqsati_n
175 ! PQSAT_G = saturation specific humidity derivative for understory
176 ! surface (kg kg-1 K-1)
177 ! PQSAT_V = saturation specific humidity derivative for the vegetation
178 ! canopy (kg kg-1 K-1)
179 ! PQSATI_N = saturation specific humidity derivative over ice for the
180 ! ground-based snowpack (kg kg-1 K-1)
181 !
182 REAL, DIMENSION(:), INTENT(IN) :: phvgs, phvns
183 ! PHVGS = Dimensionless pseudo humidity factor for computing vapor
184 ! fluxes from the non-buried part of the canopy to the canopy air (-)
185 ! PHVNS = Dimensionless pseudo humidity factor for computing vapor
186 ! fluxes from the partly-buried part of the canopy to the canopy air (-)
187 !
188 REAL, DIMENSION(:), INTENT(IN) :: ptc, pqc, pta_ic, pqa_ic
189 ! PTC = Canopy air space temperature (K)
190 ! PQC = Canopy air space specific humidity (kg kg-1)
191 ! PTA_IC = Near-ground air temperature (K)
192 ! PQA_IC = Near-ground air specific humidity (kg kg-1)
193 !
194 REAL, DIMENSION(:), INTENT(IN) :: psw_up, psw_rad, plw_rad
195 ! PSW_UP = total upwelling shortwave radiation from the surface at the atmosphere (W m-2)
196 ! PSW_RAD = downwelling shortwave radiation from the atmosphere above the canopy (W m-2)
197 ! PLW_RAD = downwelling longwave radiation from the atmosphere above the canopy (W m-2)
198 !
199 REAL, DIMENSION(:), INTENT(IN) :: pdelta_v
200 ! PDELTA_V = Explicit canopy interception fraction (-)
201 !
202 REAL, DIMENSION(:), INTENT(IN) :: pdeltat_v, pdeltat_n, pdeltat_g
203 ! PDELTAT_V = Time change in vegetation canopy temperature (K)
204 ! PDELTAT_N = Time change in snowpack surface temperature (K)
205 ! PDELTAT_G = Time change in soil surface temperature (K)
206 !
207 REAL, DIMENSION(:), INTENT(INOUT):: plwnet_v, plwnet_g, plwnet_n
208 ! PLWNET_G = Understory-ground net LW radiation implicit term output (W m-2)
209 ! PLWNET_V = Vegetation canopy net LW radiation implicit term output (W m-2)
210 ! PLWNET_N = Ground-based snow net LW radiation implicit term output (W m-2)
211 !
212 REAL, DIMENSION(:), INTENT(OUT) :: prnet_v, prnet_g, prnet_n
213 ! PRNET_G = Understory-ground net radiation (W m-2)
214 ! PRNET_V = Vegetation canopy net radiation (W m-2)
215 ! PRNET_N = Ground-based snow net radiation (W m-2)
216 !
217 REAL, DIMENSION(:), INTENT(OUT) :: prnet, plw_up
218 ! PRNET = total net radiation of snow, understory and canopy (W m-2)
219 ! PLW_UP = total net longwave upwelling radiation to the atmosphere (W m-2)
220 !
221 REAL, DIMENSION(:), INTENT(OUT) :: ph_c_a, ph_v_c, ph_g_c, ph_n_c, ph_n, ph, ph_n_a
222 ! PH_C_A = Sensible heat flux: canopy air space to overlying atmosphere (W m-2)
223 ! PH_V_C = Sensible heat flux: vegetation canopy to canopy air space (W m-2)
224 ! PH_G_C = Sensible heat flux: understory (soil & vegetation) to canopy air space (W m-2)
225 ! PH_N_C = Sensible heat flux: ground based snowpack to canopy air space (W m-2)
226 ! PH_N = Sensible heat flux: ground based snowpack to both canopy air space and overlying atmosphere (W m-2)
227 ! PH = Sensible heat flux: total net sensible heat flux from surface to atmosphere (W m-2)
228 ! PH_N_A = Sensible heat flux: ground based snowpack to overlying atmosphere (W m-2)
229 !
230 REAL, DIMENSION(:), INTENT(OUT) :: ple_c_a, ple_v_c, ple_g_c, ple_n_c
231 ! PLE_C_A = Latent heat flux: canopy air space to overlying atmosphere (W m-2)
232 ! PLE_V_C = Latent heat flux: vegetation canopy to canopy air space (W m-2)
233 ! PLE_G_C = Latent heat flux: understory (soil & vegetation) to canopy air space (W m-2)
234 ! PLE_N_C = Latent heat flux: ground based snowpack to canopy air space (W m-2)
235 !
236 REAL, DIMENSION(:), INTENT(OUT) :: pevap_c_a, plev_v_c, pevap_g_c, pevap_n_c, pevap_n_a, &
237  pevap, psubl, pevapn
238 ! PEVAP_C_A = Water flux: canopy air space to overlying atmosphere (kg m-2 s-1)
239 ! PLEV_V_C = Water flux: vegetation canopy to canopy air space (kg m-2 s-1)
240 ! PEVAP_G_C = Water flux: understory (soil & vegetation) to canopy air space (kg m-2 s-1)
241 ! PEVAP_N_C = Water flux: ground based snowpack to canopy air space (kg m-2 s-1)
242 ! PEVAP_N_A = Water flux: ground based snowpack to overlying atmosphere (kg m-2 s-1)
243 ! PEVAP = Water flux: total net water flux from surface to atmosphere (kg m-2 s-1)
244 ! PSUBL = Water flux: total sublimation flux (kg/m2/s)
245 ! PEVAPN = Water flux: ground based snowpack to both canopy air space and overlying atmosphere (kg m-2 s-1)
246 !
247 REAL, DIMENSION(:), INTENT(OUT) :: pletr_v_c, pler_v_c, pleg, plegi, ple_flood, &
248  plei_flood, ples, plel, ples_v_c, pletr, plev, ple, plei, pler
249 ! PLETR_V_C = Latent heat flux: transpiration from the canopy (overstory) vegetation to canopy air (W m-2)
250 ! PLER_V_C = Latent heat flux: evaporation of intercepted water from the canopy (overstory) vegetation to canopy air (W m-2)
251 ! PLES_V_C = Latent heat flux: sublimation of canopy intercepted snowpack to canopy air (W m-2)
252 ! PLEG = Latent heat flux: baresoil evaporation (W m-2)
253 ! PLEGI = Latent heat flux: baresoil sublimation (W m-2)
254 ! PLE_FLOOD = Latent heat flux: evaporation from flooded areas (W m-2)
255 ! PLEI_FLOOD = Latent heat flux: sublimation from ice-covered flooded areas (W m-2)
256 ! PLEL = Latent heat flux: net evaporation from ground-based snowpack to canopy air and overlying atmosphere (W m-2)
257 ! PLES = Latent heat flux: net sublimation from ground-based snowpack to canopy air and overlying atmosphere (W m-2)
258 ! PLETR = Latent heat flux: net transpiration from understory and overstory (canopy) (W m-2)
259 ! PLEV = Latent heat flux: net evapotranspiration from understory and canopy vegetation (W m-2)
260 ! PLE = Latent heat flux: net evapotranspiration (W m-2)
261 ! PLEI = Latent heat flux: net sublimation (W m-2)
262 ! PLER = Latent heat flux: net evaporation from intercepted water from understory and canopy vegetation (W m-2)
263 !
264 REAL, DIMENSION(:), INTENT(OUT) :: pts_rad, pemis
265 ! PTS_RAD = Net surface radiative temperature: computed using aggregated effective sfc emissivity
266 ! backed out from LWup: this is done to ensure cosistency between LWup, Ts_rad and effective sfc Emis (K)
267 ! PEMIS = effective (aggregated) net surface emissivity (-)
268 !
269 !
270 !* 0.2 declarations of local variables
271 !
272 !
273 REAL, DIMENSION(SIZE(PTV)) :: zfff, zwork
274 ! ZFFF = working variables to help distinguish between soil and snow hydrolology and intercepted water reservoirs (-)
275 ! ZWORK = working array
276 !
277 REAL, DIMENSION(SIZE(PTV)) :: zsair, zsairc
278 ! ZSAIR = atmospheric value of the therodynamic variable
279 ! ZSAIRC = canopy air value of the therodynamic variable
280 !
281 REAL, DIMENSION(SIZE(PTV)) :: zevap_v_c
282 ! ZEVAP_V_C = Water flux: Evapotranspiration vapor flux from the vegetation canopy (kg m-2 s-1)
283 !
284 REAL, DIMENSION(SIZE(PTV)) :: zqsatn_v, zqsatin_n, zqsatn_g
285 ! ZQSATN_V = saturation specific humidity (over water) for the vegetation canopy (kg kg-1)
286 ! ZQSATIN_N = saturation specific humidity (over ice) for the snow (kg kg-1)
287 ! NOTE that liquid water can only exist when the snowpack T=XTT in the model,
288 ! and at the freezing point, the value is the same over ice and water, therefore
289 ! over snow, we do not need to explicitly consider a "ZQSATN_N"
290 ! ZQSATN_G = saturation specific humidity (over water) for the understory (kg kg-1)
291 !
292 REAL(KIND=JPRB) :: zhook_handle
293 !-------------------------------------------------------------------------------
294 !
295 !* 0. Initialization:
296 ! ---------------
297 !
298 IF (lhook) CALL dr_hook('ISBA_FLUXES_MEB',0,zhook_handle)
299 !-------------------------------------------------------------------------------
300 !
301 !* 1. Radiative Fluxes
302 ! ----------------
303 !
304 ! LWnet: transform from explicit to implicit (i.e. at time t+dt)
305 !
306 plwnet_v(:) = plwnet_v(:) + plwnet_v_dtv(:)*pdeltat_v(:) &
307  + plwnet_v_dtg(:)*pdeltat_g(:) &
308  + plwnet_v_dtn(:)*pdeltat_n(:)
309 
310 plwnet_g(:) = plwnet_g(:) + plwnet_g_dtv(:)*pdeltat_v(:) &
311  + plwnet_g_dtg(:)*pdeltat_g(:) &
312  + plwnet_g_dtn(:)*pdeltat_n(:)
313 
314 plwnet_n(:) = plwnet_n(:) + plwnet_n_dtv(:)*pdeltat_v(:) &
315  + plwnet_n_dtg(:)*pdeltat_g(:) &
316  + plwnet_n_dtn(:)*pdeltat_n(:)
317 !
318 ! LWup at t+dt
319 !
320 plw_up(:) = plw_rad(:) - (plwnet_v(:) + plwnet_g(:) + plwnet_n(:))
321 !
322 !
323 ! Effective emissivity:
324 !
325  CALL isba_emis_meb(ppsn, ppsna, psigma_f, psigma_fn, &
326  pemis_n, pemis )
327 !
328 ! Now compute the effective radiative temperature while
329 ! imposing the constraint:
330 !
331 ! LW_RAD * (1 - EMIS ) + EMIS * XSTEFAN * TS_RAD**4 = LWUP
332 !
333 ! Using the effective emissivity ensures that the upwelling radiation from the surface (RHS)
334 ! model will be equal to the upwelling radiation computed in the atmospheric model (LHS)
335 ! (i.e. LWUP is consistent with EMIS & TS_RAD), thereby insuring energy conservation from
336 ! the surface to the atmosphere. Solving the above equation for
337 ! the radiative T gives:
338 !
339 pts_rad(:) = ((plw_up(:) - plw_rad(:)*(1.0-pemis(:)))/(xstefan*pemis(:)))**0.25
340 !
341 !
342 ! Rnet (t+dt)
343 !
344 prnet_v(:) = pswnet_v(:) + plwnet_v(:)
345 !
346 prnet_g(:) = pswnet_g(:) + plwnet_g(:)
347 !
348 prnet_n(:) = pswnet_n(:) + plwnet_n(:)
349 !
350 !
351 ! total Rnet (t+dt):
352 !
353 prnet(:) = prnet_g(:) + prnet_v(:) + prnet_n(:)
354 !
355 !
356 !* 2.a Implicit (Turbulent) Sensible Heat Fluxes
357 ! -----------------------------------------
358 
359 ! First get input thermo variable (could be enthalpy (air heat capacity x potential temperature or dry static energy)
360 
361 zsair(:) = pthrmb_ta(:) + pthrma_ta(:) *pta_ic(:)
362 zsairc(:) = pthrmb_tc(:) + pthrma_tc(:) *ptc(:)
363 
364 ! Sensible heat fluxes (W m-2):
365 ! - Canopy air to atmosphere, vegetation canopy to canopy air (implicitly includes from canopy intercepted snow),
366 ! understory-ground to canopy air,
367 ! ground-based snow to canopy air, ground-based snow to atmosphere:
368 
369 ph_c_a(:) = pflxc_c_a(:) *( zsairc(:) - zsair(:) )*(1.0 - ppsn(:)*ppsna(:))
370 ph_v_c(:) = pflxc_v_c(:) *( pthrmb_tv(:) + pthrma_tv(:)*ptv(:) - zsairc(:) )
371 ph_g_c(:) = pflxc_g_c(:) *( pthrmb_tg(:) + pthrma_tg(:)*ptg(:,1) - zsairc(:) )*(1.0-ppsn(:))
372 ph_n_c(:) = pflxc_n_c(:) *( pthrmb_tn(:) + pthrma_tn(:)*ptn(:,1) - zsairc(:) )* ppsn(:) *(1.0-ppsna(:))
373 ph_n_a(:) = pflxc_n_a(:) *( pthrmb_tn(:) + pthrma_tn(:)*ptn(:,1) - zsair(:) )* ppsn(:) * ppsna(:)
374 
375 ! - Net sensible heat flux from ground-based snow (to the canopy and the atmosphere (from
376 ! the buried-vegetation canopy fraction)) (W m-2)
377 
378 ph_n(:) = ph_n_c(:) + ph_n_a(:)
379 
380 ! FINAL sensible heat flux to the atmosphere (W m-2):
381 
382 ph(:) = ph_c_a(:) + ph_n_a(:)
383 
384 !
385 !* 2.b Implicit (Turbulent) Vapor and Latent Heat Fluxes
386 ! -------------------------------------------------
387 ! Note, to convert any of the latent heat fluxes back to vapor fluxes,
388 ! simply divide by XLVTT, even sublimation fluxes as XLSTT already accounted for.
389 
390 ! - first get 'new' surface specific humidities, qsatn, at time t+dt:
391 
392 zqsatn_g(:) = pqsat_g(:) + pdqsat_g(:) * pdeltat_g(:)
393 zqsatn_v(:) = pqsat_v(:) + pdqsat_v(:) * pdeltat_v(:)
394 zqsatin_n(:) = pqsati_n(:) + pdqsati_n(:) * pdeltat_n(:)
395 
396 ! additional sfc diagnostics needed for soil and snow hydrolology and intercepted water reservoirs:
397 
398 zfff(:) = pff(:)*( 1.0 - pffrozen(:)*(1.0 - (xlstt/xlvtt)) )
399 
400 ! - Evaporation and Sublimation latent heat fluxes from the soil, respectively:
401 ! (kg m-2 s-1)
402 
403 zwork(:) = (1.-ppsn(:)-zfff(:)) * pflxc_g_c(:)
404 
405 pleg(:) = zwork(:)*pleg_delta(:) *( phug(:) *zqsatn_g(:) - pqc(:) )*(1.-pfrozen1(:))*xlvtt
406 
407 plegi(:) = zwork(:)*plegi_delta(:)*( phugi(:)*zqsatn_g(:) - pqc(:) )* pfrozen1(:) *xlstt
408 
409 ! - Latent heat flux from frozen and unfrozen flooded zones (W m-2)
410 
411 zwork(:) = pff(:) * pflxc_g_c(:)*( zqsatn_g(:) - pqc(:) )
412 ple_flood(:) = zwork(:) * (1.-pffrozen(:))* xlvtt
413 plei_flood(:) = zwork(:) * pffrozen(:) * xlstt
414 
415 ! - Evapotranspiration vapor flux from the vegetation canopy (kg m-2 s-1)
416 
417 zevap_v_c(:) = (1.-ppsncv(:)) * phvgs(:) * pflxc_v_c(:)*( zqsatn_v(:) - pqc(:) )
418 
419 ! - Latent heat flux from the canopy (liquid) water interception reservoir (W m-2)
420 
421 pler_v_c(:) = ( (1.-ppsna(:))*ppsn(:) * pflxc_vn_c(:) + &
422  (1.-ppsn(:))* pflxc_vg_c(:) ) * &
423  xlvtt * (1.-ppsncv(:))* pdelta_v(:) * ( zqsatn_v(:) - pqc(:) )
424 
425 ! - latent heat flux from transpiration from the canopy (W m-2)
426 
427 pletr_v_c(:) = zevap_v_c(:) * xlvtt - pler_v_c(:)
428 
429 ! Snow sublimation and evaporation latent heat flux from canopy-intercepted snow (W m-2)
430 
431 ples_v_c(:) = ppsncv(:) * xlstt * phvns(:) * pflxc_v_c(:)*( zqsatn_v(:) - pqc(:) )
432 
433 ! - Total latent heat flux (evapotranspiration) from the vegetation to the canopy air space (W m-2)
434 ! *without* sublimation (for TOTAL evapotranspiration and sublimation, add PLESC here)
435 
436 plev_v_c(:) = xlvtt*zevap_v_c(:)
437 
438 ! - Total latent heat flux from vegetation canopy overstory to canopy air space
439 ! (including transpiration, liquid water store, canopy snow sublimation):
440 
441 ple_v_c(:) = plev_v_c(:) + ples_v_c(:)
442 
443 ! - Vapor flux from the ground-based snowpack to the canopy air (kg m-2 s-1):
444 
445 pevap_n_c(:) = pflxc_n_c(:)*(zqsatin_n(:) - pqc(:))*ppsn(:)*(1.0-ppsna(:))*(xlstt/xlvtt)
446 
447 ple_n_c(:) = xlvtt*pevap_n_c(:) ! W m-2
448 
449 ! - latent heat flux from transpiration from canopy veg (evapotranspiration)
450 
451 pletr(:) = pletr_v_c(:)
452 
453 ! Total latent heat flux from transpiration from understory veg and canopy veg (evapotranspiration and sublimation)
454 ! and intercepted water on both reservoirs (W m-2)
455 
456 plev(:) = pletr(:) + pler_v_c(:)
457 
458 ! Total latent heat flux from intercepted water (canopy and understory vegetation):
459 ! (does not include intercepted snow sublimation): W m-2
460 
461 pler(:) = pler_v_c(:)
462 
463 ! - Vapor flux from the ground-based snowpack (part burying the canopy vegetation) to the atmosphere (kg m-2 s-1):
464 
465 pevap_n_a(:) = pflxc_n_a(:) *( zqsatin_n(:) - pqa_ic(:))* ppsn(:)* ppsna(:) *(xlstt/xlvtt)
466 
467 ! - Net Snow (groud-based) sublimation latent heat flux (W m-2) to the canopy air space and the overlying atmosphere:
468 
469 ples(:) = ( pflxc_n_c(:) *( zqsatin_n(:) - pqc(:) )* ppsn(:)*(1.0-ppsna(:)) + &
470  pflxc_n_a(:) *( zqsatin_n(:) - pqa_ic(:))* ppsn(:)* ppsna(:) ) * xlstt
471 
472 ! - Net Snow evaporation (liquid water) latent heat flux (W m-2)
473 
474 plel(:) = xlvtt*(pevap_n_c(:) + pevap_n_a(:)) - ples(:)
475 
476 ! - Total mass flux from ground-based snowpack (kg m-2 s-1)
477 
478 pevapn(:) = (plel(:) + ples(:))/xlvtt
479 
480 ! - Total snow-free vapor flux from the understory (flooded areas, baresoil and understory vegetation)
481 ! to the canopy air space (W m-2 and kg m-2 s-1, respectively):
482 
483 ple_g_c(:) = ple_flood(:) + plei_flood(:) + plegi(:) + pleg(:)
484 
485 pevap_g_c(:) = ple_g_c(:)/xlvtt
486 
487 ! - Net vapor flux from canopy air to the atmosphere (kg m-2 s-1)
488 
489 pevap_c_a(:) = pflxc_c_a(:) *( pqc(:) - pqa_ic(:))*(1.0 - ppsn(:)*ppsna(:))
490 
491 ple_c_a(:) = xlvtt * pevap_c_a(:) ! W m-2
492 
493 ! FINAL net vapor flux from the surface to the Atmosphere:
494 ! - Net vapor flux from canopy air and exposed ground based snow (from part of snow
495 ! burying the vegetation canopy) to the atmosphere (kg m-2 s-1)
496 !
497 pevap(:) = pevap_c_a(:) + pevap_n_a(:)
498 !
499 ! Total latent heat flux of surface/snow/vegetation: W m-2
500 !
501 ple(:) = pevap(:)*xlvtt
502 !
503 ! Total sublimation from the surface/snow/vegetation: W m-2
504 !
505 plei(:) = ples(:) + plegi(:) + plei_flood(:)
506 !
507 ! Total sublimation from the surface/snow/vegetation: kg m-2 s-1
508 !
509 psubl(:) = plei(:)/plstt(:)
510 !
511 IF (lhook) CALL dr_hook('ISBA_FLUXES_MEB',1,zhook_handle)
512 !
513 END SUBROUTINE isba_fluxes_meb
514 
515 
subroutine isba_fluxes_meb(PRHOA, PSIGMA_F, PSIGMA_FN, PEMIS_N, PRNET_V, PRNET_G, PRNET_N, PSWNET_V, PSWNET_G, PSWNET_N, PLWNET_V, PLWNET_G, PLWNET_N, PLWNET_V_DTV, PLWNET_V_DTG, PLWNET_V_DTN, PLWNET_G_DTV, PLWNET_G_DTG, PLWNET_G_DTN, PLWNET_N_DTV, PLWNET_N_DTG, PLWNET_N_DTN, PTHRMA_TA, PTHRMB_TA, PTHRMA_TC, PTHRMB_TC, PTHRMA_TG, PTHRMB_TG, PTHRMA_TV, PTHRMB_TV, PTHRMA_TN, PTHRMB_TN, PQSAT_G, PQSAT_V, PQSATI_N, PFF, PPSN, PPSNA, PPSNCV, PFROZEN1, PFFROZEN, PLEG_DELTA, PLEGI_DELTA, PHUG, PHUGI, PHVG, PHVN, PFLXC_C_A, PFLXC_G_C, PFLXC_VG_C, PFLXC_VN_C, PFLXC_N_C, PFLXC_N_A, PFLXC_MOM, PFLXC_V_C, PHVGS, PHVNS, PTG, PTV, PTN, PDQSAT_G, PDQSAT_V, PDQSATI_N, PTC, PQC, PTA_IC, PQA_IC, PDELTA_V, PDELTAT_G, PDELTAT_V, PDELTAT_N, PSW_UP, PSW_RAD, PLW_RAD, PRNET, PLW_UP, PH_C_A, PH_V_C, PH_G_C, PH_N_C, PH_N_A, PH_N, PH, PLE_C_A, PLE_V_C, PLE_G_C, PLE_N_C, PEVAP_C_A, PLEV_V_C, PEVAP_G_C, PEVAP_N_C, PEVAP_N_A, PEVAP, PSUBL, PLETR_V_C, PLER_V_C, PLEG, PLEGI, PLE_FLOOD, PLEI_FLOOD, PLES, PLEL, PEVAPN, PLES_V_C, PLETR, PLER, PLEV, PLE, PLEI, PTS_RAD, PEMIS, PLSTT)
subroutine isba_emis_meb(PPSN, PPSNA, PSIGMA_F, PSIGMA_FN, PEMIS_N, PEMIS)