SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
cotwores.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 cotwores(PTSTEP, HPHOTO, OTR_ML, OSHADE, &
7  pvegtype, ostressdef, pah, pbh, pf2i, pdmax, &
8  ppoi, pcsp, ptg, pf2, psw_rad, pra, pqa, pqsat, ple, &
9  ppsnv, pdelta, plai, prhoa, pzenith, pfzero, pepso, &
10  pgamm, pqdgamm, pgmes, pgc, pqdgmes, pt1gmes, pt2gmes, &
11  pamax, pqdamax, pt1amax, pt2amax, pffv, &
12  piacan_sunlit, piacan_shade, pfrac_sun, piacan, &
13  pabc, pan, panday, prs, panfm, pgpp, panf, presp_leaf )
14 ! #########################################################################
15 !
16 !!**** *COTWORES*
17 !!
18 !! PURPOSE
19 !! -------
20 !!
21 !! Calculates net assimilation of CO2 and leaf conductance.
22 !!
23 !!** METHOD
24 !! ------
25 !! Calvet et al. 1998 Forr. Agri. Met. [from model of Jacobs(1994)]
26 !!
27 !! EXTERNAL
28 !! --------
29 !! none
30 !!
31 !! IMPLICIT ARGUMENTS
32 !! ------------------
33 !!
34 !! USE MODD_CST
35 !! USE MODD_CO2V_PAR
36 !! USE MODI_COTWO
37 !! USE MODI_CCETR
38 !! USE MODE_THERMOS
39 !!
40 !! REFERENCE
41 !! ---------
42 !!
43 !! Calvet et al. 1998 Forr. Agri. Met.
44 !!
45 !! AUTHOR
46 !! ------
47 !!
48 !! A. Boone * Meteo-France *
49 !! (following Belair)
50 !!
51 !! MODIFICATIONS
52 !! -------------
53 !! Original 27/10/97
54 !! V. Masson and V. Rivailland 12/2003 modificatino of ISBA routines order
55 !! L. Jarlan 27/10/04 : add of T2 to calculate soil respiration and use
56 !! of CRESPSL key to manage the calculation of soil
57 !! respiration
58 !! PAN et PPST in kgCO2 m-2 s-1 to be fully
59 !! compatible with vegetation growth module (lailoss.f90)
60 !! P Le Moigne 09/2005 AGS modifs of L. Jarlan
61 !! S. Lafont 03/09 : change units of EPSO GAMM ANDAY
62 !! A.L. Gibelin 06/09 : suppress evolution of [CO2] in canopy
63 !! A.L. Gibelin 06/09 : move calculations of some CO2 fluxes
64 !! A.L. Gibelin 06/09 : add RESP_LEAF
65 !! A.L. Gibelin 07/09 : ensure coherence between cotwores and cotworestress
66 !! A.L. Gibelin 07/09 : Suppress PPST and PPSTF as outputs, and diagnose GPP
67 !! S. Lafont 03/11 : Correct a bug fopr grassland below wilting point
68 !! D. Carrer 04/11 : new radiative transfert
69 !! A. Boone 11/11 : add rsmax to MODD_ISBA_PAR
70 !! B. Decharme 05/12 : Bug : flood fraction in COTWORES
71 !! Optimization
72 !! R. Alkama 04/12 : add 6 new tree vegtype (9 instead 3)
73 !! C. Delire 01/14 : vertical profile of dark respiration for tropical forest
74 !! (GTROP) with Carrer radiative transfer (OTR_ML = T)
75 !!Seferian & Delire 06/2015 : generalization of (i) linear water-stress reponse
76 ! and (ii) exponential decrease of autothrophic respiration to all woody PFTs
77 !! B. Decharme 07/15 : Suppress some numerical adjustement for F2
78 !!
79 !-------------------------------------------------------------------------------
80 !
81 USE modd_csts, ONLY : xmd, xtt, xlvtt
82 USE modd_isba_par, ONLY : xrs_max, xdenom_min
83 USE modd_co2v_par, ONLY : xparcf, xmco2, xdmax_ags, &
84  xdmaxx, xdmaxn, xaw, xbw, xasw
85 USE modd_data_cover_par, ONLY : nvt_tebd, nvt_trbe, nvt_bone, &
86  nvt_trbd, nvt_tebe, nvt_tene, &
87  nvt_bobd, nvt_bond, nvt_shrb
88 USE modd_surf_par, ONLY : xundef
89 !
90 USE modi_ccetr
91 USE modi_cotwo
92 !
93 !* 0. DECLARATIONS
94 ! ------------
95 !
96 !
97 USE yomhook ,ONLY : lhook, dr_hook
98 USE parkind1 ,ONLY : jprb
99 !
100 IMPLICIT NONE
101 !
102 !* 0.1 declarations of arguments
103 !
104 !
105 REAL, INTENT(IN) :: ptstep ! time step
106  CHARACTER(LEN=*), INTENT(IN) :: hphoto ! Kind of photosynthesis
107 ! ! 'NON'
108 ! ! 'AGS'
109 ! ! 'LAI'
110 ! ! 'AST'
111 ! ! 'LST'
112 LOGICAL, INTENT(IN) :: otr_ml ! new TR
113 LOGICAL, DIMENSION(:),INTENT(IN) :: oshade
114 !
115 REAL, DIMENSION(:,:),INTENT(IN) :: pvegtype
116 ! PVEGTYPE = type de vegetation (1 a 9)
117 !
118 LOGICAL,DIMENSION(:),INTENT(IN) :: ostressdef
119 REAL,DIMENSION(:), INTENT(IN) :: pah, pbh, pf2i, pdmax
120 ! PAH, PBH = coefficients for universal herbaceous
121 ! stress relation
122 ! OSTRESSDEF = water stress vegetation comportement
123 ! (true:defensif false:offensif)
124 ! PF2I = critical normalized soil water stress
125 ! PDMAX = maximum saturation deficit of
126 ! atmosphere tolerate by vegetation
127 !
128 REAL, DIMENSION(:), INTENT(IN) :: ppoi ! Gaussian weights (as above)
129 !
130 REAL,DIMENSION(:), INTENT(IN) :: pcsp, ptg, pf2, psw_rad, pra
131 ! PCSP = atmospheric concentration of CO2
132 ! PTG = updated leaf temperature
133 ! PF2 = normalized soil water stress factor
134 ! PSW_RAD = incident solar radiation
135 ! PRA = aerodynamic resistance
136 !
137 REAL,DIMENSION(:), INTENT(IN) :: pqa, pqsat, ple, ppsnv, pdelta, plai, prhoa
138 ! PQA = atmospheric mixing ratio
139 ! PQSAT = surface saturation mixing ratio
140 ! PLE = evapotranspiration (kgH2O kgAir-1 m s-1)
141 ! PPSNV = snow cover fraction
142 ! PDELTA= fraction of the foliage covered
143 ! by intercepted water
144 ! PLAI = leaf area index
145 ! PRHOA = air density
146 !
147 REAL,DIMENSION(:), INTENT(IN) :: pzenith
148 ! PZENITH = solar zenith angle needed
149 ! for computation of diffusuion of solar
150 ! radiation: for CO2 model.
151 !
152 REAL,DIMENSION(:), INTENT(IN) :: pfzero, pepso, pgamm, pqdgamm, pgmes, pgc, &
153  pqdgmes, pt1gmes, pt2gmes, pamax, pqdamax, &
154  pt1amax, pt2amax
155 ! PFZERO = ideal value of F, no photorespiration or
156 ! saturation deficit
157 ! PEPSO = maximum initial quantum use efficiency
158 ! (kgCO2 J-1 PAR)
159 ! PGAMM = CO2 conpensation concentration (ppmv)
160 ! PQDGAMM = Log of Q10 function for CO2 conpensation
161 ! concentration
162 ! PGMES = mesophyll conductance (m s-1)
163 ! PGC = cuticular conductance (m s-1)
164 ! PQDGMES = Log of Q10 function for mesophyll conductance
165 ! PT1GMES = reference temperature for computing
166 ! compensation concentration function for
167 ! mesophyll conductance: minimum temperature
168 ! PT2GMES = reference temperature for computing
169 ! compensation concentration function for
170 ! mesophyll conductance: maximum temperature
171 ! PAMAX = leaf photosynthetic capacity (kg m-2 s-1)
172 ! PQDAMAX = Log of Q10 function for leaf photosynthetic capacity
173 ! PT1AMAX = reference temperature for computing
174 ! compensation concentration function for leaf
175 ! photosynthetic capacity: minimum temperature
176 ! PT2AMAX = reference temperature for computing
177 ! compensation concentration function for leaf
178 ! photosynthetic capacity: maximum temperature
179 !
180 REAL, DIMENSION(:,:), INTENT(IN) :: piacan_sunlit, piacan_shade, pfrac_sun
181 !
182 REAL, DIMENSION(:), INTENT(IN) :: pffv ! Floodplain fraction over vegetation
183 !
184 REAL, DIMENSION(:,:), INTENT(INOUT) :: piacan ! PAR in the canopy at different gauss level
185 !
186 REAL,DIMENSION(:), INTENT(INOUT) :: pabc, pan, panday, prs, panfm, pgpp
187 ! PABC = Carrer radiative transfer: normalized heigh of considered layer (bottom=0, top=1)
188 ! Calvet radiative transfer: abcissa of the 3-points Gaussian quadrature
189 ! (Goudriaan, Agric&For.Meteor, 38,1986)
190 ! PAN = Net assimilation of CO2 (kg_CO2/kg_air * m/s)
191 ! PANDAY= cumulated daily net assimilation of CO2 (kgCO2/m2/day)
192 ! PRS = stomatal resistance
193 ! PANFM = maximum leaf assimilation
194 ! PGPP = Gross Primary Production (kg_CO2/kg_air * m/s)
195 !
196 REAL,DIMENSION(:), INTENT(OUT) :: panf
197 ! PANF = total assimilation over canopy
198 !
199 REAL,DIMENSION(:), INTENT(OUT) :: presp_leaf
200 ! PRESP_LEAF = dark respiration over canopy
201 !
202 !* 0.2 declarations of local variables
203 !
204 REAL, PARAMETER :: zrs_min = 1.e-4 ! minimum canopy resistance (s m-1)
205 !
206 INTEGER :: jint, jj ! index for loops
207 !
208 REAL, DIMENSION(SIZE(PLAI)) :: zconve1, ztspc, zia
209 ! ZTSPC = temperature conversion (K to C)
210 ! ZIA = absorbed PAR
211 REAL, DIMENSION(SIZE(PLAI)) :: zlai, zgmest, zfzero, zdmax
212 ! ZLAI = LAI
213 ! ZFZERO = ideal value of F, no photorespiration or
214 ! saturation deficit
215 ! ZDMAX = maximum saturation deficit of atmosphere
216 ! tolerate by vegetation
217 !
218 REAL, DIMENSION(SIZE(PLAI)) :: zgammt, zdsp, zanmax
219 ! ZGAMMT = compensation point
220 ! ZDSP = saturation deficit of atmosphere
221 ! verses the leaf surface (with correction)
222 !
223 REAL, DIMENSION(SIZE(PLAI)) :: zxmus, ztan, ztgs, zxia, zan0, zgs0, zxtgs, zrdk,zlaitop,ztrdk,zzlai
224 ! ZXMUS = cosine of solar zenith angle
225 ! ZTAN = canopy integrated net assimilation
226 ! ZTGS = canopy integrated leaf conductance
227 ! ZXIA = incident radiation after diffusion
228 ! ZAN0 = net asimilation at each interval
229 ! in the canopy
230 ! ZGS0 = leaf conductance at each interval
231 ! in the canopy
232 ! ZXTGS = total canopy conductance
233 ! ZRDK = dark respiration
234 ! ZLAITOP = LAI (thickness of canopy) above considered layer
235 ! ZTRDK = canopy integrated dark respiration
236 ! ZZLAI = LAI, used for dark respiration profile
237 !
238 REAL, DIMENSION(SIZE(PLAI)) :: zan0_,zgs0_,zrdk_ ! parameters for shaded leaves
239 !
240 REAL, DIMENSION(SIZE(PLAI)) :: zepso
241 ! ZEPSO conversion of PEPSO in kgCO2/kgair m/s
242 !
243 REAL, DIMENSION(SIZE(PLAI)) :: zdmaxstar, zfzerostar, zfzeron, zgmestn
244 ! ZDMAXSTAR = maximum saturation deficit of atmosphere
245 ! tolerate by vegetation without soil water stress
246 ! ZFZEROSTAR = initial optimal ratio Ci/Cs for woody vegetation
247 ! ZFZERON = minimum value for "fzero" in defensive woody strategy
248 ! ZGMESTN = gmest value at zf2=zf2i in offensive woody strategy
249 !
250 !
251 REAL :: zabc, zweight
252 ! ZABC = abscissa needed for integration
253 ! of net assimilation and stomatal
254 ! conductance over canopy depth
255 ! (working scalar)
256 !
257 REAL, DIMENSION(SIZE(PLAI)) :: zwork !Work array
258 !
259 LOGICAL, DIMENSION(SIZE(PLAI)) :: gherb, gwood, gf2_inf_f2i, gtrop
260 !
261 INTEGER, DIMENSION(1) :: idmax
262 !
263 REAL(KIND=JPRB) :: zhook_handle
264 !-------------------------------------------------------------------------------
265 !
266 ! STOMATAL RESISTANCE: ENTRY VARIABLES TO CO2 ROUTINE:
267 ! CS = CO2 concentration (kgCO2 kgair-1) cs
268 ! DSP = specific humidity deficit (kgH2O kgair-1) ds
269 ! TSM = surface temperature (C) ts
270 ! RG = global radiation (W m-2) rg
271 !
272 ! initialisation: convert from ppm to mg/m-3
273 !
274 IF (lhook) CALL dr_hook('COTWORES',0,zhook_handle)
275 !
276 zconve1(:) = xmco2*prhoa(:)/xmd
277 !
278 ! initialisation: convert from K to C
279 !
280 ztspc(:) = ptg(:) - xtt
281 !
282 zlai(:) = plai(:)
283 zgmest(:) = pgmes(:)
284 zfzero(:) = pfzero(:)
285 !
286 !GTROP = linear stress in case of tropical evergreen forest
287 ! (with fixed f0=0.74 for Carrer rad. transf., f0=0.7 with Calvet rad. transf.)
288 gtrop(:) = (pvegtype(:,nvt_trbe) > 0.8)
289 !
290 gherb(:) = (pvegtype(:,nvt_tebd) + pvegtype(:,nvt_trbe) + pvegtype(:,nvt_bone) &
291  +pvegtype(:,nvt_trbd) + pvegtype(:,nvt_tebe) + pvegtype(:,nvt_tene) &
292  +pvegtype(:,nvt_bobd) + pvegtype(:,nvt_bond) + pvegtype(:,nvt_shrb)<0.5)
293 gwood(:) = (.NOT.gherb(:))
294 !
295 IF (hphoto=='AGS' .OR. hphoto=='LAI') THEN
296  !
297  ! Compute conductance and assimilation of CO2:
298  !
299  zdmax = xdmax_ags
300  !
301  ! Add soil moisture stress effect to leaf conductance:
302  !
303  zgmest(:) = zgmest(:) * pf2(:)
304  !
305 ELSEIF (hphoto=='AST' .OR. hphoto=='LST' .OR. hphoto=='NIT' .OR. hphoto=='NCB') THEN
306  !
307  WHERE (plai(:)==xundef) zlai(:)=0.0
308  !
309  ! See (Varlet-Granchet C., M. Chartier, G. Gosse, and R. Bonhomme, 1981:
310  ! Rayonnement utilise pour la photosynthese des vegetaux en
311  ! conditions naturelles: caracterisation et variations.
312  ! Oecol. Plant. 2(16), 189-202.)
313  !
314  !-------------------------------------
315  ! Add soil moisture stress effect to leaf conductance:
316  ! OFFENSIVE and DEFENSIVE water stress response
317  !
318  zdmax(:) = pdmax(:)
319  !
320  gf2_inf_f2i(:) = (pf2(:)<pf2i(:))
321  !
322  ! -HERBACEOUS-
323  !
324  WHERE(gherb(:).AND.ostressdef(:))
325  zdmax(:) = xdmaxn
326  ENDWHERE
327  WHERE(gherb(:).AND..NOT.ostressdef(:))
328  zdmax(:) = xdmaxx
329  ENDWHERE
330  !
331  ! PAH and PBH are original coefficients of Calvet 2000
332  WHERE(gherb(:).AND.(.NOT.gf2_inf_f2i(:)))
333  zdmaxstar(:) = exp((log(zgmest(:)*1000.)-pah(:))/pbh(:))/1000.
334  zdmax(:) = zdmaxstar(:) - (zdmaxstar(:)-zdmax(:))*(1.-pf2(:))/(1.-pf2i(:))
335  ENDWHERE
336  !
337  WHERE(gherb(:))
338  zgmest(:) = exp(pah(:)+pbh(:)*log(zdmax(:)*1000.))/1000.
339  ENDWHERE
340  !
341  WHERE (gherb(:).AND.gf2_inf_f2i(:).AND.ostressdef(:))
342  zgmest(:) = zgmest(:) * pf2(:)/pf2i(:)
343  ENDWHERE
344  WHERE(gherb(:).AND.gf2_inf_f2i(:).AND.(.NOT.ostressdef(:)))
345  zdmax(:) = zdmax(:) * pf2(:)/pf2i(:)
346  ENDWHERE
347  !
348  ! to limit photosynthesis under wilting point
349  WHERE (gherb(:).AND.(.NOT.ostressdef(:)).AND.zdmax(:)<=xdmaxn)
350  zdmax(:) = xdmaxn
351  zgmest(:) = (exp(pah(:)+pbh(:)*log(xdmaxn*1000.))/1000.)*pf2(:)/pf2i(:)
352  ENDWHERE
353  !
354  ! -WOODY but not tropical forest-
355  !
356  WHERE(gwood(:))
357  zfzerostar(:) = ( xaw - log(zgmest(:)*1000.) )/xbw
358  ENDWHERE
359  !
360  WHERE (gwood(:).AND.ostressdef(:))
361  zgmestn(:) = zgmest(:)
362  ENDWHERE
363  WHERE(gwood(:).AND.(.NOT.ostressdef(:)))
364  zgmestn(:) = exp(xasw - xbw*zfzerostar(:))/1000.
365  ENDWHERE
366  !
367  WHERE (gwood(:).AND.gf2_inf_f2i(:))
368  zgmestn(:) = zgmestn(:)*pf2(:)/pf2i(:)
369  ENDWHERE
370  !
371  WHERE(gwood(:))
372  zwork(:) = max( xdenom_min, zgmestn(:) )
373  zfzeron(:) = (xasw - log(zwork(:)*1000.))/xbw
374  ENDWHERE
375  !
376  WHERE(gwood(:).AND.(.NOT.gf2_inf_f2i(:)).AND.ostressdef(:))
377  zfzero(:) = zfzerostar(:)
378  zfzero(:) = zfzero(:) - (zfzero(:)-zfzeron(:))*(1.-pf2(:))/(1.-pf2i(:))
379  ENDWHERE
380  WHERE(gwood(:).AND.(.NOT.gf2_inf_f2i(:)).AND.(.NOT.ostressdef(:)))
381  zfzero(:) = zfzerostar(:)
382  zgmest(:) = zgmest(:) - (zgmest(:)-zgmestn(:))*(1.-pf2(:))/(1.-pf2i(:))
383  ENDWHERE
384  !
385  WHERE(gwood(:).AND.gf2_inf_f2i(:))
386  zfzero(:) = min(.95, zfzeron(:))
387  zgmest(:) = zgmestn(:)
388  ENDWHERE
389  !
390  ! -Tropical Forest-
391  !
392  WHERE(gtrop(:))
393  zfzero(:) = pfzero(:)
394  zgmest(:) = pgmes(:)*pf2(:)
395  ENDWHERE
396  !
397 ENDIF
398 !
399 !-------------------------
400 !
401 ! compensation point (ppm): temperature response
402 !
403 !before optimization (with non log PQDGAMM) :
404 !ZGAMMT(:) = PGAMM(:)*PQDGAMM(:)**(0.1*(ZTSPC(:)-25.0))
405 zwork(:) = (0.1*(ztspc(:)-25.0)) * pqdgamm(:)
406 zgammt(:) = pgamm(:) * exp(zwork(:))
407 !
408 ! specific humidity deficit (kg kg-1)
409 !
410 zdsp(:) = max( 0.0, pqsat(:) - pqa(:) - ple(:)*pra(:)/(prhoa*xlvtt) )
411 !
412 ! cosine of solar zenith angle
413 !
414 zxmus(:) = max(cos(pzenith(:)),0.01)
415 !
416 !
417 ! Compute temperature response functions:
418 !
419 ! kg/m2/s
420 !before optimization (with non log PQDAMAX) :
421 !ZANMAX(:) = ( PAMAX(:)*PQDAMAX(:)**(0.1*(ZTSPC(:)-25.0)) ) / ...
422 zwork(:) = (0.1*(ztspc(:)-25.0)) * pqdamax(:)
423 zanmax(:) = ( pamax(:) * exp(zwork(:)) ) &
424  / ( (1.0+exp(0.3*(pt1amax(:)-ztspc(:))))* (1.0+exp(0.3*(ztspc(:)-pt2amax(:)))) )
425 !
426 ! m/s
427 !before optimization (with non log PQDGMES) :
428 !ZGMEST(:) = ( ZGMEST(:)*PQDGMES(:)**(0.1*(ZTSPC(:)-25.0)) ) / ...
429 zwork(:) = (0.1*(ztspc(:)-25.0)) * pqdgmes(:)
430 zgmest(:) = ( zgmest(:) * exp(zwork(:)) ) &
431  / ( (1.0+exp(0.3*(pt1gmes(:)-ztspc(:))))* (1.0+exp(0.3*(ztspc(:)-pt2gmes(:)))) )
432 !
433 !
434 ! Integration over the canopy: SIZE(PABC) increments
435 ! are used to approximate the integral.
436 !
437 ztan(:) = 0.0
438 ztgs(:) = 0.0
439 ztrdk(:)= 0.0
440 !
441 ! Unit conversion
442 ! ZANMAX and ZEPSO from kgCO2/m2/s to kgCO2/kgair m/s by dividing by RHOA (kgair/m3)
443 ! ZGAMMT from ppm to kgCO2/kgair
444 zgammt(:) = zgammt(:) * xmco2 / xmd * 1e-6
445 zanmax(:) = zanmax(:) / prhoa(:)
446 zepso(:) = pepso(:) / prhoa(:)
447 !
448 zia(:) = psw_rad(:)*xparcf
449 !
450 DO jint = 1, SIZE(pabc)
451  !
452  ! Diffusion of incident radiation:
453  !
454  IF (otr_ml) THEN
455  !
456  zabc = 1.
457  IF (jint.LT.SIZE(pabc)) zabc = pabc(jint+1)
458  zweight = zabc - pabc(jint)
459  zxia(:) = piacan_sunlit(:,jint)
460  !
461  ELSE
462  !
463  zabc = pabc(jint)
464  zweight = ppoi(jint)
465  !
466  CALL ccetr(zxia,zia,zxmus,zabc,zlai)
467  !
468  ! PAR at different Gauss level in micmolphot/m2/s
469  !
470  piacan(:,jint)= zxia(:)
471  !
472  ENDIF
473  !
474  ! Compute conductance and assimilation of CO2:
475  !
476  !Extinction of respiration depends on LAI above only for tropical evergreen forest
477  zlaitop(:) = 0.
478  zzlai(:) = 1.
479  IF (otr_ml) THEN
480  WHERE(gwood(:))
481  zlaitop(:) = (1.-(pabc(jint)+zabc)/2.)*zlai(:)
482  zzlai(:) = zlai(:)
483  ENDWHERE
484  ENDIF
485  CALL cotwo(pcsp, pf2, zxia, zdsp, zgammt, &
486  zfzero, zepso, zanmax, zgmest, pgc, zdmax, &
487  zan0, zgs0, zrdk, zlaitop, zzlai )
488  !
489  IF (otr_ml) THEN
490  !
491  zxia(:) = piacan_shade(:,jint)
492  CALL cotwo(pcsp, pf2, zxia, zdsp, zgammt, &
493  zfzero, zepso, zanmax, zgmest, pgc, zdmax, &
494  zan0_, zgs0_, zrdk_, zlaitop, zzlai )
495  !
496  WHERE (oshade(:))
497  !ponderate sum.
498  zan0(:)=pfrac_sun(:,jint)*zan0(:)+(1.-pfrac_sun(:,jint))*zan0_(:)
499  zrdk(:)=pfrac_sun(:,jint)*zrdk(:)+(1.-pfrac_sun(:,jint))*zrdk_(:)
500  zgs0(:)=pfrac_sun(:,jint)*zgs0(:)+(1.-pfrac_sun(:,jint))*zgs0_(:)
501  ENDWHERE
502  !
503  ENDIF
504  !
505  ! kgCO2/kgair m/s
506  ztan(:) = ztan(:) + zan0(:)*zweight
507  ztgs(:) = ztgs(:) + zgs0(:)*zweight
508  ztrdk(:) = ztrdk(:) + zrdk(:)*zweight
509  !
510 END DO
511 !
512 !
513 ! Total assimilation
514 !
515 panf(:)= ztan(:)
516 !
517 ! Net assimilation over canopy
518 !
519 pan(:) = (1.0-pdelta(:))*(1.0-ppsnv(:)-pffv(:))*panf(:)*zlai(:)
520 !
521 ! Dark respiration over canopy (does not depend on radiation,
522 ! no need to integrate over vertical dimension)
523 !
524 presp_leaf(:) = (1.0-pdelta(:))*(1.0-ppsnv(:)-pffv(:))*ztrdk(:)*zlai(:)
525 !
526 ! Gross primary production over canopy
527 !
528 pgpp(:) = pan(:) + presp_leaf(:)
529 !
530 ! Cumulated daily net assimilation over canopy (kgCO2/m2/day)
531 !
532 panday(:) = panday(:) + pan(:) * ptstep * prhoa(:)
533 !
534 ! Adjust maximum leaf assimilation:
535 !
536 panfm(:) = max( panf(:), panfm(:) )
537 !
538 ! Total conductance over canopy
539 !
540 zxtgs(:) = ztgs(:)*zlai(:)
541 !
542 ! Canopy resistance from Ags:
543 !
544 prs(:) = min( 1.0/(zxtgs(:)+xdenom_min), xrs_max)
545 !
546 prs(:) = max( prs(:), zrs_min)
547 !
548 IF (lhook) CALL dr_hook('COTWORES',1,zhook_handle)
549 !
550 END SUBROUTINE cotwores
subroutine cotwores(PTSTEP, HPHOTO, OTR_ML, OSHADE, PVEGTYPE, OSTRESSDEF, PAH, PBH, PF2I, PDMAX, PPOI, PCSP, PTG, PF2, PSW_RAD, PRA, PQA, PQSAT, PLE, PPSNV, PDELTA, PLAI, PRHOA, PZENITH, PFZERO, PEPSO, PGAMM, PQDGAMM, PGMES, PGC, PQDGMES, PT1GMES, PT2GMES, PAMAX, PQDAMAX, PT1AMAX, PT2AMAX, PFFV, PIACAN_SUNLIT, PIACAN_SHADE, PFRAC_SUN, PIACAN, PABC, PAN, PANDAY, PRS, PANFM, PGPP, PANF, PRESP_LEAF)
Definition: cotwores.F90:6
subroutine ccetr(PXIA, PIA, PXMUS, PABC, PLAI)
Definition: ccetr.F90:6
subroutine cotwo(PCSP, PF2, PIA, PDS, PGAMMT, PFZERO, PEPSO, PANMAX, PGMEST, PGC, PDMAX, PAN, PGS, PRD, PLAITOP, PLAI)
Definition: cotwo.F90:6