SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
cotwoinitn.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 cotwoinit_n (I, &
7  hphoto,pvegtype,pgmes,pco2,pgc,pdmax, &
8  pabc,ppoi,panmax, &
9  pfzero,pepso,pgamm,pqdgamm,pqdgmes,pt1gmes, &
10  pt2gmes,pamax,pqdamax,pt1amax,pt2amax,pah,pbh, &
11  ptau_wood )
12 ! #######################################################################
13 !
14 !!**** *COTWOINIT*
15 !!
16 !! PURPOSE
17 !! -------
18 !
19 ! Initialize model to calculate net assimilation of
20 ! CO2 and leaf conductance.
21 !
22 !!** METHOD
23 !! ------
24 ! Calvet at al (1998) [from model of Jacobs(1994)]
25 !!
26 !! EXTERNAL
27 !! --------
28 !! none
29 !!
30 !! IMPLICIT ARGUMENTS
31 !! ------------------
32 !!
33 !! USE MODD_CO2V_PAR
34 !! USE MODI_COTWO
35 !!
36 !! REFERENCE
37 !! ---------
38 !!
39 !! Calvet et al. (1998)
40 !!
41 !! AUTHOR
42 !! ------
43 !!
44 !! A. Boone * Meteo-France *
45 !! (following Belair)
46 !!
47 !! MODIFICATIONS
48 !! -------------
49 !! Original 27/10/97
50 !! (V. Rivalland) 10/04/02 Add: PAH and PBH coefficients for
51 !! herbaceous water stress response
52 !! (P. LeMoigne) 03/2004: computation of zgmest in SI units
53 !! (P. LeMoigne) 10/2004: possibility of 2 different FZERO
54 !! (L. Jarlan) 10/2004: initialization of DMAX
55 !! P Le Moigne 09/2005 AGS modifs of L. Jarlan
56 !! S. Lafont 03/2009 change unit of AMAX
57 !! A.L. Gibelin 04/2009 TAU_WOOD for NCB option
58 !! A.L. Gibelin 04/2009 Suppress useless GPP and RDK arguments
59 !! A.L. Gibelin 07/2009 Suppress PPST and PPSTF as outputs
60 !! B. Decharme 05/2012 Optimization
61 !! R. Alkama 05/2012 add 7 new vegtype (19 instead 12)
62 !! C. Delire 01/2014 Define a dummy LAI from top and total lai for Dark respiration
63 !!
64 !-------------------------------------------------------------------------------
65 !
66 !
67 USE modd_isba_n, ONLY : isba_t
68 !
69 USE modd_data_cover_par, ONLY : nvegtype, nvt_c3, nvt_c4, nvt_irr, nvt_trog, &
70  nvt_tebd, nvt_bone, nvt_trbe, nvt_trbd, nvt_tebe,&
71  nvt_tene, nvt_bobd, nvt_bond, nvt_shrb, nvt_gras
72 USE modd_csts, ONLY : xmd
73 USE modd_co2v_par, ONLY : xtopt, xfzero1, xfzero2, xfzerotrop, xepso, xgamm, xqdgamm, &
74  xqdgmes, xt1gmes, xt2gmes, xamax, &
75  xqdamax, xt1amax, xt2amax, xah, xbh, &
76  xdspopt, xiaopt, xaw, xbw, xmco2, xmc, xtau_wood
77 !
78 USE mode_cotwo, ONLY : gauleg
79 USE modi_cotwo
80 !
81 !* 0. DECLARATIONS
82 ! ------------
83 !
84 !
85 USE yomhook ,ONLY : lhook, dr_hook
86 USE parkind1 ,ONLY : jprb
87 !
88 IMPLICIT NONE
89 !
90 !* 0.1 declarations of arguments
91 !
92 !
93 !
94 TYPE(isba_t), INTENT(INOUT) :: i
95 !
96  CHARACTER(LEN=3), INTENT(IN) :: hphoto ! type of photosynthesis
97 REAL,DIMENSION(:,:),INTENT(IN) :: pvegtype
98 ! PVEGTYPE = fraction of each
99 ! vegetation classification index;
100 ! C3 =>1, C4 => 2
101 !
102 REAL,DIMENSION(:),INTENT(IN) :: pgmes, pco2
103 ! PGMES = mesophyll conductance (m s-1)
104 ! PCO2 = atmospheric CO2 concentration
105 !
106 REAL,DIMENSION(:),INTENT(IN) :: pdmax, pgc
107 ! PDMAX = maximum air saturation deficit tolerate
108 ! by vegetation
109 ! PGC = cuticular conductance (m s-1)
110 !
111 REAL, DIMENSION(:), INTENT(OUT) :: pabc, ppoi
112 ! ZABC = abscissa needed for integration
113 ! of net assimilation and stomatal conductance
114 ! over canopy depth
115 ! ZPOI = Gaussian weights (as above)
116 !
117 REAL,DIMENSION(:),INTENT(OUT) :: panmax
118 ! PANMAX = maximum net assimilation
119 !
120 REAL,DIMENSION(:),INTENT(OUT) :: pfzero, pepso, pgamm, pqdgamm, pqdgmes, &
121  pt1gmes, pt2gmes, pamax, pqdamax, &
122  pt1amax, pt2amax, ptau_wood
123 ! PFZERO = ideal value of F, no photorespiration or
124 ! saturation deficit
125 ! PEPSO = maximum initial quantum use efficiency
126 ! (kgCO2 kgAir-1 J-1 PAR)
127 ! PGAMM = CO2 conpensation concentration (kgCO2 kgAir-1)
128 ! PQDGAMM = Log of Q10 function for CO2 conpensation
129 ! concentration
130 ! PQDGMES = Log of Q10 function for mesophyll conductance
131 ! PT1GMES = reference temperature for computing
132 ! compensation concentration function for
133 ! mesophyll conductance: minimum temperature
134 ! PT2GMES = reference temperature for computing
135 ! compensation concentration function for
136 ! mesophyll conductance: maximum temperature
137 ! PAMAX = leaf photosynthetic capacity (Units of kgCO2 kgAir-1 m s-1)
138 ! PQDAMAX = Log of Q10 function for leaf photosynthetic capacity
139 ! PT1AMAX = reference temperature for computing
140 ! compensation concentration function for leaf
141 ! photosynthetic capacity: minimum temperature
142 ! PT2AMAX = reference temperature for computing
143 ! compensation concentration function for leaf
144 ! photosynthetic capacity: maximum temperature
145 ! PTAU_WOOD = residence time in woody biomass (s)
146 !
147 REAL,DIMENSION(:),INTENT(OUT) :: pah, pbh
148 ! PAH = coeficient of universal relationship for herbaceous
149 ! PBH = coeficient of universal relationship for herbaceous
150 !
151 !* 0.2 declaration of local variables
152 !
153 INTEGER :: jclass ! indexes for loops
154 INTEGER :: iclass ! indexes for loops
155 INTEGER :: ico2type ! type of CO2 vegetation
156 INTEGER :: irad ! with or without new radiative transfer
157 !
158 REAL, DIMENSION(SIZE(PANMAX)) :: zgs, zgammt, ztopt, zanmax, zgmest, zgpp, zrdk, zepso
159 ! ZTOPT = optimum temperature for compensation
160 ! point
161 ! ZANMAX = maximum photosynthesis rate
162 ! ZGS = leaf conductance
163 ! ZGAMMT = temperature compensation point
164 ! ZGPP = gross primary production
165 ! ZRDK = dark respiration
166 !
167 !
168 REAL, DIMENSION(SIZE(PANMAX)) :: zco2init3, zco2init4, zco2init5, zco2init2,zco2init1
169 ! working arrays for initializing surface
170 ! temperature, saturation deficit, global radiation,
171 ! optimum temperature for determining maximum
172 ! photosynthesis rate, and soil water stress (none)
173 REAL, DIMENSION(SIZE(PDMAX)) :: zdmax
174 REAL, DIMENSION(SIZE(PDMAX)) :: zwork
175 ! Local variable in order to initialise DMAX
176 ! following Calvet, 2000 (AST or LST cases)
177 REAL(KIND=JPRB) :: zhook_handle
178 !
179 !-------------------------------------------------------------------------------
180 !
181 IF (lhook) CALL dr_hook('COTWOINIT_N',0,zhook_handle)
182 !
183 ztopt(:) = 0.
184 pfzero(:) = 0.
185 pepso(:) = 0.
186 pgamm(:) = 0.
187 pqdgamm(:) = 0.
188 pqdgmes(:) = 0.
189 pt1gmes(:) = 0.
190 pt2gmes(:) = 0.
191 pamax(:) = 0.
192 pqdamax(:) = 0.
193 pt1amax(:) = 0.
194 pt2amax(:) = 0.
195 ptau_wood(:) = 0.
196 !
197 pah(:) = 0.
198 pbh(:) = 0.
199 !
200 zepso(:) = 0.
201 zgpp(:) = 0.
202 zrdk(:) = 0.
203 zgammt(:) = 0.
204 zanmax(:) = 0.
205 zgmest(:) = 0.
206 zco2init3(:) = 0.
207 zco2init4(:) = 0.
208 zco2init5(:) = 0.
209 !
210 !-------------------------------------------------------------------------------
211 !
212 !-------------------------------------------------------------------------------
213 !
214 ! DETERMINE GAUSSIAN WEIGHTS NEEDED FOR CO2 MODEL
215 ! -----------------------------------------------
216 !
217  CALL gauleg(0.0,1.0,pabc,ppoi,SIZE(pabc))
218 !
219 !
220 ! INITIALIZE VARIOUS PARAMETERS FOR CO2 MODEL:
221 ! --------------------------------------------
222 ! as a function of CO2 vegetation class, C3=>1, C4=>2
223 !
224 DO jclass=1,nvegtype
225  !
226  IF (jclass==nvt_c4 .OR. jclass==nvt_irr .OR. jclass==nvt_trog) THEN
227  ico2type = 2 ! C4 type
228  ELSE
229  ico2type = 1 ! C3 type
230  END IF
231  IF(i%LAGRI_TO_GRASS.AND.(jclass==nvt_c4 .OR. jclass==nvt_irr)) ico2type = 1
232  IF (i%LTR_ML) THEN
233  irad = 1 ! running with new radiative transfer
234  ELSE
235  irad = 2
236  ENDIF
237  !
238  ztopt(:) = ztopt(:) + xtopt(ico2type) * pvegtype(:,jclass)
239  IF (hphoto == 'AGS' .OR. hphoto == 'LAI') THEN
240  pfzero(:) = pfzero(:) + xfzero1(ico2type) * pvegtype(:,jclass)
241  ELSE
242  IF((jclass==nvt_tebd) .OR. (jclass==nvt_bone) .OR. &
243  (jclass==nvt_trbd) .OR. (jclass==nvt_tebe) .OR. (jclass==nvt_tene) .OR. &
244  (jclass==nvt_bobd) .OR. (jclass==nvt_bond) .OR. (jclass==nvt_shrb)) THEN
245  pfzero(:) = pfzero(:) + ((xaw - log(pgmes(:)*1000.0))/xbw)*pvegtype(:,jclass)
246  ELSE IF (jclass==nvt_trbe) THEN
247  pfzero(:) = pfzero(:) + xfzerotrop(irad) * pvegtype(:,jclass)
248  ELSE
249  pfzero(:) = pfzero(:) + xfzero2(ico2type) * pvegtype(:,jclass)
250  ENDIF
251  ENDIF
252  !
253  pepso(:) = pepso(:) + xepso(ico2type) * pvegtype(:,jclass)
254  pgamm(:) = pgamm(:) + xgamm(ico2type) * pvegtype(:,jclass)
255  pqdgamm(:) = pqdgamm(:) + xqdgamm(ico2type) * pvegtype(:,jclass)
256  pqdgmes(:) = pqdgmes(:) + xqdgmes(ico2type) * pvegtype(:,jclass)
257  pt1gmes(:) = pt1gmes(:) + xt1gmes(ico2type) * pvegtype(:,jclass)
258  pt2gmes(:) = pt2gmes(:) + xt2gmes(ico2type) * pvegtype(:,jclass)
259  pqdamax(:) = pqdamax(:) + xqdamax(ico2type) * pvegtype(:,jclass)
260  pt1amax(:) = pt1amax(:) + xt1amax(ico2type) * pvegtype(:,jclass)
261  pt2amax(:) = pt2amax(:) + xt2amax(ico2type) * pvegtype(:,jclass)
262  pah(:) = pah(:) + xah(ico2type) * pvegtype(:,jclass)
263  pbh(:) = pbh(:) + xbh(ico2type) * pvegtype(:,jclass)
264  !
265  IF(i%LAGRI_TO_GRASS.AND.(jclass==nvt_c3 .OR. jclass==nvt_c4 .OR. jclass==nvt_irr))THEN
266  iclass=nvt_gras
267  ELSE
268  iclass=jclass
269  ENDIF
270  !
271  ptau_wood(:) = ptau_wood(:) + xtau_wood(iclass) * pvegtype(:,jclass)
272  pamax(:) = pamax(:) + xamax(iclass) * pvegtype(:,jclass)
273  !
274 END DO
275 !
276 pqdgamm(:)=log(pqdgamm(:))
277 pqdgmes(:)=log(pqdgmes(:))
278 pqdamax(:)=log(pqdamax(:))
279 !
280 !
281 ! INITIALIZE VARIOUS VARIABLES FOR CO2 MODEL:
282 ! -------------------------------------------
283 !
284 !
285 ! compute temperature responses:
286 !
287 !before optimization (with non log PQDGAMM) :
288 !ZGAMMT(:) = PGAMM(:)*(PQDGAMM(:)**(0.1*(ZTOPT(:)-25.0)))
289 zwork(:) = (0.1*(ztopt(:)-25.0)) * pqdgamm(:)
290 zgammt(:) = pgamm(:)*exp(zwork(:))
291 !
292 !before optimization (with non log PQDAMAX) :
293 !ZANMAX(:) = ( PAMAX(:)*PQDAMAX(:)**(0.1*(ZTOPT(:)-25.0)) ) / ...
294 zwork(:) = (0.1*(ztopt(:)-25.0)) * pqdamax(:)
295 zanmax(:) = ( pamax(:)*exp(zwork(:)) ) &
296  /( (1.0+exp(0.3*(pt1amax(:)-ztopt(:))))* &
297  (1.0+exp(0.3*(ztopt(:)-pt2amax(:)))) )
298 !
299 !before optimization (with non log PQDGMES) :
300 !ZGMEST(:) = ( PGMES(:)*PQDGMES(:)**(0.1*(ZTOPT(:)-25.0)) ) &
301 zwork(:) = (0.1*(ztopt(:)-25.0)) * pqdgmes(:)
302 zgmest(:) = ( pgmes(:)*exp(zwork(:)) ) &
303  /( (1.0+exp(0.3*(pt1gmes(:)-ztopt(:))))* &
304  (1.0+exp(0.3*(ztopt(:)-pt2gmes(:)))) )
305 !
306 !
307 ! initialize other variables: (using optimum values for some variables)
308 !
309 zco2init3(:) = xdspopt
310 zco2init4(:) = xiaopt
311 zco2init5(:) = 1.0
312 !
313 ! Define a dummy LAI from top (zco2init2=0.1) and total lai (zco2init=1) for Dark respiration extinction parameterization
314 !
315 zco2init2(:) = 0.1
316 zco2init1(:) = 1.0
317 !
318 ! Add soil moisture stress effect to leaf conductance:
319 !
320 zgmest(:) = zgmest(:)*zco2init5(:)
321 !
322 ! Initialise DMAX following Calvet (2000) in the case of 'AST' or 'LST' photosynthesis option
323 !
324 IF((hphoto=='AST').OR.(hphoto=='LST').OR.(hphoto=='NIT').OR.(hphoto=='NCB')) THEN
325  zdmax(:) = exp((log(zgmest(:)*1000.)-pah(:))/pbh(:))/1000.
326 ELSE
327  zdmax(:) = pdmax(:)
328 ENDIF
329 !
330 ! Compute maximum/initial/optimum net assimilation of CO2:
331 !
332 ! Unit conversion with a constant value of 1.2 for PRHOA as it is not known here
333 ! ZANMAX and ZEPSO from kgCO2/m2/s to kgCO2/kgair m/s by dividing by RHOA (kgair/m3)
334 ! ZGAMMT from ppm to kgCO2/kgair
335 zanmax(:)=zanmax(:)/1.2
336 zepso(:)=pepso(:)/1.2
337 zgammt(:)=zgammt(:)*xmco2/xmd*1e-6
338 !
339  CALL cotwo(pco2, zco2init5, zco2init4, zco2init3, zgammt, &
340  pfzero, zepso, zanmax, zgmest, pgc, zdmax, &
341  panmax, zgs, zrdk, zco2init2, zco2init1 )
342 ! change by sebastien PEPSO change into ZEPSO for units consistency
343 !
344 !
345 !
346 IF (lhook) CALL dr_hook('COTWOINIT_N',1,zhook_handle)
347 !
348 END SUBROUTINE cotwoinit_n
subroutine cotwoinit_n(I, HPHOTO, PVEGTYPE, PGMES, PCO2, PGC, PDMAX, PABC, PPOI, PANMAX, PFZERO, PEPSO, PGAMM, PQDGAMM, PQDGMES, PT1GMES, PT2GMES, PAMAX, PQDAMAX, PT1AMAX, PT2AMAX, PAH, PBH, PTAU_WOOD)
Definition: cotwoinitn.F90:6
subroutine cotwo(PCSP, PF2, PIA, PDS, PGAMMT, PFZERO, PEPSO, PANMAX, PGMEST, PGC, PDMAX, PAN, PGS, PRD, PLAITOP, PLAI)
Definition: cotwo.F90:6