SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
veg_from_lai.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 !#######################
7 !#######################
8 !
9 INTERFACE veg_from_lai
10 !
11  FUNCTION veg_from_lai_0d(PLAI,PVEGTYPE,OAGRI_TO_GRASS) RESULT(PVEG)
12 !
13 REAL, INTENT(IN) :: plai ! Leaf area Index
14 REAL, DIMENSION(:), INTENT(IN) :: pvegtype ! type of vegetation
15 LOGICAL, INTENT(IN) :: oagri_to_grass
16 !
17 REAL :: pveg ! vegetation fraction
18 !
19 END FUNCTION veg_from_lai_0d
20 !
21 !
22  FUNCTION veg_from_lai_1d(PLAI,PVEGTYPE,OAGRI_TO_GRASS) RESULT(PVEG)
23 !
24 REAL, DIMENSION(:), INTENT(IN) :: plai ! Leaf area Index
25 REAL, DIMENSION(:,:), INTENT(IN) :: pvegtype ! type of vegetation
26 LOGICAL, INTENT(IN) :: oagri_to_grass
27 !
28 REAL, DIMENSION(SIZE(PLAI)) :: pveg ! vegetation fraction
29 !
30 END FUNCTION veg_from_lai_1d
31 !
32 !
33  FUNCTION veg_from_lai_2d(PLAI,PVEGTYPE,OAGRI_TO_GRASS) RESULT(PVEG)
34 !
35 REAL, DIMENSION(:,:), INTENT(IN) :: plai ! Leaf area Index
36 REAL, DIMENSION(:,:,:), INTENT(IN) :: pvegtype ! type of vegetation
37 LOGICAL, INTENT(IN) :: oagri_to_grass
38 !
39 REAL, DIMENSION(SIZE(PLAI,1),SIZE(PLAI,2)) :: pveg ! vegetation fraction
40 !
41 END FUNCTION veg_from_lai_2d
42 !
43 
44  FUNCTION veg_from_lai_patch_1d(PLAI,PVEGTYPE,OAGRI_TO_GRASS) RESULT(PVEG)
45 !
46 REAL, DIMENSION(:), INTENT(IN) :: plai ! Leaf area Index for each vegtype
47 REAL, DIMENSION(:), INTENT(IN) :: pvegtype !
48 LOGICAL, INTENT(IN) :: oagri_to_grass
49 !
50 REAL, DIMENSION(SIZE(PLAI)) :: pveg ! vegetation fraction
51 !
52 END FUNCTION veg_from_lai_patch_1d
53 !
54 END INTERFACE
55 !
56 END MODULE modi_veg_from_lai
57 !
58 ! ####################################################
59  FUNCTION veg_from_lai_0d(PLAI,PVEGTYPE,OAGRI_TO_GRASS) RESULT(PVEG)
60 ! ####################################################
61 !!
62 !! PURPOSE
63 !! -------
64 !
65 ! Calculates coverage of soil by vegetation from leaf
66 ! area index and type of vegetation
67 ! (most of types; forest and vineyards; grassland)
68 !
69 !!** METHOD
70 !! ------
71 !!
72 !! EXTERNAL
73 !! --------
74 !! none
75 !!
76 !! IMPLICIT ARGUMENTS
77 !! ------------------
78 !!
79 !! none
80 !!
81 !! REFERENCE
82 !! ---------
83 !!
84 !!
85 !! AUTHOR
86 !! ------
87 !!
88 !! V. Masson and A. Boone * Meteo-France *
89 !!
90 !! MODIFICATIONS
91 !! -------------
92 !! Original 25/03/99
93 !!
94 !! R. Alkama 05/2012 : extantion from 12 to 19 vegtypes
95 !! B. Decharme 05/2013 new param for equatorial forest
96 !-------------------------------------------------------------------------------
97 !
98 !* 0. DECLARATIONS
99 ! ------------
100 !
101 USE modd_data_cover_par, ONLY :nvt_no, nvt_rock, nvt_snow, nvt_tebd, &
102  nvt_bone, nvt_trbe, nvt_c3, nvt_c4, &
103  nvt_irr, nvt_gras, nvt_trog, nvt_park, &
104  nvt_trbd, nvt_tebe, nvt_tene, nvt_bobd, &
105  nvt_bond, nvt_bogr, nvt_shrb
106 !
107 USE modd_reprod_oper, ONLY : xeverg_veg
108 !
109 USE yomhook ,ONLY : lhook, dr_hook
110 USE parkind1 ,ONLY : jprb
111 !
112 IMPLICIT NONE
113 !
114 !* 0.1 declarations of arguments
115 !
116 REAL, INTENT(IN) :: plai ! Leaf area Index
117 REAL, DIMENSION(:), INTENT(IN) :: pvegtype ! type of vegetation
118 LOGICAL, INTENT(IN) :: oagri_to_grass
119 !
120 REAL :: pveg ! vegetation fraction
121 !
122 !* 0.2 declarations of local variables
123 !
124 REAL :: zlai, zagri
125 !
126 REAL(KIND=JPRB) :: zhook_handle
127 !-----------------------------------------------------------------
128 IF (lhook) CALL dr_hook('MODI_VEG_FROM_LAI:VEG_FROM_LAI_0D',0,zhook_handle)
129 zlai = plai
130 IF ( pvegtype(nvt_no ) + pvegtype(nvt_rock) + pvegtype(nvt_snow)< 1.) THEN
131  zlai = plai / (1.-pvegtype(nvt_no)-pvegtype(nvt_rock)-pvegtype(nvt_snow))
132 END IF
133 !
134 IF(oagri_to_grass)THEN
135  zagri = 0.95
136 ELSE
137  zagri = (1. - exp( -0.6 * zlai ))
138 ENDIF
139 !
140 pveg = zagri *(pvegtype(nvt_c4 ) + &! C4 crops
141  pvegtype(nvt_irr ) + &! irrigated crops
142  pvegtype(nvt_c3 ) ) &! C3 crops
143  + 0.95 *(pvegtype(nvt_tebd) + &! TREE
144  pvegtype(nvt_trbd) + &! TREE
145  pvegtype(nvt_tebe) + &! TREE
146  pvegtype(nvt_bobd) + &! TREE
147  pvegtype(nvt_shrb) + &! TREE
148  pvegtype(nvt_bone) + &! CONI
149  pvegtype(nvt_tene) + &! CONI
150  pvegtype(nvt_bond) ) &! CONI
151  + xeverg_veg * pvegtype(nvt_trbe) &! EVER
152  + 0.95 *(pvegtype(nvt_gras) + &! grassland C3
153  pvegtype(nvt_bogr) + &! boral grass C3
154  pvegtype(nvt_trog) + &! tropical grass C4
155  pvegtype(nvt_park) ) &! irr. parks
156  + 0. * pvegtype(nvt_no ) &! no vegetation (smooth)
157  + 0. * pvegtype(nvt_snow) &! no vegetation (snow)
158  + 0. * pvegtype(nvt_rock) ! no vegetation (rocks)
159 IF (lhook) CALL dr_hook('MODI_VEG_FROM_LAI:VEG_FROM_LAI_0D',1,zhook_handle)
160 !-----------------------------------------------------------------
161 !
162 END FUNCTION veg_from_lai_0d
163 !
164 ! ####################################################
165  FUNCTION veg_from_lai_1d(PLAI,PVEGTYPE,OAGRI_TO_GRASS) RESULT(PVEG)
166 ! ####################################################
167 !!
168 !! PURPOSE
169 !! -------
170 !
171 ! Calculates coverage of soil by vegetation from leaf
172 ! area index and type of vegetation
173 ! (most of types; forest and vineyards; grassland)
174 !
175 !!** METHOD
176 !! ------
177 !!
178 !! EXTERNAL
179 !! --------
180 !! none
181 !!
182 !! IMPLICIT ARGUMENTS
183 !! ------------------
184 !!
185 !! none
186 !!
187 !! REFERENCE
188 !! ---------
189 !!
190 !!
191 !! AUTHOR
192 !! ------
193 !!
194 !! V. Masson and A. Boone * Meteo-France *
195 !!
196 !! MODIFICATIONS
197 !! -------------
198 !! Original 25/03/99
199 !!
200 !-------------------------------------------------------------------------------
201 !
202 !* 0. DECLARATIONS
203 ! ------------
204 !
205 USE modd_data_cover_par, ONLY : nvt_no, nvt_rock, nvt_snow, nvt_tebd, &
206  nvt_bone, nvt_trbe, nvt_c3, nvt_c4, &
207  nvt_irr, nvt_gras, nvt_trog, nvt_park, &
208  nvt_trbd, nvt_tebe, nvt_tene, nvt_bobd, &
209  nvt_bond, nvt_bogr, nvt_shrb
210 !
211 USE modd_reprod_oper, ONLY : xeverg_veg
212 !
213 USE yomhook ,ONLY : lhook, dr_hook
214 USE parkind1 ,ONLY : jprb
215 !
216 IMPLICIT NONE
217 !
218 !* 0.1 declarations of arguments
219 !
220 REAL, DIMENSION(:), INTENT(IN) :: plai ! Leaf area Index
221 REAL, DIMENSION(:,:), INTENT(IN) :: pvegtype ! type of vegetation
222 LOGICAL, INTENT(IN) :: oagri_to_grass
223 !
224 REAL, DIMENSION(SIZE(PLAI)) :: pveg ! vegetation fraction
225 !
226 !* 0.2 declarations of local variables
227 !
228 REAL, DIMENSION(SIZE(PLAI)) :: zlai, zagri
229 !
230 REAL(KIND=JPRB) :: zhook_handle
231 !-----------------------------------------------------------------
232 IF (lhook) CALL dr_hook('MODI_VEG_FROM_LAI:VEG_FROM_LAI_1D',0,zhook_handle)
233 zlai(:) = plai(:)
234 WHERE ( pvegtype(:,nvt_no ) + pvegtype(:,nvt_rock) + pvegtype(:,nvt_snow) < 1.)
235  zlai(:) = plai(:) / (1.-pvegtype(:,nvt_no)-pvegtype(:,nvt_rock)-pvegtype(:,nvt_snow))
236 END WHERE
237 !
238 IF(oagri_to_grass)THEN
239  zagri(:) = 0.95
240 ELSE
241  zagri(:) = (1. - exp( -0.6 * zlai(:) ))
242 ENDIF
243 !
244 pveg(:) = zagri(:) *(pvegtype(:,nvt_c4 ) + &! C4 crops
245  pvegtype(:,nvt_irr ) + &! irrigated crops
246  pvegtype(:,nvt_c3 ) ) &! C3 crops
247  + 0.95 *(pvegtype(:,nvt_tebd) + &! TREE
248  pvegtype(:,nvt_trbd) + &! TREE
249  pvegtype(:,nvt_tebe) + &! TREE
250  pvegtype(:,nvt_bobd) + &! TREE
251  pvegtype(:,nvt_shrb) + &! TREE
252  pvegtype(:,nvt_bone) + &! CONI
253  pvegtype(:,nvt_tene) + &! CONI
254  pvegtype(:,nvt_bond) ) &! CONI
255  + xeverg_veg * pvegtype(:,nvt_trbe) &! EVER
256  + 0.95 *(pvegtype(:,nvt_gras) + &! grassland C3
257  pvegtype(:,nvt_bogr) + &! boral grass C3
258  pvegtype(:,nvt_trog) + &! tropical grass C4
259  pvegtype(:,nvt_park) ) &! irr. parks
260  + 0. * pvegtype(:,nvt_no ) &! no vegetation (smooth)
261  + 0. * pvegtype(:,nvt_snow) &! no vegetation (snow)
262  + 0. * pvegtype(:,nvt_rock) ! no vegetation (rocks)
263 
264 IF (lhook) CALL dr_hook('MODI_VEG_FROM_LAI:VEG_FROM_LAI_1D',1,zhook_handle)
265 !
266 !-----------------------------------------------------------------
267 !
268 END FUNCTION veg_from_lai_1d
269 !
270 ! ####################################################
271  FUNCTION veg_from_lai_2d(PLAI,PVEGTYPE,OAGRI_TO_GRASS) RESULT(PVEG)
272 ! ####################################################
273 !!
274 !! PURPOSE
275 !! -------
276 !
277 ! Calculates coverage of soil by vegetation from leaf
278 ! area index and type of vegetation
279 ! (most of types; forest and vineyards; grassland)
280 !
281 !!** METHOD
282 !! ------
283 !!
284 !! EXTERNAL
285 !! --------
286 !! none
287 !!
288 !! IMPLICIT ARGUMENTS
289 !! ------------------
290 !!
291 !! none
292 !!
293 !! REFERENCE
294 !! ---------
295 !!
296 !!
297 !! AUTHOR
298 !! ------
299 !!
300 !! V. Masson and A. Boone * Meteo-France *
301 !!
302 !! MODIFICATIONS
303 !! -------------
304 !! Original 25/03/99
305 !!
306 !-------------------------------------------------------------------------------
307 !
308 !* 0. DECLARATIONS
309 ! ------------
310 !
311 USE modd_data_cover_par, ONLY : nvt_no, nvt_rock, nvt_snow, nvt_tebd, &
312  nvt_bone, nvt_trbe, nvt_c3, nvt_c4, &
313  nvt_irr, nvt_gras, nvt_trog, nvt_park, &
314  nvt_trbd, nvt_tebe, nvt_tene, nvt_bobd, &
315  nvt_bond, nvt_bogr, nvt_shrb
316 USE modd_surf_par, ONLY : xundef
317 !
318 USE modd_reprod_oper, ONLY : xeverg_veg
319 !
320 USE yomhook ,ONLY : lhook, dr_hook
321 USE parkind1 ,ONLY : jprb
322 !
323 IMPLICIT NONE
324 !
325 !* 0.1 declarations of arguments
326 !
327 REAL, DIMENSION(:,:), INTENT(IN) :: plai ! Leaf area Index
328 REAL, DIMENSION(:,:,:), INTENT(IN) :: pvegtype ! type of vegetation
329 LOGICAL, INTENT(IN) :: oagri_to_grass
330 !
331 REAL, DIMENSION(SIZE(PLAI,1),SIZE(PLAI,2)) :: pveg ! vegetation fraction
332 !
333 !* 0.2 declarations of local variables
334 !
335 REAL, DIMENSION(SIZE(PLAI,1),SIZE(PLAI,2)) :: zlai, zagri
336 REAL(KIND=JPRB) :: zhook_handle
337 !-----------------------------------------------------------------
338 IF (lhook) CALL dr_hook('MODI_VEG_FROM_LAI:VEG_FROM_LAI_2D',0,zhook_handle)
339 zlai(:,:) = plai(:,:)
340 WHERE ( pvegtype(:,:,nvt_no ) + pvegtype(:,:,nvt_rock) + pvegtype(:,:,nvt_snow) < 1.)
341  zlai(:,:) = plai(:,:) / (1.-pvegtype(:,:,nvt_no)-pvegtype(:,:,nvt_rock)-pvegtype(:,:,nvt_snow))
342 END WHERE
343 !
344 pveg(:,:) = xundef
345 !
346 IF(oagri_to_grass)THEN
347  zagri(:,:) = 0.95
348 ELSE
349  WHERE (plai(:,:) /= xundef)
350  zagri(:,:) = (1. - exp( -0.6 * zlai(:,:) ))
351  ELSEWHERE
352  zagri(:,:) = xundef
353  ENDWHERE
354 ENDIF
355 !
356 WHERE (plai(:,:) /= xundef)
357 pveg(:,:) = zagri(:,:) *(pvegtype(:,:,nvt_c4 ) + &! C4 crops
358  pvegtype(:,:,nvt_irr ) + &! irrigated crops
359  pvegtype(:,:,nvt_c3 ) ) &! C3 crops
360  + 0.95 *(pvegtype(:,:,nvt_tebd) + &! TREE
361  pvegtype(:,:,nvt_trbd) + &! TREE
362  pvegtype(:,:,nvt_tebe) + &! TREE
363  pvegtype(:,:,nvt_bobd) + &! TREE
364  pvegtype(:,:,nvt_shrb) + &! TREE
365  pvegtype(:,:,nvt_bone) + &! CONI
366  pvegtype(:,:,nvt_tene) + &! CONI
367  pvegtype(:,:,nvt_bond) ) &! CONI
368  + xeverg_veg * pvegtype(:,:,nvt_trbe) &! EVER
369  + 0.95 *(pvegtype(:,:,nvt_gras) + &! grassland C3
370  pvegtype(:,:,nvt_bogr) + &! boral grass C3
371  pvegtype(:,:,nvt_trog) + &! tropical grass C4
372  pvegtype(:,:,nvt_park) ) &! irr. parks
373  + 0. * pvegtype(:,:,nvt_no ) &! no vegetation (smooth)
374  + 0. * pvegtype(:,:,nvt_snow) &! no vegetation (snow)
375  + 0. * pvegtype(:,:,nvt_rock) ! no vegetation (rocks)
376 END WHERE
377 IF (lhook) CALL dr_hook('MODI_VEG_FROM_LAI:VEG_FROM_LAI_2D',1,zhook_handle)
378 !
379 !-----------------------------------------------------------------
380 !
381 END FUNCTION veg_from_lai_2d
382 !
383 !
384 !
385 ! ####################################################
386  FUNCTION veg_from_lai_patch_1d(PLAI,PVEGTYPE,OAGRI_TO_GRASS) RESULT(PVEG)
387 ! ####################################################
388 !!
389 !! PURPOSE
390 !! -------
391 !
392 ! Calculates coverage of soil by vegetation from leaf
393 ! area index and type of vegetation for each vegetation patch
394 ! (most of types; forest and vineyards; grassland)
395 !
396 !!** METHOD
397 !! ------
398 !!
399 !! EXTERNAL
400 !! --------
401 !! none
402 !!
403 !! IMPLICIT ARGUMENTS
404 !! ------------------
405 !!
406 !! none
407 !!
408 !! REFERENCE
409 !! ---------
410 !!
411 !!
412 !! AUTHOR
413 !! ------
414 !!
415 !! F.Solmon/V.Masson
416 !!
417 !! MODIFICATIONS
418 !! -------------
419 !! Original 25/03/99
420 !!
421 !-------------------------------------------------------------------------------
422 !
423 !* 0. DECLARATIONS
424 ! ------------
425 !
426 USE modd_data_cover_par, ONLY : nvt_no, nvt_rock, nvt_snow, nvt_tebd, &
427  nvt_bone, nvt_trbe, nvt_c3, nvt_c4, &
428  nvt_irr, nvt_gras, nvt_trog, nvt_park, &
429  nvt_trbd, nvt_tebe, nvt_tene, nvt_bobd, &
430  nvt_bond, nvt_bogr, nvt_shrb
431 
432 USE modd_surf_par, ONLY : xundef
433 !
434 USE modd_reprod_oper, ONLY : xeverg_veg
435 !
436 USE yomhook ,ONLY : lhook, dr_hook
437 USE parkind1 ,ONLY : jprb
438 !
439 IMPLICIT NONE
440 !
441 !* 0.1 declarations of arguments
442 !
443 REAL, DIMENSION(:), INTENT(IN) :: plai ! Leaf area Index
444 REAL, DIMENSION(:), INTENT(IN) :: pvegtype ! type of vegetation
445 LOGICAL, INTENT(IN) :: oagri_to_grass
446 !
447 REAL, DIMENSION(SIZE(PLAI)) :: pveg ! vegetation fraction
448 !
449 !* 0.2 declarations of local variables
450 !
451 REAL, DIMENSION(SIZE(PLAI)) :: zlai
452 REAL(KIND=JPRB) :: zhook_handle
453 !-----------------------------------------------------------------
454 IF (lhook) CALL dr_hook('MODI_VEG_FROM_LAI:VEG_FROM_LAI_PATCH_1D',0,zhook_handle)
455 zlai(:) = plai(:)
456 pveg(:) = xundef
457 !
458 IF(oagri_to_grass)THEN
459  IF (pvegtype(nvt_c4 )>0.) pveg(nvt_c4 )= 0.95
460  IF (pvegtype(nvt_irr )>0.) pveg(nvt_irr )= 0.95
461  IF (pvegtype(nvt_c3 )>0.) pveg(nvt_c3 )= 0.95
462 ELSE
463  IF (pvegtype(nvt_c4 )>0.) pveg(nvt_c4 )= 1. - exp( -0.6 * zlai(nvt_c4 ) )
464  IF (pvegtype(nvt_irr )>0.) pveg(nvt_irr )= 1. - exp( -0.6 * zlai(nvt_irr ) )
465  IF (pvegtype(nvt_c3 )>0.) pveg(nvt_c3 )= 1. - exp( -0.6 * zlai(nvt_c3 ) )
466 ENDIF
467 !
468 IF (pvegtype(nvt_tebd)>0.) pveg(nvt_tebd)= 0.95
469 IF (pvegtype(nvt_trbd)>0.) pveg(nvt_trbd)= 0.95
470 IF (pvegtype(nvt_tebe)>0.) pveg(nvt_tebe)= 0.95
471 IF (pvegtype(nvt_bobd)>0.) pveg(nvt_bobd)= 0.95
472 IF (pvegtype(nvt_shrb)>0.) pveg(nvt_shrb)= 0.95
473 IF (pvegtype(nvt_bone)>0.) pveg(nvt_bone)= 0.95
474 IF (pvegtype(nvt_tene)>0.) pveg(nvt_tene)= 0.95
475 IF (pvegtype(nvt_bond)>0.) pveg(nvt_bond)= 0.95
476 IF (pvegtype(nvt_trbe)>0.) pveg(nvt_trbe)= xeverg_veg
477 !
478 IF (pvegtype(nvt_gras)>0.) pveg(nvt_gras)= 0.95
479 IF (pvegtype(nvt_bogr)>0.) pveg(nvt_bogr)= 0.95
480 IF (pvegtype(nvt_trog)>0.) pveg(nvt_trog)= 0.95
481 IF (pvegtype(nvt_park)>0.) pveg(nvt_park)= 0.95
482 !
483 IF (pvegtype(nvt_no )>0.) pveg(nvt_no )= 0.
484 IF (pvegtype(nvt_snow)>0.) pveg(nvt_snow)= 0.
485 IF (pvegtype(nvt_rock)>0.) pveg(nvt_rock)= 0.
486 IF (lhook) CALL dr_hook('MODI_VEG_FROM_LAI:VEG_FROM_LAI_PATCH_1D',1,zhook_handle)
487 !
488 END FUNCTION veg_from_lai_patch_1d
489 !
490 !--------------------------------------------
491 !
real function, dimension(size(plai)) veg_from_lai_1d(PLAI, PVEGTYPE, OAGRI_TO_GRASS)
real function, dimension(size(plai, 1), size(plai, 2)) veg_from_lai_2d(PLAI, PVEGTYPE, OAGRI_TO_GRASS)
real function veg_from_lai_0d(PLAI, PVEGTYPE, OAGRI_TO_GRASS)
real function, dimension(size(plai)) veg_from_lai_patch_1d(PLAI, PVEGTYPE, OAGRI_TO_GRASS)