1 !WRF:MEDIATION_LAYER:SOLVER
6 MODULE module_first_rk_step_part1
10 SUBROUTINE first_rk_step_part1 ( grid , config_flags &
11 , moist , moist_tend &
13 , tracer, tracer_tend &
14 , scalar , scalar_tend &
16 , ru_tendf, rv_tendf &
18 , ph_tendf, mu_tendf &
20 , adapt_step_flag , curr_secs &
21 , psim , psih , wspd , gz1oz0 , br , chklowq &
22 , cu_act_flag , hol , th_phy &
23 , pi_phy , p_phy , t_phy , u_phy , v_phy &
24 , dz8w , p8w , t8w , rho_phy , rho &
25 , ids, ide, jds, jde, kds, kde &
26 , ims, ime, jms, jme, kms, kme &
27 , ips, ipe, jps, jpe, kps, kpe &
28 , imsx,imex,jmsx,jmex,kmsx,kmex &
29 , ipsx,ipex,jpsx,jpex,kpsx,kpex &
30 , imsy,imey,jmsy,jmey,kmsy,kmey &
31 , ipsy,ipey,jpsy,jpey,kpsy,kpey &
35 USE module_state_description
36 USE module_model_constants
37 USE module_domain, ONLY : domain, domain_clock_get, get_ijk_from_subgrid
38 USE module_configure, ONLY : grid_config_rec_type, model_config_rec
39 USE module_radiation_driver, ONLY : pre_radiation_driver, radiation_driver
40 USE module_surface_driver, ONLY : surface_driver
41 USE module_cumulus_driver, ONLY : cumulus_driver
42 USE module_shallowcu_driver, ONLY : shallowcu_driver
43 USE module_pbl_driver, ONLY : pbl_driver
44 USE module_fr_sfire_driver_wrf, ONLY : sfire_driver_em_step
45 USE module_fddagd_driver, ONLY : fddagd_driver
46 USE module_em, ONLY : init_zero_tendency
48 USE module_convtrans_prep
49 USE module_big_step_utilities_em, ONLY : phy_prep
50 use module_scalar_tables
52 USE module_dm, ONLY : local_communicator, mytask, ntasks, ntasks_x, ntasks_y, local_communicator_periodic, wrf_dm_maxval
53 USE module_comm_dm, ONLY : halo_em_phys_a_sub,halo_em_fdda_sfc_sub
58 TYPE ( domain ), INTENT(INOUT) :: grid
59 TYPE ( grid_config_rec_type ), INTENT(IN) :: config_flags
60 TYPE(WRFU_Time) :: currentTime
62 INTEGER, INTENT(IN) :: ids, ide, jds, jde, kds, kde, &
63 ims, ime, jms, jme, kms, kme, &
64 ips, ipe, jps, jpe, kps, kpe, &
65 imsx,imex,jmsx,jmex,kmsx,kmex, &
66 ipsx,ipex,jpsx,jpex,kpsx,kpex, &
67 imsy,imey,jmsy,jmey,kmsy,kmey, &
68 ipsy,ipey,jpsy,jpey,kpsy,kpey
71 LOGICAL ,INTENT(IN) :: adapt_step_flag
72 REAL, INTENT(IN) :: curr_secs
74 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme,num_moist),INTENT(INOUT) :: moist
75 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme,num_moist),INTENT(INOUT) :: moist_tend
76 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme,num_chem),INTENT(INOUT) :: chem
77 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme,num_chem),INTENT(INOUT) :: chem_tend
78 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme,num_tracer),INTENT(INOUT) :: tracer
79 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme,num_tracer),INTENT(INOUT) :: tracer_tend
80 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme,num_scalar),INTENT(INOUT) :: scalar
81 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme,num_scalar),INTENT(INOUT) :: scalar_tend
82 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme,num_fdda3d),INTENT(INOUT) :: fdda3d
83 REAL ,DIMENSION(ims:ime,1:1,jms:jme,num_fdda2d),INTENT(INOUT) :: fdda2d
84 REAL ,DIMENSION(ims:ime,jms:jme), INTENT(INOUT) :: psim
85 REAL ,DIMENSION(ims:ime,jms:jme), INTENT(INOUT) :: psih
86 REAL ,DIMENSION(ims:ime,jms:jme), INTENT(INOUT) :: wspd
87 REAL ,DIMENSION(ims:ime,jms:jme), INTENT(INOUT) :: gz1oz0
88 REAL ,DIMENSION(ims:ime,jms:jme), INTENT(INOUT) :: br
89 REAL ,DIMENSION(ims:ime,jms:jme), INTENT(INOUT) :: chklowq
90 LOGICAL ,DIMENSION(ims:ime,jms:jme), INTENT(INOUT) :: cu_act_flag
91 REAL ,DIMENSION(ims:ime,jms:jme), INTENT(INOUT) :: hol
93 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: th_phy
94 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: pi_phy
95 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: p_phy
96 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: t_phy
97 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: u_phy
98 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: v_phy
99 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: dz8w
100 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: p8w
101 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: t8w
102 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: rho_phy
103 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: rho
105 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: ru_tendf
106 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: rv_tendf
107 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: rw_tendf
108 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: ph_tendf
109 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: t_tendf
110 REAL ,DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: tke_tend
112 REAL ,DIMENSION(ims:ime,jms:jme), INTENT(INOUT) :: mu_tendf
114 INTEGER, INTENT(IN) :: k_start, k_end
115 LOGICAL, INTENT(IN), OPTIONAL :: f_flux
118 REAL, DIMENSION( ims:ime, jms:jme ) :: exch_temf ! 1/7/09 WA
120 REAL, DIMENSION( ims:ime, jms:jme ) :: ht_loc, mixht
122 INTEGER num_roof_layers
123 INTEGER num_wall_layers
124 INTEGER num_road_layers
129 INTEGER :: yr, month, day, hr, minute, sec, rc
132 INTEGER :: sids , side , sjds , sjde , skds , skde , &
133 sims , sime , sjms , sjme , skms , skme , &
134 sips , sipe , sjps , sjpe , skps , skpe
136 CHARACTER (LEN=256) :: mminlu
138 #if ( WRF_DFI_RADAR == 1 )
139 INTEGER do_capsupress ! =1 do CAP supress, other = don't
142 CALL get_ijk_from_subgrid ( grid , &
143 sids, side, sjds, sjde, skds, skde, &
144 sims, sime, sjms, sjme, skms, skme, &
145 sips, sipe, sjps, sjpe, skps, skpe )
147 ! initialize all tendencies to zero in order to update physics
148 ! tendencies first (separate from dry dynamics).
151 if (present(f_flux)) l_flux=f_flux
155 BENCH_START(init_zero_tend_tim)
159 DO ij = 1 , grid%num_tiles
161 CALL wrf_debug ( 200 , ' call init_zero_tendency' )
162 CALL init_zero_tendency ( ru_tendf, rv_tendf, rw_tendf, &
163 ph_tendf, t_tendf, tke_tend, &
165 moist_tend,chem_tend,scalar_tend, &
166 tracer_tend,num_tracer, &
167 num_moist,num_chem,num_scalar, &
169 ids, ide, jds, jde, kds, kde, &
170 ims, ime, jms, jme, kms, kme, &
171 grid%i_start(ij), grid%i_end(ij), &
172 grid%j_start(ij), grid%j_end(ij), &
176 !$OMP END PARALLEL DO
177 BENCH_END(init_zero_tend_tim)
180 # include "HALO_EM_PHYS_A.inc"
185 DO ij = 1 , grid%num_tiles
187 CALL wrf_debug ( 200 , ' call phy_prep' )
188 CALL phy_prep ( config_flags, &
189 grid%mut, grid%muu, grid%muv, grid%u_2, &
190 grid%v_2, grid%p, grid%pb, grid%alt, &
191 grid%ph_2, grid%phb, grid%t_2, grid%tsk, moist, num_moist, &
192 rho,th_phy, p_phy, pi_phy, u_phy, v_phy, &
193 p8w, t_phy, t8w, grid%z, grid%z_at_w, dz8w, &
194 grid%p_hyd, grid%p_hyd_w, grid%dnw, &
195 grid%fnm, grid%fnp, grid%znw, grid%p_top, &
197 grid%rthblten, grid%rublten, grid%rvblten, &
198 grid%rqvblten, grid%rqcblten, grid%rqiblten, &
199 grid%rucuten, grid%rvcuten, grid%rthcuten, &
200 grid%rqvcuten, grid%rqccuten, grid%rqrcuten, &
201 grid%rqicuten, grid%rqscuten, &
202 grid%rushten, grid%rvshten, grid%rthshten, &
203 grid%rqvshten, grid%rqcshten, grid%rqrshten, &
204 grid%rqishten, grid%rqsshten, grid%rqgshten, &
205 grid%rthften, grid%rqvften, &
206 grid%RUNDGDTEN, grid%RVNDGDTEN, grid%RTHNDGDTEN, &
207 grid%RPHNDGDTEN,grid%RQVNDGDTEN, grid%RMUNDGDTEN,&
208 ids, ide, jds, jde, kds, kde, &
209 ims, ime, jms, jme, kms, kme, &
210 grid%i_start(ij), grid%i_end(ij), &
211 grid%j_start(ij), grid%j_end(ij), &
214 !$OMP END PARALLEL DO
216 BENCH_END(phy_prep_tim)
219 CALL domain_clock_get( grid, current_time=currentTime, &
220 current_timestr=mesg )
221 CALL WRFU_TimeGet( currentTime, YY=yr, dayOfYear=day, H=hr, M=minute, S=sec, rc=rc)
222 IF( rc/= WRFU_SUCCESS)THEN
223 CALL wrf_error_fatal('WRFU_TimeGet failed')
226 ! this driver is only needed to handle non-local shadowing effects
227 CALL pre_radiation_driver ( grid, config_flags &
228 & ,itimestep=grid%itimestep, ra_call_offset=grid%ra_call_offset &
229 & ,XLAT=grid%xlat, XLONG=grid%xlong, GMT=grid%gmt &
230 & ,julian=grid%julian, xtime=grid%xtime, RADT=grid%radt &
231 & ,STEPRA=grid%stepra &
232 & ,ht=grid%ht,dx=grid%dx,dy=grid%dy,sina=grid%sina,cosa=grid%cosa &
233 & ,shadowmask=grid%shadowmask,slope_rad=config_flags%slope_rad &
234 & ,topo_shading=config_flags%topo_shading &
235 & ,shadlen=config_flags%shadlen,ht_shad=grid%ht_shad,ht_loc=ht_loc &
236 & ,ht_shad_bxs=grid%ht_shad_bxs, ht_shad_bxe=grid%ht_shad_bxe &
237 & ,ht_shad_bys=grid%ht_shad_bys, ht_shad_bye=grid%ht_shad_bye &
238 & ,nested=config_flags%nested, min_ptchsz=grid%min_ptchsz &
239 & ,spec_bdy_width=config_flags%spec_bdy_width &
241 & ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
242 & ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
243 & ,IPS=ips,IPE=ipe, JPS=jps,JPE=jpe, KPS=kps,KPE=kpe &
244 & ,i_start=grid%i_start,i_end=min(grid%i_end, ide-1) &
245 & ,j_start=grid%j_start,j_end=min(grid%j_end, jde-1) &
246 & ,kts=k_start, kte=min(k_end,kde-1) &
247 & ,num_tiles=grid%num_tiles )
249 CALL wrf_debug ( 200 , ' call radiation_driver' )
250 BENCH_START(rad_driver_tim)
252 CALL radiation_driver( &
253 & ACFRCV=grid%acfrcv ,ACFRST=grid%acfrst ,ALBEDO=grid%albedo &
254 & ,CFRACH=grid%cfrach ,CFRACL=grid%cfracl ,CFRACM=grid%cfracm &
255 & ,CUPPT=grid%cuppt ,CZMEAN=grid%czmean ,DT=grid%dt &
256 & ,DZ8W=dz8w ,EMISS=grid%emiss ,GLW=grid%glw &
257 & ,GMT=grid%gmt ,GSW=grid%gsw ,HBOT=grid%hbot &
258 & ,HTOP=grid%htop ,HBOTR=grid%hbotr ,HTOPR=grid%htopr &
259 & ,ICLOUD=config_flags%icloud &
260 & ,ITIMESTEP=grid%itimestep,JULDAY=grid%julday , JULIAN=grid%julian &
261 & ,JULYR=grid%julyr ,LW_PHYSICS=config_flags%ra_lw_physics &
262 & ,NCFRCV=grid%ncfrcv ,NCFRST=grid%ncfrst ,NPHS=1 &
263 & ,P8W=grid%p_hyd_w ,P=grid%p_hyd ,PI=pi_phy &
264 & ,RADT=grid%radt ,RA_CALL_OFFSET=grid%ra_call_offset &
265 & ,RHO=rho ,RLWTOA=grid%rlwtoa &
266 & ,RSWTOA=grid%rswtoa ,RTHRATEN=grid%rthraten &
267 & ,RTHRATENLW=grid%rthratenlw ,RTHRATENSW=grid%rthratensw &
268 & ,SNOW=grid%snow ,STEPRA=grid%stepra ,SWDOWN=grid%swdown &
269 & ,SWDOWNC=grid%swdownc ,SW_PHYSICS=config_flags%ra_sw_physics &
270 & ,T8W=t8w ,T=grid%t_phy ,TAUCLDC=grid%taucldc &
271 & ,TAUCLDI=grid%taucldi ,TSK=grid%tsk ,VEGFRA=grid%vegfra &
272 & ,WARM_RAIN=grid%warm_rain ,XICE=grid%xice ,XLAND=grid%xland &
273 & ,XLAT=grid%xlat ,XLONG=grid%xlong ,YR=yr &
274 ! SSiB LSM radiation components (fds 06/2010)
275 & ,ALSWVISDIR=grid%alswvisdir ,ALSWVISDIF=grid%alswvisdif & !ssib
276 & ,ALSWNIRDIR=grid%alswnirdir ,ALSWNIRDIF=grid%alswnirdif & !ssib
277 & ,SWVISDIR=grid%swvisdir ,SWVISDIF=grid%swvisdif & !ssib
278 & ,SWNIRDIR=grid%swnirdir ,SWNIRDIF=grid%swnirdif & !ssib
279 & ,SF_SURFACE_PHYSICS=config_flags%sf_surface_physics & !ssib
280 !Optional solar variables
281 & ,DECLINX=grid%declin ,SOLCONX=grid%solcon ,COSZEN=grid%coszen ,HRANG=grid%hrang &
282 & , CEN_LAT=grid%cen_lat &
284 & ,LEVSIZ=grid%levsiz, N_OZMIXM=num_ozmixm &
285 & ,N_AEROSOLC=num_aerosolc &
286 & ,PAERLEV=grid%paerlev &
287 & ,CAM_ABS_DIM1=grid%cam_abs_dim1, CAM_ABS_DIM2=grid%cam_abs_dim2 &
288 & ,CAM_ABS_FREQ_S=grid%cam_abs_freq_s &
289 & ,XTIME=grid%xtime &
290 ,CURR_SECS=curr_secs, ADAPT_STEP_FLAG=adapt_step_flag &
292 & ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
293 & ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
294 & ,i_start=grid%i_start,i_end=min(grid%i_end, ide-1) &
295 & ,j_start=grid%j_start,j_end=min(grid%j_end, jde-1) &
296 & ,kts=k_start, kte=min(k_end,kde-1) &
297 & ,num_tiles=grid%num_tiles &
300 & , TLWDN=grid%tlwdn, TLWUP=grid%tlwup & ! goddard schemes
301 & , SLWDN=grid%slwdn, SLWUP=grid%slwup & ! goddard schemes
302 & , TSWDN=grid%tswdn, TSWUP=grid%tswup & ! goddard schemes
303 & , SSWDN=grid%sswdn, SSWUP=grid%sswup & ! goddard schemes
306 & , CLDFRA=grid%cldfra &
308 & , F_ICE_PHY=grid%f_ice_phy,F_RAIN_PHY=grid%f_rain_phy &
309 & , QV=moist(ims,kms,jms,P_QV), F_QV=F_QV &
310 & , QC=moist(ims,kms,jms,P_QC), F_QC=F_QC &
311 & , QR=moist(ims,kms,jms,P_QR), F_QR=F_QR &
312 & , QI=moist(ims,kms,jms,P_QI), F_QI=F_QI &
313 & , QS=moist(ims,kms,jms,P_QS), F_QS=F_QS &
314 & , QG=moist(ims,kms,jms,P_QG), F_QG=F_QG &
315 & , QNDROP=scalar(ims,kms,jms,P_QNDROP), F_QNDROP=F_QNDROP &
316 & ,ACSWUPT=grid%acswupt ,ACSWUPTC=grid%acswuptc &
317 & ,ACSWDNT=grid%acswdnt ,ACSWDNTC=grid%acswdntc &
318 & ,ACSWUPB=grid%acswupb ,ACSWUPBC=grid%acswupbc &
319 & ,ACSWDNB=grid%acswdnb ,ACSWDNBC=grid%acswdnbc &
320 & ,ACLWUPT=grid%aclwupt ,ACLWUPTC=grid%aclwuptc &
321 & ,ACLWDNT=grid%aclwdnt ,ACLWDNTC=grid%aclwdntc &
322 & ,ACLWUPB=grid%aclwupb ,ACLWUPBC=grid%aclwupbc &
323 & ,ACLWDNB=grid%aclwdnb ,ACLWDNBC=grid%aclwdnbc &
324 & ,SWUPT=grid%swupt ,SWUPTC=grid%swuptc &
325 & ,SWDNT=grid%swdnt ,SWDNTC=grid%swdntc &
326 & ,SWUPB=grid%swupb ,SWUPBC=grid%swupbc &
327 & ,SWDNB=grid%swdnb ,SWDNBC=grid%swdnbc &
328 & ,LWUPT=grid%lwupt ,LWUPTC=grid%lwuptc &
329 & ,LWDNT=grid%lwdnt ,LWDNTC=grid%lwdntc &
330 & ,LWUPB=grid%lwupb ,LWUPBC=grid%lwupbc &
331 & ,LWDNB=grid%lwdnb ,LWDNBC=grid%lwdnbc &
335 & ,OZMIXM=grid%ozmixm, PIN=grid%pin &
336 & ,M_PS_1=grid%m_ps_1, M_PS_2=grid%m_ps_2, AEROSOLC_1=grid%aerosolc_1 &
337 & ,AEROSOLC_2=grid%aerosolc_2, M_HYBI0=grid%m_hybi &
338 & ,ABSTOT=grid%abstot, ABSNXT=grid%absnxt, EMSTOT=grid%emstot &
339 & ,RADTACTTIME=grid%radtacttime &
340 & ,CU_RAD_FEEDBACK=config_flags%cu_rad_feedback &
341 & ,QC_ADJUST=grid%GD_CLOUD_B , QI_ADJUST=grid%GD_CLOUD2_B &
343 & ,AER_RA_FEEDBACK=config_flags%aer_ra_feedback &
344 & ,PM2_5_DRY=grid%pm2_5_dry, PM2_5_WATER=grid%pm2_5_water &
345 & ,PM2_5_DRY_EC=grid%pm2_5_dry_ec &
346 & ,TAUAER300=grid%tauaer1, TAUAER400=grid%tauaer2 & ! jcb
347 & ,TAUAER600=grid%tauaer3, TAUAER999=grid%tauaer4 & ! jcb
348 & ,GAER300=grid%gaer1, GAER400=grid%gaer2, GAER600=grid%gaer3, GAER999=grid%gaer4 & ! jcb
349 & ,WAER300=grid%waer1, WAER400=grid%waer2, WAER600=grid%waer3, WAER999=grid%waer4 & ! jcb
350 & ,TAUAERlw1 =grid%tauaerlw1, TAUAERlw2=grid%tauaerlw2 &
351 & ,TAUAERlw3 =grid%tauaerlw3, TAUAERlw4=grid%tauaerlw4 &
352 & ,TAUAERlw5 =grid%tauaerlw5, TAUAERlw6=grid%tauaerlw6 &
353 & ,TAUAERlw7 =grid%tauaerlw7, TAUAERlw8=grid%tauaerlw8 &
354 & ,TAUAERlw9 =grid%tauaerlw9, TAUAERlw10=grid%tauaerlw10 &
355 & ,TAUAERlw11 =grid%tauaerlw11, TAUAERlw12=grid%tauaerlw12 &
356 & ,TAUAERlw13 =grid%tauaerlw13, TAUAERlw14=grid%tauaerlw14 &
357 & ,TAUAERlw15 =grid%tauaerlw15, TAUAERlw16=grid%tauaerlw16 &
358 & ,progn=config_flags%progn &
360 & ,slope_rad=config_flags%slope_rad,topo_shading=config_flags%topo_shading &
361 & ,shadowmask=grid%shadowmask,ht=grid%ht,dx=grid%dx,dy=grid%dy )
363 BENCH_END(rad_driver_tim)
365 !********* Surface driver
368 BENCH_START(surf_driver_tim)
370 !-----------------------------------------------------------------
371 ! urban related variable are added to arguments of surface_driver
372 !-----------------------------------------------------------------
373 num_roof_layers = grid%num_soil_layers !urban
374 num_wall_layers = grid%num_soil_layers !urban
375 num_road_layers = grid%num_soil_layers !urban
376 CALL nl_get_iswater(grid%id, iswater)
377 CALL nl_get_isurban(grid%id, isurban)
378 call nl_get_mminlu(grid%id, mminlu)
380 CALL wrf_debug ( 200 , ' call surface_driver' )
382 CALL surface_driver( &
383 & ACGRDFLX=grid%acgrdflx ,ACHFX=grid%achfx ,ACLHF=grid%aclhf &
384 & ,ACSNOM=grid%acsnom ,ACSNOW=grid%acsnow ,AKHS=grid%akhs &
385 & ,AKMS=grid%akms ,ALBBCK=grid%albbck ,ALBEDO=grid%albedo &
386 & ,EMBCK=grid%embck &
387 & ,BR=br ,CANWAT=grid%canwat ,CHKLOWQ=chklowq &
388 & ,CT=grid%ct ,DT=grid%dt ,DX=grid%dx &
389 & ,DZ8W=dz8w ,DZS=grid%dzs ,FLHC=grid%flhc &
390 & ,FLQC=grid%flqc ,GLW=grid%glw ,GRDFLX=grid%grdflx &
391 & ,GSW=grid%gsw ,SWDOWN=grid%swdown ,GZ1OZ0=gz1oz0 ,HFX=grid%hfx &
392 & ,HT=grid%ht ,IFSNOW=config_flags%ifsnow ,ISFFLX=config_flags%isfflx &
393 & ,FRACTIONAL_SEAICE=config_flags%fractional_seaice &
394 & ,SEAICE_ALBEDO_OPT=config_flags%seaice_albedo_opt &
395 & ,TICE2TSK_IF2COLD=config_flags%tice2tsk_if2cold &
396 & ,ISLTYP=grid%isltyp ,ITIMESTEP=grid%itimestep, JULIAN_IN=grid%julian &
397 & ,IVGTYP=grid%ivgtyp ,LH=grid%lh ,LOWLYR=grid%lowlyr &
398 & ,MAVAIL=grid%mavail ,NUM_SOIL_LAYERS=config_flags%num_soil_layers &
399 & ,P8W=grid%p_hyd_w ,PBLH=grid%pblh ,PI_PHY=pi_phy &
400 & ,PSFC=grid%psfc ,PSHLTR=grid%pshltr ,PSIH=psih &
401 & ,BLDT=grid%bldt ,CURR_SECS=curr_secs, ADAPT_STEP_FLAG=adapt_step_flag &
402 & ,BLDTACTTIME=grid%bldtacttime &
403 & ,PSIM=psim ,P_PHY=grid%p_hyd ,Q10=grid%q10 &
404 & ,Q2=grid%q2 ,QFX=grid%qfx ,QSFC=grid%qsfc &
405 & ,QSHLTR=grid%qshltr ,QZ0=grid%qz0 ,RAINCV=grid%raincv &
406 & ,RA_LW_PHYSICS=config_flags%ra_lw_physics ,RHO=rho &
407 & ,RMOL=grid%rmol ,SFCEVP=grid%sfcevp ,SFCEXC=grid%sfcexc &
408 & ,SFCRUNOFF=grid%sfcrunoff &
409 & ,SF_SFCLAY_PHYSICS=config_flags%sf_sfclay_physics &
410 & ,SF_SURFACE_PHYSICS=config_flags%sf_surface_physics ,SH2O=grid%sh2o &
411 & ,SHDMAX=grid%shdmax ,SHDMIN=grid%shdmin ,SMOIS=grid%smois &
412 & ,SMSTAV=grid%smstav ,SMSTOT=grid%smstot ,SNOALB=grid%snoalb &
413 & ,SNOW=grid%snow ,SNOWC=grid%snowc ,SNOWH=grid%snowh &
414 & ,SMCREL=grid%smcrel &
415 & ,SST=grid%sst ,SST_UPDATE=grid%sst_update &
416 & ,SSTSK=grid%sstsk ,DTW=grid%dtw ,SST_SKIN=grid%sst_skin &
417 & ,SCM_FORCE_SKINTEMP=grid%scm_force_skintemp &
418 & ,SCM_FORCE_FLUX=grid%scm_force_flux &
419 & ,STEPBL=grid%stepbl ,TH10=grid%th10 ,TH2=grid%th2 &
420 & ,THZ0=grid%thz0 ,TH_PHY=th_phy ,TKE_PBL=grid%tke_pbl &
421 & ,TMN=grid%tmn ,TSHLTR=grid%tshltr ,TSK=grid%tsk &
422 & ,TYR=grid%tyr ,TYRA=grid%tyra ,TDLY=grid%tdly &
423 & ,TLAG=grid%tlag ,LAGDAY=config_flags%lagday ,NYEAR=grid%nyear &
424 & ,NDAY=grid%nday ,TMN_UPDATE=grid%tmn_update ,YR=yr &
425 & ,TSLB=grid%tslb ,T_PHY=t_phy ,U10=grid%u10 &
426 & ,URATX=grid%uratx ,VRATX=grid%vratx ,TRATX=grid%tratx &
427 & ,UDRUNOFF=grid%udrunoff ,UST=grid%ust ,UZ0=grid%uz0 &
428 & ,U_FRAME=grid%u_frame ,U_PHY=u_phy ,V10=grid%v10 &
429 & ,VEGFRA=grid%vegfra ,VZ0=grid%vz0 ,V_FRAME=grid%v_frame &
430 & ,V_PHY=v_phy ,WARM_RAIN=grid%warm_rain &
431 & ,WSPD=wspd ,XICE=grid%xice ,XLAND=grid%xland &
432 & ,Z0=grid%z0 ,Z=grid%z ,ZNT=grid%znt &
433 & ,ZS=grid%zs ,XICEM=grid%xicem ,ISICE=grid%landuse_isice&
434 & ,USTM=grid%ustm ,CK=grid%ck ,CKA=grid%cka &
435 & ,CD=grid%cd ,CDA=grid%cda &
436 & ,ISFTCFLX=config_flags%isftcflx, IZ0TLND=config_flags%iz0tlnd &
437 & ,OMLCALL=config_flags%omlcall ,OML_HML0=config_flags%oml_hml0 ,OML_GAMMA=config_flags%oml_gamma &
438 & ,TML=grid%tml, T0ML=grid%t0ml, HML=grid%hml, H0ML=grid%h0ml, HUML=grid%huml, HVML=grid%hvml, F=grid%f &
439 & ,TMOML=grid%TMOML,ISWATER=iswater &
440 & ,SLOPE_RAD=config_flags%slope_rad,TOPO_SHADING=config_flags%topo_shading & ! solar
441 & ,SHADOWMASK=grid%shadowmask & ! solar
442 & ,SLOPE=grid%slope, SLP_AZI=grid%slp_azi, SWNORM=grid%swnorm & ! solar
443 & ,DECLIN=grid%declin ,SOLCON=grid%solcon ,COSZEN=grid%coszen ,HRANG=grid%hrang &
444 & ,xlat_urb2d=grid%XLAT & !I urban
445 & ,NUM_ROOF_LAYERS=num_roof_layers & !I urban
446 & ,NUM_WALL_LAYERS=num_wall_layers & !I urban
447 & ,NUM_ROAD_LAYERS=num_road_layers &
448 & ,DZR=grid%dzr ,DZB=grid%dzb ,DZG=grid%dzg & !I urban
449 & ,TR_URB2D=grid%tr_urb2d ,TB_URB2D=grid%tb_urb2d &
450 & ,TG_URB2D=grid%tg_urb2d & !H urban
451 & ,TC_URB2D=grid%tc_urb2d ,QC_URB2D=grid%qc_urb2d & !H urban
452 & ,UC_URB2D=grid%uc_urb2d & !H urban
453 & ,XXXR_URB2D=grid%xxxr_urb2d &
454 & ,XXXB_URB2D=grid%xxxb_urb2d & !H urban
455 & ,XXXG_URB2D=grid%xxxg_urb2d &
456 & ,XXXC_URB2D=grid%xxxc_urb2d & !H urban
457 & ,TRL_URB3D=grid%trl_urb3d ,TBL_URB3D=grid%tbl_urb3d & !H urban
458 & ,TGL_URB3D=grid%tgl_urb3d & !H urban
459 & ,SH_URB2D=grid%sh_urb2d ,LH_URB2D=grid%lh_urb2d &
460 & ,G_URB2D=grid%g_urb2d & !H urban
461 & ,RN_URB2D=grid%rn_urb2d , TS_URB2D=grid%ts_urb2d & !H urban
462 & ,FRC_URB2D=grid%frc_urb2d & !H urban
463 & ,UTYPE_URB2D=grid%utype_urb2d & !H urban
464 ! Optional urban for BEP scheme
465 & ,SF_URBAN_PHYSICS=config_flags%sf_urban_physics &
466 & ,NUM_URBAN_LAYERS=config_flags%num_urban_layers & !multi-layer urban
467 & ,TRB_URB4D=grid%trb_urb4d,TW1_URB4D=grid%tw1_urb4d & !multi-layer urban
468 & ,TW2_URB4D=grid%tw2_urb4d,TGB_URB4D=grid%tgb_urb4d & !multi-layer urban
469 & ,TLEV_URB3D=grid%tlev_urb3d & !multi-layer urban
470 & ,QLEV_URB3D=grid%qlev_urb3d & !multi-layer urban
471 & ,TW1LEV_URB3D=grid%tw1lev_urb3d & !multi-layer urban
472 & ,TW2LEV_URB3D=grid%tw2lev_urb3d & !multi-layer urban
473 & ,TGLEV_URB3D=grid%tglev_urb3d & !multi-layer urban
474 & ,TFLEV_URB3D=grid%tflev_urb3d & !multi-layer urban
475 & ,SF_AC_URB3D=grid%sf_ac_urb3d & !multi-layer urban
476 & ,LF_AC_URB3D=grid%lf_ac_urb3d & !multi-layer urban
477 & ,CM_AC_URB3D=grid%cm_ac_urb3d & !multi-layer urban
478 & ,SFVENT_URB3D=grid%sfvent_urb3d & !multi-layer urban
479 & ,LFVENT_URB3D=grid%lfvent_urb3d & !multi-layer urban
480 & ,SFWIN1_URB3D=grid%sfwin1_urb3d & !multi-layer urban
481 & ,SFWIN2_URB3D=grid%sfwin2_urb3d & !multi-layer urban
482 & ,SFW1_URB3D=grid%sfw1_urb3d,SFW2_URB3D=grid%sfw2_urb3d & !multi-layer urban
483 & ,SFR_URB3D=grid%sfr_urb3d,SFG_URB3D=grid%sfg_urb3d & !multi-layer urban
484 & ,GMT=grid%gmt,XLAT=grid%xlat,XLONG=grid%xlong,JULDAY=grid%julday &
485 & ,A_U_BEP=grid%a_u_bep,A_V_BEP=grid%a_v_bep,A_T_BEP=grid%a_t_bep &
486 & ,A_Q_BEP=grid%a_q_bep &
487 & ,B_U_BEP=grid%b_u_bep,B_V_BEP=grid%b_v_bep,B_T_BEP=grid%b_t_bep &
488 & ,B_Q_BEP=grid%b_q_bep &
489 & ,SF_BEP=grid%sf_bep,VL_BEP=grid%vl_bep &
490 & ,A_E_BEP=grid%a_e_bep,B_E_BEP=grid%b_e_bep,DLG_BEP=grid%dlg_bep &
491 & ,DL_U_BEP=grid%dl_u_bep &
492 & ,CMR_SFCDIF=grid%cmr_sfcdif, CHR_SFCDIF=grid%chr_sfcdif & !I/O urban
493 & ,CMC_SFCDIF=grid%cmc_sfcdif, CHC_SFCDIF=grid%chc_sfcdif & !I/O urban
495 & ,LANDUSEF=grid%landusef, SOILCTOP=grid%soilctop & ! P-X LSM
496 & ,SOILCBOT=grid%soilcbot & ! P-X LSM
497 & ,RA=grid%ra, RS=grid%rs, LAI=grid%lai & ! P-X LSM
498 & ,NLCAT=grid%num_land_cat, NSCAT=grid%num_soil_cat & ! P-X LSM
499 & ,VEGF_PX=grid%vegf_px, SNOWNCV=grid%snowncv & ! P-X LSM
500 & ,ANAL_INTERVAL=config_flags%auxinput9_interval_s+config_flags%auxinput9_interval_m*60 & ! P-X LSM
501 & ,PXLSM_SMOIS_INIT=config_flags%pxlsm_smois_init & ! P-X LSM
502 & ,PXLSM_SOIL_NUDGE=config_flags%pxlsm_soil_nudge & ! P-X LSM
503 ! SSiB LSM variables (fds 06/2010)
504 & ,alswvisdir=grid%alswvisdir, alswvisdif=grid%alswvisdif & !ssib
505 & ,alswnirdir=grid%alswnirdir, alswnirdif=grid%alswnirdif & !ssib
506 & ,swvisdir=grid%swvisdir, swvisdif=grid%swvisdif & !ssib
507 & ,swnirdir=grid%swnirdir, swnirdif=grid%swnirdif & !ssib
508 & ,ssib_br=grid%ssib_br, ssib_fm=grid%ssib_fm & !ssib
509 & ,ssib_fh=grid%ssib_fh, ssib_cm=grid%ssib_cm & !ssib
510 & ,ssibxdd=grid%ssibxdd, ssib_lhf=grid%ssib_lhf & !ssib
511 & ,ssib_shf=grid%ssib_shf, ssib_ghf=grid%ssib_ghf & !ssib
512 & ,ssib_egs=grid%ssib_egs, ssib_eci=grid%ssib_eci & !ssib
513 & ,ssib_ect=grid%ssib_ect, ssib_egi=grid%ssib_egi & !ssib
514 & ,ssib_egt=grid%ssib_egt, ssib_sdn=grid%ssib_sdn & !ssib
515 & ,ssib_sup=grid%ssib_sup, ssib_ldn=grid%ssib_ldn & !ssib
516 & ,ssib_lup=grid%ssib_lup, ssib_wat=grid%ssib_wat & !ssib
517 & ,ssib_shc=grid%ssib_shc, ssib_shg=grid%ssib_shg & !ssib
518 & ,ssib_lai=grid%ssib_lai, ssib_vcf=grid%ssib_vcf & !ssib
519 & ,ssib_z00=grid%ssib_z00, ssib_veg=grid%ssib_veg & !ssib
520 & ,cldfra=grid%cldfra & !ssib
521 & ,ISNOW=grid%isnow, SWE=grid%swe, SNOWDEN=grid%snowden & !ssib snow
522 & ,SNOWDEPTH=grid%snowdepth, TKAIR=grid%tkair & !ssib snow
523 & ,DZO1=grid%dzo1, WO1=grid%wo1, TSSN1=grid%tssn1, TSSNO1=grid%tssno1 & !ssib snow
524 & ,BWO1=grid%bwo1, BTO1=grid%bto1, CTO1=grid%cto1, FIO1=grid%fio1 & !ssib snow
525 & ,FLO1=grid%flo1, BIO1=grid%bio1, BLO1=grid%blo1, HO1=grid%ho1 & !ssib snow
526 & ,DZO2=grid%dzo2, WO2=grid%wo2, TSSN2=grid%tssn2, TSSNO2=grid%tssno2 & !ssib snow
527 & ,BWO2=grid%bwo2, BTO2=grid%bto2, CTO2=grid%cto2, FIO2=grid%fio2 & !ssib snow
528 & ,FLO2=grid%flo2, BIO2=grid%bio2, BLO2=grid%blo2, HO2=grid%ho2 & !ssib snow
529 & ,DZO3=grid%dzo3, WO3=grid%wo3, TSSN3=grid%tssn3, TSSNO3=grid%tssno3 & !ssib snow
530 & ,BWO3=grid%bwo3, BTO3=grid%bto3, CTO3=grid%cto3, FIO3=grid%fio3 & !ssib snow
531 & ,FLO3=grid%flo3, BIO3=grid%bio3, BLO3=grid%blo3, HO3=grid%ho3 & !ssib snow
532 & ,DZO4=grid%dzo4, WO4=grid%wo4, TSSN4=grid%tssn4, TSSNO4=grid%tssno4 & !ssib snow
533 & ,BWO4=grid%bwo4, BTO4=grid%bto4, CTO4=grid%cto4, FIO4=grid%fio4 & !ssib snow
534 & ,FLO4=grid%flo4, BIO4=grid%bio4, BLO4=grid%blo4, HO4=grid%ho4 & !ssib snow
535 & ,RA_SW_PHYSICS=config_flags%ra_sw_physics & !ssib
536 !------------------------------------------------------------------------------
537 ! Optional PX LSM nudging
538 & ,t2_ndg_old=grid%t2_ndg_old &
539 & ,q2_ndg_old=grid%q2_ndg_old &
540 & ,t2_ndg_new=grid%t2_ndg_new &
541 & ,q2_ndg_new=grid%q2_ndg_new &
542 & ,sn_ndg_old=grid%sn_ndg_old &
543 & ,sn_ndg_new=grid%sn_ndg_new &
544 & ,idveg=config_flags%dveg, iopt_crs=config_flags%opt_crs &
545 & ,iopt_btr=config_flags%opt_btr, iopt_run=config_flags%opt_run &
546 & ,iopt_sfc=config_flags%opt_sfc, iopt_frz=config_flags%opt_frz &
547 & ,iopt_inf=config_flags%opt_inf, iopt_rad=config_flags%opt_rad &
548 & ,iopt_alb=config_flags%opt_alb ,iopt_snf=config_flags%opt_snf &
549 & ,iopt_tbot=config_flags%opt_tbot, iopt_stc=config_flags%opt_stc &
550 & ,isnowxy=grid%isnowxy &
551 & ,tvxy=grid%tvxy ,tgxy=grid%tgxy &
552 & ,canicexy=grid%canicexy,canliqxy=grid%canliqxy &
553 & ,eahxy=grid%eahxy &
554 & ,tahxy=grid%tahxy ,cmxy=grid%cmxy ,chxy=grid%chxy &
555 & ,fwetxy=grid%fwetxy ,sneqvoxy=grid%sneqvoxy &
556 & ,alboldxy=grid%alboldxy ,qsnowxy=grid%qsnowxy &
557 & ,wslakexy=grid%wslakexy ,zwtxy=grid%zwtxy ,waxy=grid%waxy &
558 & ,wtxy=grid%wtxy ,tsnoxy=grid%tsnoxy ,zsnsoxy=grid%zsnsoxy &
559 & ,snicexy=grid%snicexy ,snliqxy=grid%snliqxy &
560 & ,lfmassxy=grid%lfmassxy ,rtmassxy=grid%rtmassxy &
561 & ,stmassxy=grid%stmassxy ,woodxy=grid%woodxy &
562 & ,stblcpxy=grid%stblcpxy ,fastcpxy=grid%fastcpxy &
563 & ,xsaixy=grid%xsaixy ,tradxy=grid%tradxy &
564 & ,tsxy=grid%tsxy ,neexy=grid%neexy ,gppxy=grid%gppxy &
565 & ,nppxy=grid%nppxy ,fvegxy=grid%fvegxy ,qinxy=grid%qinxy &
566 & ,runsfxy=grid%runsfxy ,runsbxy=grid%runsbxy ,ecanxy=grid%ecanxy &
567 & ,edirxy=grid%edirxy ,etranxy=grid%etranxy ,fsaxy=grid%fsaxy &
568 & ,firaxy=grid%firaxy &
569 & ,aparxy=grid%aparxy ,psnxy=grid%psnxy &
570 & ,savxy=grid%savxy ,sagxy=grid%sagxy ,fsnoxy=grid%fsnoxy &
571 & ,t2mvxy=grid%t2mvxy ,t2mbxy=grid%t2mbxy ,chstarxy=grid%chstarxy &
572 & ,rssunxy=grid%rssunxy ,rsshaxy=grid%rsshaxy ,bgapxy=grid%bgapxy &
573 & ,wgapxy=grid%wgapxy ,gapxy=grid%gapxy, tgvxy=grid%tgvxy &
574 & ,tgbxy=grid%tgbxy,q2mvxy=grid%q2mvxy, q2mbxy=grid%q2mbxy &
575 & ,chvxy=grid%chvxy,chbxy=grid%chbxy &
577 & ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
578 & ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
579 & , I_START=grid%i_start,I_END=min(grid%i_end, ide-1) &
580 & , J_START=grid%j_start,J_END=min(grid%j_end, jde-1) &
581 & , KTS=k_start, KTE=min(k_end,kde-1) &
582 & , NUM_TILES=grid%num_tiles &
583 ! Variables required by TEMF PBL - WA 1/7/09
584 ,te_temf=grid%te_temf,hd_temf=grid%hd_temf &
585 ,fCor=grid%f,exch_temf=exch_temf,wm_temf=grid%wm_temf &
586 ! Variables required by IDEAL SCM sfc scheme - WA 1/6/10
587 ,hfx_force=grid%hfx_force,lh_force=grid%lh_force &
588 ,tsk_force=grid%tsk_force &
589 ,hfx_force_tend=grid%hfx_force_tend &
590 ,lh_force_tend=grid%lh_force_tend &
591 ,tsk_force_tend=grid%tsk_force_tend &
593 & ,QV_CURR=moist(ims,kms,jms,P_QV), F_QV=F_QV &
594 & ,QC_CURR=moist(ims,kms,jms,P_QC), F_QC=F_QC &
595 & ,QR_CURR=moist(ims,kms,jms,P_QR), F_QR=F_QR &
596 & ,QI_CURR=moist(ims,kms,jms,P_QI), F_QI=F_QI &
597 & ,QS_CURR=moist(ims,kms,jms,P_QS), F_QS=F_QS &
598 & ,QG_CURR=moist(ims,kms,jms,P_QG), F_QG=F_QG &
599 & ,CAPG=grid%capg, EMISS=grid%emiss, HOL=hol,MOL=grid%mol &
600 & ,T2OBS=grid%t2obs, Q2OBS=grid%q2obs &
601 & ,RAINBL=grid%rainbl,SR=grid%sr,RAINSHV=grid%rainshv &
602 & ,RAINNCV=grid%rainncv,REGIME=grid%regime,T2=grid%t2,THC=grid%thc &
603 & ,QSG=grid%qsg,QVG=grid%qvg,QCG=grid%qcg,SOILT1=grid%soilt1,TSNAV=grid%tsnav & ! ruc lsm
604 & ,SMFR3D=grid%smfr3d,KEEPFR3DFLAG=grid%keepfr3dflag,DEW=grid%dew & ! ruc lsm
605 & ,POTEVP=grid%POTEVP, SNOPCX=grid%SNOPCX, SOILTB=grid%SOILTB & ! ruc lsm
606 & ,MOSAIC_LU=config_flags%mosaic_lu & ! RUC LSM
607 & ,MOSAIC_SOIL=config_flags%mosaic_soil & ! RUC LSM
608 & ,ISURBAN=isurban, MMINLU=TRIM(mminlu) &
609 & ,SNOTIME = grid%SNOTIME &
610 & ,RDLAI2D=config_flags%rdlai2d &
611 & ,usemonalb=config_flags%usemonalb &
612 & ,NOAHRES=grid%noahres &
614 & ,ch=grid%ch,tsq=grid%tsq,qsq=grid%qsq,cov=grid%cov &
616 BENCH_END(surf_driver_tim)
621 CALL wrf_debug ( 200 , ' call pbl_driver' )
622 BENCH_START(pbl_driver_tim)
624 & AKHS=grid%akhs ,AKMS=grid%akms &
625 & ,BL_PBL_PHYSICS=config_flags%bl_pbl_physics &
626 & ,BLDT=grid%bldt, CURR_SECS=curr_secs, ADAPT_STEP_FLAG=adapt_step_flag &
627 & ,BLDTACTTIME=grid%bldtacttime &
628 & ,BR=br ,CHKLOWQ=chklowq ,CT=grid%ct &
629 & ,DT=grid%dt ,DX=grid%dx ,DZ8W=dz8w &
630 & ,EXCH_H=grid%exch_h ,EXCH_M=grid%exch_m &
631 & ,F=grid%f ,GRDFLX=grid%grdflx &
632 & ,GZ1OZ0=gz1oz0 ,HFX=grid%hfx ,HT=grid%ht &
633 & ,ID=grid%id ,ITIMESTEP=grid%itimestep ,KPBL=grid%kpbl &
634 & ,LH=grid%lh ,LOWLYR=grid%lowlyr ,P8W=grid%p_hyd_w &
635 & ,PBLH=grid%pblh ,PI_PHY=pi_phy ,PSIH=psih &
636 & ,PSIM=psim ,P_PHY=grid%p_hyd ,QFX=grid%qfx &
637 & ,QSFC=grid%qsfc ,QZ0=grid%qz0 ,MIXHT=mixht &
638 & ,RA_LW_PHYSICS=config_flags%ra_lw_physics &
639 & ,RHO=rho ,RQCBLTEN=grid%rqcblten ,RQIBLTEN=grid%rqiblten &
640 & ,RQVBLTEN=grid%rqvblten ,RTHBLTEN=grid%rthblten ,RUBLTEN=grid%rublten &
641 & ,RVBLTEN=grid%rvblten ,SNOW=grid%snow ,STEPBL=grid%stepbl &
642 & ,THZ0=grid%thz0 ,TH_PHY=th_phy &
643 & ,TSK=grid%tsk ,T_PHY=grid%t_phy ,UST=grid%ust &
644 & ,U10=grid%u10 ,UZ0=grid%uz0 ,U_FRAME=grid%u_frame ,U_PHY=u_phy &
645 & ,V10=grid%v10 ,VZ0=grid%vz0 ,V_FRAME=grid%v_frame ,V_PHY=v_phy &
647 & ,WARM_RAIN=grid%warm_rain ,WSPD=wspd &
648 & ,XICE=grid%xice ,XLAND=grid%xland ,Z=grid%z &
651 & ,CTOPO=grid%ctopo,CTOPO2=grid%ctopo2 &
652 ! variables added for BEP
653 & ,FRC_URB2D=grid%frc_urb2d &
654 & ,A_U_BEP=grid%a_u_bep,A_V_BEP=grid%a_v_bep,A_T_BEP=grid%a_t_bep &
655 & ,A_Q_BEP=grid%a_q_bep &
656 & ,B_U_BEP=grid%b_u_bep,B_V_BEP=grid%b_v_bep,B_T_BEP=grid%b_t_bep &
657 & ,B_Q_BEP=grid%b_q_bep &
658 & ,SF_BEP=grid%sf_bep,VL_BEP=grid%vl_bep &
659 & ,A_E_BEP=grid%a_e_bep,B_E_BEP=grid%b_e_bep,DLG_BEP=grid%dlg_bep &
660 & ,DL_U_BEP=grid%dl_u_bep &
661 & ,SF_SFCLAY_PHYSICS=config_flags%sf_sfclay_physics &
662 & ,SF_URBAN_PHYSICS=config_flags%sf_urban_physics &
664 ! add tke_pbl, and turbulent fluxes
665 & ,TKE_PBL=grid%tke_pbl,EL_PBL=grid%el_pbl,WU_TUR=grid%wu_tur,WV_tur=grid%wv_tur,WT_tur=grid%wt_tur,WQ_tur=grid%wq_tur &
666 ! end add tke_pbl, and turbulent fluxes
667 & ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
668 & ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
669 & ,I_START=grid%i_start,I_END=min(grid%i_end, ide-1) &
670 & ,J_START=grid%j_start,J_END=min(grid%j_end, jde-1) &
671 & ,KTS=k_start, KTE=min(k_end,kde-1) &
672 & ,NUM_TILES=grid%num_tiles &
673 ! Variables Required by ACM PBL - jp
674 & ,ZNU=grid%znu,ZNW=grid%znw,MUT=grid%mut,P_TOP=grid%p_top &
675 ! Variables required by TEMF PBL - WA 9/9/08
676 ,te_temf=grid%te_temf &
677 ,kh_temf=grid%kh_temf,km_temf=grid%km_temf &
678 ,shf_temf=grid%shf_temf,qf_temf=grid%qf_temf &
679 ,uw_temf=grid%uw_temf,vw_temf=grid%vw_temf &
680 ,hd_temf=grid%hd_temf,lcl_temf=grid%lcl_temf &
681 ,wupd_temf=grid%wupd_temf,mf_temf=grid%mf_temf &
682 ,thup_temf=grid%thup_temf,qtup_temf=grid%qtup_temf &
683 ,qlup_temf=grid%qlup_temf &
684 ,cf3d_temf=grid%cf3d_temf,cfm_temf=grid%cfm_temf &
685 ,hct_temf=grid%hct_temf &
686 ,flhc=grid%flhc,flqc=grid%flqc &
687 ,exch_temf=exch_temf &
689 & ,QV_CURR=moist(ims,kms,jms,P_QV), F_QV=F_QV &
690 & ,QC_CURR=moist(ims,kms,jms,P_QC), F_QC=F_QC &
691 & ,QR_CURR=moist(ims,kms,jms,P_QR), F_QR=F_QR &
692 & ,QI_CURR=moist(ims,kms,jms,P_QI), F_QI=F_QI &
693 & ,QS_CURR=moist(ims,kms,jms,P_QS), F_QS=F_QS &
694 & ,QG_CURR=moist(ims,kms,jms,P_QG), F_QG=F_QG &
695 & ,HOL=HOL, MOL=grid%mol, REGIME=grid%REGIME &
697 & ,QKE=scalar(ims,kms,jms,P_qke), tsq=grid%tsq, qsq=grid%qsq, cov=grid%cov &
698 & ,EL_MYNN=grid%el_mynn,DQKE=grid%dqke,QWT=grid%qWT &
699 & ,QSHEAR=grid%qSHEAR,QBUOY=grid%qBUOY,QDISS=grid%qDISS &
700 & ,rmol=grid%rmol, ch=grid%ch &
701 & ,qcg=grid%qcg, grav_settling=grid%grav_settling &
702 ! & ,K_m=grid%K_m, K_h=grid%K_h, K_q=grid%K_q &
704 & ,GWD_OPT=config_flags%gwd_opt &
705 & ,DTAUX3D=grid%dtaux3d,DTAUY3D=grid%dtauy3d &
706 & ,DUSFCG=grid%dusfcg,DVSFCG=grid%dvsfcg &
707 & ,VAR2D=grid%var2d,OC12D=grid%oc12d &
708 & ,OA1=grid%oa1,OA2=grid%oa2,OA3=grid%oa3,OA4=grid%oa4 &
709 & ,OL1=grid%ol1,OL2=grid%ol2,OL3=grid%ol3,OL4=grid%ol4 &
710 & ,MFSHCONV=config_flags%mfshconv &
711 & ,MASSFLUX_EDKF=grid%massflux_EDKF &
712 & ,ENTR_EDKF=grid%entr_EDKF, DETR_EDKF=grid%detr_EDKF &
713 & ,THL_UP=grid%thl_up &
714 & ,THV_UP=grid%thv_up, RT_UP=grid%rt_up ,RV_UP=grid%rv_up &
715 & ,RC_UP=grid%rc_up, U_UP=grid% u_up, V_UP=grid%v_up &
716 & ,FRAC_UP=grid%frac_up, RC_MF=grid%RC_MF &
717 ! For Wind Turbine Drag Parameterizations
719 & ,XLAT_U=grid%xlat_u,XLONG_U=grid%xlong_u &
720 !Variables required for camuwpbl scheme
721 & ,Z_AT_W=grid%z_at_w,CLDFRA=grid%cldfra &
722 & ,RTHRATENLW=grid%rthratenlw,TAURESX2D=grid%tauresx2d &
723 & ,TAURESY2D=grid%tauresy2d &
724 & ,TPERT2D=grid%tpert2d,QPERT2D=grid%qpert2d &
725 & ,WPERT2D=grid%wpert2d &
726 & ,XLAT_V=grid%xlat_v,XLONG_V=grid%xlong_v &
730 BENCH_END(pbl_driver_tim)
735 ! Jan Mandel's call to SFIRE
737 IF ((grid%sr_x > 0 .OR. grid%sr_y > 0) .AND. config_flags%ifire == 2) THEN
739 BENCH_START(fire_driver_tim)
740 if(config_flags%ifire.eq.2)then
741 ! initialization moved to start_em:start_domain_em
742 ! if(grid%initestep.eq.1) &
743 ! call sfire_driver_em_init ( grid , config_flags &
744 ! ,ids,ide, kds,kde, jds,jde &
745 ! ,ims,ime, kms,kme, jms,jme &
746 ! ,ips,ipe, kps,kpe, jps,jpe )
747 ! one timestep of the fire model
748 call sfire_driver_em_step ( grid , config_flags &
749 ,ids,ide, kds,kde, jds,jde &
750 ,ims,ime, kms,kme, jms,jme &
751 ,ips,ipe, kps,kpe, jps,jpe &
752 ,rho,grid%z_at_w,dz8w)
755 BENCH_END(fire_driver_tim)
761 CALL wrf_debug ( 200 , ' call cumulus_driver' )
763 #if ( WRF_DFI_RADAR == 1 )
765 ! if (config_flags%dfi_radar == 1) then
766 if(grid%dfi_stage == DFI_FWD ) do_capsupress=1
767 if(grid%itimestep <= 31 .and. grid%dfi_stage == DFI_FST ) do_capsupress=1
771 BENCH_START(cu_driver_tim)
772 CALL cumulus_driver(grid &
773 ! Prognostic variables
774 & ,U=u_phy ,V=v_phy ,TH=th_phy ,T=grid%t_phy &
775 & ,W=grid%w_2 ,P=grid%p_hyd ,PI=pi_phy ,RHO=rho &
777 & ,ITIMESTEP=grid%itimestep ,DT=grid%dt ,DX=grid%dx &
778 & ,CUDT=grid%cudt,CURR_SECS=curr_secs,ADAPT_STEP_FLAG=adapt_step_flag &
779 & ,CUDTACTTIME=grid%cudtacttime &
780 & ,RAINC=grid%rainc ,RAINCV=grid%raincv ,PRATEC=grid%pratec &
782 & ,HTOP=grid%cutop ,HBOT=grid%cubot ,KPBL=grid%kpbl &
783 & ,Z=grid%z ,Z_AT_W=grid%z_at_w ,MAVAIL=grid%mavail ,PBLH=grid%pblh &
784 & ,DZ8W=dz8w ,P8W=grid%p_hyd_w, PSFC=grid%psfc, TSK=grid%tsk &
785 & ,TKE_PBL=grid%tke_pbl, UST=grid%ust &
786 & ,W0AVG=grid%w0avg ,STEPCU=grid%stepcu &
787 & ,CLDEFI=grid%cldefi ,LOWLYR=grid%lowlyr ,XLAND=grid%xland &
788 & ,APR_GR=grid%apr_gr ,APR_W=grid%apr_w ,APR_MC=grid%apr_mc &
789 & ,APR_ST=grid%apr_st ,APR_AS=grid%apr_as ,APR_CAPMA=grid%apr_capma &
790 & ,APR_CAPME=grid%apr_capme ,APR_CAPMI=grid%apr_capmi &
791 & ,MASS_FLUX=grid%mass_flux ,XF_ENS=grid%xf_ens &
792 & ,PR_ENS=grid%pr_ens ,HT=grid%ht,EDT_OUT=grid%edt_out &
793 & ,imomentum=grid%imomentum,clos_choice=grid%clos_choice &
794 & ,ishallow=config_flags%ishallow &
795 & ,cugd_tten=grid%cugd_tten,cugd_qvten=grid%cugd_qvten,cugd_qcten=grid%cugd_qcten &
796 & ,cugd_ttens=grid%cugd_ttens,cugd_qvtens=grid%cugd_qvtens &
797 & ,ENSDIM=config_flags%ensdim ,MAXIENS=config_flags%maxiens ,MAXENS=config_flags%maxens &
798 & ,MAXENS2=config_flags%maxens2 ,MAXENS3=config_flags%maxens3 &
799 & ,CU_ACT_FLAG=cu_act_flag ,WARM_RAIN=grid%warm_rain &
800 & ,HFX=grid%hfx, QFX=grid%qfx &
801 & ,CLDFRA=grid%cldfra, TPERT2D=grid%tpert2d &
802 & ,GSW=grid%gsw,cugd_avedx=config_flags%cugd_avedx &
803 & ,k22_shallow=grid%k22_shallow,kbcon_shallow=grid%kbcon_shallow &
804 & ,ktop_shallow=grid%ktop_shallow,xmb_shallow=grid%xmb_shallow &
805 & ,PERIODIC_X=(config_flags%polar .OR. config_flags%periodic_x) &
806 & ,PERIODIC_Y=config_flags%periodic_y &
807 ! Zhang-McFarlane outputs
808 & ,CAPE=grid%cape ,ZMMU=grid%zmmu ,ZMMD=grid%zmmd &
809 & ,ZMDT=grid%zmdt ,ZMDQ=grid%zmdq &
810 & ,DLF=grid%dlf, RLIQ=grid%rliq &
811 & ,PCONVB=grid%pconvb, PCONVT=grid%pconvt &
812 & ,EVAPTZM=grid%evaptzm, FZSNTZM=grid%fzsntzm, EVSNTZM=grid%evsntzm &
813 & ,EVAPQZM=grid%evapqzm, ZMFLXPRC=grid%zmflxprc &
814 & ,ZMFLXSNW=grid%zmflxsnw, ZMNTPRPD=grid%zmntprpd &
815 & ,ZMNTSNPD=grid%zmntsnpd, ZMEIHEAT=grid%zmeiheat &
816 & ,CMFMC=grid%cmfmc, CMFMCDZM=grid%cmfmcdzm &
817 & ,PRECCDZM=grid%preccdzm, PRECZ=grid%precz &
818 & ,ZMMTU=grid%zmmtu, ZMMTV=grid%zmmtv &
819 & ,ZMUPGU=grid%zmupgu, ZMUPGD=grid%zmupgd &
820 & ,ZMVPGU=grid%zmvpgu, ZMVPGD=grid%zmvpgd &
821 & ,ZMICUU=grid%zmicuu, ZMICUD=grid%zmicud &
822 & ,ZMICVU=grid%zmicvu, ZMICVD=grid%zmicvd &
823 & ,ZMDICE=grid%zmdice, ZMDLIQ=grid%zmdliq &
825 & ,pgcon=config_flags%sas_pgcon &
826 & ,CU_PHYSICS=config_flags%cu_physics &
827 & ,BL_PBL_PHYSICS=config_flags%bl_pbl_physics &
828 & ,SF_SFCLAY_PHYSICS=config_flags%sf_sfclay_physics &
829 & ,KFETA_TRIGGER=config_flags%kfeta_trigger &
830 ! Dimension arguments
831 & ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
832 & ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
833 & ,IPS=ips,IPE=ipe, JPS=jps,JPE=jpe, KPS=kps,KPE=kpe &
834 & ,I_START=grid%i_start,I_END=min(grid%i_end, ide-1) &
835 & ,J_START=grid%j_start,J_END=min(grid%j_end, jde-1) &
836 & ,KTS=k_start, KTE=min(k_end,kde-1) &
837 & ,NUM_TILES=grid%num_tiles &
838 ! Moisture tendency arguments
839 & ,RQVCUTEN=grid%rqvcuten , RQCCUTEN=grid%rqccuten &
840 & ,RQSCUTEN=grid%rqscuten , RQICUTEN=grid%rqicuten &
841 & ,RQRCUTEN=grid%rqrcuten &
842 & ,RQVBLTEN=grid%rqvblten , RQVFTEN=grid%rqvften &
843 ! Other tendency arguments
844 & ,RTHRATEN=grid%rthraten , RTHBLTEN=grid%rthblten &
845 & ,RUCUTEN=grid%rucuten , RVCUTEN=grid%rvcuten &
846 & ,RTHCUTEN=grid%rthcuten , RTHFTEN=grid%rthften &
847 ! Moisture tracer arguments
848 & ,QV_CURR=moist(ims,kms,jms,P_QV), F_QV=F_QV &
849 & ,QC_CURR=moist(ims,kms,jms,P_QC), F_QC=F_QC &
850 & ,QR_CURR=moist(ims,kms,jms,P_QR), F_QR=F_QR &
851 & ,QI_CURR=moist(ims,kms,jms,P_QI), F_QI=F_QI &
852 & ,QS_CURR=moist(ims,kms,jms,P_QS), F_QS=F_QS &
853 & ,QG_CURR=moist(ims,kms,jms,P_QG), F_QG=F_QG &
854 ! Variables for Tiedtke and NSAS schemes
856 & ,MP_PHYSICS=config_flags%mp_physics &
858 & ,GD_CLOUD=grid%GD_CLOUD,GD_CLOUD2=grid%GD_CLOUD2 &
860 #if ( WRF_DFI_RADAR == 1 )
861 & ,DO_CAPSUPPRESS=do_capsupress &
863 & ,cfu1=grid%cfu1,cfd1=grid%cfd1,dfu1=grid%dfu1,efu1=grid%efu1,dfd1=grid%dfd1,efd1=grid%efd1,f_flux=l_flux)
864 BENCH_END(cu_driver_tim)
866 ! this for calculating (G3 scheme only) time averaged variables for online (WRF-CHem) or offline (other models) chem runs
868 if(config_flags%cu_diag.eq.1)then
871 DO ij = 1 , grid%num_tiles
872 call convtrans_prep(grid%gd_cloud,grid%gd_cloud2,grid%gd_cloud_a,&
873 & grid%gd_cloud_b,grid%raincv,grid%raincv_a,grid%raincv_b, &
874 & grid%gd_cldfr,moist,p_QV,p_QC,p_qi,T_PHY,P_PHY,num_moist, &
875 & grid%gd_cloud2_a,grid%gd_cloud2_b,grid%convtrans_avglen_m,&
876 & adapt_step_flag,curr_secs, &
877 & grid%itimestep,grid%dt, &
878 & config_flags%cu_physics, &
879 & ids,ide, jds,jde, kds,kde, &
880 & ims,ime, jms,jme, kms,kme &
881 & ,ITS=grid%i_start(ij),ITE=min(grid%i_end(ij), ide-1) &
882 & ,JTS=grid%j_start(ij),JTE=min(grid%j_end(ij), jde-1) &
883 & ,KTS=k_start, KTE=min(k_end,kde-1))
885 !$OMP END PARALLEL DO
888 ! shallow cumulus parameterization
889 CALL wrf_debug ( 200 , ' call shallow_cumulus_driver' )
891 BENCH_START(shcu_driver_tim)
892 CALL shallowcu_driver( &
893 & IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
894 & ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
895 & ,IPS=ips,IPE=ipe, JPS=jps,JPE=jpe, KPS=kps,KPE=kpe &
896 & ,I_START=grid%i_start, I_END=min(grid%i_end, ide-1) &
897 & ,J_START=grid%j_start, J_END=min(grid%j_end, jde-1) &
898 & ,KTS=k_start, KTE=min(k_end, kde-1) &
899 & ,NUM_TILES=grid%num_tiles &
900 & ,U=u_phy, V=v_phy, TH=th_phy, T=t_phy &
901 & ,P=grid%p_hyd, PI=pi_phy, RHO=rho, MOIST=moist &
902 & ,NUM_MOIST=num_moist &
903 & ,ITIMESTEP=grid%itimestep, DT=grid%dt, DX=grid%dx &
905 & ,CURR_SECS=curr_secs, ADAPT_STEP_FLAG=adapt_step_flag &
906 & ,RAINSH=grid%rainsh, PRATESH=grid%pratesh, NCA=grid%nca&
907 & ,RAINSHV=grid%rainshv &
908 & ,Z=grid%z, Z_AT_W=grid%z_at_w, DZ8W=dz8w &
909 & ,MAVAIL=grid%mavail, PBLH=grid%pblh, P8W=grid%p_hyd_w &
910 & ,TKE_PBL=grid%tke_pbl &
911 & ,CLDFRA=grid%cldfra, CLDFRA_OLD=grid%cldfra_old &
912 & ,CLDFRASH=grid%cldfrash, HTOP=grid%htop, HBOT=grid%hbot&
913 & ,SHCU_PHYSICS=grid%shcu_physics &
914 & ,QV_CURR=moist(ims,kms,jms,P_QV) &
915 & ,QC_CURR=moist(ims,kms,jms,P_QC) &
916 & ,QR_CURR=moist(ims,kms,jms,P_QR) &
917 & ,QI_CURR=moist(ims,kms,jms,P_QI) &
918 & ,QS_CURR=moist(ims,kms,jms,P_QI) &
919 & ,QG_CURR=moist(ims,kms,jms,P_QG) &
920 & ,DLF=grid%dlf, RLIQ=grid%rliq, RLIQ2=grid%rliq2 &
921 & ,CMFMC=grid%cmfmc, CMFMC2=grid%cmfmc2 &
922 & ,CUSH=grid%cush, SNOWSH=grid%snowsh &
923 & ,ICWMRSH=grid%icwmrsh, RPRDSH=grid%rprdsh &
924 & ,CBMF=grid%cbmf_cu, CMFSL=grid%cmfsl, CMFLQ=grid%cmflq &
925 & ,EVAPCSH=grid%evapcsh &
926 & ,RQVSHTEN=grid%rqvshten, RQCSHTEN=grid%rqcshten &
927 & ,RQRSHTEN=grid%rqrshten, RQISHTEN=grid%rqishten &
928 & ,RQSSHTEN=grid%rqsshten, RQGSHTEN=grid%rqgshten &
929 & ,RQVBLTEN=grid%rqvblten, RQVFTEN=grid%rqvften &
930 & ,RUSHTEN=grid%rushten, RVSHTEN=grid%rvshten &
931 & ,RTHSHTEN=grid%rthshten, RTHRATEN=grid%rthraten &
932 & ,RTHBLTEN=grid%rthblten, RTHFTEN=grid%rthften &
933 & ,F_QV=f_qv,F_QC=f_qc,F_QR=f_qr &
934 & ,F_QI=f_qi,F_QS=f_qs,F_QG=f_qg &
937 BENCH_END(shcu_driver_tim)
939 ! JPH call force_scm to update bl tendencies
940 CALL force_scm(itimestep=grid%itimestep,dt=grid%dt &
941 & ,scm_force=config_flags%scm_force &
942 & ,dx=config_flags%scm_force_dx &
943 & ,num_force_layers=grid%num_force_layers &
944 & ,scm_th_adv=config_flags%scm_th_adv &
945 & ,scm_qv_adv=config_flags%scm_qv_adv &
946 & ,scm_ql_adv=config_flags%scm_ql_adv &
947 & ,scm_wind_adv=config_flags%scm_wind_adv &
948 & ,scm_vert_adv=config_flags%scm_vert_adv &
949 & ,scm_th_t_tend=config_flags%scm_th_t_tend &
950 & ,scm_qv_t_tend=config_flags%scm_qv_t_tend &
951 & ,scm_soilT_force=config_flags%scm_soilT_force &
952 & ,scm_soilQ_force=config_flags%scm_soilQ_force &
953 & ,scm_force_th_largescale=config_flags%scm_force_th_largescale &
954 & ,scm_force_qv_largescale=config_flags%scm_force_qv_largescale &
955 & ,scm_force_ql_largescale=config_flags%scm_force_ql_largescale &
956 & ,scm_force_wind_largescale=config_flags%scm_force_wind_largescale &
957 & ,u_base=grid%u_base,v_base=grid%v_base &
958 & ,z_base=grid%z_base &
959 & ,z_force=grid%z_force,z_force_tend=grid%z_force_tend &
960 & ,u_g=grid%u_g,v_g=grid%v_g &
961 & ,u_g_tend=grid%u_g_tend,v_g_tend=grid%v_g_tend &
962 & ,w_subs=grid%w_subs, w_subs_tend=grid%w_subs_tend &
963 & ,th_upstream_x=grid%th_upstream_x &
964 & ,th_upstream_x_tend=grid%th_upstream_x_tend &
965 & ,th_upstream_y=grid%th_upstream_y &
966 & ,th_upstream_y_tend=grid%th_upstream_y_tend &
967 & ,qv_upstream_x=grid%qv_upstream_x &
968 & ,qv_upstream_x_tend=grid%qv_upstream_x_tend &
969 & ,qv_upstream_y=grid%qv_upstream_y &
970 & ,qv_upstream_y_tend=grid%qv_upstream_y_tend &
971 & ,ql_upstream_x=grid%ql_upstream_x &
972 & ,ql_upstream_x_tend=grid%ql_upstream_x_tend &
973 & ,ql_upstream_y=grid%ql_upstream_y &
974 & ,ql_upstream_y_tend=grid%ql_upstream_y_tend &
975 & ,u_upstream_x=grid%u_upstream_x &
976 & ,u_upstream_x_tend=grid%u_upstream_x_tend &
977 & ,u_upstream_y=grid%u_upstream_y &
978 & ,u_upstream_y_tend=grid%u_upstream_y_tend &
979 & ,v_upstream_x=grid%v_upstream_x &
980 & ,v_upstream_x_tend=grid%v_upstream_x_tend &
981 & ,v_upstream_y=grid%v_upstream_y &
982 & ,v_upstream_y_tend=grid%v_upstream_y_tend &
983 & ,th_t_tend=grid%th_t_tend &
984 & ,qv_t_tend=grid%qv_t_tend &
985 & ,tau_x=grid%tau_x &
986 & ,tau_x_tend=grid%tau_x_tend &
987 & ,tau_y=grid%tau_y &
988 & ,tau_y_tend=grid%tau_y_tend &
989 & ,th_largescale=grid%th_largescale &
990 & ,th_largescale_tend=grid%th_largescale_tend &
991 & ,qv_largescale=grid%qv_largescale &
992 & ,qv_largescale_tend=grid%qv_largescale_tend &
993 & ,ql_largescale=grid%ql_largescale &
994 & ,ql_largescale_tend=grid%ql_largescale_tend &
995 & ,u_largescale=grid%u_largescale &
996 & ,u_largescale_tend=grid%u_largescale_tend &
997 & ,v_largescale=grid%v_largescale &
998 & ,v_largescale_tend=grid%v_largescale_tend &
999 & ,tau_largescale=grid%tau_largescale &
1000 & ,tau_largescale_tend=grid%tau_largescale_tend &
1001 & ,num_force_soil_layers=config_flags%num_force_soil_layers &
1002 & ,num_soil_layers=config_flags%num_soil_layers &
1003 & ,soil_depth_force=grid%soil_depth_force &
1005 & ,tslb=grid%tslb,smois=grid%smois &
1006 & ,t_soil_forcing_val=grid%t_soil_forcing_val &
1007 & ,t_soil_forcing_tend=grid%t_soil_forcing_tend &
1008 & ,q_soil_forcing_val=grid%q_soil_forcing_val &
1009 & ,q_soil_forcing_tend=grid%q_soil_forcing_tend &
1010 & ,tau_soil=grid%tau_soil &
1011 & ,z=grid%z,z_at_w=grid%z_at_w &
1012 & ,th=th_phy, qv=moist(ims,kms,jms,P_QV) &
1013 & ,ql=moist(ims,kms,jms,P_QC) &
1014 & ,u=u_phy, v=v_phy &
1015 & ,thten=grid%rthblten, qvten=grid%rqvblten &
1016 & ,qlten=grid%rqcblten &
1017 & ,uten=grid%rublten, vten=grid%rvblten &
1018 & ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1019 & ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1020 & ,IPS=ips,IPE=ipe, JPS=jps,JPE=jpe, KPS=kps,KPE=kpe &
1021 & ,KTS=k_start, KTE=min(k_end,kde-1) &
1025 # include "HALO_EM_FDDA_SFC.inc"
1027 CALL wrf_debug ( 200 , ' call fddagd_driver' )
1029 BENCH_START(fdda_driver_tim)
1030 CALL fddagd_driver(itimestep=grid%itimestep,dt=grid%dt,xtime=grid%XTIME, &
1032 RUNDGDTEN=grid%rundgdten,RVNDGDTEN=grid%rvndgdten, &
1033 RTHNDGDTEN=grid%rthndgdten,RPHNDGDTEN=grid%rphndgdten, &
1034 RQVNDGDTEN=grid%rqvndgdten,RMUNDGDTEN=grid%rmundgdten, &
1035 u_ndg_old=fdda3d(ims,kms,jms,P_u_ndg_old), &
1036 v_ndg_old=fdda3d(ims,kms,jms,P_v_ndg_old), &
1037 t_ndg_old=fdda3d(ims,kms,jms,P_t_ndg_old), &
1038 ph_ndg_old=fdda3d(ims,kms,jms,P_ph_ndg_old), &
1039 q_ndg_old=fdda3d(ims,kms,jms,P_q_ndg_old), &
1040 mu_ndg_old=fdda2d(ims,1,jms,P_mu_ndg_old), &
1041 u_ndg_new=fdda3d(ims,kms,jms,P_u_ndg_new), &
1042 v_ndg_new=fdda3d(ims,kms,jms,P_v_ndg_new), &
1043 t_ndg_new=fdda3d(ims,kms,jms,P_t_ndg_new), &
1044 ph_ndg_new=fdda3d(ims,kms,jms,P_ph_ndg_new), &
1045 q_ndg_new=fdda3d(ims,kms,jms,P_q_ndg_new), &
1046 mu_ndg_new=fdda2d(ims,1,jms,P_mu_ndg_new), &
1047 u3d=grid%u_2,v3d=grid%v_2,th_phy=th_phy, &
1048 ph=grid%ph_2,rho=rho,moist=moist, &
1049 p_phy=p_phy,pi_phy=pi_phy,p8w=p8w,t_phy=grid%t_phy, &
1050 dz8w=dz8w,z=grid%z,z_at_w=grid%z_at_w, &
1051 grid=grid,config_flags=config_flags,dx=grid%DX,n_moist=num_moist, &
1052 STEPFG=grid%STEPFG, &
1053 pblh=grid%pblh,ht=grid%ht,REGIME=grid%regime,ZNT=grid%znt &
1054 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1055 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1056 ,I_START=grid%i_start,I_END=min(grid%i_end, ide-1) &
1057 ,J_START=grid%j_start,J_END=min(grid%j_end, jde-1) &
1058 ,KTS=k_start, KTE=min(k_end,kde-1) &
1059 , num_tiles=grid%num_tiles, &
1060 u10=grid%u10, v10=grid%v10, th2=grid%th2, q2=grid%q2, &
1061 u10_ndg_old=grid%u10_ndg_old, &
1062 v10_ndg_old=grid%v10_ndg_old, &
1063 t2_ndg_old=grid%t2_ndg_old, &
1064 th2_ndg_old=grid%th2_ndg_old, &
1065 q2_ndg_old=grid%q2_ndg_old, &
1066 rh_ndg_old=grid%rh_ndg_old, &
1067 psl_ndg_old=grid%psl_ndg_old, &
1068 ps_ndg_old=grid%ps_ndg_old, &
1069 tob_ndg_old=grid%tob_ndg_old, &
1070 odis_ndg_old=grid%odis_ndg_old, &
1071 u10_ndg_new=grid%u10_ndg_new, &
1072 v10_ndg_new=grid%v10_ndg_new, &
1073 t2_ndg_new=grid%t2_ndg_new, &
1074 th2_ndg_new=grid%th2_ndg_new, &
1075 q2_ndg_new=grid%q2_ndg_new, &
1076 rh_ndg_new=grid%rh_ndg_new, &
1077 psl_ndg_new=grid%psl_ndg_new, &
1078 ps_ndg_new=grid%ps_ndg_new, &
1079 tob_ndg_new=grid%tob_ndg_new, &
1080 odis_ndg_new=grid%odis_ndg_new &
1081 ,IPS=ips,IPE=ipe, JPS=jps,JPE=jpe, KPS=kps,KPE=kpe &
1082 ,IMSX=imsx,IMEX=imex,JMSX=jmsx,JMEX=jmex,KMSX=kmsx,KMEX=kmex &
1083 ,IPSX=ipsx,IPEX=ipex,JPSX=jpsx,JPEX=jpex,KPSX=kpsx,KPEX=kpex &
1084 ,IMSY=imsy,IMEY=imey,JMSY=jmsy,JMEY=jmey,KMSY=kmsy,KMEY=kmey &
1085 ,IPSY=ipsy,IPEY=ipey,JPSY=jpsy,JPEY=jpey,KPSY=kpsy,KPEY=kpey )
1087 BENCH_END(fdda_driver_tim)
1089 END SUBROUTINE first_rk_step_part1
1091 END MODULE module_first_rk_step_part1