SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
canopy_evol_neutral.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 canopy_evol_neutral(KI,KLVL,PTSTEP,KIMPL,PWIND,PRHOA, &
7  psflux_u, &
8  pforc_u,pdforc_udu,pforc_e,pdforc_ede, &
9  pz,pzf,pdz,pdzf,pu,ptke,pustar, &
10  palfau,pbetau )
11 ! #########################################
12 !
13 !!**** *CANOPY_EVOL* - evolution of canopy
14 !!
15 !!
16 !! PURPOSE
17 !! -------
18 !!
19 !!** METHOD
20 !! ------
21 !!
22 !! EXTERNAL
23 !! --------
24 !!
25 !!
26 !! IMPLICIT ARGUMENTS
27 !! ------------------
28 !!
29 !! REFERENCE
30 !! ---------
31 !!
32 !!
33 !! AUTHOR
34 !! ------
35 !! V. Masson *Meteo France*
36 !!
37 !! MODIFICATIONS
38 !! -------------
39 !! Original 05/2010
40 !-------------------------------------------------------------------------------
41 !
42 !* 0. DECLARATIONS
43 ! ------------
44 !
45 USE modd_csts, ONLY : xkarman
46 USE modd_surf_par, ONLY : xundef
47 USE modd_canopy_turb, ONLY : xcmfs, xalpsbl, xced
48 !
49 USE modi_canopy_evol_wind
50 USE modi_canopy_evol_tke
51 !
52 USE mode_sbls
53 !
54 USE yomhook ,ONLY : lhook, dr_hook
55 USE parkind1 ,ONLY : jprb
56 !
57 IMPLICIT NONE
58 !
59 !* 0.1 Declarations of arguments
60 ! -------------------------
61 !
62 INTEGER, INTENT(IN) :: ki ! number of horizontal points
63 INTEGER, INTENT(IN) :: klvl ! number of levels in canopy
64 REAL, INTENT(IN) :: ptstep ! atmospheric time-step (s)
65 INTEGER, INTENT(IN) :: kimpl ! implicitation code:
66 ! ! 1 : computes only alfa and beta coupling
67 ! ! coefficients for all variables
68 ! ! 2 : computes temporal evolution of the
69 ! ! variables
70 REAL, DIMENSION(KI), INTENT(IN) :: pwind ! wind speed (m/s)
71 REAL, DIMENSION(KI), INTENT(IN) :: prhoa ! Air density at forcing level (kg/m3)
72 REAL, DIMENSION(KI), INTENT(IN) :: psflux_u ! surface flux u'w' (m2/s2)
73 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: pforc_u ! tendency of wind due to canopy drag (m/s2)
74 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: pdforc_udu! formal derivative of the tendency of
75 ! ! wind due to canopy drag (1/s)
76 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: pforc_e ! tendency of TKE due to canopy drag (m2/s3)
77 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: pdforc_ede! formal derivative of the tendency of
78 ! ! TKE due to canopy drag (1/s)
79 !
80 REAL, DIMENSION(KI,KLVL), INTENT(INOUT) :: pz ! heights of canopy levels (m)
81 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: pzf ! heights of bottom of canopy levels (m)
82 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: pdz ! depth of canopy levels (m)
83 REAL, DIMENSION(KI,KLVL), INTENT(IN) :: pdzf ! depth between canopy levels (m)
84 REAL, DIMENSION(KI,KLVL), INTENT(INOUT) :: pu ! wind speed at canopy levels (m/s)
85 REAL, DIMENSION(KI,KLVL), INTENT(INOUT) :: ptke ! TKE at canopy levels (m2/s2)
86 REAL, DIMENSION(KI), INTENT(OUT) :: pustar ! friction velocity at forcing level (m/s)
87 REAL, DIMENSION(KI), INTENT(OUT) :: palfau ! V+(1) = alfa u'w'(1) + beta
88 REAL, DIMENSION(KI), INTENT(OUT) :: pbetau ! V+(1) = alfa u'w'(1) + beta
89 !
90 !* 0.2 Declarations of local variables
91 ! -------------------------------
92 !
93 INTEGER :: jlayer ! loop counter on layers
94 INTEGER :: ji ! loop counter
95 !
96 REAL, DIMENSION(KI,KLVL) :: zk ! mixing coefficient
97 REAL, DIMENSION(KI,KLVL) :: zdkddvdz ! formal derivative of mixing coefficient according to variable vertical gradient
98 REAL, DIMENSION(KI,KLVL) :: zexn ! Exner function at full levels
99 REAL, DIMENSION(KI,KLVL) :: zuw ! friction at mid levels
100 REAL, DIMENSION(KI,KLVL) :: zth ! temperature(meaningless here)
101 REAL, DIMENSION(KI,KLVL) :: zwth ! heat flux (supposed equal to zero)
102 REAL, DIMENSION(KI,KLVL) :: zwq ! vapor flux (supposed equal to zero)
103 REAL, DIMENSION(KI,KLVL) :: zleps ! Dissipative length at full levels
104 REAL, DIMENSION(KI,KLVL) :: zz ! height above displacement height
105 REAL, DIMENSION(KI,KLVL) :: zlm ! Mixing length at mid levels
106 REAL, DIMENSION(KI) :: zustar ! friction velocity (estimated from
107 ! ! fluxes at atmospheric forcing level)
108 !
109 REAL :: zz0 ! a value of z0 just for first time-step init.
110 REAL(KIND=JPRB) :: zhook_handle
111 !
112 !-------------------------------------------------------------------------------
113 !
114 !* 1. First time step initialization
115 ! ------------------------------
116 !
117 !* first time step (i.e. wind profile is initially zero) :
118 ! set a neutral wind profile in relation with forcing wind
119 IF (lhook) CALL dr_hook('CANOPY_EVOL_NEUTRAL',0,zhook_handle)
120 DO ji=1,ki
121  IF(pwind(ji)>0. .AND. pu(ji,klvl-1)==0.) THEN
122  zz0 = pz(ji,1)/2.
123  pu(ji,:) = pwind(ji) * log(pz(ji,:)/zz0) / log(pz(ji,klvl)/zz0)
124  END IF
125 END DO
126 !-------------------------------------------------------------------------------
127 !
128 !* 2. mixing and dissipative lengths (at full levels)
129 ! ------------------------------
130 !
131 !* influence of ground surface on mixing length in neutral case
132 DO jlayer=1,klvl
133  zlm(:,jlayer) = xkarman/sqrt(xalpsbl)/xcmfs * pz(:,jlayer)
134  zleps(:,jlayer) = xkarman*(xalpsbl**1.5)*xced * pz(:,jlayer)
135 END DO
136 !
137 !-------------------------------------------------------------------------------
138 !
139 !* 3. time evolution of wind in canopy
140 ! --------------------------------
141 !
142 !* 3.1 mixing coefficient for wind at mid layers (at half levels)
143 ! ---------------------------
144 !
145 zk = -999.
146 DO jlayer=2,klvl
147  zk(:,jlayer) = 0.5 * xcmfs * zlm(:,jlayer) * sqrt(ptke(:,jlayer) ) &
148  + 0.5 * xcmfs * zlm(:,jlayer-1) * sqrt(ptke(:,jlayer-1))
149 END DO
150 !
151 !
152 !* 3.2 mixing coefficient vertical derivative at mid layers (at half levels)
153 ! --------------------------------------
154 !
155 !* there is no formal dependency on wind
156 zdkddvdz = 0.
157 !
158 !
159 !* 3.3 time evolution of wind in canopy
160 ! --------------------------------
161 !
162  CALL canopy_evol_wind(ki,klvl,ptstep,kimpl,pwind,zk,zdkddvdz,psflux_u,pforc_u,pdforc_udu,pdz,pdzf,pu,zuw,palfau,pbetau)
163 !
164 !* 3.4 Friction velocity at top of SBL layers
165 ! --------------------------------------
166 !
167 pustar = sqrt(abs(zuw(:,klvl)))
168 !
169 !-------------------------------------------------------------------------------
170 !
171 !* 4. time evolution of TKE in canopy
172 ! -------------------------------
173 !
174 !* neutral case, no thermal production
175 zwth = 0.
176 zwq = 0.
177 zth = 300.
178 !
179  CALL canopy_evol_tke(ki,klvl,ptstep,prhoa,pz,pzf,pdz,pdzf,pforc_e,pdforc_ede, &
180  pu,zth,zuw,zwth,zwq,zleps,ptke )
181 !
182 !-------------------------------------------------------------------------------
183 !
184 !* 5. Security at atmospheric forcing level
185 ! -------------------------------------
186 !
187 pu(:,klvl) = pwind(:)
188 IF (lhook) CALL dr_hook('CANOPY_EVOL_NEUTRAL',1,zhook_handle)
189 !
190 !-------------------------------------------------------------------------------
191 END SUBROUTINE canopy_evol_neutral
192 
193 
subroutine canopy_evol_tke(KI, KLVL, PTSTEP, PRHOA, PZ, PZF, PDZ, PDZF, PFORC_E, PDFORC_EDE, PU, PTH, PUW, PWTH, PWQ, PLEPS, PTKE)
subroutine canopy_evol_neutral(KI, KLVL, PTSTEP, KIMPL, PWIND, PRHOA, PSFLUX_U, PFORC_U, PDFORC_UDU, PFORC_E, PDFORC_EDE, PZ, PZF, PDZ, PDZF, PU, PTKE, PUSTAR, PALFAU, PBETAU)
subroutine canopy_evol_wind(KI, KLVL, PTSTEP, KIMPL, PWIND, PK, PDKDDVDZ, PSFLUX_U, PFORC_U, PDFORC_UDU, PDZ, PDZF, PU, PUW, PALFA, PBETA)