SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
ini_data_rootfrac.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 ini_data_rootfrac( PDG, PROOTDEPTH, PROOT_EXT, PROOT_LIN, &
7  prootfrac, ogv )
8 
9 ! ##########################################################################
10 !
11 !!**** *INI_DATA_ROOTFRAC*
12 !!
13 !! PURPOSE
14 !! -------
15 !
16 ! Calculates the soil grid configuration using a reference grid
17 ! Also compute the root fraction
18 !
19 !
20 !!** METHOD
21 !! ------
22 !
23 ! Direct calculation
24 !
25 !! EXTERNAL
26 !! --------
27 !
28 ! None
29 !!
30 !! IMPLICIT ARGUMENTS
31 !! ------------------
32 !!
33 !! REFERENCE
34 !! ---------
35 !!
36 !! Noilhan and Planton (1989)
37 !! Belair (1995)
38 !! Boone (2000)
39 !! Boone et al. (2000)
40 !! Habets et al. (2003)
41 !! Decharme et al. (2011)
42 !!
43 !! AUTHOR
44 !! ------
45 !! A. Boone * Meteo-France *
46 !! new version :
47 !! B. Decharme * Meteo-France *
48 !!
49 !! MODIFICATIONS
50 !! -------------
51 !! Original 12/04/03
52 !! new version :10/08/2011
53 !! P. Samuelsson 02/2012 MEB
54 !-------------------------------------------------------------------------------
55 !
56 !* 0. DECLARATIONS
57 ! ------------
58 !
59 USE modd_surf_par, ONLY : xundef, nundef
60 USE modd_isba_par, ONLY : noptimlayer, xoptimgrid
61 !
62 USE yomhook ,ONLY : lhook, dr_hook
63 USE parkind1 ,ONLY : jprb
64 !
65 IMPLICIT NONE
66 !
67 !* 0.1 declarations of arguments
68 !
69 REAL, DIMENSION(:,:,:), INTENT(IN) :: pdg ! depth of base of soil layers (m)
70 REAL, DIMENSION(:,:), INTENT(IN) :: prootdepth ! effective root depth (m)
71 REAL, DIMENSION(:,:), INTENT(IN) :: proot_ext
72 REAL, DIMENSION(:,:), INTENT(IN) :: proot_lin
73 LOGICAL, OPTIONAL, INTENT(IN) :: ogv
74 !
75 REAL, DIMENSION(:,:,:), INTENT(OUT) :: prootfrac
76 !
77 !* 0.2 declarations of local variables
78 !
79 REAL :: zlog1, zlog2
80 REAL :: zjackson ! Jackson (1996) formulation for cumulative root fraction
81 REAL :: zunif ! linear formulation for cumulative root fraction
82 REAL :: zrootfrgv ! Fraction of patch root depth given to
83 ! ! grass root depth for understory ground vegetation.
84 ! ! =1 for non-understory vegetation
85 
86 !
87 INTEGER :: ini,inl,ipatch
88 INTEGER :: jj,jl,jpatch
89 !
90 REAL(KIND=JPRB) :: zhook_handle
91 !-------------------------------------------------------------------------------
92 ! 0. Initialization
93 ! --------------
94 !
95 IF (lhook) CALL dr_hook('INI_DATA_ROOTFRAC',0,zhook_handle)
96 !
97 ini = SIZE(pdg,1)
98 inl = SIZE(pdg,2)
99 ipatch = SIZE(pdg,3)
100 !
101 zrootfrgv = 1.0
102 IF (present(ogv)) THEN
103  IF(ogv) zrootfrgv = 0.5
104 ENDIF
105 !
106 prootfrac(:,:,:) = xundef
107 !
108 DO jpatch=1,ipatch
109  DO jj=1,ini
110  !
111  IF ( prootdepth(jj,jpatch)/=xundef .AND. prootdepth(jj,jpatch)/=0.0 ) THEN
112  !
113  DO jl=1,inl
114  zlog1 = 100. * log(proot_ext(jj,jpatch)) * pdg(jj,jl,jpatch)
115  zlog2 = 100. * log(proot_ext(jj,jpatch)) * zrootfrgv * prootdepth(jj,jpatch)
116  zjackson = min(1.0,(1.0-exp(zlog1))/(1.0-exp(zlog2)))
117  zunif = min(1.0,(pdg(jj,jl,jpatch)/zrootfrgv/prootdepth(jj,jpatch)))
118  prootfrac(jj,jl,jpatch) = proot_lin(jj,jpatch) * zunif &
119  + (1.0-proot_lin(jj,jpatch)) * zjackson
120  ENDDO
121 ! No vegetation case
122  ELSE
123  prootfrac(jj,:,jpatch) = 0.0
124  ENDIF
125  !
126  ENDDO
127 ENDDO
128 !
129 IF (lhook) CALL dr_hook('INI_DATA_ROOTFRAC',1,zhook_handle)
130 !-------------------------------------------------------------------------------
131 END SUBROUTINE ini_data_rootfrac
subroutine ini_data_rootfrac(PDG, PROOTDEPTH, PROOT_EXT, PROOT_LIN, PROOTFRAC, OGV)