1 | !WRF:MEDIATION_LAYER:PHYSICS |
---|
2 | ! |
---|
3 | |
---|
4 | MODULE module_pbl_driver |
---|
5 | CONTAINS |
---|
6 | |
---|
7 | !------------------------------------------------------------------ |
---|
8 | SUBROUTINE pbl_driver( & |
---|
9 | itimestep,dt,u_frame,v_frame & |
---|
10 | ,rublten,rvblten,rthblten & |
---|
11 | ,tsk,xland,znt,ht & |
---|
12 | ,ust,pblh,hfx,qfx,grdflx & |
---|
13 | ,u_phy,v_phy,th_phy,rho & |
---|
14 | ,p_phy,pi_phy,p8w,t_phy,dz8w,z & |
---|
15 | ,tke_myj,el_myj,exch_h,akhs,akms & |
---|
16 | ,thz0,qz0,uz0,vz0,qsfc & |
---|
17 | ,lowlyr & |
---|
18 | ,psim,psih,gz1oz0, wspd,br,chklowq & |
---|
19 | ,bl_pbl_physics, ra_lw_physics, dx & |
---|
20 | ,stepbl,warm_rain & |
---|
21 | ,kpbl,ct,lh,snow,xice & |
---|
22 | ,ids,ide, jds,jde, kds,kde & |
---|
23 | ,ims,ime, jms,jme, kms,kme & |
---|
24 | ,i_start,i_end, j_start,j_end, kts,kte, num_tiles & |
---|
25 | ! Optional |
---|
26 | ,hol, mol, regime & |
---|
27 | ! Optional moisture tracers |
---|
28 | ,qv_curr, qc_curr, qr_curr & |
---|
29 | ,qi_curr, qs_curr, qg_curr & |
---|
30 | ,rqvblten,rqcblten,rqiblten & |
---|
31 | ,rqrblten,rqsblten,rqgblten & |
---|
32 | ! Optional moisture tracer flags |
---|
33 | ,f_qv,f_qc,f_qr & |
---|
34 | ,f_qi,f_qs,f_qg & |
---|
35 | ) |
---|
36 | !------------------------------------------------------------------ |
---|
37 | USE module_state_description, ONLY : & |
---|
38 | YSUSCHEME,MRFSCHEME,GFSSCHEME,MYJPBLSCHEME |
---|
39 | |
---|
40 | USE module_model_constants |
---|
41 | |
---|
42 | ! *** add new modules of schemes here |
---|
43 | |
---|
44 | USE module_bl_myjpbl |
---|
45 | USE module_bl_ysu |
---|
46 | USE module_bl_mrf |
---|
47 | USE module_bl_gfs |
---|
48 | |
---|
49 | ! This driver calls subroutines for the PBL parameterizations. |
---|
50 | ! |
---|
51 | ! pbl scheme: |
---|
52 | ! 1. ysupbl |
---|
53 | ! 2. myjpbl |
---|
54 | ! 99. mrfpbl |
---|
55 | ! |
---|
56 | !------------------------------------------------------------------ |
---|
57 | IMPLICIT NONE |
---|
58 | !====================================================================== |
---|
59 | ! Grid structure in physics part of WRF |
---|
60 | !---------------------------------------------------------------------- |
---|
61 | ! The horizontal velocities used in the physics are unstaggered |
---|
62 | ! relative to temperature/moisture variables. All predicted |
---|
63 | ! variables are carried at half levels except w, which is at full |
---|
64 | ! levels. Some arrays with names (*8w) are at w (full) levels. |
---|
65 | ! |
---|
66 | !---------------------------------------------------------------------- |
---|
67 | ! In WRF, kms (smallest number) is the bottom level and kme (largest |
---|
68 | ! number) is the top level. In your scheme, if 1 is at the top level, |
---|
69 | ! then you have to reverse the order in the k direction. |
---|
70 | ! |
---|
71 | ! kme - half level (no data at this level) |
---|
72 | ! kme ----- full level |
---|
73 | ! kme-1 - half level |
---|
74 | ! kme-1 ----- full level |
---|
75 | ! . |
---|
76 | ! . |
---|
77 | ! . |
---|
78 | ! kms+2 - half level |
---|
79 | ! kms+2 ----- full level |
---|
80 | ! kms+1 - half level |
---|
81 | ! kms+1 ----- full level |
---|
82 | ! kms - half level |
---|
83 | ! kms ----- full level |
---|
84 | ! |
---|
85 | !====================================================================== |
---|
86 | ! Definitions |
---|
87 | !----------- |
---|
88 | ! Rho_d dry density (kg/m^3) |
---|
89 | ! Theta_m moist potential temperature (K) |
---|
90 | ! Qv water vapor mixing ratio (kg/kg) |
---|
91 | ! Qc cloud water mixing ratio (kg/kg) |
---|
92 | ! Qr rain water mixing ratio (kg/kg) |
---|
93 | ! Qi cloud ice mixing ratio (kg/kg) |
---|
94 | ! Qs snow mixing ratio (kg/kg) |
---|
95 | !----------------------------------------------------------------- |
---|
96 | !-- RUBLTEN U tendency due to |
---|
97 | ! PBL parameterization (m/s^2) |
---|
98 | !-- RVBLTEN V tendency due to |
---|
99 | ! PBL parameterization (m/s^2) |
---|
100 | !-- RTHBLTEN Theta tendency due to |
---|
101 | ! PBL parameterization (K/s) |
---|
102 | !-- RQVBLTEN Qv tendency due to |
---|
103 | ! PBL parameterization (kg/kg/s) |
---|
104 | !-- RQCBLTEN Qc tendency due to |
---|
105 | ! PBL parameterization (kg/kg/s) |
---|
106 | !-- RQIBLTEN Qi tendency due to |
---|
107 | ! PBL parameterization (kg/kg/s) |
---|
108 | !-- itimestep number of time steps |
---|
109 | !-- GLW downward long wave flux at ground surface (W/m^2) |
---|
110 | !-- GSW downward short wave flux at ground surface (W/m^2) |
---|
111 | !-- EMISS surface emissivity (between 0 and 1) |
---|
112 | !-- TSK surface temperature (K) |
---|
113 | !-- TMN soil temperature at lower boundary (K) |
---|
114 | !-- XLAND land mask (1 for land, 2 for water) |
---|
115 | !-- ZNT roughness length (m) |
---|
116 | !-- MAVAIL surface moisture availability (between 0 and 1) |
---|
117 | !-- UST u* in similarity theory (m/s) |
---|
118 | !-- MOL T* (similarity theory) (K) |
---|
119 | !-- HOL PBL height over Monin-Obukhov length |
---|
120 | !-- PBLH PBL height (m) |
---|
121 | !-- CAPG heat capacity for soil (J/K/m^3) |
---|
122 | !-- THC thermal inertia (Cal/cm/K/s^0.5) |
---|
123 | !-- SNOWC flag indicating snow coverage (1 for snow cover) |
---|
124 | !-- HFX upward heat flux at the surface (W/m^2) |
---|
125 | !-- QFX upward moisture flux at the surface (kg/m^2/s) |
---|
126 | !-- REGIME flag indicating PBL regime (stable, unstable, etc.) |
---|
127 | !-- tke_myj turbulence kinetic energy from Mellor-Yamada-Janjic (MYJ) (m^2/s^2) |
---|
128 | !-- el_myj mixing length from Mellor-Yamada-Janjic (MYJ) (m) |
---|
129 | !-- akhs sfc exchange coefficient of heat/moisture from MYJ |
---|
130 | !-- akms sfc exchange coefficient of momentum from MYJ |
---|
131 | !-- thz0 potential temperature at roughness length (K) |
---|
132 | !-- uz0 u wind component at roughness length (m/s) |
---|
133 | !-- vz0 v wind component at roughness length (m/s) |
---|
134 | !-- qsfc specific humidity at lower boundary (kg/kg) |
---|
135 | !-- th2 diagnostic 2-m theta from surface layer and lsm |
---|
136 | !-- t2 diagnostic 2-m temperature from surface layer and lsm |
---|
137 | !-- q2 diagnostic 2-m mixing ratio from surface layer and lsm |
---|
138 | !-- lowlyr index of lowest model layer above ground |
---|
139 | !-- rr dry air density (kg/m^3) |
---|
140 | !-- u_phy u-velocity interpolated to theta points (m/s) |
---|
141 | !-- v_phy v-velocity interpolated to theta points (m/s) |
---|
142 | !-- th_phy potential temperature (K) |
---|
143 | !-- p_phy pressure (Pa) |
---|
144 | !-- pi_phy exner function (dimensionless) |
---|
145 | !-- p8w pressure at full levels (Pa) |
---|
146 | !-- t_phy temperature (K) |
---|
147 | !-- dz8w dz between full levels (m) |
---|
148 | !-- z height above sea level (m) |
---|
149 | !-- DX horizontal space interval (m) |
---|
150 | !-- DT time step (second) |
---|
151 | !-- n_moist number of moisture species |
---|
152 | !-- PSFC pressure at the surface (Pa) |
---|
153 | !-- TSLB |
---|
154 | !-- ZS |
---|
155 | !-- DZS |
---|
156 | !-- num_soil_layers number of soil layer |
---|
157 | !-- IFSNOW ifsnow=1 for snow-cover effects |
---|
158 | ! |
---|
159 | !-- P_QV species index for water vapor |
---|
160 | !-- P_QC species index for cloud water |
---|
161 | !-- P_QR species index for rain water |
---|
162 | !-- P_QI species index for cloud ice |
---|
163 | !-- P_QS species index for snow |
---|
164 | !-- P_QG species index for graupel |
---|
165 | !-- ids start index for i in domain |
---|
166 | !-- ide end index for i in domain |
---|
167 | !-- jds start index for j in domain |
---|
168 | !-- jde end index for j in domain |
---|
169 | !-- kds start index for k in domain |
---|
170 | !-- kde end index for k in domain |
---|
171 | !-- ims start index for i in memory |
---|
172 | !-- ime end index for i in memory |
---|
173 | !-- jms start index for j in memory |
---|
174 | !-- jme end index for j in memory |
---|
175 | !-- kms start index for k in memory |
---|
176 | !-- kme end index for k in memory |
---|
177 | !-- jts start index for j in tile |
---|
178 | !-- jte end index for j in tile |
---|
179 | !-- kts start index for k in tile |
---|
180 | !-- kte end index for k in tile |
---|
181 | ! |
---|
182 | !****************************************************************** |
---|
183 | !------------------------------------------------------------------ |
---|
184 | ! |
---|
185 | |
---|
186 | |
---|
187 | INTEGER, INTENT(IN ) :: bl_pbl_physics, ra_lw_physics |
---|
188 | |
---|
189 | INTEGER, INTENT(IN ) :: ids,ide, jds,jde, kds,kde, & |
---|
190 | ims,ime, jms,jme, kms,kme, & |
---|
191 | kts,kte, num_tiles |
---|
192 | |
---|
193 | INTEGER, DIMENSION(num_tiles), INTENT(IN) :: & |
---|
194 | & i_start,i_end,j_start,j_end |
---|
195 | |
---|
196 | INTEGER, INTENT(IN ) :: itimestep,STEPBL |
---|
197 | INTEGER, DIMENSION( ims:ime , jms:jme ), & |
---|
198 | INTENT(IN ) :: LOWLYR |
---|
199 | ! |
---|
200 | LOGICAL, INTENT(IN ) :: warm_rain |
---|
201 | ! |
---|
202 | REAL, INTENT(IN ) :: DT,DX |
---|
203 | |
---|
204 | |
---|
205 | ! |
---|
206 | REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), & |
---|
207 | INTENT(IN ) :: p_phy, & |
---|
208 | pi_phy, & |
---|
209 | p8w, & |
---|
210 | rho, & |
---|
211 | t_phy, & |
---|
212 | u_phy, & |
---|
213 | v_phy, & |
---|
214 | dz8w, & |
---|
215 | z, & |
---|
216 | th_phy |
---|
217 | ! |
---|
218 | ! |
---|
219 | REAL, DIMENSION( ims:ime , jms:jme ), & |
---|
220 | INTENT(IN ) :: XLAND, & |
---|
221 | HT, & |
---|
222 | PSIM, & |
---|
223 | PSIH, & |
---|
224 | GZ1OZ0, & |
---|
225 | BR, & |
---|
226 | CHKLOWQ |
---|
227 | ! |
---|
228 | REAL, DIMENSION( ims:ime, jms:jme ) , & |
---|
229 | INTENT(INOUT) :: TSK, & |
---|
230 | UST, & |
---|
231 | PBLH, & |
---|
232 | HFX, & |
---|
233 | QFX, & |
---|
234 | ZNT, & |
---|
235 | QSFC, & |
---|
236 | AKHS, & |
---|
237 | AKMS, & |
---|
238 | QZ0, & |
---|
239 | THZ0, & |
---|
240 | UZ0, & |
---|
241 | VZ0, & |
---|
242 | CT, & |
---|
243 | GRDFLX , & |
---|
244 | WSPD |
---|
245 | |
---|
246 | ! |
---|
247 | REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), & |
---|
248 | INTENT(INOUT) :: RUBLTEN, & |
---|
249 | RVBLTEN, & |
---|
250 | RTHBLTEN, & |
---|
251 | EXCH_H,TKE_MYJ |
---|
252 | ! |
---|
253 | REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), & |
---|
254 | INTENT(OUT) :: EL_MYJ |
---|
255 | |
---|
256 | REAL , INTENT(IN ) :: u_frame, & |
---|
257 | v_frame |
---|
258 | ! |
---|
259 | |
---|
260 | INTEGER, DIMENSION( ims:ime , jms:jme ), & |
---|
261 | INTENT(INOUT) :: KPBL |
---|
262 | |
---|
263 | REAL, DIMENSION( ims:ime , jms:jme ), & |
---|
264 | INTENT(IN) :: XICE, SNOW, LH |
---|
265 | |
---|
266 | ! |
---|
267 | ! Optional |
---|
268 | ! |
---|
269 | ! |
---|
270 | ! Flags relating to the optional tendency arrays declared above |
---|
271 | ! Models that carry the optional tendencies will provdide the |
---|
272 | ! optional arguments at compile time; these flags all the model |
---|
273 | ! to determine at run-time whether a particular tracer is in |
---|
274 | ! use or not. |
---|
275 | ! |
---|
276 | LOGICAL, INTENT(IN), OPTIONAL :: & |
---|
277 | f_qv & |
---|
278 | ,f_qc & |
---|
279 | ,f_qr & |
---|
280 | ,f_qi & |
---|
281 | ,f_qs & |
---|
282 | ,f_qg |
---|
283 | |
---|
284 | REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), & |
---|
285 | OPTIONAL, INTENT(INOUT) :: & |
---|
286 | ! optional moisture tracers |
---|
287 | ! 2 time levels; if only one then use CURR |
---|
288 | qv_curr, qc_curr, qr_curr & |
---|
289 | ,qi_curr, qs_curr, qg_curr & |
---|
290 | ,rqvblten,rqcblten,rqrblten & |
---|
291 | ,rqiblten,rqsblten,rqgblten |
---|
292 | |
---|
293 | REAL, DIMENSION( ims:ime, jms:jme ) , & |
---|
294 | OPTIONAL , & |
---|
295 | INTENT(INOUT) :: HOL, & |
---|
296 | MOL, & |
---|
297 | REGIME |
---|
298 | |
---|
299 | ! LOCAL VAR |
---|
300 | |
---|
301 | REAL, DIMENSION( ims:ime, kms:kme, jms:jme ) ::v_phytmp |
---|
302 | REAL, DIMENSION( ims:ime, kms:kme, jms:jme ) ::u_phytmp |
---|
303 | |
---|
304 | REAL, DIMENSION( ims:ime, jms:jme ) :: TSKOLD, & |
---|
305 | USTOLD, & |
---|
306 | ZNTOLD, & |
---|
307 | ZOL, & |
---|
308 | PSFC |
---|
309 | |
---|
310 | ! |
---|
311 | |
---|
312 | REAL :: DTMIN,DTBL |
---|
313 | ! |
---|
314 | INTEGER :: i,J,K,NK,jj,ij,its,ite,jts,jte |
---|
315 | LOGICAL :: radiation |
---|
316 | LOGICAL :: flag_qv, flag_qc, flag_qr, flag_qi, flag_qs, flag_qg |
---|
317 | CHARACTER*256 :: message |
---|
318 | |
---|
319 | !------------------------------------------------------------------ |
---|
320 | ! |
---|
321 | |
---|
322 | flag_qv = .FALSE. ; IF ( PRESENT( F_QV ) ) flag_qv = F_QV |
---|
323 | flag_qc = .FALSE. ; IF ( PRESENT( F_QC ) ) flag_qv = F_QC |
---|
324 | flag_qr = .FALSE. ; IF ( PRESENT( F_QR ) ) flag_qv = F_QR |
---|
325 | flag_qi = .FALSE. ; IF ( PRESENT( F_QI ) ) flag_qv = F_QI |
---|
326 | flag_qs = .FALSE. ; IF ( PRESENT( F_QS ) ) flag_qv = F_QS |
---|
327 | flag_qg = .FALSE. ; IF ( PRESENT( F_QG ) ) flag_qv = F_QG |
---|
328 | |
---|
329 | |
---|
330 | if (bl_pbl_physics .eq. 0) return |
---|
331 | ! RAINBL in mm (Accumulation between PBL calls) |
---|
332 | |
---|
333 | |
---|
334 | IF (itimestep .eq. 1 .or. mod(itimestep,STEPBL) .eq. 0) THEN |
---|
335 | |
---|
336 | radiation = .false. |
---|
337 | IF (ra_lw_physics .gt. 0) radiation = .true. |
---|
338 | |
---|
339 | !---- |
---|
340 | ! CALCULATE CONSTANT |
---|
341 | |
---|
342 | DTMIN=DT/60. |
---|
343 | ! PBL schemes need PBL time step for updates |
---|
344 | DTBL=DT*STEPBL |
---|
345 | |
---|
346 | ! SAVE OLD VALUES |
---|
347 | |
---|
348 | !$OMP PARALLEL DO & |
---|
349 | !$OMP PRIVATE ( ij,i,j,k ) |
---|
350 | DO ij = 1 , num_tiles |
---|
351 | DO j=j_start(ij),j_end(ij) |
---|
352 | DO i=i_start(ij),i_end(ij) |
---|
353 | TSKOLD(i,j)=TSK(i,j) |
---|
354 | USTOLD(i,j)=UST(i,j) |
---|
355 | ZNTOLD(i,j)=ZNT(i,j) |
---|
356 | |
---|
357 | ! REVERSE ORDER IN THE VERTICAL DIRECTION |
---|
358 | |
---|
359 | ! testing change later |
---|
360 | |
---|
361 | DO k=kts,kte |
---|
362 | v_phytmp(i,k,j)=v_phy(i,k,j)+v_frame |
---|
363 | u_phytmp(i,k,j)=u_phy(i,k,j)+u_frame |
---|
364 | ENDDO |
---|
365 | |
---|
366 | ! PSFC : in Pa |
---|
367 | |
---|
368 | PSFC(I,J)=p8w(I,kms,J) |
---|
369 | |
---|
370 | DO k=kts,min(kte+1,kde) |
---|
371 | RTHBLTEN(I,K,J)=0. |
---|
372 | RUBLTEN(I,K,J)=0. |
---|
373 | RVBLTEN(I,K,J)=0. |
---|
374 | IF ( PRESENT( RQCBLTEN )) RQCBLTEN(I,K,J)=0. |
---|
375 | IF ( PRESENT( RQVBLTEN )) RQVBLTEN(I,K,J)=0. |
---|
376 | ENDDO |
---|
377 | |
---|
378 | IF (flag_QI .AND. PRESENT(RQIBLTEN) ) THEN |
---|
379 | DO k=kts,min(kte+1,kde) |
---|
380 | RQIBLTEN(I,K,J)=0. |
---|
381 | ENDDO |
---|
382 | ENDIF |
---|
383 | ENDDO |
---|
384 | ENDDO |
---|
385 | |
---|
386 | ENDDO |
---|
387 | !$OMP END PARALLEL DO |
---|
388 | ! |
---|
389 | !$OMP PARALLEL DO & |
---|
390 | !$OMP PRIVATE ( ij, i,j,k, its, ite, jts, jte ) |
---|
391 | DO ij = 1 , num_tiles |
---|
392 | |
---|
393 | its = i_start(ij) |
---|
394 | ite = i_end(ij) |
---|
395 | jts = j_start(ij) |
---|
396 | jte = j_end(ij) |
---|
397 | |
---|
398 | pbl_select: SELECT CASE(bl_pbl_physics) |
---|
399 | |
---|
400 | CASE (YSUSCHEME) |
---|
401 | CALL wrf_debug(100,'in YSU PBL') |
---|
402 | IF ( PRESENT( qv_curr ) .AND. PRESENT( qc_curr ) .AND. & |
---|
403 | PRESENT( qi_curr ) .AND. & |
---|
404 | PRESENT( rqvblten ) .AND. PRESENT( rqcblten ) .AND. & |
---|
405 | PRESENT( rqiblten ) .AND. & |
---|
406 | PRESENT( hol ) .AND. & |
---|
407 | .TRUE. ) THEN |
---|
408 | CALL ysu( & |
---|
409 | U3D=u_phytmp,V3D=v_phytmp,TH3D=th_phy,T3D=t_phy & |
---|
410 | ,QV3D=qv_curr,QC3D=qc_curr,QI3D=qi_curr & |
---|
411 | ,P3D=p_phy,PI3D=pi_phy & |
---|
412 | ,RUBLTEN=rublten,RVBLTEN=rvblten & |
---|
413 | ,RTHBLTEN=rthblten,RQVBLTEN=rqvblten & |
---|
414 | ,RQCBLTEN=rqcblten,RQIBLTEN=rqiblten & |
---|
415 | ,CP=cp,G=g,ROVCP=rcp,RD=r_D,ROVG=rovg & |
---|
416 | ,DZ8W=dz8w,Z=z,XLV=XLV,RV=r_v,PSFC=PSFC & |
---|
417 | ,ZNT=znt,UST=ust,ZOL=zol,HOL=hol,HPBL=pblh & |
---|
418 | ,PSIM=psim,PSIH=psih,XLAND=xland & |
---|
419 | ,HFX=hfx,QFX=qfx,TSK=tskold,GZ1OZ0=gz1oz0 & |
---|
420 | ,WSPD=wspd,BR=br,DT=dtbl,DTMIN=dtmin,KPBL2D=kpbl & |
---|
421 | ,SVP1=svp1,SVP2=svp2,SVP3=svp3,SVPT0=svpt0 & |
---|
422 | ,EP1=ep_1,EP2=ep_2,KARMAN=karman,EOMEG=eomeg & |
---|
423 | ,STBOLT=stbolt,EXCH_H=exch_h,REGIME=regime & |
---|
424 | ,IDS=ids,IDE=ide,JDS=jds,JDE=jde,KDS=kds,KDE=kde & |
---|
425 | ,IMS=ims,IME=ime,JMS=jms,JME=jme,KMS=kms,KME=kme & |
---|
426 | ,ITS=its,ITE=ite,JTS=jts,JTE=jte,KTS=kts,KTE=kte & |
---|
427 | ) |
---|
428 | ELSE |
---|
429 | CALL wrf_error_fatal('Lack arguments to call YSU pbl') |
---|
430 | ENDIF |
---|
431 | |
---|
432 | CASE (MRFSCHEME) |
---|
433 | IF ( PRESENT( qv_curr ) .AND. PRESENT( qc_curr ) .AND. & |
---|
434 | PRESENT( rqvblten ) .AND. PRESENT( rqcblten ) .AND. & |
---|
435 | PRESENT( hol ) .AND. & |
---|
436 | .TRUE. ) THEN |
---|
437 | |
---|
438 | CALL wrf_debug(100,'in MRF') |
---|
439 | CALL mrf( & |
---|
440 | U3D=u_phytmp,V3D=v_phytmp,TH3D=th_phy,T3D=t_phy & |
---|
441 | ,QV3D=qv_curr & |
---|
442 | ,QC3D=qc_curr & |
---|
443 | ,QI3D=qi_curr & |
---|
444 | ,P3D=p_phy,PI3D=pi_phy & |
---|
445 | ,RUBLTEN=rublten,RVBLTEN=rvblten & |
---|
446 | ,RTHBLTEN=rthblten,RQVBLTEN=rqvblten & |
---|
447 | ,RQCBLTEN=rqcblten,RQIBLTEN=rqiblten & |
---|
448 | ,CP=cp,G=g,ROVCP=rcp,R=r_d,ROVG=rovg & |
---|
449 | ,DZ8W=dz8w,Z=z,XLV=xlv,RV=r_v,PSFC=psfc & |
---|
450 | ,ZNT=znt,UST=ust,ZOL=zol,HOL=hol & |
---|
451 | ,PBL=pblh,PSIM=psim,PSIH=psih & |
---|
452 | ,XLAND=xland,HFX=hfx,QFX=qfx,TSK=tskold & |
---|
453 | ,GZ1OZ0=gz1oz0,WSPD=wspd,BR=br & |
---|
454 | ,DT=dtbl,DTMIN=dtmin,KPBL2D=kpbl & |
---|
455 | ,SVP1=svp1,SVP2=svp2,SVP3=svp3,SVPT0=svpt0 & |
---|
456 | ,EP1=ep_1,EP2=ep_2,KARMAN=karman,EOMEG=eomeg & |
---|
457 | ,STBOLT=stbolt,REGIME=regime & |
---|
458 | ,FLAG_QI=flag_qi & |
---|
459 | ,IDS=ids,IDE=ide,JDS=jds,JDE=jde,KDS=kds,KDE=kde & |
---|
460 | ,IMS=ims,IME=ime,JMS=jms,JME=jme,KMS=kms,KME=kme & |
---|
461 | ,ITS=its,ITE=ite,JTS=jts,JTE=jte,KTS=kts,KTE=kte & |
---|
462 | ) |
---|
463 | ELSE |
---|
464 | CALL wrf_error_fatal('Lack arguments to call MRF pbl') |
---|
465 | ENDIF |
---|
466 | |
---|
467 | CASE (GFSSCHEME) |
---|
468 | IF ( PRESENT( qv_curr ) .AND. PRESENT( qc_curr ) .AND. & |
---|
469 | PRESENT( rqvblten ) .AND. PRESENT( rqcblten ) .AND. & |
---|
470 | .TRUE. ) THEN |
---|
471 | CALL wrf_debug(100,'in GFS') |
---|
472 | CALL bl_gfs( & |
---|
473 | U3D=u_phytmp,V3D=v_phytmp & |
---|
474 | ,TH3D=th_phy,T3D=t_phy & |
---|
475 | ,QV3D=qv_curr,QC3D=qc_curr,QI3D=qi_curr & |
---|
476 | ,P3D=p_phy,PI3D=pi_phy & |
---|
477 | ,RUBLTEN=rublten,RVBLTEN=rvblten,RTHBLTEN=rthblten & |
---|
478 | ,RQVBLTEN=rqvblten,RQCBLTEN=rqcblten & |
---|
479 | ,RQIBLTEN=rqiblten & |
---|
480 | ,CP=cp,G=g,ROVCP=rcp,R=r_d,ROVG=rovg,FLAG_QI=flag_qi & |
---|
481 | ,DZ8W=dz8w,z=z,PSFC=psfc & |
---|
482 | ,UST=ust,PBL=pblh,PSIM=psim,PSIH=psih & |
---|
483 | ,HFX=hfx,QFX=qfx,TSK=tskold,GZ1OZ0=gz1oz0 & |
---|
484 | ,WSPD=wspd,BR=br & |
---|
485 | ,DT=dtbl,KPBL2D=kpbl,EP1=ep_1,KARMAN=karman & |
---|
486 | ,IDS=ids,IDE=ide,JDS=jds,JDE=jde,KDS=kds,KDE=kde & |
---|
487 | ,IMS=ims,IME=ime,JMS=jms,JME=jme,KMS=kms,KME=kme & |
---|
488 | ,ITS=its,ITE=ite,JTS=jts,JTE=jte,KTS=kts,KTE=kte & |
---|
489 | ) |
---|
490 | ELSE |
---|
491 | CALL wrf_error_fatal('Lack arguments to call GFS pbl') |
---|
492 | ENDIF |
---|
493 | |
---|
494 | CASE (MYJPBLSCHEME) |
---|
495 | IF ( PRESENT( qv_curr ) .AND. PRESENT( qc_curr ) .AND. & |
---|
496 | PRESENT( rqvblten ) .AND. PRESENT( rqcblten ) .AND. & |
---|
497 | .TRUE. ) THEN |
---|
498 | |
---|
499 | CALL wrf_debug(100,'in MYJPBL') |
---|
500 | CALL myjpbl( & |
---|
501 | DT=dt,STEPBL=stepbl,HT=ht,DZ=dz8w & |
---|
502 | ,PMID=p_phy,PINT=p8w,TH=th_phy,T=t_phy,EXNER=pi_phy & |
---|
503 | ,QV=qv_curr, CWM=qc_curr & |
---|
504 | ,U=u_phy,V=v_phy,RHO=rho & |
---|
505 | ,TSK=tsk,QSFC=qsfc,CHKLOWQ=chklowq,THZ0=thz0 & |
---|
506 | ,QZ0=qz0,UZ0=uz0,VZ0=vz0 & |
---|
507 | ,LOWLYR=lowlyr & |
---|
508 | ,XLAND=xland,SICE=xice,SNOW=snow & |
---|
509 | ,TKE_MYJ=tke_myj,EXCH_H=exch_h,USTAR=ust,ZNT=znt & |
---|
510 | ,EL_MYJ=el_myj,PBLH=pblh,KPBL=kpbl,CT=ct & |
---|
511 | ,AKHS=akhs,AKMS=akms,ELFLX=lh & |
---|
512 | ,RUBLTEN=rublten,RVBLTEN=rvblten,RTHBLTEN=rthblten & |
---|
513 | ,RQVBLTEN=rqvblten,RQCBLTEN=rqcblten & |
---|
514 | ,IDS=ids,IDE=ide,JDS=jds,JDE=jde,KDS=kds,KDE=kde & |
---|
515 | ,IMS=ims,IME=ime,JMS=jms,JME=jme,KMS=kms,KME=kme & |
---|
516 | ,ITS=its,ITE=ite,JTS=jts,JTE=jte,KTS=kts,KTE=kte & |
---|
517 | ) |
---|
518 | ELSE |
---|
519 | CALL wrf_error_fatal('Lack arguments to call MYJ pbl') |
---|
520 | ENDIF |
---|
521 | |
---|
522 | CASE DEFAULT |
---|
523 | |
---|
524 | WRITE( message , * ) 'The pbl option does not exist: bl_pbl_physics = ', bl_pbl_physics |
---|
525 | CALL wrf_error_fatal ( message ) |
---|
526 | |
---|
527 | END SELECT pbl_select |
---|
528 | |
---|
529 | ENDDO |
---|
530 | !$OMP END PARALLEL DO |
---|
531 | |
---|
532 | ENDIF |
---|
533 | ! |
---|
534 | END SUBROUTINE pbl_driver |
---|
535 | END MODULE module_pbl_driver |
---|