1 | !WRF:MEDIATION_LAYER:SOLVER |
---|
2 | |
---|
3 | #define BENCH_START(A) |
---|
4 | #define BENCH_END(A) |
---|
5 | |
---|
6 | MODULE module_first_rk_step_part1 |
---|
7 | |
---|
8 | CONTAINS |
---|
9 | |
---|
10 | SUBROUTINE first_rk_step_part1 ( grid , config_flags & |
---|
11 | , moist , moist_tend & |
---|
12 | , chem , chem_tend & |
---|
13 | , scalar , scalar_tend & |
---|
14 | , fdda3d, fdda2d & |
---|
15 | , ru_tendf, rv_tendf & |
---|
16 | , rw_tendf, t_tendf & |
---|
17 | , ph_tendf, mu_tendf & |
---|
18 | , tke_tend & |
---|
19 | , adapt_step_flag , curr_secs & |
---|
20 | , psim , psih , wspd , gz1oz0 , br , chklowq & |
---|
21 | , cu_act_flag , hol , th_phy & |
---|
22 | , pi_phy , p_phy , t_phy , u_phy , v_phy & |
---|
23 | , dz8w , p8w , t8w , rho_phy , rho & |
---|
24 | , z_at_w , mu_3d & |
---|
25 | , ids, ide, jds, jde, kds, kde & |
---|
26 | , ims, ime, jms, jme, kms, kme & |
---|
27 | , ips, ipe, jps, jpe, kps, kpe & |
---|
28 | , k_start , k_end & |
---|
29 | ) |
---|
30 | USE module_state_description |
---|
31 | USE module_model_constants |
---|
32 | USE module_domain, ONLY : domain |
---|
33 | USE module_configure, ONLY : grid_config_rec_type, model_config_rec |
---|
34 | USE module_radiation_driver, ONLY : pre_radiation_driver, radiation_driver |
---|
35 | USE module_surface_driver, ONLY : surface_driver |
---|
36 | USE module_cumulus_driver, ONLY : cumulus_driver |
---|
37 | USE module_pbl_driver, ONLY : pbl_driver |
---|
38 | USE module_fddagd_driver, ONLY : fddagd_driver |
---|
39 | USE module_em, ONLY : init_zero_tendency |
---|
40 | USE module_big_step_utilities_em, ONLY : phy_prep |
---|
41 | USE module_dm |
---|
42 | IMPLICIT NONE |
---|
43 | |
---|
44 | TYPE ( domain ), INTENT(INOUT) :: grid |
---|
45 | TYPE ( grid_config_rec_type ), INTENT(IN) :: config_flags |
---|
46 | |
---|
47 | INTEGER, INTENT(IN) :: ids, ide, jds, jde, kds, kde, & |
---|
48 | ims, ime, jms, jme, kms, kme, & |
---|
49 | ips, ipe, jps, jpe, kps, kpe |
---|
50 | |
---|
51 | LOGICAL ,INTENT(IN) :: adapt_step_flag |
---|
52 | REAL, INTENT(IN) :: curr_secs |
---|
53 | |
---|
54 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme,num_moist),INTENT(INOUT) :: moist |
---|
55 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme,num_moist),INTENT(INOUT) :: moist_tend |
---|
56 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme,num_moist),INTENT(INOUT) :: chem |
---|
57 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme,num_moist),INTENT(INOUT) :: chem_tend |
---|
58 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme,num_moist),INTENT(INOUT) :: scalar |
---|
59 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme,num_moist),INTENT(INOUT) :: scalar_tend |
---|
60 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme,num_fdda3d),INTENT(INOUT) :: fdda3d |
---|
61 | REAL ,DIMENSION(ims:ime,1:1,jms:jme,num_fdda2d),INTENT(INOUT) :: fdda2d |
---|
62 | REAL ,DIMENSION(ims:ime,jms:jme), INTENT(INOUT) :: psim |
---|
63 | REAL ,DIMENSION(ims:ime,jms:jme), INTENT(INOUT) :: psih |
---|
64 | REAL ,DIMENSION(ims:ime,jms:jme), INTENT(INOUT) :: wspd |
---|
65 | REAL ,DIMENSION(ims:ime,jms:jme), INTENT(INOUT) :: gz1oz0 |
---|
66 | REAL ,DIMENSION(ims:ime,jms:jme), INTENT(INOUT) :: br |
---|
67 | REAL ,DIMENSION(ims:ime,jms:jme), INTENT(INOUT) :: chklowq |
---|
68 | LOGICAL ,DIMENSION(ims:ime,jms:jme), INTENT(INOUT) :: cu_act_flag |
---|
69 | REAL ,DIMENSION(ims:ime,jms:jme), INTENT(INOUT) :: hol |
---|
70 | |
---|
71 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: th_phy |
---|
72 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: pi_phy |
---|
73 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: p_phy |
---|
74 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: t_phy |
---|
75 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: u_phy |
---|
76 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: v_phy |
---|
77 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: dz8w |
---|
78 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: p8w |
---|
79 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: t8w |
---|
80 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: rho_phy |
---|
81 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: rho |
---|
82 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: z_at_w |
---|
83 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: mu_3d |
---|
84 | |
---|
85 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: ru_tendf |
---|
86 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: rv_tendf |
---|
87 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: rw_tendf |
---|
88 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: ph_tendf |
---|
89 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: t_tendf |
---|
90 | REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: tke_tend |
---|
91 | |
---|
92 | REAL ,DIMENSION(ims:ime,jms:jme), INTENT(INOUT) :: mu_tendf |
---|
93 | |
---|
94 | INTEGER , INTENT(IN) :: k_start, k_end |
---|
95 | |
---|
96 | ! Local |
---|
97 | |
---|
98 | REAL, DIMENSION( ims:ime, jms:jme ) :: ht_loc |
---|
99 | INTEGER, DIMENSION( ims:ime, jms:jme ) :: shadowmask |
---|
100 | INTEGER :: ij |
---|
101 | INTEGER num_roof_layers |
---|
102 | INTEGER num_wall_layers |
---|
103 | INTEGER num_road_layers |
---|
104 | INTEGER iswater |
---|
105 | INTEGER rk_step |
---|
106 | |
---|
107 | ! initialize all tendencies to zero in order to update physics |
---|
108 | ! tendencies first (separate from dry dynamics). |
---|
109 | |
---|
110 | rk_step = 1 |
---|
111 | |
---|
112 | BENCH_START(init_zero_tend_tim) |
---|
113 | !$OMP PARALLEL DO & |
---|
114 | !$OMP PRIVATE ( ij ) |
---|
115 | |
---|
116 | DO ij = 1 , grid%num_tiles |
---|
117 | |
---|
118 | CALL wrf_debug ( 200 , ' call init_zero_tendency' ) |
---|
119 | CALL init_zero_tendency ( ru_tendf, rv_tendf, rw_tendf, & |
---|
120 | ph_tendf, t_tendf, tke_tend, & |
---|
121 | mu_tendf, & |
---|
122 | moist_tend,chem_tend,scalar_tend, & |
---|
123 | num_moist,num_chem,num_scalar, & |
---|
124 | rk_step, & |
---|
125 | ids, ide, jds, jde, kds, kde, & |
---|
126 | ims, ime, jms, jme, kms, kme, & |
---|
127 | grid%i_start(ij), grid%i_end(ij), & |
---|
128 | grid%j_start(ij), grid%j_end(ij), & |
---|
129 | k_start, k_end ) |
---|
130 | |
---|
131 | END DO |
---|
132 | !$OMP END PARALLEL DO |
---|
133 | BENCH_END(init_zero_tend_tim) |
---|
134 | |
---|
135 | #ifdef DM_PARALLEL |
---|
136 | # include "HALO_EM_PHYS_A.inc" |
---|
137 | #endif |
---|
138 | |
---|
139 | !$OMP PARALLEL DO & |
---|
140 | !$OMP PRIVATE ( ij ) |
---|
141 | DO ij = 1 , grid%num_tiles |
---|
142 | |
---|
143 | CALL wrf_debug ( 200 , ' call phy_prep' ) |
---|
144 | CALL phy_prep ( config_flags, & |
---|
145 | grid%mut, grid%muu, grid%muv, grid%u_2, & |
---|
146 | grid%v_2, grid%p, grid%pb, grid%alt, & |
---|
147 | grid%ph_2, grid%phb, grid%t_2, grid%tsk, moist, num_moist, & |
---|
148 | mu_3d, rho, & |
---|
149 | th_phy, p_phy, pi_phy, u_phy, v_phy, & |
---|
150 | p8w, t_phy, t8w, grid%z, z_at_w, & |
---|
151 | dz8w, grid%fnm, grid%fnp, & |
---|
152 | grid%rthraten, & |
---|
153 | grid%rthblten, grid%rublten, grid%rvblten, & |
---|
154 | grid%rqvblten, grid%rqcblten, grid%rqiblten, & |
---|
155 | grid%rthcuten, grid%rqvcuten, grid%rqccuten, & |
---|
156 | grid%rqrcuten, grid%rqicuten, grid%rqscuten, & |
---|
157 | grid%rthften, grid%rqvften, & |
---|
158 | grid%RUNDGDTEN, grid%RVNDGDTEN, grid%RTHNDGDTEN, & |
---|
159 | grid%RQVNDGDTEN, grid%RMUNDGDTEN, & |
---|
160 | ids, ide, jds, jde, kds, kde, & |
---|
161 | ims, ime, jms, jme, kms, kme, & |
---|
162 | grid%i_start(ij), grid%i_end(ij), & |
---|
163 | grid%j_start(ij), grid%j_end(ij), & |
---|
164 | k_start, k_end ) |
---|
165 | ENDDO |
---|
166 | !$OMP END PARALLEL DO |
---|
167 | |
---|
168 | BENCH_END(phy_prep_tim) |
---|
169 | |
---|
170 | ! radiation |
---|
171 | |
---|
172 | ! this driver is only needed to handle non-local shadowing effects |
---|
173 | CALL pre_radiation_driver ( grid, config_flags & |
---|
174 | & ,itimestep=grid%itimestep, ra_call_offset=grid%ra_call_offset & |
---|
175 | & ,XLAT=grid%xlat, XLONG=grid%xlong, GMT=grid%gmt & |
---|
176 | & ,julian=grid%julian, xtime=grid%xtime, RADT=grid%radt & |
---|
177 | & ,STEPRA=grid%stepra & |
---|
178 | & ,ht=grid%ht,dx=grid%dx,dy=grid%dy,sina=grid%sina,cosa=grid%cosa & |
---|
179 | & ,shadowmask=shadowmask,slope_rad=config_flags%slope_rad & |
---|
180 | & ,topo_shading=config_flags%topo_shading & |
---|
181 | & ,shadlen=config_flags%shadlen,ht_shad=grid%ht_shad,ht_loc=ht_loc & |
---|
182 | & ,ht_shad_bxs=grid%ht_shad_bxs, ht_shad_bxe=grid%ht_shad_bxe & |
---|
183 | & ,ht_shad_bys=grid%ht_shad_bys, ht_shad_bye=grid%ht_shad_bye & |
---|
184 | & ,nested=config_flags%nested, min_ptchsz=grid%min_ptchsz & |
---|
185 | & ,spec_bdy_width=config_flags%spec_bdy_width & |
---|
186 | ! indexes |
---|
187 | & ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
188 | & ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
189 | & ,IPS=ips,IPE=ipe, JPS=jps,JPE=jpe, KPS=kps,KPE=kpe & |
---|
190 | & ,i_start=grid%i_start,i_end=min(grid%i_end, ide-1) & |
---|
191 | & ,j_start=grid%j_start,j_end=min(grid%j_end, jde-1) & |
---|
192 | & ,kts=k_start, kte=min(k_end,kde-1) & |
---|
193 | & ,num_tiles=grid%num_tiles ) |
---|
194 | |
---|
195 | CALL wrf_debug ( 200 , ' call radiation_driver' ) |
---|
196 | BENCH_START(rad_driver_tim) |
---|
197 | |
---|
198 | CALL radiation_driver( & |
---|
199 | & ACFRCV=grid%acfrcv ,ACFRST=grid%acfrst ,ALBEDO=grid%albedo & |
---|
200 | & ,CFRACH=grid%cfrach ,CFRACL=grid%cfracl ,CFRACM=grid%cfracm & |
---|
201 | & ,CUPPT=grid%cuppt ,CZMEAN=grid%czmean ,DT=grid%dt & |
---|
202 | & ,DZ8W=dz8w ,EMISS=grid%emiss ,GLW=grid%glw & |
---|
203 | & ,GMT=grid%gmt ,GSW=grid%gsw ,HBOT=grid%hbot & |
---|
204 | & ,HTOP=grid%htop ,HBOTR=grid%hbotr ,HTOPR=grid%htopr & |
---|
205 | & ,ICLOUD=config_flags%icloud & |
---|
206 | & ,ITIMESTEP=grid%itimestep,JULDAY=grid%julday , JULIAN=grid%julian & |
---|
207 | & ,JULYR=grid%julyr ,LW_PHYSICS=config_flags%ra_lw_physics & |
---|
208 | & ,NCFRCV=grid%ncfrcv ,NCFRST=grid%ncfrst ,NPHS=1 & |
---|
209 | & ,P8W=p8w ,P=p_phy ,PI=pi_phy & |
---|
210 | & ,RADT=grid%radt ,RA_CALL_OFFSET=grid%ra_call_offset & |
---|
211 | & ,RHO=rho ,RLWTOA=grid%rlwtoa & |
---|
212 | & ,RSWTOA=grid%rswtoa ,RTHRATEN=grid%rthraten & |
---|
213 | & ,RTHRATENLW=grid%rthratenlw ,RTHRATENSW=grid%rthratensw & |
---|
214 | & ,SNOW=grid%snow ,STEPRA=grid%stepra ,SWDOWN=grid%swdown & |
---|
215 | & ,SWDOWNC=grid%swdownc ,SW_PHYSICS=config_flags%ra_sw_physics & |
---|
216 | & ,T8W=t8w ,T=t_phy ,TAUCLDC=grid%taucldc & |
---|
217 | & ,TAUCLDI=grid%taucldi ,TSK=grid%tsk ,VEGFRA=grid%vegfra & |
---|
218 | & ,WARM_RAIN=grid%warm_rain ,XICE=grid%xice ,XLAND=grid%xland & |
---|
219 | & ,XLAT=grid%xlat ,XLONG=grid%xlong & |
---|
220 | !Optional urban |
---|
221 | & ,DECLIN_URB=grid%declin_urb ,COSZ_URB2D=grid%cosz_urb2d & |
---|
222 | & ,OMG_URB2D=grid%omg_urb2d & |
---|
223 | ! |
---|
224 | & ,Z=grid%z & |
---|
225 | & ,LEVSIZ=grid%levsiz, N_OZMIXM=num_ozmixm & |
---|
226 | & ,N_AEROSOLC=num_aerosolc & |
---|
227 | & ,PAERLEV=grid%paerlev & |
---|
228 | & ,CAM_ABS_DIM1=grid%cam_abs_dim1, CAM_ABS_DIM2=grid%cam_abs_dim2 & |
---|
229 | & ,CAM_ABS_FREQ_S=grid%cam_abs_freq_s & |
---|
230 | & ,XTIME=grid%xtime & |
---|
231 | ,CURR_SECS=curr_secs, ADAPT_STEP_FLAG=adapt_step_flag & |
---|
232 | ! indexes |
---|
233 | & ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
234 | & ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
235 | & ,i_start=grid%i_start,i_end=min(grid%i_end, ide-1) & |
---|
236 | & ,j_start=grid%j_start,j_end=min(grid%j_end, jde-1) & |
---|
237 | & ,kts=k_start, kte=min(k_end,kde-1) & |
---|
238 | & ,num_tiles=grid%num_tiles & |
---|
239 | ! Optional |
---|
240 | & , CLDFRA=grid%cldfra & |
---|
241 | & , PB=grid%pb & |
---|
242 | & , F_ICE_PHY=grid%f_ice_phy,F_RAIN_PHY=grid%f_rain_phy & |
---|
243 | & , QV=moist(ims,kms,jms,P_QV), F_QV=F_QV & |
---|
244 | & , QC=moist(ims,kms,jms,P_QC), F_QC=F_QC & |
---|
245 | & , QR=moist(ims,kms,jms,P_QR), F_QR=F_QR & |
---|
246 | & , QI=moist(ims,kms,jms,P_QI), F_QI=F_QI & |
---|
247 | & , QS=moist(ims,kms,jms,P_QS), F_QS=F_QS & |
---|
248 | & , QG=moist(ims,kms,jms,P_QG), F_QG=F_QG & |
---|
249 | & , QNDROP=scalar(ims,kms,jms,P_QNDROP), F_QNDROP=F_QNDROP & |
---|
250 | #ifdef ACFLUX |
---|
251 | & ,ACSWUPT=acswupt ,ACSWUPTC=acswuptc & |
---|
252 | & ,ACSWDNT=acswdnt ,ACSWDNTC=acswdntc & |
---|
253 | & ,ACSWUPB=acswupb ,ACSWUPBC=acswupbc & |
---|
254 | & ,ACSWDNB=acswdnb ,ACSWDNBC=acswdnbc & |
---|
255 | & ,ACLWUPT=aclwupt ,ACLWUPTC=aclwuptc & |
---|
256 | & ,ACLWDNT=aclwdnt ,ACLWDNTC=aclwdntc & |
---|
257 | & ,ACLWUPB=aclwupb ,ACLWUPBC=aclwupbc & |
---|
258 | & ,ACLWDNB=aclwdnb ,ACLWDNBC=aclwdnbc & |
---|
259 | & ,SWUPT=swupt ,SWUPTC=swuptc & |
---|
260 | & ,SWDNT=swdnt ,SWDNTC=swdntc & |
---|
261 | & ,SWUPB=swupb ,SWUPBC=swupbc & |
---|
262 | & ,SWDNB=swdnb ,SWDNBC=swdnbc & |
---|
263 | & ,LWUPT=lwupt ,LWUPTC=lwuptc & |
---|
264 | & ,LWDNT=lwdnt ,LWDNTC=lwdntc & |
---|
265 | & ,LWUPB=lwupb ,LWUPBC=lwupbc & |
---|
266 | & ,LWDNB=lwdnb ,LWDNBC=lwdnbc & |
---|
267 | #endif |
---|
268 | & ,LWCF=grid%lwcf & |
---|
269 | & ,SWCF=grid%swcf & |
---|
270 | & ,OLR=grid%olr & |
---|
271 | & ,OZMIXM=grid%ozmixm, PIN=grid%pin & |
---|
272 | & ,M_PS_1=grid%m_ps_1, M_PS_2=grid%m_ps_2, AEROSOLC_1=grid%aerosolc_1 & |
---|
273 | & ,AEROSOLC_2=grid%aerosolc_2, M_HYBI0=grid%m_hybi & |
---|
274 | & ,ABSTOT=grid%abstot, ABSNXT=grid%absnxt, EMSTOT=grid%emstot & |
---|
275 | #ifdef WRF_CHEM |
---|
276 | & ,CU_RAD_FEEDBACK=config_flags%cu_rad_feedback & |
---|
277 | & ,AER_RA_FEEDBACK=config_flags%aer_ra_feedback & |
---|
278 | & ,QC_ADJUST=grid%GD_CLOUD_B , QI_ADJUST=grid%GD_CLOUD2_B & |
---|
279 | & ,PM2_5_DRY=grid%pm2_5_dry, PM2_5_WATER=grid%pm2_5_water & |
---|
280 | & ,PM2_5_DRY_EC=grid%pm2_5_dry_ec & |
---|
281 | & ,TAUAER300=grid%tauaer1, TAUAER400=grid%tauaer2 & ! jcb |
---|
282 | & ,TAUAER600=grid%tauaer3, TAUAER999=grid%tauaer4 & ! jcb |
---|
283 | & ,GAER300=grid%gaer1, GAER400=grid%gaer2, GAER600=grid%gaer3, GAER999=grid%gaer4 & ! jcb |
---|
284 | & ,WAER300=grid%waer1, WAER400=grid%waer2, WAER600=grid%waer3, WAER999=grid%waer4 & ! jcb |
---|
285 | #endif |
---|
286 | & ,slope_rad=config_flags%slope_rad,topo_shading=config_flags%topo_shading & |
---|
287 | & ,shadowmask=shadowmask,ht=grid%ht,dx=grid%dx,dy=grid%dy,sina=grid%sina,cosa=grid%cosa ) |
---|
288 | |
---|
289 | BENCH_END(rad_driver_tim) |
---|
290 | |
---|
291 | !********* Surface driver |
---|
292 | ! surface |
---|
293 | |
---|
294 | BENCH_START(surf_driver_tim) |
---|
295 | |
---|
296 | !----------------------------------------------------------------- |
---|
297 | ! urban related variable are added to arguments of surface_driver |
---|
298 | !----------------------------------------------------------------- |
---|
299 | num_roof_layers = grid%num_soil_layers !urban |
---|
300 | num_wall_layers = grid%num_soil_layers !urban |
---|
301 | num_road_layers = grid%num_soil_layers !urban |
---|
302 | CALL nl_get_iswater(grid%id, iswater) |
---|
303 | |
---|
304 | CALL wrf_debug ( 200 , ' call surface_driver' ) |
---|
305 | |
---|
306 | CALL surface_driver( & |
---|
307 | & ACSNOM=grid%acsnom ,ACSNOW=grid%acsnow ,AKHS=grid%akhs & |
---|
308 | & ,AKMS=grid%akms ,ALBBCK=grid%albbck ,ALBEDO=grid%albedo & |
---|
309 | & ,EMBCK=grid%embck & |
---|
310 | & ,BR=br ,CANWAT=grid%canwat ,CHKLOWQ=chklowq & |
---|
311 | & ,CT=grid%ct ,DT=grid%dt ,DX=grid%dx & |
---|
312 | & ,DZ8W=dz8w ,DZS=grid%dzs ,FLHC=grid%flhc & |
---|
313 | & ,FLQC=grid%flqc ,GLW=grid%glw ,GRDFLX=grid%grdflx & |
---|
314 | & ,GSW=grid%gsw ,SWDOWN=grid%swdown ,GZ1OZ0=gz1oz0 ,HFX=grid%hfx & |
---|
315 | & ,HT=grid%ht ,IFSNOW=config_flags%ifsnow ,ISFFLX=config_flags%isfflx & |
---|
316 | & ,ISLTYP=grid%isltyp ,ITIMESTEP=grid%itimestep & |
---|
317 | & ,IVGTYP=grid%ivgtyp ,LH=grid%lh ,LOWLYR=grid%lowlyr & |
---|
318 | & ,MAVAIL=grid%mavail ,NUM_SOIL_LAYERS=config_flags%num_soil_layers & |
---|
319 | & ,P8W=p8w ,PBLH=grid%pblh ,PI_PHY=pi_phy & |
---|
320 | & ,PSFC=grid%psfc ,PSHLTR=grid%pshltr ,PSIH=psih & |
---|
321 | & ,BLDT=grid%bldt ,CURR_SECS=curr_secs, ADAPT_STEP_FLAG=adapt_step_flag & |
---|
322 | & ,PSIM=psim ,P_PHY=p_phy ,Q10=grid%q10 & |
---|
323 | & ,Q2=grid%q2 ,QFX=grid%qfx ,QSFC=grid%qsfc & |
---|
324 | & ,QSHLTR=grid%qshltr ,QZ0=grid%qz0 ,RAINCV=grid%raincv & |
---|
325 | & ,RA_LW_PHYSICS=config_flags%ra_lw_physics ,RHO=rho & |
---|
326 | & ,RMOL=grid%rmol ,SFCEVP=grid%sfcevp ,SFCEXC=grid%sfcexc & |
---|
327 | & ,SFCRUNOFF=grid%sfcrunoff & |
---|
328 | & ,SF_SFCLAY_PHYSICS=config_flags%sf_sfclay_physics & |
---|
329 | & ,SF_SURFACE_PHYSICS=config_flags%sf_surface_physics ,SH2O=grid%sh2o & |
---|
330 | & ,SHDMAX=grid%shdmax ,SHDMIN=grid%shdmin ,SMOIS=grid%smois & |
---|
331 | & ,SMSTAV=grid%smstav ,SMSTOT=grid%smstot ,SNOALB=grid%snoalb & |
---|
332 | & ,SNOW=grid%snow ,SNOWC=grid%snowc ,SNOWH=grid%snowh & |
---|
333 | & ,SST=grid%sst ,SST_UPDATE=grid%sst_update & |
---|
334 | & ,STEPBL=grid%stepbl ,TH10=grid%th10 ,TH2=grid%th2 & |
---|
335 | & ,THZ0=grid%thz0 ,TH_PHY=th_phy ,TKE_MYJ=grid%tke_myj & |
---|
336 | & ,TMN=grid%tmn ,TSHLTR=grid%tshltr ,TSK=grid%tsk & |
---|
337 | & ,TSLB=grid%tslb ,T_PHY=t_phy ,U10=grid%u10 & |
---|
338 | & ,URATX=grid%uratx ,VRATX=grid%vratx ,TRATX=grid%tratx & |
---|
339 | & ,UDRUNOFF=grid%udrunoff ,UST=grid%ust ,UZ0=grid%uz0 & |
---|
340 | & ,U_FRAME=grid%u_frame ,U_PHY=u_phy ,V10=grid%v10 & |
---|
341 | & ,VEGFRA=grid%vegfra ,VZ0=grid%vz0 ,V_FRAME=grid%v_frame & |
---|
342 | & ,V_PHY=v_phy ,WARM_RAIN=grid%warm_rain & |
---|
343 | & ,WSPD=wspd ,XICE=grid%xice ,XLAND=grid%xland & |
---|
344 | & ,Z0=grid%z0 ,Z=grid%z ,ZNT=grid%znt & |
---|
345 | & ,ZS=grid%zs ,XICEM=grid%xicem ,ISICE=grid%landuse_isice& |
---|
346 | & ,USTM=grid%ustm ,CK=grid%ck ,CKA=grid%cka & |
---|
347 | & ,CD=grid%cd ,CDA=grid%cda & |
---|
348 | & ,ISFTCFLX=config_flags%isftcflx & |
---|
349 | & ,OMLCALL=config_flags%omlcall ,OML_HML0=config_flags%oml_hml0 ,OML_GAMMA=config_flags%oml_gamma & |
---|
350 | & ,TML=grid%tml, T0ML=grid%t0ml, HML=grid%hml, H0ML=grid%h0ml, HUML=grid%huml, HVML=grid%hvml, F=grid%f & |
---|
351 | & ,ISWATER=iswater & |
---|
352 | & ,DECLIN_URB=grid%declin_urb ,COSZ_URB2D=grid%cosz_urb2d & !I urban |
---|
353 | & ,OMG_URB2D=grid%omg_urb2d ,xlat_urb2d=grid%XLAT & !I urban |
---|
354 | & ,NUM_ROOF_LAYERS=num_roof_layers & !I urban |
---|
355 | & ,NUM_WALL_LAYERS=num_wall_layers & !I urban |
---|
356 | & ,NUM_ROAD_LAYERS=num_road_layers & |
---|
357 | & ,DZR=grid%dzr ,DZB=grid%dzb ,DZG=grid%dzg & !I urban |
---|
358 | & ,TR_URB2D=grid%tr_urb2d ,TB_URB2D=grid%tb_urb2d & |
---|
359 | & ,TG_URB2D=grid%tg_urb2d & !H urban |
---|
360 | & ,TC_URB2D=grid%tc_urb2d ,QC_URB2D=grid%qc_urb2d & !H urban |
---|
361 | & ,UC_URB2D=grid%uc_urb2d & !H urban |
---|
362 | & ,XXXR_URB2D=grid%xxxr_urb2d & |
---|
363 | & ,XXXB_URB2D=grid%xxxb_urb2d & !H urban |
---|
364 | & ,XXXG_URB2D=grid%xxxg_urb2d & |
---|
365 | & ,XXXC_URB2D=grid%xxxc_urb2d & !H urban |
---|
366 | & ,TRL_URB3D=grid%trl_urb3d ,TBL_URB3D=grid%tbl_urb3d & !H urban |
---|
367 | & ,TGL_URB3D=grid%tgl_urb3d & !H urban |
---|
368 | & ,SH_URB2D=grid%sh_urb2d ,LH_URB2D=grid%lh_urb2d & |
---|
369 | & ,G_URB2D=grid%g_urb2d & !H urban |
---|
370 | & ,RN_URB2D=grid%rn_urb2d , TS_URB2D=grid%ts_urb2d & !H urban |
---|
371 | & ,FRC_URB2D=grid%frc_urb2d & !H urban |
---|
372 | & ,UTYPE_URB2D=grid%utype_urb2d & !H urban |
---|
373 | & ,ucmcall=grid%ucmcall & !H urban |
---|
374 | ! P-X LSM Variables |
---|
375 | & ,LANDUSEF=grid%landusef, SOILCTOP=grid%soilctop & ! P-X LSM |
---|
376 | & ,SOILCBOT=grid%soilcbot & ! P-X LSM |
---|
377 | & ,RA=grid%ra, RS=grid%rs, LAI=grid%lai & ! P-X LSM |
---|
378 | & ,NLCAT=grid%num_land_cat, NSCAT=grid%num_soil_cat & ! P-X LSM |
---|
379 | & ,VEGF_PX=grid%vegf_px, SNOWNCV=grid%snowncv & ! P-X LSM |
---|
380 | & ,ANAL_INTERVAL=config_flags%interval_seconds & ! P-X LSM |
---|
381 | & ,PXLSM_SMOIS_INIT=config_flags%pxlsm_smois_init & ! P-X LSM |
---|
382 | & ,PXLSM_SOIL_NUDGE=config_flags%grid_fdda & ! P-X LSM |
---|
383 | ! Optional PX LSM nudging |
---|
384 | & ,t2_ndg_old=fdda2d(ims,1,jms,P_t2_ndg_old) & |
---|
385 | & ,q2_ndg_old=fdda2d(ims,1,jms,P_q2_ndg_old) & |
---|
386 | & ,t2_ndg_new=fdda2d(ims,1,jms,P_t2_ndg_new) & |
---|
387 | & ,q2_ndg_new=fdda2d(ims,1,jms,P_q2_ndg_new) & |
---|
388 | & ,sn_ndg_old=fdda2d(ims,1,jms,P_sn_ndg_old) & |
---|
389 | & ,sn_ndg_new=fdda2d(ims,1,jms,P_sn_ndg_new) & |
---|
390 | ! Indexes |
---|
391 | & ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
392 | & ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
393 | & , I_START=grid%i_start,I_END=min(grid%i_end, ide-1) & |
---|
394 | & , J_START=grid%j_start,J_END=min(grid%j_end, jde-1) & |
---|
395 | & , KTS=k_start, KTE=min(k_end,kde-1) & |
---|
396 | & , NUM_TILES=grid%num_tiles & |
---|
397 | ! Optional |
---|
398 | & ,QV_CURR=moist(ims,kms,jms,P_QV), F_QV=F_QV & |
---|
399 | & ,QC_CURR=moist(ims,kms,jms,P_QC), F_QC=F_QC & |
---|
400 | & ,QR_CURR=moist(ims,kms,jms,P_QR), F_QR=F_QR & |
---|
401 | & ,QI_CURR=moist(ims,kms,jms,P_QI), F_QI=F_QI & |
---|
402 | & ,QS_CURR=moist(ims,kms,jms,P_QS), F_QS=F_QS & |
---|
403 | & ,QG_CURR=moist(ims,kms,jms,P_QG), F_QG=F_QG & |
---|
404 | & ,CAPG=grid%capg, EMISS=grid%emiss, HOL=hol,MOL=grid%mol & |
---|
405 | & ,T2OBS=grid%t2obs, Q2OBS=grid%q2obs & |
---|
406 | & ,RAINBL=grid%rainbl,SR=grid%sr & |
---|
407 | & ,RAINNCV=grid%rainncv,REGIME=grid%regime,T2=grid%t2,THC=grid%thc & |
---|
408 | & ,QSG=grid%qsg,QVG=grid%qvg,QCG=grid%qcg,SOILT1=grid%soilt1,TSNAV=grid%tsnav & ! ruc lsm |
---|
409 | & ,SMFR3D=grid%smfr3d,KEEPFR3DFLAG=grid%keepfr3dflag & ! ruc lsm |
---|
410 | & ,POTEVP=grid%POTEVP, SNOPCX=grid%SNOPCX, SOILTB=grid%SOILTB & ! ruc lsm |
---|
411 | & ) |
---|
412 | BENCH_END(surf_driver_tim) |
---|
413 | |
---|
414 | !********* |
---|
415 | ! pbl |
---|
416 | |
---|
417 | CALL wrf_debug ( 200 , ' call pbl_driver' ) |
---|
418 | BENCH_START(pbl_driver_tim) |
---|
419 | CALL pbl_driver( & |
---|
420 | & AKHS=grid%akhs ,AKMS=grid%akms & |
---|
421 | & ,BL_PBL_PHYSICS=config_flags%bl_pbl_physics & |
---|
422 | & ,BLDT=grid%bldt, CURR_SECS=curr_secs, ADAPT_STEP_FLAG=adapt_step_flag & |
---|
423 | & ,BR=br ,CHKLOWQ=chklowq ,CT=grid%ct & |
---|
424 | & ,DT=grid%dt ,DX=grid%dx ,DZ8W=dz8w & |
---|
425 | & ,EL_MYJ=grid%el_myj ,EXCH_H=grid%exch_h ,GRDFLX=grid%grdflx & |
---|
426 | & ,GZ1OZ0=gz1oz0 ,HFX=grid%hfx ,HT=grid%ht & |
---|
427 | & ,ITIMESTEP=grid%itimestep ,KPBL=grid%kpbl & |
---|
428 | & ,LH=grid%lh ,LOWLYR=grid%lowlyr ,P8W=p8w & |
---|
429 | & ,PBLH=grid%pblh ,PI_PHY=pi_phy ,PSIH=psih & |
---|
430 | & ,PSIM=psim ,P_PHY=p_phy ,QFX=grid%qfx & |
---|
431 | & ,QSFC=grid%qsfc ,QZ0=grid%qz0 & |
---|
432 | & ,RA_LW_PHYSICS=config_flags%ra_lw_physics & |
---|
433 | & ,RHO=rho ,RQCBLTEN=grid%rqcblten ,RQIBLTEN=grid%rqiblten & |
---|
434 | & ,RQVBLTEN=grid%rqvblten ,RTHBLTEN=grid%rthblten ,RUBLTEN=grid%rublten & |
---|
435 | & ,RVBLTEN=grid%rvblten ,SNOW=grid%snow ,STEPBL=grid%stepbl & |
---|
436 | & ,THZ0=grid%thz0 ,TH_PHY=th_phy ,TKE_MYJ=grid%tke_myj & |
---|
437 | & ,TSK=grid%tsk ,T_PHY=t_phy ,UST=grid%ust & |
---|
438 | & ,U10=grid%u10 ,UZ0=grid%uz0 ,U_FRAME=grid%u_frame ,U_PHY=u_phy & |
---|
439 | & ,V10=grid%v10 ,VZ0=grid%vz0 ,V_FRAME=grid%v_frame ,V_PHY=v_phy & |
---|
440 | & ,WARM_RAIN=grid%warm_rain ,WSPD=wspd & |
---|
441 | & ,XICE=grid%xice ,XLAND=grid%xland ,Z=grid%z & |
---|
442 | & ,ZNT=grid%znt & |
---|
443 | & ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
444 | & ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
445 | & ,I_START=grid%i_start,I_END=min(grid%i_end, ide-1) & |
---|
446 | & ,J_START=grid%j_start,J_END=min(grid%j_end, jde-1) & |
---|
447 | & ,KTS=k_start, KTE=min(k_end,kde-1) & |
---|
448 | & ,NUM_TILES=grid%num_tiles & |
---|
449 | ! Variables Required by ACM PBL - jp |
---|
450 | & ,ZNU=grid%znu,ZNW=grid%znw,MUT=grid%mut,P_TOP=grid%p_top & |
---|
451 | ! optional |
---|
452 | & ,QV_CURR=moist(ims,kms,jms,P_QV), F_QV=F_QV & |
---|
453 | & ,QC_CURR=moist(ims,kms,jms,P_QC), F_QC=F_QC & |
---|
454 | & ,QR_CURR=moist(ims,kms,jms,P_QR), F_QR=F_QR & |
---|
455 | & ,QI_CURR=moist(ims,kms,jms,P_QI), F_QI=F_QI & |
---|
456 | & ,QS_CURR=moist(ims,kms,jms,P_QS), F_QS=F_QS & |
---|
457 | & ,QG_CURR=moist(ims,kms,jms,P_QG), F_QG=F_QG & |
---|
458 | & ,HOL=HOL, MOL=grid%mol, REGIME=grid%REGIME & |
---|
459 | & ) |
---|
460 | |
---|
461 | BENCH_END(pbl_driver_tim) |
---|
462 | |
---|
463 | ! cumulus para. |
---|
464 | |
---|
465 | CALL wrf_debug ( 200 , ' call cumulus_driver' ) |
---|
466 | |
---|
467 | |
---|
468 | BENCH_START(cu_driver_tim) |
---|
469 | CALL cumulus_driver(grid & |
---|
470 | ! Prognostic variables |
---|
471 | & ,U=u_phy ,V=v_phy ,TH=th_phy ,T=t_phy & |
---|
472 | & ,W=grid%w_2 ,P=p_phy ,PI=pi_phy ,RHO=rho & |
---|
473 | ! Other arguments |
---|
474 | & ,ITIMESTEP=grid%itimestep ,DT=grid%dt ,DX=grid%dx & |
---|
475 | & ,CUDT=grid%cudt,CURR_SECS=curr_secs,ADAPT_STEP_FLAG=adapt_step_flag & |
---|
476 | & ,RAINC=grid%rainc ,RAINCV=grid%raincv ,PRATEC=grid%pratec & |
---|
477 | & , NCA=grid%nca & |
---|
478 | & ,HTOP=grid%cutop ,HBOT=grid%cubot ,KPBL=grid%kpbl & |
---|
479 | & ,DZ8W=dz8w ,P8W=p8w & |
---|
480 | & ,W0AVG=grid%w0avg ,STEPCU=grid%stepcu & |
---|
481 | & ,CLDEFI=grid%cldefi ,LOWLYR=grid%lowlyr ,XLAND=grid%xland & |
---|
482 | & ,APR_GR=grid%apr_gr ,APR_W=grid%apr_w ,APR_MC=grid%apr_mc & |
---|
483 | & ,APR_ST=grid%apr_st ,APR_AS=grid%apr_as ,APR_CAPMA=grid%apr_capma & |
---|
484 | & ,APR_CAPME=grid%apr_capme ,APR_CAPMI=grid%apr_capmi & |
---|
485 | & ,MASS_FLUX=grid%mass_flux ,XF_ENS=grid%xf_ens & |
---|
486 | & ,PR_ENS=grid%pr_ens ,HT=grid%ht,EDT_OUT=grid%edt_out & |
---|
487 | & ,imomentum=grid%imomentum,clos_choice=grid%clos_choice & |
---|
488 | & ,cugd_tten=grid%cugd_tten,cugd_qvten=grid%cugd_qvten,cugd_qcten=grid%cugd_qcten & |
---|
489 | & ,cugd_ttens=grid%cugd_ttens,cugd_qvtens=grid%cugd_qvtens & |
---|
490 | & ,ENSDIM=config_flags%ensdim ,MAXIENS=config_flags%maxiens ,MAXENS=config_flags%maxens & |
---|
491 | & ,MAXENS2=config_flags%maxens2 ,MAXENS3=config_flags%maxens3 & |
---|
492 | & ,CU_ACT_FLAG=cu_act_flag ,WARM_RAIN=grid%warm_rain & |
---|
493 | & ,GSW=grid%gsw,cugd_avedx=config_flags%cugd_avedx & |
---|
494 | & ,PERIODIC_X=(config_flags%polar .OR. config_flags%periodic_x) & |
---|
495 | & ,PERIODIC_Y=config_flags%periodic_y & |
---|
496 | ! Selection flag |
---|
497 | & ,CU_PHYSICS=config_flags%cu_physics & |
---|
498 | ! Dimension arguments |
---|
499 | & ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
500 | & ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
501 | & ,IPS=ips,IPE=ipe, JPS=jps,JPE=jpe, KPS=kps,KPE=kpe & |
---|
502 | & ,I_START=grid%i_start,I_END=min(grid%i_end, ide-1) & |
---|
503 | & ,J_START=grid%j_start,J_END=min(grid%j_end, jde-1) & |
---|
504 | & ,KTS=k_start, KTE=min(k_end,kde-1) & |
---|
505 | & ,NUM_TILES=grid%num_tiles & |
---|
506 | ! Moisture tendency arguments |
---|
507 | & ,RQVCUTEN=grid%rqvcuten , RQCCUTEN=grid%rqccuten & |
---|
508 | & ,RQSCUTEN=grid%rqscuten , RQICUTEN=grid%rqicuten & |
---|
509 | & ,RQRCUTEN=grid%rqrcuten , RQVBLTEN=grid%rqvblten & |
---|
510 | & ,RQVFTEN=grid%rqvften & |
---|
511 | ! Other tendency arguments |
---|
512 | & ,RTHRATEN=grid%rthraten , RTHBLTEN=grid%rthblten & |
---|
513 | & ,RTHCUTEN=grid%rthcuten , RTHFTEN=grid%rthften & |
---|
514 | ! Moisture tracer arguments |
---|
515 | & ,QV_CURR=moist(ims,kms,jms,P_QV), F_QV=F_QV & |
---|
516 | & ,QC_CURR=moist(ims,kms,jms,P_QC), F_QC=F_QC & |
---|
517 | & ,QR_CURR=moist(ims,kms,jms,P_QR), F_QR=F_QR & |
---|
518 | & ,QI_CURR=moist(ims,kms,jms,P_QI), F_QI=F_QI & |
---|
519 | & ,QS_CURR=moist(ims,kms,jms,P_QS), F_QS=F_QS & |
---|
520 | & ,QG_CURR=moist(ims,kms,jms,P_QG), F_QG=F_QG & |
---|
521 | #ifdef WRF_CHEM |
---|
522 | & ,GD_CLOUD=grid%GD_CLOUD,GD_CLOUD2=grid%GD_CLOUD2 & |
---|
523 | #endif |
---|
524 | & ) |
---|
525 | BENCH_END(cu_driver_tim) |
---|
526 | |
---|
527 | CALL wrf_debug ( 200 , ' call fddagd_driver' ) |
---|
528 | |
---|
529 | BENCH_START(fdda_driver_tim) |
---|
530 | CALL fddagd_driver(itimestep=grid%itimestep,dt=grid%dt,xtime=grid%XTIME, & |
---|
531 | id=grid%id, & |
---|
532 | RUNDGDTEN=grid%rundgdten,RVNDGDTEN=grid%rvndgdten, & |
---|
533 | RTHNDGDTEN=grid%rthndgdten,RQVNDGDTEN=grid%rqvndgdten, & |
---|
534 | RMUNDGDTEN=grid%rmundgdten, & |
---|
535 | u_ndg_old=fdda3d(ims,kms,jms,P_u_ndg_old), & |
---|
536 | v_ndg_old=fdda3d(ims,kms,jms,P_v_ndg_old), & |
---|
537 | t_ndg_old=fdda3d(ims,kms,jms,P_t_ndg_old), & |
---|
538 | q_ndg_old=fdda3d(ims,kms,jms,P_q_ndg_old), & |
---|
539 | mu_ndg_old=fdda2d(ims,1,jms,P_mu_ndg_old), & |
---|
540 | u_ndg_new=fdda3d(ims,kms,jms,P_u_ndg_new), & |
---|
541 | v_ndg_new=fdda3d(ims,kms,jms,P_v_ndg_new), & |
---|
542 | t_ndg_new=fdda3d(ims,kms,jms,P_t_ndg_new), & |
---|
543 | q_ndg_new=fdda3d(ims,kms,jms,P_q_ndg_new), & |
---|
544 | mu_ndg_new=fdda2d(ims,1,jms,P_mu_ndg_new), & |
---|
545 | u3d=grid%u_2,v3d=grid%v_2,th_phy=th_phy,rho=rho,moist=moist, & |
---|
546 | p_phy=p_phy,pi_phy=pi_phy,p8w=p8w,t_phy=t_phy, & |
---|
547 | dz8w=dz8w,z=grid%z,z_at_w=z_at_w, & |
---|
548 | config_flags=config_flags,dx=grid%DX,n_moist=num_moist, & |
---|
549 | STEPFG=grid%STEPFG, & |
---|
550 | pblh=grid%pblh,ht=grid%ht, & |
---|
551 | IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
552 | ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
553 | ,I_START=grid%i_start,I_END=min(grid%i_end, ide-1) & |
---|
554 | ,J_START=grid%j_start,J_END=min(grid%j_end, jde-1) & |
---|
555 | ,KTS=k_start, KTE=min(k_end,kde-1) & |
---|
556 | , num_tiles=grid%num_tiles ) |
---|
557 | BENCH_END(fdda_driver_tim) |
---|
558 | |
---|
559 | END SUBROUTINE first_rk_step_part1 |
---|
560 | |
---|
561 | END MODULE module_first_rk_step_part1 |
---|
562 | |
---|