1 | MODULE wx_pbl_mod |
---|
2 | |
---|
3 | ! Split Planetary Boundary Layer |
---|
4 | |
---|
5 | ! This module manages the splitting of the boundary layer between two regions; the (w) |
---|
6 | ! region (inside cold pools) and the (x) region (outside cold pools) |
---|
7 | |
---|
8 | USE dimphy |
---|
9 | |
---|
10 | IMPLICIT NONE |
---|
11 | |
---|
12 | CONTAINS |
---|
13 | |
---|
14 | !**************************************************************************************** |
---|
15 | |
---|
16 | SUBROUTINE wx_pbl0_merge(knon, ypplay, ypaprs, & |
---|
17 | sigw, dTs_forcing, dqs_forcing, & |
---|
18 | yt_x, yt_w, yq_x, yq_w, & |
---|
19 | yu_x, yu_w, yv_x, yv_w, & |
---|
20 | ycdragh_x, ycdragh_w, ycdragq_x, ycdragq_w, & |
---|
21 | ycdragm_x, ycdragm_w, & |
---|
22 | AcoefT_x, AcoefT_w, AcoefQ_x, AcoefQ_w, & |
---|
23 | AcoefU_x, AcoefU_w, AcoefV_x, AcoefV_w, & |
---|
24 | BcoefT_x, BcoefT_w, BcoefQ_x, BcoefQ_w, & |
---|
25 | BcoefU_x, BcoefU_w, BcoefV_x, BcoefV_w, & |
---|
26 | AcoefT, AcoefQ, AcoefU, AcoefV, & |
---|
27 | BcoefT, BcoefQ, BcoefU, BcoefV, & |
---|
28 | ycdragh, ycdragq, ycdragm, & |
---|
29 | yt1, yq1, yu1, yv1 & |
---|
30 | ) |
---|
31 | |
---|
32 | USE wx_pbl_var_mod |
---|
33 | |
---|
34 | USE lmdz_print_control, ONLY: prt_level,lunout |
---|
35 | USE indice_sol_mod, ONLY: is_oce |
---|
36 | |
---|
37 | INCLUDE "YOMCST.h" |
---|
38 | INCLUDE "FCTTRE.h" |
---|
39 | INCLUDE "YOETHF.h" |
---|
40 | INCLUDE "clesphys.h" |
---|
41 | |
---|
42 | INTEGER, INTENT(IN) :: knon ! number of grid cells |
---|
43 | REAL, DIMENSION(knon,klev), INTENT(IN) :: ypplay ! mid-layer pressure (Pa) |
---|
44 | REAL, DIMENSION(knon,klev), INTENT(IN) :: ypaprs ! pressure at layer interfaces (pa) |
---|
45 | REAL, DIMENSION(knon), INTENT(IN) :: sigw ! cold pools fractional area |
---|
46 | REAL, DIMENSION(knon), INTENT(IN) :: dTs_forcing ! forced temperature difference (w)-(x) |
---|
47 | REAL, DIMENSION(knon), INTENT(IN) :: dqs_forcing ! forced humidity difference (w)-(x) |
---|
48 | REAL, DIMENSION(knon,klev), INTENT(IN) :: yt_x, yt_w, yq_x, yq_w |
---|
49 | REAL, DIMENSION(knon,klev), INTENT(IN) :: yu_x, yu_w, yv_x, yv_w |
---|
50 | REAL, DIMENSION(knon), INTENT(IN) :: ycdragh_x, ycdragh_w, ycdragq_x, ycdragq_w |
---|
51 | REAL, DIMENSION(knon), INTENT(IN) :: ycdragm_x, ycdragm_w |
---|
52 | REAL, DIMENSION(knon), INTENT(IN) :: AcoefT_x, AcoefT_w, AcoefQ_x, AcoefQ_w |
---|
53 | REAL, DIMENSION(knon), INTENT(IN) :: AcoefU_x, AcoefU_w, AcoefV_x, AcoefV_w |
---|
54 | REAL, DIMENSION(knon), INTENT(IN) :: BcoefT_x, BcoefT_w, BcoefQ_x, BcoefQ_w |
---|
55 | REAL, DIMENSION(knon), INTENT(IN) :: BcoefU_x, BcoefU_w, BcoefV_x, BcoefV_w |
---|
56 | REAL, DIMENSION(knon), INTENT(OUT) :: AcoefT, AcoefQ, AcoefU, AcoefV |
---|
57 | REAL, DIMENSION(knon), INTENT(OUT) :: BcoefT, BcoefQ, BcoefU, BcoefV |
---|
58 | REAL, DIMENSION(knon), INTENT(OUT) :: ycdragh, ycdragq, ycdragm |
---|
59 | REAL, DIMENSION(knon), INTENT(OUT) :: yt1, yq1, yu1, yv1 ! Apparent T, q, u, v at first level, as |
---|
60 | !seen by surface modules |
---|
61 | |
---|
62 | ! Local variables |
---|
63 | INTEGER :: j |
---|
64 | REAL :: dd_Kh |
---|
65 | REAL :: dd_Kq |
---|
66 | REAL :: dd_Km |
---|
67 | REAL :: dd_u |
---|
68 | REAL :: dd_v |
---|
69 | REAL :: dd_t |
---|
70 | REAL :: dd_q |
---|
71 | |
---|
72 | REAL :: LambdaTs, LambdaQs, LambdaUs, LambdaVs |
---|
73 | |
---|
74 | REAL, DIMENSION(knon) :: sigx ! fractional area of (x) region |
---|
75 | |
---|
76 | |
---|
77 | sigx(1:knon) = 1.-sigw(1:knon) |
---|
78 | |
---|
79 | |
---|
80 | DO j=1,knon |
---|
81 | |
---|
82 | |
---|
83 | ! Compute w-x differences |
---|
84 | dd_t = yt_w(j,1) - yt_x(j,1) |
---|
85 | dd_q = yq_w(j,1) - yq_x(j,1) |
---|
86 | dd_u = yu_w(j,1) - yu_x(j,1) |
---|
87 | dd_v = yv_w(j,1) - yv_x(j,1) |
---|
88 | |
---|
89 | ! Merged exchange coefficients |
---|
90 | dd_Kh = Kech_h_w(j) - Kech_h_x(j) |
---|
91 | dd_Kq = Kech_q_w(j) - Kech_q_x(j) |
---|
92 | dd_Km = Kech_m_w(j) - Kech_m_x(j) |
---|
93 | |
---|
94 | LambdaTs = dd_KTp(j)/Kech_Tp(j) |
---|
95 | LambdaQs = dd_KQs(j)/Kech_Qs(j) |
---|
96 | LambdaUs = dd_KUp(j)/Kech_Up(j) |
---|
97 | LambdaVs = dd_KVp(j)/Kech_Vp(j) |
---|
98 | |
---|
99 | ! Calcul des coef A, B \'equivalents dans la couche 1 |
---|
100 | |
---|
101 | ! The dTs_forcing and dqs_forcing terms are added for diagnostic purpose ; they should be zero in normal operation. |
---|
102 | AcoefT(j) = AcoefT_x(j) + sigw(j)*(1.+sigx(j)*LambdaTs)*(dd_AT(j) - C_p(j)*dTs_forcing(j)) |
---|
103 | AcoefQ(j) = AcoefQ_x(j) + sigw(j)*(1.+sigx(j)*LambdaQs)*(dd_AQ(j) - dqs_forcing(j)) |
---|
104 | AcoefU(j) = AcoefU_x(j) + sigw(j)*(1.+sigx(j)*LambdaUs)*dd_AU(j) |
---|
105 | AcoefV(j) = AcoefV_x(j) + sigw(j)*(1.+sigx(j)*LambdaVs)*dd_AV(j) |
---|
106 | |
---|
107 | |
---|
108 | !! BcoefT(j) = (sigw(j)*Kech_h_w(j)*Kech_T_pw(j)*BcoefT_w(j) + & |
---|
109 | !! sigx(j)*Kech_h_x(j)*Kech_T_px(j)*BcoefT_x(j) )/(Kech_h(j)*Kech_Tp(j)) |
---|
110 | !! BcoefQ(j) = (sigw(j)*Kech_q_w(j)*Kech_Q_pw(j)*BcoefQ_w(j) + & |
---|
111 | !! sigx(j)*Kech_q_x(j)*Kech_Q_px(j)*BcoefQ_x(j) )/(Kech_q(j)*Kech_Qp(j)) |
---|
112 | !! BcoefU(j) = (sigw(j)*Kech_m_w(j)*Kech_U_pw(j)*BcoefU_w(j) + & |
---|
113 | !! sigx(j)*Kech_m_x(j)*Kech_U_px(j)*BcoefU_x(j) )/(Kech_m(j)*Kech_Up(j)) |
---|
114 | !! BcoefV(j) = (sigw(j)*Kech_m_w(j)*Kech_V_pw(j)*BcoefV_w(j) + & |
---|
115 | !! sigx(j)*Kech_m_x(j)*Kech_V_px(j)*BcoefV_x(j) )/(Kech_m(j)*Kech_Vp(j)) |
---|
116 | |
---|
117 | !! Print *,'YYYYpbl0: BcoefT_x, sigw, sigx, dd_Kh, dd_KTp, Kech_h_w ', & |
---|
118 | !! BcoefT_x, sigw, sigx, dd_Kh, dd_KTp, Kech_h_w |
---|
119 | !! Print *,'YYYYpbl0: Kech_T_pw, dd_BT, Kech_h, Kech_Tp ', & |
---|
120 | !! Kech_T_pw, dd_BT, Kech_h, Kech_Tp |
---|
121 | BcoefT(j) = BcoefT_x(j) + sigw(j)*(sigx(j)*dd_Kh*dd_KTp(j)*BcoefT_x(j) + & |
---|
122 | Kech_h_w(j)*Kech_T_pw(j)*dd_BT(j))/(Kech_h(j)*Kech_Tp(j)) |
---|
123 | BcoefQ(j) = BcoefQ_x(j) + sigw(j)*(sigx(j)*dd_Kq*dd_KQs(j)*BcoefQ_x(j) + & |
---|
124 | Kech_q_w(j)*Kech_Q_sw(j)*dd_BQ(j))/(Kech_q(j)*Kech_Qs(j)) |
---|
125 | BcoefU(j) = BcoefU_x(j) + sigw(j)*(sigx(j)*dd_Km*dd_KUp(j)*BcoefU_x(j) + & |
---|
126 | Kech_m_w(j)*Kech_U_pw(j)*dd_BU(j))/(Kech_m(j)*Kech_Up(j)) |
---|
127 | BcoefV(j) = BcoefV_x(j) + sigw(j)*(sigx(j)*dd_Km*dd_KVp(j)*BcoefV_x(j) + & |
---|
128 | Kech_m_w(j)*Kech_V_pw(j)*dd_BV(j))/(Kech_m(j)*Kech_Vp(j)) |
---|
129 | !>jyg |
---|
130 | |
---|
131 | |
---|
132 | ! Calcul des cdrag \'equivalents dans la couche |
---|
133 | |
---|
134 | ycdragm(j) = ycdragm_x(j) + sigw(j)*dd_Cdragm(j) |
---|
135 | ycdragh(j) = ycdragh_x(j) + sigw(j)*dd_Cdragh(j) |
---|
136 | ycdragq(j) = ycdragq_x(j) + sigw(j)*dd_Cdragq(j) |
---|
137 | |
---|
138 | ! Calcul de T, q, u et v \'equivalents dans la couche 1 |
---|
139 | !! yt1(j) = yt_x(j,1) + sigw(j)*dd_t*(1.+sigx(j)*dd_Kh/KCT) |
---|
140 | !! yq1(j) = yq_x(j,1) + sigw(j)*dd_q*(1.+sigx(j)*dd_Kh/KCQ) |
---|
141 | !! yu1(j) = yu_x(j,1) + sigw(j)*dd_u*(1.+sigx(j)*dd_Km/KCU) |
---|
142 | !! yv1(j) = yv_x(j,1) + sigw(j)*dd_v*(1.+sigx(j)*dd_Km/KCV) |
---|
143 | yt1(j) = yt_x(j,1) + sigw(j)*dd_t |
---|
144 | yq1(j) = yq_x(j,1) + sigw(j)*dd_q |
---|
145 | yu1(j) = yu_x(j,1) + sigw(j)*dd_u |
---|
146 | yv1(j) = yv_x(j,1) + sigw(j)*dd_v |
---|
147 | |
---|
148 | |
---|
149 | ENDDO |
---|
150 | |
---|
151 | |
---|
152 | |
---|
153 | END SUBROUTINE wx_pbl0_merge |
---|
154 | |
---|
155 | SUBROUTINE wx_pbl_dts_merge(knon, dtime, ypplay, ypaprs, & |
---|
156 | sigw, beta, wcstar, wdens, & |
---|
157 | AT_x, AT_w, & |
---|
158 | BT_x, BT_w, & |
---|
159 | AcoefT0, AcoefQ0, BcoefT0, BcoefQ0, & |
---|
160 | AcoefT, AcoefQ, BcoefT, BcoefQ, & |
---|
161 | HTphiT_b, dd_HTphiT, HTphiQ_b, dd_HTphiQ, HTRn_b, dd_HTRn, & |
---|
162 | phiT0_b, dphiT0, phiQ0_b, dphiQ0, Rn0_b, dRn0, & |
---|
163 | g_T, g_Q, & |
---|
164 | Gamma_phiT, Gamma_phiQ, & |
---|
165 | dTs_ins, dqsatsrf_ins & |
---|
166 | ) |
---|
167 | |
---|
168 | USE wx_pbl_var_mod |
---|
169 | |
---|
170 | USE lmdz_print_control, ONLY: prt_level,lunout |
---|
171 | |
---|
172 | INCLUDE "YOMCST.h" |
---|
173 | INCLUDE "FCTTRE.h" |
---|
174 | INCLUDE "YOETHF.h" |
---|
175 | |
---|
176 | INTEGER, INTENT(IN) :: knon ! number of grid cells |
---|
177 | REAL, INTENT(IN) :: dtime ! time step size (s) |
---|
178 | REAL, DIMENSION(knon,klev), INTENT(IN) :: ypplay ! mid-layer pressure (Pa) |
---|
179 | REAL, DIMENSION(knon,klev), INTENT(IN) :: ypaprs ! pressure at layer interfaces (pa) |
---|
180 | REAL, DIMENSION(knon), INTENT(IN) :: sigw ! cold pool fractional area |
---|
181 | REAL, DIMENSION(knon), INTENT(IN) :: beta ! evaporation by potential evaporation |
---|
182 | REAL, DIMENSION(knon), INTENT(IN) :: wcstar ! cold pool gust front speed |
---|
183 | REAL, DIMENSION(knon), INTENT(IN) :: wdens ! cold pool number density |
---|
184 | REAL, DIMENSION(knon), INTENT(IN) :: AT_x, AT_w |
---|
185 | REAL, DIMENSION(knon), INTENT(IN) :: BT_x, BT_w |
---|
186 | REAL, DIMENSION(knon), INTENT(IN) :: AcoefT0, AcoefQ0, BcoefT0, BcoefQ0 |
---|
187 | |
---|
188 | REAL, DIMENSION(knon), INTENT(OUT) :: AcoefT, AcoefQ, BcoefT, BcoefQ |
---|
189 | REAL, DIMENSION(knon), INTENT(OUT) :: HTphiT_b, dd_HTphiT, HTphiQ_b, dd_HTphiQ, HTRn_b, dd_HTRn |
---|
190 | REAL, DIMENSION(knon), INTENT(OUT) :: phiT0_b, dphiT0, phiQ0_b, dphiQ0, Rn0_b, dRn0 |
---|
191 | REAL, DIMENSION(knon), INTENT(OUT) :: g_T, g_Q |
---|
192 | REAL, DIMENSION(knon), INTENT(OUT) :: Gamma_phiT, Gamma_phiQ |
---|
193 | REAL, DIMENSION(knon), INTENT(OUT) :: dTs_ins, dqsatsrf_ins |
---|
194 | |
---|
195 | ! Local variables |
---|
196 | REAL, DIMENSION(knon) :: qsat_x |
---|
197 | REAL, DIMENSION(knon) :: qsat_w |
---|
198 | REAL, DIMENSION(knon) :: dqsatdT_x |
---|
199 | REAL, DIMENSION(knon) :: dqsatdT_w |
---|
200 | |
---|
201 | REAL, DIMENSION(knon) :: T10_x |
---|
202 | REAL, DIMENSION(knon) :: T10_w |
---|
203 | REAL, DIMENSION(knon) :: phiT0_x |
---|
204 | REAL, DIMENSION(knon) :: phiT0_w |
---|
205 | REAL, DIMENSION(knon) :: phiQ0_x |
---|
206 | REAL, DIMENSION(knon) :: phiQ0_w |
---|
207 | REAL, DIMENSION(knon) :: Rn0_x |
---|
208 | REAL, DIMENSION(knon) :: Rn0_w |
---|
209 | REAL, DIMENSION(knon) :: Rp1_x |
---|
210 | REAL, DIMENSION(knon) :: Rp1_w |
---|
211 | REAL, DIMENSION(knon) :: Rps_x |
---|
212 | REAL, DIMENSION(knon) :: Rps_w |
---|
213 | |
---|
214 | REAL, DIMENSION(knon) :: HTphiT_x |
---|
215 | REAL, DIMENSION(knon) :: HTphiT_w |
---|
216 | REAL, DIMENSION(knon) :: HTphiQ_x |
---|
217 | REAL, DIMENSION(knon) :: HTphiQ_w |
---|
218 | REAL, DIMENSION(knon) :: HTRn_x |
---|
219 | REAL, DIMENSION(knon) :: HTRn_w |
---|
220 | |
---|
221 | REAL, DIMENSION(knon) :: HQphiT_x |
---|
222 | REAL, DIMENSION(knon) :: HQphiT_w |
---|
223 | REAL, DIMENSION(knon) :: HQphiQ_x |
---|
224 | REAL, DIMENSION(knon) :: HQphiQ_w |
---|
225 | REAL, DIMENSION(knon) :: HQRn_x |
---|
226 | REAL, DIMENSION(knon) :: HQRn_w |
---|
227 | |
---|
228 | REAL, DIMENSION(knon) :: HQphiT_b |
---|
229 | REAL, DIMENSION(knon) :: dd_HQphiT |
---|
230 | REAL, DIMENSION(knon) :: HQphiQ_b |
---|
231 | REAL, DIMENSION(knon) :: dd_HQphiQ |
---|
232 | REAL, DIMENSION(knon) :: HQRn_b |
---|
233 | REAL, DIMENSION(knon) :: dd_HQRn |
---|
234 | |
---|
235 | REAL, DIMENSION(knon) :: sigx |
---|
236 | |
---|
237 | REAL, DIMENSION(knon) :: Ts, T1 |
---|
238 | !!! REAL, DIMENSION(knon) :: qsat, dqsat_dT |
---|
239 | !!! REAL, DIMENSION(knon) :: phiT0 |
---|
240 | |
---|
241 | !!! REAL, DIMENSION(knon) :: Cp, Lv |
---|
242 | REAL, DIMENSION(knon) :: tau, Inert |
---|
243 | |
---|
244 | REAL :: dd_Kh |
---|
245 | REAL :: zdelta, zcvm5, zcor |
---|
246 | REAL :: qsat |
---|
247 | |
---|
248 | INTEGER :: j |
---|
249 | |
---|
250 | |
---|
251 | !---------------------------------------------------------------------------- |
---|
252 | ! Reference state |
---|
253 | ! --------------- |
---|
254 | ! dqsat_dT_w = dqsat_dT(Ts0_w) dqsat_dT_x = dqsat_dT(Ts0_x) |
---|
255 | ! T10_w = (AT_w/Cp - Kech_T_w BT_w dtime Ts0_w)/(1 - Kech_T_w BT_w dtime) |
---|
256 | ! T10_x = (AT_x/Cp - Kech_T_x BT_x dtime Ts0_x)/(1 - Kech_T_x BT_x dtime) |
---|
257 | ! phiT0_w = Kech_T_pw (AT_w - Cp Ts0_w) phiT0_x = Kech_T_px (AT_x - Cp Ts0_x) |
---|
258 | ! phiQ0_w = Kech_Q_sw (beta AQ_w - qsatsrf0_w) phiQ0_x = Kech_Q_sx (beta AQ_x - qsatsrf0_x) |
---|
259 | ! Rn0_w = eps_1 Rsigma T10_w^4 - Rsigma Ts0_w^4 Rn0_x = eps_1 Rsigma T10_x^4 - Rsigma Ts0_x^4 |
---|
260 | ! Rp1_w = 4 eps_1 Rsigma T10_w^3 Rp1_x = 4 eps_1 Rsigma T10_x^3 |
---|
261 | ! Rps_w = 4 Rsigma Ts0_w^3 Rps_x = 4 Rsigma Ts0_x^3 |
---|
262 | |
---|
263 | ! phiT0_b = sigw phiT0_w + sigx phiT0_x |
---|
264 | ! dphiT0 = phiT0_w - phiT0_x |
---|
265 | ! phiQ0_b = sigw phiQ0_w + sigx phiQ0_x |
---|
266 | ! dphiQ0 = phiQ0_w - phiQ0_x |
---|
267 | ! Rn0_b = sigw Rn0_w + sigx Rn0_x |
---|
268 | dRn0 = Rn0_w - Rn0_x |
---|
269 | |
---|
270 | |
---|
271 | !---------------------------------------------------------------------------- |
---|
272 | ! Elementary enthalpy equations |
---|
273 | ! ----------------------------- |
---|
274 | ! phiT_w = phiT0_w - HTphiT_w (Ts_w-Ts0_w) phiT_x = phiT0_x - HTphiT_x (Ts_x-Ts0_x) |
---|
275 | ! phiQ_w = phiQ0_w - HTphiQ_w (Ts_w-Ts0_w) phiQ_x = phiQ0_x - HTphiQ_x (Ts_x-Ts0_x) |
---|
276 | ! Rn_w = Rn0_w - HTRn_w (Ts_w-Ts0_w) Rn_x = Rn0_x - HTRn_x (Ts_x-Ts0_x) |
---|
277 | ! DFlux_DT coefficients |
---|
278 | ! --------------------- |
---|
279 | ! Heat flux equation |
---|
280 | ! HTphiT_w = Cp Kech_T_pw HTphiT_x = Cp Kech_T_px |
---|
281 | ! Moisture flux equation |
---|
282 | ! HTphiQ_w = beta Kech_Q_sw dqsat_dT_w HTphiQ_x = beta Kech_Q_sx dqsat_dT_x |
---|
283 | ! Radiation equation |
---|
284 | ! HTRn_w = Rp1_w Kech_T_pw BcoefT_w dtime + Rps_w HTRn_x = Rp1_x Kech_T_px BcoefT_x dtime + Rps_x |
---|
285 | |
---|
286 | !---------------------------------------------------------------------------- |
---|
287 | ! Elementary moisture equations |
---|
288 | ! ----------------------------- |
---|
289 | ! beta Ts_w = beta Ts0_w + QQ_w (qsatsrf_w-qsatsrf0_w) beta Ts_x = beta Ts0_x + QQ_x (qsatsrf_x-qsatsrf0_x) |
---|
290 | ! beta phiT_w = beta phiT0_w - HQphiT_w (qsatsrf_w-qsatsrf0_w) beta phiQ_x = beta phiQ0_x - HTphiQ_x (qsatsrf_x-qsatsrf0_x) |
---|
291 | ! beta phiQ_w = beta phiQ0_w - HQphiQ_w (qsatsrf_w-qsatsrf0_w) beta phiQ_x = beta phiQ0_x - HTphiQ_x (qsatsrf_x-qsatsrf0_x) |
---|
292 | ! beta Rn_w = beta Rn0_w - HQRn_w (qsatsrf_w-qsatsrf0_w) beta Rn_x = beta Rn0_x - HTRn_x (qsatsrf_x-qsatsrf0_x) |
---|
293 | ! DFluxDQ coefficients |
---|
294 | ! --------------------- |
---|
295 | ! dqsat_dT equation |
---|
296 | ! QQ_w = 1. / dqsat_dT_w QQ_x = 1. / dqsat_dT_x |
---|
297 | ! Heat flux equation |
---|
298 | ! HQphiT_w = Cp Kech_T_pw QQ_w HQphiT_x = Cp Kech_T_px QQ_x |
---|
299 | ! Moisture flux equation |
---|
300 | ! HQphiQ_w = beta Kech_Q_sw HQphiQ_x = beta Kech_Q_sx |
---|
301 | ! Radiation equation |
---|
302 | ! HQRn_w = (Rp1_w Kech_T_pw BcoefT_w dtime + Rps_w) QQ_w |
---|
303 | ! HQRn_x = (Rp1_x Kech_T_px BcoefT_x dtime + Rps_x) QQ_x |
---|
304 | |
---|
305 | !---------------------------------------------------------------------------- |
---|
306 | ! Mean values and w-x differences |
---|
307 | ! ------------------------------- |
---|
308 | ! HTphiT_b = sigw HTphiT_w + sigx HTphiT_x dd_HTphiT = HTphiT_w - HTphiT_x |
---|
309 | ! HTphiQ_b = sigw HTphiQ_w + sigx HTphiQ_x dd_HTphiQ = HTphiQ_w - HTphiQ_x |
---|
310 | ! HTRn_b = sigw HTRn_w + sigx HTRn_x dd_HTRn = HTRn_w - HTRn_x |
---|
311 | |
---|
312 | ! QQ_b = sigw QQ_w + sigx QQ_x dd_QQ = QQ_w - QQ_x |
---|
313 | ! HQphiT_b = sigw HQphiT_w + sigx HQphiT_x dd_HQphiT = HQphiT_w - HQphiT_x |
---|
314 | ! HQphiQ_b = sigw HQphiQ_w + sigx HQphiQ_x dd_HQphiQ = HQphiQ_w - HQphiQ_x |
---|
315 | ! HQRn_b = sigw HQRn_w + sigx HQRn_x dd_HQRn = HQRn_w - HQRn_x |
---|
316 | |
---|
317 | !---------------------------------------------------------------------------- |
---|
318 | ! Equations |
---|
319 | ! --------- |
---|
320 | ! (1 - g_T) dTs = dTs_ins + Gamma_phiT phiT |
---|
321 | ! (1 - g_Q) dqsatsrf = dqsatsrf_ins + Gamma_phiQ phiQ |
---|
322 | |
---|
323 | ! Feedback Gains |
---|
324 | ! -------------- |
---|
325 | ! g_T = - (sqrt(tau)/I) [ HTphiT_b + Lv HTphiQ_b + HTRn_b + & |
---|
326 | ! (dd_HTphiT + Lv dd_HTphiQ + dd_HTRn) (sigx - sigw - sigw sigx dd_HTphiT/HTphiT_b) ] |
---|
327 | ! g_Q = - (sqrt(tau)/(I QQ_b)) ( HQphiT_b + Lv HQphiQ_b + HQRn_b ) - & |
---|
328 | ! (sigx - sigw - sigw sigx dd_HQphiQ/HQphiQ_b) & |
---|
329 | ! [ dd_QQ/QQ_b + (sqrt(tau)/(I QQ_b))(dd_HQphiT + Lv dd_HQphiQ + dd_HQRn) ] |
---|
330 | |
---|
331 | ! Ts, qs Coupling coefficients / |
---|
332 | ! ---------------------------- |
---|
333 | ! Gamma_phiT = (sqrt(tau)/(I HTphiT_b)) (dd_HTphiT + Lv dd_HTphiQ + dd_HTRn) |
---|
334 | ! Gamma_phiQ = (1/(HQphiQ_b QQ_b)) [ dd_QQ + (sqrt(tau)/(I )) (dd_HQphiT + Lv dd_HQphiQ + dd_HQRn) ] |
---|
335 | |
---|
336 | ! Insensitive changes |
---|
337 | ! ------------------- |
---|
338 | ! dTs_ins = (1 - g_T) dTs0 - Gamma_phiT phiT0_b |
---|
339 | ! dqsatsrf_ins = (1 - g_Q) dqsatsrf0 - Gamma_phiQ phiQ0_b |
---|
340 | |
---|
341 | !---------------------------------------------------------------------------- |
---|
342 | ! Effective coefficients Acoef and Bcoef |
---|
343 | ! -------------------------------------- |
---|
344 | ! Equations |
---|
345 | ! --------- |
---|
346 | ! Cp Ta = AcoefT + BcoefT phiT dtime |
---|
347 | ! qa = AcoefQ + BcoefQ phiQ dtime |
---|
348 | ! Coefficients |
---|
349 | ! ------------ |
---|
350 | ! AcoefT = AcoefT0 - sigw sigx (dd_KTp/Kech_Tp) Cp dTs_ins/(1 - g_T) |
---|
351 | ! BcoefT = BcoefT0 - sigw sigx (dd_KTp/Kech_Tp) Cp Gamma_phiT/(1 - g_T)/dtime |
---|
352 | |
---|
353 | ! AcoefQ = AcoefQ0 - sigw sigx (dd_KQp/Kech_Qp) dqs_ins/(1 - g_Q) |
---|
354 | ! BcoefQ = BcoefQ0 - sigw sigx (dd_KQp/Kech_Qp) Gamma_phiq/(1 - g_Q)/dtime |
---|
355 | |
---|
356 | !============================================================================== |
---|
357 | |
---|
358 | |
---|
359 | ! Parameters |
---|
360 | ! ---------- |
---|
361 | Inert(1:knon) = 2000. |
---|
362 | tau(1:knon) = sqrt(sigw(1:knon)/max(rpi*wdens(1:knon)*wcstar(1:knon)**2 , & |
---|
363 | sigw(1:knon)*1.e-12,smallestreal)) |
---|
364 | sigx(1:knon) = 1.-sigw(1:knon) |
---|
365 | !! Compute Cp, Lv, qsat, dqsat_dT. |
---|
366 | ! C_p(1:knon) = RCpd |
---|
367 | ! L_v(1:knon) = RLvtt |
---|
368 | |
---|
369 | ! print *,' AAAA wx_pbl_dTs, C_p(j), qsat0(j), Ts0(j) : ', C_p(:), qsat0(:), Ts0(:) |
---|
370 | |
---|
371 | |
---|
372 | T10_x(1:knon) = (AT_x(1:knon)/C_p(1:knon) - Kech_h_x(1:knon)*BT_x(1:knon)*dtime*Ts0_x(1:knon))/ & |
---|
373 | (1 - Kech_h_x(1:knon)*BT_x(1:knon)*dtime) |
---|
374 | T10_w(1:knon) = (AT_w(1:knon)/C_p(1:knon) - Kech_h_w(1:knon)*BT_w(1:knon)*dtime*Ts0_w(1:knon))/ & |
---|
375 | (1 - Kech_h_w(1:knon)*BT_w(1:knon)*dtime) |
---|
376 | |
---|
377 | phiT0_x(1:knon) = Kech_T_px(1:knon)*(AT_x(1:knon) - C_p(1:knon)*Ts0_x(1:knon)) |
---|
378 | phiT0_w(1:knon) = Kech_T_pw(1:knon)*(AT_w(1:knon) - C_p(1:knon)*Ts0_w(1:knon)) |
---|
379 | |
---|
380 | phiQ0_x(1:knon) = Kech_Q_sx(1:knon)*(beta(1:knon)*AQ_x(1:knon) - qsatsrf0_x(1:knon)) |
---|
381 | phiQ0_w(1:knon) = Kech_Q_sw(1:knon)*(beta(1:knon)*AQ_w(1:knon) - qsatsrf0_w(1:knon)) |
---|
382 | |
---|
383 | Rn0_x(1:knon) = eps_1*Rsigma*T10_x(1:knon)**4 - Rsigma*Ts0_x(1:knon)**4 |
---|
384 | Rn0_w(1:knon) = eps_1*Rsigma*T10_w(1:knon)**4 - Rsigma*Ts0_w(1:knon)**4 |
---|
385 | |
---|
386 | Rp1_x(1:knon) = 4*eps_1*Rsigma*T10_x(1:knon)**3 |
---|
387 | Rp1_w(1:knon) = 4*eps_1*Rsigma*T10_w(1:knon)**3 |
---|
388 | |
---|
389 | Rps_x(1:knon) = 4*Rsigma*Ts0_x(1:knon)**3 |
---|
390 | Rps_w(1:knon) = 4*Rsigma*Ts0_w(1:knon)**3 |
---|
391 | |
---|
392 | ! DFlux_DT coefficients |
---|
393 | ! --------------------- |
---|
394 | ! Heat flux equation |
---|
395 | HTphiT_x(1:knon) = C_p(1:knon)*Kech_T_px(1:knon) |
---|
396 | HTphiT_w(1:knon) = C_p(1:knon)*Kech_T_pw(1:knon) |
---|
397 | ! Moisture flux equation |
---|
398 | HTphiQ_x(1:knon) = beta(1:knon)*Kech_Q_sx(1:knon)*dqsatdT0_x(1:knon) |
---|
399 | HTphiQ_w(1:knon) = beta(1:knon)*Kech_Q_sw(1:knon)*dqsatdT0_w(1:knon) |
---|
400 | ! Radiation equation |
---|
401 | HTRn_x(1:knon) = Rp1_x(1:knon)*Kech_T_px(1:knon)*BT_x(1:knon)*dtime + Rps_x(1:knon) |
---|
402 | HTRn_w(1:knon) = Rp1_w(1:knon)*Kech_T_pw(1:knon)*BT_w(1:knon)*dtime + Rps_w(1:knon) |
---|
403 | |
---|
404 | ! DFluxDQ coefficients |
---|
405 | ! --------------------- |
---|
406 | ! Heat flux equation |
---|
407 | HQphiT_x(1:knon) = C_p(1:knon)*Kech_T_px(1:knon)*QQ_x(1:knon) |
---|
408 | HQphiT_w(1:knon) = C_p(1:knon)*Kech_T_pw(1:knon)*QQ_w(1:knon) |
---|
409 | ! Moisture flux equation |
---|
410 | HQphiQ_x(1:knon) = beta(1:knon)*Kech_Q_sx(1:knon) |
---|
411 | HQphiQ_w(1:knon) = beta(1:knon)*Kech_Q_sw(1:knon) |
---|
412 | ! Radiation equation |
---|
413 | HQRn_x(1:knon) = (Rp1_x(1:knon)*Kech_T_px(1:knon)*BT_x(1:knon)*dtime + Rps_x(1:knon))*QQ_x(1:knon) |
---|
414 | HQRn_w(1:knon) = (Rp1_w(1:knon)*Kech_T_pw(1:knon)*BT_w(1:knon)*dtime + Rps_w(1:knon))*QQ_w(1:knon) |
---|
415 | |
---|
416 | ! Mean values and w-x differences |
---|
417 | ! ------------------------------- |
---|
418 | phiT0_b(1:knon) = sigw(1:knon)*phiT0_w(1:knon) + sigx(1:knon)*phiT0_x(1:knon) |
---|
419 | phiQ0_b(1:knon) = sigw(1:knon)*phiQ0_w(1:knon) + sigx(1:knon)*phiQ0_x(1:knon) |
---|
420 | Rn0_b(1:knon) = sigw(1:knon)*Rn0_w(1:knon) + sigx(1:knon)*Rn0_x(1:knon) |
---|
421 | |
---|
422 | dphiT0(1:knon) = phiT0_w(1:knon) - phiT0_x(1:knon) |
---|
423 | dphiQ0(1:knon) = phiQ0_w(1:knon) - phiQ0_x(1:knon) |
---|
424 | dRn0(1:knon) = Rn0_w(1:knon) - Rn0_x(1:knon) |
---|
425 | |
---|
426 | HTphiT_b(1:knon) = sigw(1:knon)*HTphiT_w(1:knon) + sigx(1:knon)*HTphiT_x(1:knon) |
---|
427 | dd_HTphiT(1:knon) = HTphiT_w(1:knon) - HTphiT_x(1:knon) |
---|
428 | |
---|
429 | HTphiQ_b(1:knon) = sigw(1:knon)*HTphiQ_w(1:knon) + sigx(1:knon)*HTphiQ_x(1:knon) |
---|
430 | dd_HTphiQ(1:knon) = HTphiQ_w(1:knon) - HTphiQ_x(1:knon) |
---|
431 | |
---|
432 | HTRn_b(1:knon) = sigw(1:knon)*HTRn_w(1:knon) + sigx(1:knon)*HTRn_x(1:knon) |
---|
433 | dd_HTRn(1:knon) = HTRn_w(1:knon) - HTRn_x(1:knon) |
---|
434 | |
---|
435 | HQphiT_b(1:knon) = sigw(1:knon)*HQphiT_w(1:knon) + sigx(1:knon)*HQphiT_x(1:knon) |
---|
436 | dd_HQphiT(1:knon) = HQphiT_w(1:knon) - HQphiT_x(1:knon) |
---|
437 | |
---|
438 | HQphiQ_b(1:knon) = sigw(1:knon)*HQphiQ_w(1:knon) + sigx(1:knon)*HQphiQ_x(1:knon) |
---|
439 | dd_HQphiQ(1:knon) = HQphiQ_w - HQphiQ_x(1:knon) |
---|
440 | |
---|
441 | HQRn_b(1:knon) = sigw(1:knon)*HQRn_w(1:knon) + sigx(1:knon)*HQRn_x(1:knon) |
---|
442 | dd_HQRn(1:knon) = HQRn_w(1:knon) - HQRn_x(1:knon) |
---|
443 | |
---|
444 | ! Feedback Gains |
---|
445 | ! -------------- |
---|
446 | g_T(1:knon) = - (sqrt(tau(1:knon))/Inert(1:knon)) & |
---|
447 | * (HTphiT_b(1:knon) + L_v(1:knon)*HTphiQ_b(1:knon) + HTRn_b(1:knon) & |
---|
448 | + (dd_HTphiT(1:knon) + L_v(1:knon)*dd_HTphiQ(1:knon) + dd_HTRn(1:knon)) & |
---|
449 | * (sigx(1:knon) - sigw(1:knon) - sigw(1:knon)*sigx(1:knon)*dd_HTphiT(1:knon)/HTphiT_b(1:knon)) ) |
---|
450 | |
---|
451 | !!!! DO j = 1,knon |
---|
452 | !!!! IF (mod(j,20) .EQ.0) THEN |
---|
453 | !!!! print *, ' j dd_QQ QQ_b dd_HQphiQ dd_HQphiT dd_HQRn HQphiQ_b HQphiT_b HQRn_b ' |
---|
454 | !!!! ENDIF |
---|
455 | !!!! print 1789, j, dd_QQ(j), QQ_b(j), dd_HQphiQ(j), dd_HQphiT(j), dd_HQRn(j), HQphiQ_b(j), HQphiT_b(j), HQRn_b(j) |
---|
456 | !!!! 1789 FORMAT( I4, 10(1X,E10.2)) |
---|
457 | !!!! ENDDO |
---|
458 | g_Q(1:knon) = - (dd_QQ(1:knon)/QQ_b(1:knon)) * & |
---|
459 | (sigx(1:knon)-sigw(1:knon)-sigw(1:knon)*sigx(1:knon)*dd_KQs(1:knon)/Kech_Qs(1:knon)) & |
---|
460 | - sqrt(tau(1:knon))/(Inert(1:knon)*QQ_b(1:knon)) * & |
---|
461 | ( HQphiT_b(1:knon) + L_v(1:knon)*HQphiQ_b(1:knon) + HQRn_b(1:knon) + & |
---|
462 | (sigx(1:knon) - sigw(1:knon) - sigw(1:knon)*sigx(1:knon)*dd_KQs(1:knon)/Kech_Qs(1:knon)) * & |
---|
463 | (dd_HQphiT(1:knon) + L_v(1:knon)*dd_HQphiQ(1:knon) + dd_HQRn(1:knon)) ) |
---|
464 | |
---|
465 | !! g_Q(1:knon) = - (dd_QQ(1:knon)/QQ_b(1:knon)) * & |
---|
466 | !! (sigx(1:knon)-sigw(1:knon)-sigw(1:knon)*sigx(1:knon)*dd_HQphiQ(1:knon)/HQphiQ_b(1:knon)) & |
---|
467 | !! - sqrt(tau(1:knon))/(Inert(1:knon)*QQ_b(1:knon)) * & |
---|
468 | !! ( HQphiT_b(1:knon) + L_v(1:knon)*HQphiQ_b(1:knon) + HQRn_b(1:knon) + & |
---|
469 | !! (sigx(1:knon) - sigw(1:knon) - sigw(1:knon)*sigx(1:knon)*dd_HQphiQ(1:knon)/HQphiQ_b(1:knon)) * & |
---|
470 | !! (dd_HQphiT(1:knon) + L_v(1:knon)*dd_HQphiQ(1:knon) + dd_HQRn(1:knon)) ) |
---|
471 | |
---|
472 | !! g_Q(1:knon) = - (sqrt(tau(1:knon))/(Inert(1:knon)*QQ_b(1:knon))) * & |
---|
473 | !! ( HQphiT_b(1:knon) + L_v(1:knon)*HQphiQ_b(1:knon) + HQRn_b(1:knon) ) & |
---|
474 | !! - (sigx(1:knon) - sigw(1:knon) - sigw(1:knon)*sigx(1:knon)*dd_HQphiQ(1:knon)/HQphiQ_b(1:knon)) * & |
---|
475 | !! ( dd_QQ(1:knon)/QQ_b(1:knon) & |
---|
476 | !! + (sqrt(tau(1:knon))/(Inert(1:knon)*QQ_b(1:knon))) & |
---|
477 | !! * (dd_HQphiT(1:knon) + L_v(1:knon)*dd_HQphiQ(1:knon) + dd_HQRn(1:knon)) ) |
---|
478 | |
---|
479 | ! Ts, qs Coupling coefficients / |
---|
480 | ! ---------------------------- |
---|
481 | Gamma_phiT(1:knon) = (sqrt(tau(1:knon))/(Inert(1:knon)*HTphiT_b(1:knon))) & |
---|
482 | * (dd_HTphiT(1:knon) + L_v(1:knon)*dd_HTphiQ(1:knon) + dd_HTRn(1:knon)) |
---|
483 | |
---|
484 | Gamma_phiQ(1:knon) = (1./(Kech_Qs(1:knon)*QQ_b(1:knon))) * & |
---|
485 | ( dd_QQ(1:knon) & |
---|
486 | + (sqrt(tau(1:knon))/(Inert(1:knon))) * & |
---|
487 | (dd_HQphiT(1:knon) + L_v(1:knon)*dd_HQphiQ(1:knon) + dd_HQRn(1:knon)) ) |
---|
488 | |
---|
489 | !! Gamma_phiQ(1:knon) = (beta(1:knon)/(HQphiQ_b(1:knon)*QQ_b(1:knon))) * & |
---|
490 | !! ( dd_QQ(1:knon) & |
---|
491 | !! + (sqrt(tau(1:knon))/(Inert(1:knon))) * & |
---|
492 | !! (dd_HQphiT(1:knon) + L_v(1:knon)*dd_HQphiQ(1:knon) + dd_HQRn(1:knon)) ) |
---|
493 | |
---|
494 | !! Gamma_phiQ(1:knon) = (1/(HQphiQ_b(1:knon)*QQ_b(1:knon))) & |
---|
495 | !! * ( dd_QQ(1:knon) & |
---|
496 | !! + (sqrt(tau(1:knon))/(Inert(1:knon))) & |
---|
497 | !! * (dd_HQphiT(1:knon) + L_v(1:knon)*dd_HQphiQ(1:knon) + dd_HQRn(1:knon)) ) |
---|
498 | |
---|
499 | ! Insensitive changes |
---|
500 | ! ------------------- |
---|
501 | dTs_ins(1:knon) = (sqrt(tau(1:knon))/Inert(1:knon))* & |
---|
502 | (dphiT0(1:knon) + L_v(1:knon)*dphiQ0(1:knon) + dRn0(1:knon)) |
---|
503 | |
---|
504 | dqsatsrf_ins(1:knon) = (beta(1:knon)/QQ_b(1:knon))*dTs_ins(1:knon) |
---|
505 | |
---|
506 | IF (prt_level >= 10) THEN |
---|
507 | print *,'wx_pbl_merge, tau ', tau |
---|
508 | print *,'wx_pbl_merge, AcoefT0 ', AcoefT0 |
---|
509 | print *,'wx_pbl_merge, AcoefQ0 ', AcoefQ0 |
---|
510 | print *,'wx_pbl_merge, BcoefT0 ', BcoefT0 |
---|
511 | print *,'wx_pbl_merge, BcoefQ0 ', BcoefQ0 |
---|
512 | print *,'wx_pbl_merge, qsat0_w, qsat0_x ', (qsat0_w(j), qsat0_x(j),j=1,knon) |
---|
513 | print *,'wx_pbl_merge, dqsatdT0_w, dqsatdT0_x ', (dqsatdT0_w(j), dqsatdT0_x(j),j=1,knon) |
---|
514 | ENDIF |
---|
515 | |
---|
516 | !---------------------------------------------------------------------------- |
---|
517 | |
---|
518 | !------------------------------------------------------------------------------ |
---|
519 | |
---|
520 | ! Effective coefficients Acoef and Bcoef |
---|
521 | ! -------------------------------------- |
---|
522 | DO j = 1,knon |
---|
523 | AcoefT(j) = AcoefT0(j) - sigw(j)*sigx(j)*(dd_KTp(j)/Kech_Tp(j))*C_p(j)* & |
---|
524 | (dTs0(j) + (dTs_ins(j)-dTs0(j)-Gamma_phiT(j)*phiT0_b(j))/(1. - g_T(j))) |
---|
525 | BcoefT(j) = BcoefT0(j) - sigw(j)*sigx(j)*(dd_KTp(j)/Kech_Tp(j))*C_p(j)*Gamma_phiT(j)/(1. - g_T(j))/dtime |
---|
526 | |
---|
527 | AcoefQ(j) = AcoefQ0(j) - sigw(j)*sigx(j)*(dd_KQs(j)/Kech_Qs(j))* & |
---|
528 | (dqsatsrf0(j) + (dqsatsrf_ins(j)-(beta(j)/QQ_b(j))*dTs0(j)-Gamma_phiQ(j)*phiQ0_b(j))/(1 - g_Q(j)))/ & |
---|
529 | max(beta(j),1.e-4) |
---|
530 | BcoefQ(j) = BcoefQ0(j) - sigw(j)*sigx(j)*(dd_KQs(j)/Kech_Qs(j))*Gamma_phiQ(j)/(1 - g_Q(j))/ & |
---|
531 | (max(beta(j),1.e-4)*dtime) |
---|
532 | !! AcoefQ(j) = AcoefQ0(j) - sigw(j)*sigx(j)*(dd_KQs(j)/Kech_Qs(j))* & |
---|
533 | !! (dqsatsrf0(j) + (dqsatsrf_ins(j)-(beta(j)/QQ_b(j))*dTs0(j)-Gamma_phiQ(j)*phiQ0_b(j))/(1 - g_Q(j)))/ & |
---|
534 | !! beta(j) |
---|
535 | !! BcoefQ(j) = BcoefQ0(j) - sigw(j)*sigx(j)*(dd_KQs(j)/Kech_Qs(j))*Gamma_phiQ(j)/(1 - g_Q(j))/(beta(j)*dtime) |
---|
536 | ENDDO ! j = 1,knon |
---|
537 | |
---|
538 | IF (prt_level >= 10) THEN |
---|
539 | print *,'wx_pbl_dts AAAA BcoefQ, BcoefQ0, sigw ', & |
---|
540 | BcoefQ, BcoefQ0, sigw |
---|
541 | print *,'wx_pbl_dts_merge, dTs_ins ', dTs_ins |
---|
542 | print *,'wx_pbl_dts_merge, dqs_ins ', dqsatsrf_ins |
---|
543 | ENDIF |
---|
544 | |
---|
545 | |
---|
546 | |
---|
547 | END SUBROUTINE wx_pbl_dts_merge |
---|
548 | |
---|
549 | SUBROUTINE wx_pbl_split(knon, nsrf, dtime, sigw, beta, iflag_split, & |
---|
550 | g_T, g_Q, & |
---|
551 | Gamma_phiT, Gamma_phiQ, & |
---|
552 | dTs_ins, dqsatsrf_ins, & |
---|
553 | phiT, phiQ, phiU, phiV, & |
---|
554 | !!!! HTRn_b, dd_HTRn, HTphiT_b, dd_HTphiT, & |
---|
555 | phiQ0_b, phiT0_b, & |
---|
556 | phiT_x, phiT_w, & |
---|
557 | phiQ_x, phiQ_w, & |
---|
558 | phiU_x, phiU_w, & |
---|
559 | phiV_x, phiV_w, & |
---|
560 | philat_x, philat_w, & |
---|
561 | !!!! Rn_b, dRn, & |
---|
562 | dqsatsrf, & |
---|
563 | dTs, delta_qsurf & |
---|
564 | ) |
---|
565 | |
---|
566 | USE wx_pbl_var_mod |
---|
567 | |
---|
568 | USE lmdz_print_control, ONLY: prt_level,lunout |
---|
569 | USE indice_sol_mod, ONLY: is_oce |
---|
570 | |
---|
571 | INCLUDE "YOMCST.h" |
---|
572 | |
---|
573 | INTEGER, INTENT(IN) :: knon ! number of grid cells |
---|
574 | INTEGER, INTENT(IN) :: nsrf ! surface type |
---|
575 | REAL, INTENT(IN) :: dtime ! time step size (s) |
---|
576 | REAL, DIMENSION(knon), INTENT(IN) :: sigw ! cold pools fractional area |
---|
577 | REAL, DIMENSION(knon), INTENT(IN) :: beta ! aridity factor |
---|
578 | INTEGER, INTENT(IN) :: iflag_split |
---|
579 | REAL, DIMENSION(knon), INTENT(IN) :: g_T, g_Q |
---|
580 | REAL, DIMENSION(knon), INTENT(IN) :: Gamma_phiT, Gamma_phiQ |
---|
581 | REAL, DIMENSION(knon), INTENT(IN) :: dTs_ins, dqsatsrf_ins |
---|
582 | REAL, DIMENSION(knon), INTENT(IN) :: phiT, phiQ, phiU, phiV |
---|
583 | REAL, DIMENSION(knon), INTENT(IN) :: phiQ0_b, phiT0_b |
---|
584 | |
---|
585 | REAL, DIMENSION(knon), INTENT(OUT) :: phiT_x, phiT_w |
---|
586 | REAL, DIMENSION(knon), INTENT(OUT) :: phiQ_x, phiQ_w |
---|
587 | REAL, DIMENSION(knon), INTENT(OUT) :: phiU_x, phiU_w |
---|
588 | REAL, DIMENSION(knon), INTENT(OUT) :: phiV_x, phiV_w |
---|
589 | REAL, DIMENSION(knon), INTENT(OUT) :: philat_x, philat_w |
---|
590 | REAL, DIMENSION(knon), INTENT(OUT) :: dqsatsrf ! beta delta(qsat(Ts)) |
---|
591 | REAL, DIMENSION(knon), INTENT(OUT) :: dTs ! Temperature difference at surface |
---|
592 | REAL, DIMENSION(knon), INTENT(OUT) :: delta_qsurf |
---|
593 | |
---|
594 | !! Local variables |
---|
595 | INTEGER :: j |
---|
596 | REAL, DIMENSION(knon) :: dphiT, dphiQ, dphiU, dphiV |
---|
597 | REAL, DIMENSION(knon) :: q1_x, q1_w |
---|
598 | |
---|
599 | REAL, DIMENSION(knon) :: sigx ! fractional area of (x) region |
---|
600 | |
---|
601 | !---------------------------------------------------------------------------- |
---|
602 | ! Equations |
---|
603 | ! --------- |
---|
604 | !!!!!! (1 - g_T) dTs = dTs_ins + Gamma_phiT phiT |
---|
605 | !!!!!! (1 - g_Q) dqsatsrf = dqsatsrf_ins + Gamma_phiQ phiQ |
---|
606 | !!!!!! dphiT = (dd_KTp/KTp) phiT + ( dd_AT - C_p dTs)*KxKwTp/KTp |
---|
607 | !!!!!! dphiQ = (dd_KQs/KQs) phiQ + (beta dd_AQ - dqsatsrf )*KxKwQs/KQs |
---|
608 | !!!!!! dphiU = (dd_KUp/KUp) phiU + ( dd_AU )*KxKwUp/KUp |
---|
609 | !!!!!! dphiV = (dd_KVp/KVp) phiV + ( dd_AV )*KxKwVp/KVp |
---|
610 | |
---|
611 | ! (1 - g_T) (dTs-dTs0) = dTs_ins-dTs0 + Gamma_phiT (phiT-phiT0) |
---|
612 | ! (1 - g_Q) dqsatsrf = dqsatsrf_ins + Gamma_phiQ phiQ |
---|
613 | ! dphiT = (dd_KTp/KTp) phiT + ( dd_AT - C_p dTs)*KxKwTp/KTp |
---|
614 | ! dphiQ = (dd_KQs/KQs) phiQ + (beta dd_AQ - dqsatsrf )*KxKwQs/KQs |
---|
615 | ! dphiU = (dd_KUp/KUp) phiU + ( dd_AU )*KxKwUp/KUp |
---|
616 | ! dphiV = (dd_KVp/KVp) phiV + ( dd_AV )*KxKwVp/KVp |
---|
617 | |
---|
618 | !! |
---|
619 | sigx(:) = 1.-sigw(:) |
---|
620 | |
---|
621 | ! print *,' AAAA wx_pbl_split, C_p(j), qsat0(j), Ts0(j) : ', C_p(:), qsat0(:), Ts0(:) |
---|
622 | |
---|
623 | IF (iflag_split == 2 .AND. nsrf /= is_oce) THEN |
---|
624 | |
---|
625 | ! Delta_tsurf and Delta_qsurf computation |
---|
626 | ! ----------------------------------------- |
---|
627 | IF (prt_level >=10 ) THEN |
---|
628 | print *,' wx_pbl_split, dTs_ins, dTs0 , Gamma_phiT, g_T ', dTs_ins, dTs0, Gamma_phiT, g_T |
---|
629 | print *,' wx_pbl_split, dqsatsrf_ins, Gamma_phiQ, g_q ', dqsatsrf_ins, Gamma_phiQ, g_q |
---|
630 | ENDIF |
---|
631 | |
---|
632 | DO j = 1,knon |
---|
633 | dTs(j) = dTs0(j) + (dTs_ins(j) - dTs0(j) + Gamma_phiT(j)*(phiT(j)-phiT0_b(j)) )/(1 - g_T(j)) |
---|
634 | dqsatsrf(j) = dqsatsrf0(j) + (dqsatsrf_ins(j) - (beta(j)/QQ_b(j))*dTs0(j) + & |
---|
635 | Gamma_phiQ(j)*(phiQ(j)-phiQ0_b(j)) )/(1 - g_Q(j)) |
---|
636 | ENDDO ! j = 1,knon |
---|
637 | |
---|
638 | IF (prt_level >=10 ) THEN |
---|
639 | print *,' wx_pbl_split, dqsatsrf0, QQ_b ', dqsatsrf0, QQ_b |
---|
640 | print *,' wx_pbl_split, phiT0_b, phiT, dTs ', phiT0_b, phiT, dTs |
---|
641 | print *,' wx_pbl_split, phiQ0_b, phiQ, dqsatsrf ', phiQ0_b, phiQ, dqsatsrf |
---|
642 | ENDIF |
---|
643 | ELSE |
---|
644 | dTs(:) = 0. |
---|
645 | dqsatsrf(:) = 0. |
---|
646 | ENDIF ! (iflag_split .EQ. 2 .AND. nsrf .NE. is_oce) |
---|
647 | |
---|
648 | DO j = 1,knon |
---|
649 | dphiT(j) = (phiT(j)*dd_KTp(j) + ( dd_AT(j) - C_p(j)*dTs(j))*KxKwTp(j))/Kech_Tp(j) |
---|
650 | dphiQ(j) = (phiQ(j)*dd_KQs(j) + (beta(j)*dd_AQ(j) - dqsatsrf(j))*KxKwQs(j))/Kech_Qs(j) |
---|
651 | dphiU(j) = (phiU(j)*dd_KUp(j) + dd_AU(j) *KxKwUp(j))/Kech_Up(j) |
---|
652 | dphiV(j) = (phiV(j)*dd_KVp(j) + dd_AV(j) *KxKwVp(j))/Kech_Vp(j) |
---|
653 | |
---|
654 | phiT_x(j)=phiT(j) - sigw(j)*dphiT(j) |
---|
655 | phiT_w(j)=phiT(j) + sigx(j)*dphiT(j) |
---|
656 | phiQ_x(j)=phiQ(j) - sigw(j)*dphiQ(j) |
---|
657 | phiQ_w(j)=phiQ(j) + sigx(j)*dphiQ(j) |
---|
658 | phiU_x(j)=phiU(j) - sigw(j)*dphiU(j) |
---|
659 | phiU_w(j)=phiU(j) + sigx(j)*dphiU(j) |
---|
660 | phiV_x(j)=phiV(j) - sigw(j)*dphiV(j) |
---|
661 | phiV_w(j)=phiV(j) + sigx(j)*dphiV(j) |
---|
662 | |
---|
663 | philat_x(j)=phiQ_x(j)*RLVTT |
---|
664 | philat_w(j)=phiQ_w(j)*RLVTT |
---|
665 | ENDDO ! j = 1,knon |
---|
666 | |
---|
667 | DO j = 1,knon |
---|
668 | q1_x(j) = AQ_x(j) + BQ_x(j)*phiQ_x(j)*dtime |
---|
669 | q1_w(j) = AQ_w(j) + BQ_w(j)*phiQ_w(j)*dtime |
---|
670 | ENDDO ! j = 1,knon |
---|
671 | DO j = 1,knon |
---|
672 | delta_qsurf(j) = (1.-beta(j))*(q1_w(j) - q1_x(j)) + dqsatsrf(j) |
---|
673 | ENDDO ! j = 1,knon |
---|
674 | |
---|
675 | !! Do j = 1,knon |
---|
676 | !! print *,'XXXsplit : j, q1_x(j), AQ_x(j), BQ_x(j), phiQ_x(j) ', j, q1_x(j), AQ_x(j), BQ_x(j), phiQ_x(j) |
---|
677 | !! print *,'XXXsplit : j, q1_w(j), AQ_w(j), BQ_w(j), phiQ_w(j) ', j, q1_w(j), AQ_w(j), BQ_w(j), phiQ_w(j) |
---|
678 | !! ENDDO |
---|
679 | |
---|
680 | IF (prt_level >=10 ) THEN |
---|
681 | print *,' wx_pbl_split, phiT, dphiT, dTs ', phiT, dphiT, dTs |
---|
682 | print *,' wx_pbl_split, phiQ, dphiQ, dqsatsrf ', phiQ, dphiQ, dqsatsrf |
---|
683 | ENDIF |
---|
684 | |
---|
685 | IF (prt_level >=10 ) THEN |
---|
686 | !! print *,' wx_pbl_split, verif dqsatsrf = beta dqsatdT0 dTs ' |
---|
687 | !! print *,' wx_pbl_split, dqsatsrf, dqsatdT0*dTs ', dqsatsrf, dqsatdT0*dTs |
---|
688 | ENDIF |
---|
689 | |
---|
690 | !! IF (knon .NE. 0) THEN |
---|
691 | !! call iophys_ecrit('sigw', 1,'sigw', '.',sigw) |
---|
692 | !! call iophys_ecrit('phit', 1,'phit', 'W/m2',phit) |
---|
693 | !! call iophys_ecrit('phit_w', 1,'phit_w', 'W/m2',phit_w) |
---|
694 | !! call iophys_ecrit('phit_x', 1,'phit_x', 'W/m2',phit_x) |
---|
695 | !! call iophys_ecrit('phiq', 1,'phiq', 'kg/m2/s',phiq) |
---|
696 | !! call iophys_ecrit('phiq_w', 1,'phiq_w', 'kg/m2/s',phiq_w) |
---|
697 | !! call iophys_ecrit('phiq_x', 1,'phiq_x', 'kg/m2/s',phiq_x) |
---|
698 | !! call iophys_ecrit('q1_w', 1,'q1_w', '.',q1_w) |
---|
699 | !! call iophys_ecrit('q1_x', 1,'q1_x', '.',q1_x) |
---|
700 | !! ENDIF ! (knon .NE. 0) |
---|
701 | |
---|
702 | |
---|
703 | |
---|
704 | END SUBROUTINE wx_pbl_split |
---|
705 | |
---|
706 | SUBROUTINE wx_pbl_check( knon, dtime, ypplay, ypaprs, & |
---|
707 | sigw, beta, iflag_split, & |
---|
708 | Ts0_b9, dTs09, & |
---|
709 | qs_b9, Ts_b9, & ! yqsurf, Tsurf_new |
---|
710 | dTs9, dqsatsrf9, & |
---|
711 | AcoefT_x, AcoefT_w, & |
---|
712 | BcoefT_x, BcoefT_w, & |
---|
713 | AcoefT0, AcoefQ0, BcoefT0, BcoefQ0, & |
---|
714 | AcoefT, AcoefQ, BcoefT, BcoefQ, & |
---|
715 | phiT_b9, phiQ_b9, & |
---|
716 | phiT_x9, phiT_w9, & |
---|
717 | phiQ_x9, phiQ_w9 & |
---|
718 | ) |
---|
719 | |
---|
720 | USE wx_pbl_var_mod |
---|
721 | |
---|
722 | USE lmdz_print_control, ONLY: prt_level,lunout |
---|
723 | |
---|
724 | INCLUDE "YOMCST.h" |
---|
725 | INCLUDE "FCTTRE.h" |
---|
726 | INCLUDE "YOETHF.h" |
---|
727 | |
---|
728 | INTEGER, INTENT(IN) :: knon ! number of grid cells |
---|
729 | REAL, INTENT(IN) :: dtime ! time step size (s) |
---|
730 | REAL, DIMENSION(knon,klev), INTENT(IN) :: ypplay ! mid-layer pressure (Pa) |
---|
731 | REAL, DIMENSION(knon,klev), INTENT(IN) :: ypaprs ! pressure at layer interfaces (pa) |
---|
732 | REAL, DIMENSION(knon), INTENT(IN) :: sigw ! cold pools fractional area |
---|
733 | REAL, DIMENSION(knon), INTENT(IN) :: beta ! aridity factor |
---|
734 | INTEGER, INTENT(IN) :: iflag_split |
---|
735 | REAL, DIMENSION(knon), INTENT(IN) :: Ts0_b9, dTs09 |
---|
736 | REAL, DIMENSION(knon), INTENT(IN) :: qs_b9, Ts_b9 ! yqsurf, Tsurf_new |
---|
737 | REAL, DIMENSION(knon), INTENT(IN) :: dTs9, dqsatsrf9 |
---|
738 | REAL, DIMENSION(knon), INTENT(IN) :: AcoefT_x, AcoefT_w |
---|
739 | REAL, DIMENSION(knon), INTENT(IN) :: BcoefT_x, BcoefT_w |
---|
740 | REAL, DIMENSION(knon), INTENT(IN) :: AcoefT0, AcoefQ0, BcoefT0, BcoefQ0 |
---|
741 | |
---|
742 | REAL, DIMENSION(knon), INTENT(IN) :: AcoefT, AcoefQ, BcoefT, BcoefQ |
---|
743 | REAL, DIMENSION(knon), INTENT(IN) :: phiT_b9, phiQ_b9 |
---|
744 | REAL, DIMENSION(knon), INTENT(IN) :: phiT_x9, phiT_w9 |
---|
745 | REAL, DIMENSION(knon), INTENT(IN) :: phiQ_x9, phiQ_w9 |
---|
746 | |
---|
747 | !! Local variables |
---|
748 | INTEGER :: j |
---|
749 | REAL, DIMENSION(knon) :: sigx ! fractional area of (x) region |
---|
750 | REAL, DIMENSION(knon) :: AcoefT_b, AcoefQ_b ! mean values of AcoefT and AcoefQ |
---|
751 | REAL :: zzt, zzq, zzqsat |
---|
752 | REAL :: zdelta, zcvm5, zcor, qsat |
---|
753 | REAL, DIMENSION(knon) :: qsat_w, qsat_x |
---|
754 | REAL, DIMENSION(knon) :: dqsatdT_w, dqsatdT_x |
---|
755 | REAL, DIMENSION(knon) :: qsat_bs ! qsat(Ts_b) |
---|
756 | REAL, DIMENSION(knon) :: qsat01, dqsatdT01 |
---|
757 | REAL, DIMENSION(knon) :: Ts_x, Ts_w, qs_x, qs_w |
---|
758 | REAL, DIMENSION(knon) :: T1_x, T1_w, q1_x, q1_w |
---|
759 | REAL, DIMENSION(knon) :: Rn_x, Rn_w |
---|
760 | REAL, DIMENSION(knon) :: phiQ0_x, phiQ0_w |
---|
761 | REAL, DIMENSION(knon) :: Ta, qa |
---|
762 | REAL, DIMENSION(knon) :: qsatsrf_w, qsatsrf_x, qsatsrf_b |
---|
763 | REAL, DIMENSION(knon) :: qsurf_w, qsurf_x |
---|
764 | REAL :: dphiT, dphiQ |
---|
765 | REAL :: dqsatsrf1 |
---|
766 | REAL :: phiT_w1, phiT_w2 |
---|
767 | REAL :: phiT_x1, phiT_x2 |
---|
768 | REAL :: phiQ_w1, phiQ_w2, phiQ_w3 |
---|
769 | REAL :: phiQ_x1, phiQ_x2, phiQ_x3 |
---|
770 | REAL :: phiT_b1, phiQ_b1 |
---|
771 | REAL :: Kech_Q_sw1, Kech_Q_sx1 |
---|
772 | REAL :: evap_pot |
---|
773 | |
---|
774 | !---------------------------------------------------------------------------- |
---|
775 | ! Equations to be checked: |
---|
776 | ! ----------------------- |
---|
777 | ! Input : Ts0_b, dTs0, Ts_b, dTs, qsatsrf_b, dqsatsrf, |
---|
778 | ! phiT_b, phiQ_b, phiT_w, phiT_x, phiQ_w, phiQ_x, |
---|
779 | |
---|
780 | ! AcoefT, AcoefQ, AcoefT_w, AcoefQ_w, AcoefT_x, AcoefQ_x, |
---|
781 | ! BcoefT, BcoefQ, BcoefT_w, BcoefQ_w, BcoefT_x, BcoefQ_x |
---|
782 | |
---|
783 | ! C_p T1_w = AcoefT_w + BcoefT_w phiT_w Delta t C_p T1_x = AcoefT_x + BcoefT_x phiT_x Delta t |
---|
784 | ! q1_w = AQ_w + BQ_w phiQ_w Delta t q1_x = AQ_x + BQ_x phiQ_x Delta t |
---|
785 | ! qsatsrf_w = beta qsat(Ts_w) qsatsrf_x = beta qsat(Ts_x) |
---|
786 | ! qsurf_w = (1-beta) q1_w + qsatsrf_w qsurf_x = (1-beta) q1_x + qsatsrf_x |
---|
787 | ! phiT_w = Kech_h_w C_p ( T1_w - Ts_w) phiT_x = Kech_h_x C_p ( T1_x - Ts_x) |
---|
788 | ! phiT_w = Kech_T_pw ( AcoefT_w - C_p Ts_w) phiT_x = Kech_T_px ( AcoefT_x - C_p Ts_x) |
---|
789 | ! phiq_w = Kech_h_w ( beta q1_w - qsatsrf_w) phiq_x = Kech_h_x ( beta q1_x - qsatsrf_x)) |
---|
790 | ! phiq_w = Kech_Q_sw (beta AQ_w -qsatsrf_w) phiq_x = Kech_Q_sx (beta AQ_x -qsatsrf_x) |
---|
791 | ! phiq_w = Kech_h_w (q1_w - qsurf_w) phiq_x = Kech_h_x (q1_x - qsurf_x) |
---|
792 | ! phiT_b = sigw phiT_w + sigx phiT_x dphiT = phiT_w - phiT_x |
---|
793 | ! phiQ_b = sigw phiQ_w + sigx phiQ_x dphiQ = phiQ_w - phiQ_x |
---|
794 | ! Ts_b = sigw Ts_w + sigx Ts_x dTs = Ts_w - Ts_x |
---|
795 | ! qsatsrf_b = sigw qsatsrf_w + sigx qsatsrf_x |
---|
796 | ! C_p Ta = AcoefT + BcoefT phiT_b Delta t |
---|
797 | ! qa = AcoefQ + BcoefQ phiQ_b Delta t |
---|
798 | ! phiT_b = Kech_h C_p (Ta - Ts_b) |
---|
799 | ! phiQ_b = beta Kech_h (qa - qsatsrf_b) |
---|
800 | ! dTs = sqrt(tau)/I (dphit + L_v dphiq + dR) |
---|
801 | |
---|
802 | !---------------------------------------------------------------------------- |
---|
803 | |
---|
804 | !! |
---|
805 | sigx(:) = 1.-sigw(:) |
---|
806 | AcoefT_b(1:knon) = AcoefT_x(1:knon) + sigw(1:knon)*dd_AT(1:knon) |
---|
807 | AcoefQ_b(1:knon) = AQ_x(1:knon) + sigw(1:knon)*dd_AQ(1:knon) |
---|
808 | |
---|
809 | ! Compute the three qsat and dqsatdTs |
---|
810 | ! --------------------------------------------- |
---|
811 | !! C_p(1:knon) = RCpd |
---|
812 | !! L_v(1:knon) = RLvtt |
---|
813 | IF (prt_level >=10 ) THEN |
---|
814 | print *,' AAAA wx_pbl_check, C_p(j), qsat0(j), Ts0(j) : ', C_p(:), qsat0(:), Ts0(:) |
---|
815 | ENDIF ! (prt_level >=10 ) |
---|
816 | |
---|
817 | DO j = 1, knon |
---|
818 | zdelta = MAX(0.,SIGN(1.,RTT-Ts0_b9(j))) |
---|
819 | zcvm5 = R5LES*(1.-zdelta) + R5IES*zdelta |
---|
820 | qsat = R2ES*FOEEW(Ts0_b9(j),zdelta)/ypaprs(j,1) |
---|
821 | qsat = MIN(0.5,qsat) |
---|
822 | zcor = 1./(1.-RETV*qsat) |
---|
823 | qsat01(j) = fqsat*qsat*zcor |
---|
824 | !! dqsatdT0(j) = FOEDE(Ts0_b(j),zdelta,zcvm5,qsat0(j),zcor)/RLVTT ! jyg 20210116 |
---|
825 | !! dqsatdT0(j) = (RLvtt*(1.-zdelta)+RLSTT*zdelta)*qsat0(j)/(Rv*Ts0_b(j)*Ts0_b(j)) |
---|
826 | dqsatdT01(j) = fqsat*FOEDE(Ts0_b9(j),zdelta,zcvm5,qsat01(j),zcor) |
---|
827 | ENDDO |
---|
828 | |
---|
829 | !-------------------------------------------------------------------------------------------------- |
---|
830 | IF (prt_level >=10 ) THEN |
---|
831 | |
---|
832 | DO j = 1, knon |
---|
833 | |
---|
834 | print *,'wx_pbl_check: Kech_h, Kech_q ', Kech_h(j), Kech_q(j) |
---|
835 | |
---|
836 | Ta(j) = (AcoefT(j) + BcoefT(j)*phiT_b9(j)*dtime)/C_p(j) |
---|
837 | qa(j) = AcoefQ(j) + BcoefQ(j)*phiQ_b9(j)*dtime |
---|
838 | print *, 'wx_pbl_check: j, Ta, qa ', Ta(j), qa(j) |
---|
839 | |
---|
840 | qsat_bs(j) = qsat01(j) + dqsatdT01(j)*(Ts_b9(j)-Ts0_b9(j)) |
---|
841 | |
---|
842 | print *,'wx_pbl_check: qsat01, qsat_bs ', j,qsat01(j), qsat_bs(j) |
---|
843 | |
---|
844 | Ts_x(j) = Ts_b9(j) - sigw(j)*dTs9(j) |
---|
845 | Ts_w(j) = Ts_b9(j) + sigx(j)*dTs9(j) |
---|
846 | print *, 'wx_pbl_check: j, Ts_b9, Ts_w, Ts_x ', j, Ts_b9(j), Ts_w(j), Ts_x(j) |
---|
847 | |
---|
848 | qsat_x(j) = qsat0_x(j) + dqsatdT0_x(j)*(Ts_x(j)-Ts0_x(j)) |
---|
849 | qsat_w(j) = qsat0_w(j) + dqsatdT0_w(j)*(Ts_w(j)-Ts0_w(j)) |
---|
850 | |
---|
851 | print *,'wx_pbl_check: qsat0_w, qsat0_x, qsat_w, qsat_x ', qsat0_w(j), qsat0_x(j), qsat_w(j), qsat_x(j) |
---|
852 | |
---|
853 | T1_x(j) = (AcoefT_x(j) + BcoefT_x(j)*phiT_x9(j)*dtime) / C_p(j) |
---|
854 | T1_w(j) = (AcoefT_w(j) + BcoefT_w(j)*phiT_w9(j)*dtime) / C_p(j) |
---|
855 | print *, 'wx_pbl_check: j, T1_w, T1_x ', j, T1_w(j), T1_x(j) |
---|
856 | |
---|
857 | q1_x(j) = AQ_x(j) + BQ_x(j)*phiQ_x9(j)*dtime |
---|
858 | q1_w(j) = AQ_w(j) + BQ_w(j)*phiQ_w9(j)*dtime |
---|
859 | print *, 'wx_pbl_check: j, q1_w, q1_x ', j, q1_w(j), q1_x(j) |
---|
860 | |
---|
861 | qsatsrf_x(j) = beta(j)*qsat_x(j) |
---|
862 | qsatsrf_w(j) = beta(j)*qsat_w(j) |
---|
863 | qsatsrf_b(j) = sigw(j)*qsatsrf_w(j) + sigx(j)*qsatsrf_x(j) |
---|
864 | |
---|
865 | dqsatsrf1 = qsatsrf_w(j) - qsatsrf_x(j) |
---|
866 | print *, 'wx_pbl_check: j, qsatsrf_w, qsatsrf_x, dqsatsrf1, dqsatsrf9 ', & |
---|
867 | qsatsrf_w(j), qsatsrf_x(j), dqsatsrf1, dqsatsrf9(j) |
---|
868 | |
---|
869 | qsurf_x(j) = (1-beta(j))*q1_x(j) + qsatsrf_x(j) |
---|
870 | qsurf_w(j) = (1-beta(j))*q1_w(j) + qsatsrf_w(j) |
---|
871 | print *, 'wx_pbl_check: j, qsurf_w, qsurf_x ', j, qsurf_w(j), qsurf_x(j) |
---|
872 | |
---|
873 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
874 | ! Test qsat01 = qsat0 et dqsatdT01 = dqsatdT0 |
---|
875 | !------------------------------------------------------------------------------------------------------ |
---|
876 | print *, 'wx_pbl_check: j, qsat01(j), qsat0(j) ', j, qsat01(j), qsat0(j) |
---|
877 | print *, 'wx_pbl_check: j, dqsatdT01(j), dqsatdT0(j) ', j, dqsatdT01(j), dqsatdT0(j) |
---|
878 | |
---|
879 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
880 | ! Test Kexh_Q_sw = Kech_q_w/(1.-beta*Kech_q_w*BcoefQ) Kexh_Q_sx = Kech_q_x/(1.-beta*Kech_q_x*BcoefQ) |
---|
881 | !------------------------------------------------------------------------------------------------------ |
---|
882 | Kech_Q_sx1 = Kech_q_x(j)/(1.-beta(j)*Kech_q_x(j)*BQ_x(j)*dtime) |
---|
883 | Kech_Q_sw1 = Kech_q_w(j)/(1.-beta(j)*Kech_q_w(j)*BQ_w(j)*dtime) |
---|
884 | print *, 'wx_pbl_check: j, Kech_Q_sx1, Kech_Q_sx(j)', j, Kech_Q_sx1, Kech_Q_sx(j) |
---|
885 | print *, 'wx_pbl_check: j, Kech_Q_sw1, Kech_Q_sw(j)', j, Kech_Q_sw1, Kech_Q_sw(j) |
---|
886 | |
---|
887 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
888 | ! Test phiT_w = Kech_h_w*C_p(j)*(T1_w(j)-Ts_w(j)) phiT_x = Kech_h_x*C_p(j)*(T1_x(j)-Ts_x(j)) |
---|
889 | !----------------------------------------------------- |
---|
890 | phiT_x1 = Kech_h_x(j)*C_p(j)*(T1_x(j)-Ts_x(j)) |
---|
891 | phiT_w1 = Kech_h_w(j)*C_p(j)*(T1_w(j)-Ts_w(j)) |
---|
892 | |
---|
893 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
894 | ! Test phiT_w = Kech_T_pw*(AcoefT_w(j)-C_p(j)*Ts_w(j)) phiT_x = Kech_T_px*(AcoefT_x(j)-C_p(j)*Ts_x(j)) |
---|
895 | !----------------------------------------------------- |
---|
896 | phiT_x2 = Kech_T_px(j)*(AcoefT_x(j)-C_p(j)*Ts_x(j)) |
---|
897 | phiT_w2 = Kech_T_pw(j)*(AcoefT_w(j)-C_p(j)*Ts_w(j)) |
---|
898 | print *, 'wx_pbl_check: j, phiT_w1, phiT_w2, phiT_w9 ', j, phiT_w1, phiT_w2, phiT_w9(j) |
---|
899 | print *, 'wx_pbl_check: j, phiT_x1, phiT_x2, phiT_x9 ', j, phiT_x1, phiT_x2, phiT_x9(j) |
---|
900 | |
---|
901 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
902 | ! Test phiq_w = Kech_q_w ( beta q1_w - qsatsrf_w) phiq_x = Kech_q_x ( beta q1_x - qsatsrf_x)) |
---|
903 | !-------------------------------------------------------------- |
---|
904 | phiq_x1 = Kech_q_x(j)*( beta(j)*q1_x(j) - qsatsrf_x(j)) |
---|
905 | phiq_w1 = Kech_q_w(j)*( beta(j)*q1_w(j) - qsatsrf_w(j)) |
---|
906 | |
---|
907 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
908 | ! Test phiq_w = Kech_Q_sw (beta AQ_w -qsatsrf_w) phiq_x = Kech_Q_sx (beta AQ_x -qsatsrf_x) |
---|
909 | !-------------------------------------------------------------- |
---|
910 | phiq_x2 = Kech_Q_sx(j)*(beta(j)*AQ_x(j) -qsatsrf_x(j)) |
---|
911 | phiq_w2 = Kech_Q_sw(j)*(beta(j)*AQ_w(j) -qsatsrf_w(j)) |
---|
912 | |
---|
913 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
914 | ! Test phiq_w = Kech_q_w ( q1_w - qsurf_w) phiq_x = Kech_q_x ( q1_x - qsurf_x)) |
---|
915 | !-------------------------------------------------------------- |
---|
916 | phiq_x3 = Kech_q_x(j)*( q1_x(j) - qsurf_x(j)) |
---|
917 | phiq_w3 = Kech_q_w(j)*( q1_w(j) - qsurf_w(j)) |
---|
918 | print *, 'wx_pbl_check: j, phiQ_w1, phiQ_w2, phiQ_w3, phiQ_w9 ', j, phiQ_w1, phiQ_w2, phiQ_w3, phiQ_w9(j) |
---|
919 | print *, 'wx_pbl_check: j, phiQ_x1, phiQ_x2, phiQ_x3, phiQ_x9 ', j, phiQ_x1, phiQ_x2, phiQ_x3, phiQ_x9(j) |
---|
920 | |
---|
921 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
922 | ! Test phiT_b = Kech_h C_p (Ta - Ts_b) |
---|
923 | !-------------------------------------------------------------- |
---|
924 | phiT_b1 = Kech_h(j)*C_p(j)*(Ta(j) - Ts_b9(j)) |
---|
925 | print *, 'wx_pbl_check: j, phiT_b1, PhiT_b9 ', j, phiT_b1, PhiT_b9(j) |
---|
926 | |
---|
927 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
928 | ! Test phiQ_b = beta Kech_q (qa - qsat_bs) |
---|
929 | !-------------------------------------------------------------- |
---|
930 | evap_pot = Kech_q(j)*(qa(j) - qsat_bs(j)) |
---|
931 | phiQ_b1 = beta(j)*Kech_q(j)*(qa(j) - qsat_bs(j)) |
---|
932 | print *, 'wx_pbl_check: j, beta, evap_pot, phiQ_b1, PhiQ_b9 ', j, beta(j), evap_pot, phiQ_b1, PhiQ_b9(j) |
---|
933 | |
---|
934 | |
---|
935 | ENDDO ! j = 1, knon |
---|
936 | |
---|
937 | ENDIF ! (prt_level >=10 ) |
---|
938 | !-------------------------------------------------------------------------------------------------- |
---|
939 | |
---|
940 | |
---|
941 | |
---|
942 | END SUBROUTINE wx_pbl_check |
---|
943 | |
---|
944 | SUBROUTINE wx_pbl_dts_check( knon, dtime, ypplay, ypaprs, & |
---|
945 | sigw, beta, iflag_split, & |
---|
946 | Ts0_b9, dTs09, & |
---|
947 | qs_b9, Ts_b9, & ! yqsurf, Tsurf_new |
---|
948 | dqsatsrf9, dTs9, delta_qsurf9, & |
---|
949 | AcoefT_x, AcoefT_w, & |
---|
950 | BcoefT_x, BcoefT_w, & |
---|
951 | AcoefT0, AcoefQ0, BcoefT0, BcoefQ0, & |
---|
952 | AcoefT, AcoefQ, BcoefT, BcoefQ, & |
---|
953 | HTphiT_b, dd_HTphiT, HTphiQ_b, dd_HTphiQ, HTRn_b, dd_HTRn, & |
---|
954 | phiT0_b9, dphiT09, phiQ0_b9, dphiQ09, Rn0_b9, dRn09, & |
---|
955 | g_T, g_Q, & |
---|
956 | Gamma_phiT, Gamma_phiQ, & |
---|
957 | dTs_ins, dqsatsrf_ins, & |
---|
958 | phiT_b9, phiQ_b9, & |
---|
959 | phiT_x9, phiT_w9, & |
---|
960 | phiQ_x9, phiQ_w9 & |
---|
961 | ) |
---|
962 | |
---|
963 | USE wx_pbl_var_mod |
---|
964 | |
---|
965 | USE lmdz_print_control, ONLY: prt_level,lunout |
---|
966 | |
---|
967 | INCLUDE "YOMCST.h" |
---|
968 | INCLUDE "FCTTRE.h" |
---|
969 | INCLUDE "YOETHF.h" |
---|
970 | |
---|
971 | INTEGER, INTENT(IN) :: knon ! number of grid cells |
---|
972 | REAL, INTENT(IN) :: dtime ! time step size (s) |
---|
973 | REAL, DIMENSION(knon,klev), INTENT(IN) :: ypplay ! mid-layer pressure (Pa) |
---|
974 | REAL, DIMENSION(knon,klev), INTENT(IN) :: ypaprs ! pressure at layer interfaces (pa) |
---|
975 | REAL, DIMENSION(knon), INTENT(IN) :: sigw ! cold pools fractional area |
---|
976 | REAL, DIMENSION(knon), INTENT(IN) :: beta ! aridity factor |
---|
977 | INTEGER, INTENT(IN) :: iflag_split |
---|
978 | REAL, DIMENSION(knon), INTENT(IN) :: Ts0_b9, dTs09 |
---|
979 | REAL, DIMENSION(knon), INTENT(IN) :: qs_b9, Ts_b9 ! yqsurf, Tsurf_new |
---|
980 | REAL, DIMENSION(knon), INTENT(IN) :: dTs9, dqsatsrf9 |
---|
981 | REAL, DIMENSION(knon), INTENT(IN) :: delta_qsurf9 |
---|
982 | REAL, DIMENSION(knon), INTENT(IN) :: AcoefT_x, AcoefT_w |
---|
983 | REAL, DIMENSION(knon), INTENT(IN) :: BcoefT_x, BcoefT_w |
---|
984 | REAL, DIMENSION(knon), INTENT(IN) :: AcoefT0, AcoefQ0, BcoefT0, BcoefQ0 |
---|
985 | |
---|
986 | REAL, DIMENSION(knon), INTENT(IN) :: AcoefT, AcoefQ, BcoefT, BcoefQ |
---|
987 | REAL, DIMENSION(knon), INTENT(IN) :: HTphiT_b, dd_HTphiT, HTphiQ_b, dd_HTphiQ, HTRn_b, dd_HTRn |
---|
988 | REAL, DIMENSION(knon), INTENT(IN) :: phiT0_b9, dphiT09, phiQ0_b9, dphiQ09, Rn0_b9, dRn09 |
---|
989 | REAL, DIMENSION(knon), INTENT(IN) :: g_T, g_Q |
---|
990 | REAL, DIMENSION(knon), INTENT(IN) :: Gamma_phiT, Gamma_phiQ |
---|
991 | REAL, DIMENSION(knon), INTENT(IN) :: dTs_ins, dqsatsrf_ins |
---|
992 | REAL, DIMENSION(knon), INTENT(IN) :: phiT_b9, phiQ_b9 |
---|
993 | REAL, DIMENSION(knon), INTENT(IN) :: phiT_x9, phiT_w9 |
---|
994 | REAL, DIMENSION(knon), INTENT(IN) :: phiQ_x9, phiQ_w9 |
---|
995 | |
---|
996 | !! Local variables |
---|
997 | INTEGER :: j |
---|
998 | REAL, DIMENSION(knon) :: sigx ! fractional area of (x) region |
---|
999 | REAL, DIMENSION(knon) :: AcoefT_b, AcoefQ_b ! mean values of AcoefT and AcoefQ |
---|
1000 | REAL :: zzt, zzq, zzqsat |
---|
1001 | REAL :: zdelta, zcvm5, zcor, qsat |
---|
1002 | REAL, DIMENSION(knon) :: qsat_w, qsat_x |
---|
1003 | REAL, DIMENSION(knon) :: Ts_x, Ts_w, qs_x, qs_w |
---|
1004 | REAL, DIMENSION(knon) :: T1_x, T1_w, q1_x, q1_w |
---|
1005 | REAL, DIMENSION(knon) :: Rn_x, Rn_w |
---|
1006 | REAL, DIMENSION(knon) :: Rn_b, dRn |
---|
1007 | REAL, DIMENSION(knon) :: phiQ0_x, phiQ0_w |
---|
1008 | REAL, DIMENSION(knon) :: Ta, qa |
---|
1009 | REAL, DIMENSION(knon) :: err_phiT_w, err_phiT_x |
---|
1010 | REAL, DIMENSION(knon) :: err_phiq_w, err_phiq_x |
---|
1011 | REAL, DIMENSION(knon) :: err_phiT_b |
---|
1012 | REAL, DIMENSION(knon) :: err_phiQ_b |
---|
1013 | REAL, DIMENSION(knon) :: err2_phiT_b |
---|
1014 | REAL :: T1A_x, T1A_w, q1A_x, q1A_w |
---|
1015 | REAL :: qsatsrf_w, qsatsrf_x, qsatsrfb, qsbA |
---|
1016 | REAL :: dphiT, dphiQ |
---|
1017 | REAL :: dphiT_H, dphiQ_H |
---|
1018 | REAL :: phiQ_pot |
---|
1019 | REAL :: phiQ_w_m_phiQ0_w |
---|
1020 | REAL :: phiQ_x_m_phiQ0_x |
---|
1021 | REAL :: dphiQ_m_dphiQ0 |
---|
1022 | REAL :: dphiT_m_dphiT0 |
---|
1023 | REAL :: dRN_m_dRn0 |
---|
1024 | REAL :: phiTb_m_phiT0b |
---|
1025 | |
---|
1026 | !---------------------------------------------------------------------------- |
---|
1027 | ! Equations to be checked: |
---|
1028 | ! ----------------------- |
---|
1029 | ! Input : Ts0_b, dTs0, Ts_b, dTs, qsatsrf_b, dqsatsrf, |
---|
1030 | ! phiT_b, phiQ_b, phiT_w, phiT_x, phiQ_w, phiQ_x, |
---|
1031 | |
---|
1032 | ! AcoefT, AcoefQ, AcoefT_w, AcoefQ_w, AcoefT_x, AcoefQ_x, |
---|
1033 | ! BcoefT, BcoefQ, BcoefT_w, BcoefQ_w, BcoefT_x, BcoefQ_x |
---|
1034 | |
---|
1035 | ! Ts_w = Ts_b + sigx dTs Ts_x = Ts_b - sigw dTs |
---|
1036 | ! T1_w = AcoefT_w + BcoefT_w phiT_w Delta t T1_x = AcoefT_x + BcoefT_x phiT_x Delta t |
---|
1037 | ! q1_w = AcoefQ_w + BcoefQ_w phiQ_w Delta t q1_x = AcoefQ_x + BcoefQ_x phiQ_x Delta t |
---|
1038 | ! phiT_w = Kech_h_w ( T1_w - Ts_w) phiT_x = Kech_h_x ( T1_x - Ts_x) |
---|
1039 | ! phiq_w = beta Kech_h_w ( q1_w - qsat(Ts_w)) phiq_x = beta Kech_h_x ( q1_x - qsat(Ts_x)) |
---|
1040 | ! phiT_b = sigw phiT_w + sigx phiT_x dphiT = phiT_w - phiT_x |
---|
1041 | ! phiQ_b = sigw phiQ_w + sigx phiQ_x dphiQ = phiQ_w - phiQ_x |
---|
1042 | ! Ts_b = sigw Ts_w + sigx Ts_x dTs = Ts_w - Ts_x |
---|
1043 | ! Ta = AcoefT + BcoefT phiT_b Delta t |
---|
1044 | ! qa = AcoefQ + BcoefQ phiQ_b Delta t |
---|
1045 | ! phiT_b = Kech_h (Ta - Ts_b) |
---|
1046 | ! phiQ_b = beta Kech_h (qa - qsat(Ts_b)) |
---|
1047 | ! dTs = sqrt(tau)/I (dphit + L_v dphiq + dR) |
---|
1048 | |
---|
1049 | !---------------------------------------------------------------------------- |
---|
1050 | |
---|
1051 | !! |
---|
1052 | sigx(:) = 1.-sigw(:) |
---|
1053 | AcoefT_b(1:knon) = AcoefT_x(1:knon) + sigw(1:knon)*dd_AT(1:knon) |
---|
1054 | AcoefQ_b(1:knon) = AQ_x(1:knon) + sigw(1:knon)*dd_AQ(1:knon) |
---|
1055 | |
---|
1056 | IF (prt_level >=10 ) THEN |
---|
1057 | print *,'->wx_pbl_dts_check, HTphiT_b, HTphiQ_b, HTRn_b ', & |
---|
1058 | HTphiT_b, HTphiQ_b, HTRn_b |
---|
1059 | print *,'->wx_pbl_dts_check, dd_HTphiT, dd_HTphiQ, dd_HTRn ', & |
---|
1060 | dd_HTphiT, dd_HTphiQ, dd_HTRn |
---|
1061 | ENDIF ! (prt_level >=10 ) |
---|
1062 | |
---|
1063 | ! Compute the three qsat and dqsatdTs |
---|
1064 | ! --------------------------------------------- |
---|
1065 | !! print *,' AAAA wx_pbl_dts_check, C_p(j), qsat0(j), Ts0(j) : ', & |
---|
1066 | !! (C_p(j), qsat0(j), Ts0(j), j = 1,knon) |
---|
1067 | |
---|
1068 | |
---|
1069 | !-------------------------------------------------------------------------------------------------- |
---|
1070 | IF (prt_level >=10 ) THEN |
---|
1071 | |
---|
1072 | DO j = 1, knon |
---|
1073 | Ts_x(j) = Ts_b9(j) - sigw(j)*dTs9(j) |
---|
1074 | Ts_w(j) = Ts_b9(j) + sigx(j)*dTs9(j) |
---|
1075 | print *, 'wx_pbl_dts_check: j, Ts_b9, Ts_w, Ts_x ', j, Ts_b9(j), Ts_w(j), Ts_x(j) |
---|
1076 | |
---|
1077 | qsat_x(j) = qsat0_x(j) + dqsatdT0_x(j)*(Ts_x(j)-Ts0_x(j)) |
---|
1078 | qsat_w(j) = qsat0_w(j) + dqsatdT0_w(j)*(Ts_w(j)-Ts0_w(j)) |
---|
1079 | |
---|
1080 | T1_x(j) = (AcoefT_x(j) + BcoefT_x(j)*phiT_x9(j)*dtime) / C_p(j) |
---|
1081 | T1_w(j) = (AcoefT_w(j) + BcoefT_w(j)*phiT_w9(j)*dtime) / C_p(j) |
---|
1082 | print *, 'wx_pbl_dts_check: j, T1_w, T1_x ', j, T1_w(j), T1_x(j) |
---|
1083 | |
---|
1084 | q1_x(j) = AQ_x(j) + BQ_x(j)*phiQ_x9(j)*dtime |
---|
1085 | q1_w(j) = AQ_w(j) + BQ_w(j)*phiQ_w9(j)*dtime |
---|
1086 | print *, 'wx_pbl_dts_check: j, q1_w, q1_x ', j, q1_w(j), q1_x(j) |
---|
1087 | |
---|
1088 | Rn_x(j) = eps_1*Rsigma*T1_x(j)**4 - Rsigma*Ts_x(j)**4 |
---|
1089 | Rn_w(j) = eps_1*Rsigma*T1_w(j)**4 - Rsigma*Ts_w(j)**4 |
---|
1090 | Rn_b(j) = sigw(j)*Rn_w(j) + sigx(j)*Rn_x(j) |
---|
1091 | dRn(j) = dRn09(j) - ( HTRn_b(j) & |
---|
1092 | +(sigx(j)-sigw(j))*dd_HTRn(j) & |
---|
1093 | -sigw(j)*sigx(j)*dd_HTRn(j)*dd_HTphiT(j)/HTphiT_b(j) & |
---|
1094 | )*(dTs9(j)-dTs09(j)) & |
---|
1095 | + dd_HTRn(j)/HTphiT_b(j)*(phiT_b9(j)-phiT0_b9(j)) |
---|
1096 | |
---|
1097 | print *,'wx_pbl_dts_check, dphiT, L_v*dphiQ, dRn, dTs ', & |
---|
1098 | phiT_w9(j)-phiT_x9(j), L_v(j)*(phiQ_w9(j)-phiQ_x9(j)), dRn(j), dTs9(j) |
---|
1099 | |
---|
1100 | phiQ0_x(j) = PhiQ0_b9(j) - sigw(j)*dphiQ09(j) |
---|
1101 | phiQ0_w(j) = PhiQ0_b9(j) + sigx(j)*dphiQ09(j) |
---|
1102 | |
---|
1103 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1104 | ! Test phiQ_w-phiQ0_w = -beta*Kech_Q_sw*dqsatdT_w*(Ts_w-Ts0_w) |
---|
1105 | !-------------------------------------------------------------- |
---|
1106 | print *,'wx_pbl_dts_check: beta(j), Kech_Q_sw(j), dqsatdT0_w(j), Ts_w(j), Ts0_w(j) ', & |
---|
1107 | beta(j), Kech_Q_sw(j), dqsatdT0_w(j), Ts_w(j), Ts0_w(j) |
---|
1108 | phiQ_w_m_phiQ0_w = -beta(j)*Kech_Q_sw(j)*dqsatdT0_w(j)*(Ts_w(j)-Ts0_w(j)) |
---|
1109 | print *,'wx_pbl_dts_check: j, phiQ_w9-phiQ0_w, phiQ_w_m_phiQ0_w ', & |
---|
1110 | j, phiQ_w9(j)-phiQ0_w(j), phiQ_w_m_phiQ0_w |
---|
1111 | |
---|
1112 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1113 | ! Test phiQ_x-phiQ0_x = -beta*Kech_Q_sx*dqsatdT_x*(Ts_x-Ts0_x) |
---|
1114 | !-------------------------------------------------------------- |
---|
1115 | phiQ_x_m_phiQ0_x = -beta(j)*Kech_Q_sx(j)*dqsatdT0_x(j)*(Ts_x(j)-Ts0_x(j)) |
---|
1116 | print *,'wx_pbl_dts_check: j, phiQ_x9-phiQ0_x, phiQ_x_m_phiQ0_x ', & |
---|
1117 | j, phiQ_x9(j)-phiQ0_x(j), phiQ_x_m_phiQ0_x |
---|
1118 | |
---|
1119 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1120 | ! Test dphiT-dphiT0 = -(HTphiT_b+(sigx-sigw)*dd_HTphiT)*(dTs-dTs0) - dd_HTphiT*(Ts_b-Ts0_b) |
---|
1121 | !------------------------------------------------------------------------------------------- |
---|
1122 | dphiT = phiT_w9(j) - phiT_x9(j) |
---|
1123 | dphiT_m_dphiT0 = -(HTphiT_b(j)+(sigx(j)-sigw(j))*dd_HTphiT(j))*(dTs9(j)-dTs09(j)) & |
---|
1124 | - dd_HTphiT(j)*(Ts_b9(j)-Ts0_b9(j)) |
---|
1125 | print *,'wx_pbl_dts_check: j, dphiT-dphiT09, dphiT_m_dphiT0 ',j, dphiT-dphiT09(j), dphiT_m_dphiT0 |
---|
1126 | |
---|
1127 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1128 | ! Test dphiQ-dphiQ0 = -(HTphiQ_b+(sigx-sigw)*dd_HTphiQ)*(dTs-dTs0) - dd_HTphiQ*(Ts_b-Ts0_b) |
---|
1129 | !------------------------------------------------------------------------------------------- |
---|
1130 | dphiQ = phiQ_w9(j) - phiQ_x9(j) |
---|
1131 | dphiQ_m_dphiQ0 = -(HTphiQ_b(j)+(sigx(j)-sigw(j))*dd_HTphiQ(j))*(dTs9(j)-dTs09(j)) & |
---|
1132 | - dd_HTphiQ(j)*(Ts_b9(j)-Ts0_b9(j)) |
---|
1133 | print *,'wx_pbl_dts_check: j, dphiQ-dphiQ09, dphiQ_m_dphiQ0 ',j, dphiQ-dphiQ09(j), dphiQ_m_dphiQ0 |
---|
1134 | |
---|
1135 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1136 | ! Test dRn-dRn0 = -(HTRn_b+(sigx-sigw)*dd_HTRn)*(dTs-dTs0) - dd_HTRn*(Ts_b-Ts0_b) |
---|
1137 | !------------------------------------------------------------------------------------------- |
---|
1138 | dRn_m_dRn0 = -(HTRn_b(j)+(sigx(j)-sigw(j))*dd_HTRn(j))*(dTs9(j)-dTs09(j)) & |
---|
1139 | - dd_HTRn(j)*(Ts_b9(j)-Ts0_b9(j)) |
---|
1140 | print *,'wx_pbl_dts_check: j, dRn-dRn09, dRn_m_dRn0 ',j, dRn-dRn09(j), dRn_m_dRn0 |
---|
1141 | |
---|
1142 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1143 | ! Test phiT_b-phiT0_b = -sigx*sigw*dd_HTphiT*(dTs-dTs0) - HTphiT_b*(Ts_b-Ts0_b) |
---|
1144 | !------------------------------------------------------------------------------- |
---|
1145 | phiTb_m_phiT0b = -sigx(j)*sigw(j)*dd_HTphiT(j)*(dTs9(j)-dTs09(j)) - HTphiT_b(j)*(Ts_b9(j)-Ts0_b9(j)) |
---|
1146 | print *,'wx_pbl_dts_check: j, phiT_b9-phiT0_b9, phiTb_m_phiT0b ',j ,phiT_b9(j)-phiT0_b9(j), phiTb_m_phiT0b |
---|
1147 | |
---|
1148 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1149 | ! Test phiT_w, phiT_x, dphiT from HTphiT |
---|
1150 | !------------------------------------------ |
---|
1151 | ! phiT_w = Kech_h_w C_p ( T1_w - Ts_w) phiT_x = Kech_h_x C_p ( T1_x - Ts_x) |
---|
1152 | err_phiT_x(j) = Kech_h_x(j)*C_p(j)*(T1_x(j) - Ts_x(j)) - phiT_x9(j) |
---|
1153 | err_phiT_w(j) = Kech_h_w(j)*C_p(j)*(T1_w(j) - Ts_w(j)) - phiT_w9(j) |
---|
1154 | print *, 'wx_pbl_dts_check: j, phiT_w9, phiT_x9, err_phiT_w, err_phiT_x ', & |
---|
1155 | j, phiT_w9(j), phiT_x9(j), err_phiT_w(j), err_phiT_x(j) |
---|
1156 | dphiT = phiT_w9(j) - phiT_x9(j) |
---|
1157 | dphiT_H = dphiT09(j) - ( HTphiT_b(j) & |
---|
1158 | +(sigx(j)-sigw(j))*dd_HTphiT(j) & |
---|
1159 | -sigw(j)*sigx(j)*dd_HTphiT(j)*dd_HTphiT(j)/HTphiT_b(j) & |
---|
1160 | )*(dTs9(j)-dTs09(j)) & |
---|
1161 | + dd_HTphiT(j)/HTphiT_b(j)*(phiT_b9(j)-phiT0_b9(j)) |
---|
1162 | print *,'wx_pbl_dts_check: j, dphiT, dphiT_H ', j, dphiT, dphiT_H |
---|
1163 | |
---|
1164 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
1165 | ! Test phiq_w, phiq_x, dphiq from HTphiq |
---|
1166 | !------------------------------------------ |
---|
1167 | |
---|
1168 | ! phiq_w = beta Kech_q_w ( q1_w - qsat(Ts_w)) phiq_x = beta Kech_q_x ( q1_x - qsat(Ts_x)) |
---|
1169 | err_phiq_x(j) = beta(j)*Kech_q_x(j)*( q1_x(j) - qsat_x(j)) - phiq_x9(j) |
---|
1170 | err_phiq_w(j) = beta(j)*Kech_q_w(j)*( q1_w(j) - qsat_w(j)) - phiq_w9(j) |
---|
1171 | dphiQ = phiQ_w9(j) - phiQ_x9(j) |
---|
1172 | dphiQ_H = dphiQ09(j) - ( HTphiQ_b(j) & |
---|
1173 | +(sigx(j)-sigw(j))*dd_HTphiQ(j) & |
---|
1174 | -sigw(j)*sigx(j)*dd_HTphiQ(j)*dd_HTphiT(j)/HTphiT_b(j) & |
---|
1175 | )*(dTs9(j)-dTs09(j)) & |
---|
1176 | + dd_HTphiQ(j)/HTphiT_b(j)*(phiT_b9(j)-phiT0_b9(j)) |
---|
1177 | print *,'wx_pbl_dts_check: j, dphiQ, dphiQ_H ', j, dphiQ, dphiQ_H |
---|
1178 | |
---|
1179 | ! phiT_b = sigw phiT_w + sigx phiT_x dphiT = phiT_w - phiT_x |
---|
1180 | err_phiT_b(j) = sigw(j)*phiT_w9(j) + sigx(j)*phiT_x9(j) - phiT_b9(j) |
---|
1181 | |
---|
1182 | ! phiQ_b = sigw phiQ_w + sigx phiQ_x dphiQ = phiQ_w - phiQ_x |
---|
1183 | err_phiQ_b(j) = sigw(j)*phiQ_w9(j) + sigx(j)*phiQ_x9(j) - phiQ_b9(j) |
---|
1184 | |
---|
1185 | ! Ta = AcoefT + BcoefT phiT_b Delta t |
---|
1186 | ! phiT_b = Kech_h C_p (Ta - Ts_b) |
---|
1187 | Ta(j) = (AcoefT(j) + BcoefT(j)*phiT_b9(j)*dtime) / C_p(j) |
---|
1188 | err2_phiT_b(j) = Kech_h(j)*C_p(j)*(Ta(j) - Ts_b9(j)) - phiT_b9(j) |
---|
1189 | print *, 'wx_pbl_dts_check: j, Ta, phiT_b9, err2_phiT_b ', & |
---|
1190 | j, Ta(j), phiT_b9(j), err2_phiT_b(j) |
---|
1191 | |
---|
1192 | ENDDO ! j = 1, knon |
---|
1193 | |
---|
1194 | ENDIF ! (prt_level >=10 ) |
---|
1195 | !-------------------------------------------------------------------------------------------------- |
---|
1196 | |
---|
1197 | |
---|
1198 | END SUBROUTINE wx_pbl_dts_check |
---|
1199 | |
---|
1200 | SUBROUTINE wx_evappot(knon, q1, Ts, evap_pot) |
---|
1201 | |
---|
1202 | USE wx_pbl_var_mod |
---|
1203 | |
---|
1204 | INTEGER, INTENT(IN) :: knon ! number of grid cells |
---|
1205 | REAL, DIMENSION(knon), INTENT(IN) :: q1 ! specific humidity in layer 1 |
---|
1206 | REAL, DIMENSION(knon), INTENT(IN) :: Ts ! surface temperature |
---|
1207 | |
---|
1208 | REAL, DIMENSION(knon), INTENT(OUT) :: evap_pot ! potential evaporation |
---|
1209 | |
---|
1210 | INTEGER :: j |
---|
1211 | REAL :: qsat_bs |
---|
1212 | |
---|
1213 | DO j = 1,knon |
---|
1214 | evap_pot(j) = Kech_q(j)*(qsat0(j)+dqsatdT0(j)*(Ts(j)-Ts0(j))-q1(j)) |
---|
1215 | |
---|
1216 | qsat_bs = qsat0(j)+dqsatdT0(j)*(Ts(j)-Ts0(j)) |
---|
1217 | !! print *,'wx_evappot : Kech_q, qsat_bs, qa, evap_pot ', Kech_q(j), qsat_bs, q1(j), evap_pot(j) |
---|
1218 | ENDDO |
---|
1219 | |
---|
1220 | |
---|
1221 | END SUBROUTINE wx_evappot |
---|
1222 | |
---|
1223 | END MODULE wx_pbl_mod |
---|
1224 | |
---|