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 | , tracer, tracer_tend & |
---|
14 | , scalar , scalar_tend & |
---|
15 | , fdda3d, fdda2d & |
---|
16 | , ru_tendf, rv_tendf & |
---|
17 | , rw_tendf, t_tendf & |
---|
18 | , ph_tendf, mu_tendf & |
---|
19 | , tke_tend & |
---|
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 & |
---|
32 | , k_start , k_end & |
---|
33 | , f_flux & |
---|
34 | ) |
---|
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 |
---|
47 | USE module_force_scm |
---|
48 | USE module_convtrans_prep |
---|
49 | USE module_big_step_utilities_em, ONLY : phy_prep |
---|
50 | use module_scalar_tables |
---|
51 | #ifdef DM_PARALLEL |
---|
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 |
---|
54 | #endif |
---|
55 | USE module_utility |
---|
56 | IMPLICIT NONE |
---|
57 | |
---|
58 | TYPE ( domain ), INTENT(INOUT) :: grid |
---|
59 | TYPE ( grid_config_rec_type ), INTENT(IN) :: config_flags |
---|
60 | TYPE(WRFU_Time) :: currentTime |
---|
61 | |
---|
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 |
---|
69 | |
---|
70 | |
---|
71 | LOGICAL ,INTENT(IN) :: adapt_step_flag |
---|
72 | REAL, INTENT(IN) :: curr_secs |
---|
73 | |
---|
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 |
---|
92 | |
---|
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 |
---|
104 | |
---|
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 |
---|
111 | |
---|
112 | REAL ,DIMENSION(ims:ime,jms:jme), INTENT(INOUT) :: mu_tendf |
---|
113 | |
---|
114 | INTEGER, INTENT(IN) :: k_start, k_end |
---|
115 | LOGICAL, INTENT(IN), OPTIONAL :: f_flux |
---|
116 | |
---|
117 | ! Local |
---|
118 | REAL, DIMENSION( ims:ime, jms:jme ) :: exch_temf ! 1/7/09 WA |
---|
119 | |
---|
120 | REAL, DIMENSION( ims:ime, jms:jme ) :: ht_loc, mixht |
---|
121 | INTEGER :: ij |
---|
122 | INTEGER num_roof_layers |
---|
123 | INTEGER num_wall_layers |
---|
124 | INTEGER num_road_layers |
---|
125 | INTEGER iswater |
---|
126 | LOGICAL :: l_flux |
---|
127 | INTEGER :: isurban |
---|
128 | INTEGER rk_step |
---|
129 | INTEGER :: yr, month, day, hr, minute, sec, rc |
---|
130 | CHARACTER*80 :: mesg |
---|
131 | |
---|
132 | INTEGER :: sids , side , sjds , sjde , skds , skde , & |
---|
133 | sims , sime , sjms , sjme , skms , skme , & |
---|
134 | sips , sipe , sjps , sjpe , skps , skpe |
---|
135 | |
---|
136 | CHARACTER (LEN=256) :: mminlu |
---|
137 | |
---|
138 | #if ( WRF_DFI_RADAR == 1 ) |
---|
139 | INTEGER do_capsupress ! =1 do CAP supress, other = don't |
---|
140 | #endif |
---|
141 | |
---|
142 | #ifdef LMDZ1 |
---|
143 | CHARACTER*256 :: message |
---|
144 | INTEGER :: im2, jm2, km2 |
---|
145 | INTEGER :: ix,iy,iz |
---|
146 | CHARACTER(LEN=50) :: errmsg |
---|
147 | |
---|
148 | errmsg = 'ERROR -- error -- ERROR -- error' |
---|
149 | |
---|
150 | im2 = config_flags%i_check_point |
---|
151 | jm2 = config_flags%j_check_point |
---|
152 | km2 = config_flags%k_check_point |
---|
153 | #endif |
---|
154 | |
---|
155 | #ifdef LMDZ1 |
---|
156 | WRITE(message, *)' module_first_rk_step_part1: inside' |
---|
157 | CALL wrf_debug(200, message) |
---|
158 | WRITE(message, *)' t_tend: ',t_tendf(im2,km2,jm2), & |
---|
159 | ' u_tend: ', ru_tendf(im2,1,jm2) |
---|
160 | CALL wrf_debug(200, message) |
---|
161 | WRITE(message,*)' psfc_tend: ',grid%dpsdt(im2,jm2), & |
---|
162 | 'p sfc: ',p8w(im2,kms,jm2) |
---|
163 | CALL wrf_debug(200, message) |
---|
164 | WRITE(message,*)' p 1: ',grid%p(im2,kms,jm2), ' ph 1: ',grid%ph_2(im2,kms,jm2) |
---|
165 | CALL wrf_debug(200, message) |
---|
166 | WRITE(message,*)' Lluis checking variables k t u v p ph alt _________________' |
---|
167 | CALL wrf_debug(200, message) |
---|
168 | DO iz=kms,kme |
---|
169 | PRINT *,iz, grid%t_2(im2,iz,jm2), grid%u_2(im2,iz,jm2), grid%v_2(im2,iz,jm2), & |
---|
170 | grid%p(im2,iz,jm2), grid%ph_2(im2,iz,jm2), grid%alt(im2,iz,jm2) |
---|
171 | END DO |
---|
172 | #endif |
---|
173 | |
---|
174 | CALL get_ijk_from_subgrid ( grid , & |
---|
175 | sids, side, sjds, sjde, skds, skde, & |
---|
176 | sims, sime, sjms, sjme, skms, skme, & |
---|
177 | sips, sipe, sjps, sjpe, skps, skpe ) |
---|
178 | |
---|
179 | ! initialize all tendencies to zero in order to update physics |
---|
180 | ! tendencies first (separate from dry dynamics). |
---|
181 | |
---|
182 | l_flux=.FALSE. |
---|
183 | if (present(f_flux)) l_flux=f_flux |
---|
184 | |
---|
185 | rk_step = 1 |
---|
186 | |
---|
187 | BENCH_START(init_zero_tend_tim) |
---|
188 | !$OMP PARALLEL DO & |
---|
189 | !$OMP PRIVATE ( ij ) |
---|
190 | |
---|
191 | DO ij = 1 , grid%num_tiles |
---|
192 | |
---|
193 | CALL wrf_debug ( 200 , ' call init_zero_tendency' ) |
---|
194 | CALL init_zero_tendency ( ru_tendf, rv_tendf, rw_tendf, & |
---|
195 | ph_tendf, t_tendf, tke_tend, & |
---|
196 | mu_tendf, & |
---|
197 | moist_tend,chem_tend,scalar_tend, & |
---|
198 | tracer_tend,num_tracer, & |
---|
199 | num_moist,num_chem,num_scalar, & |
---|
200 | rk_step, & |
---|
201 | ids, ide, jds, jde, kds, kde, & |
---|
202 | ims, ime, jms, jme, kms, kme, & |
---|
203 | grid%i_start(ij), grid%i_end(ij), & |
---|
204 | grid%j_start(ij), grid%j_end(ij), & |
---|
205 | k_start, k_end ) |
---|
206 | |
---|
207 | END DO |
---|
208 | !$OMP END PARALLEL DO |
---|
209 | BENCH_END(init_zero_tend_tim) |
---|
210 | |
---|
211 | #ifdef DM_PARALLEL |
---|
212 | # include "HALO_EM_PHYS_A.inc" |
---|
213 | #endif |
---|
214 | |
---|
215 | !$OMP PARALLEL DO & |
---|
216 | !$OMP PRIVATE ( ij ) |
---|
217 | DO ij = 1 , grid%num_tiles |
---|
218 | |
---|
219 | CALL wrf_debug ( 200 , ' call phy_prep' ) |
---|
220 | CALL phy_prep ( config_flags, & |
---|
221 | grid%mut, grid%muu, grid%muv, grid%u_2, & |
---|
222 | grid%v_2, grid%p, grid%pb, grid%alt, & |
---|
223 | grid%ph_2, grid%phb, grid%t_2, grid%tsk, moist, num_moist, & |
---|
224 | rho,th_phy, p_phy, pi_phy, u_phy, v_phy, & |
---|
225 | p8w, t_phy, t8w, grid%z, grid%z_at_w, dz8w, & |
---|
226 | grid%p_hyd, grid%p_hyd_w, & |
---|
227 | grid%fnm, grid%fnp, grid%znw, grid%p_top, & |
---|
228 | grid%rthraten, & |
---|
229 | grid%rthblten, grid%rublten, grid%rvblten, & |
---|
230 | grid%rqvblten, grid%rqcblten, grid%rqiblten, & |
---|
231 | grid%rucuten, grid%rvcuten, grid%rthcuten, & |
---|
232 | grid%rqvcuten, grid%rqccuten, grid%rqrcuten, & |
---|
233 | grid%rqicuten, grid%rqscuten, & |
---|
234 | grid%rushten, grid%rvshten, grid%rthshten, & |
---|
235 | grid%rqvshten, grid%rqcshten, grid%rqrshten, & |
---|
236 | grid%rqishten, grid%rqsshten, grid%rqgshten, & |
---|
237 | grid%rthften, grid%rqvften, & |
---|
238 | grid%RUNDGDTEN, grid%RVNDGDTEN, grid%RTHNDGDTEN, & |
---|
239 | grid%RPHNDGDTEN,grid%RQVNDGDTEN, grid%RMUNDGDTEN,& |
---|
240 | ids, ide, jds, jde, kds, kde, & |
---|
241 | ims, ime, jms, jme, kms, kme, & |
---|
242 | grid%i_start(ij), grid%i_end(ij), & |
---|
243 | grid%j_start(ij), grid%j_end(ij), & |
---|
244 | k_start, k_end ) |
---|
245 | ENDDO |
---|
246 | !$OMP END PARALLEL DO |
---|
247 | |
---|
248 | BENCH_END(phy_prep_tim) |
---|
249 | #ifdef LMDZ1 |
---|
250 | WRITE(message, *)' module_first_rk_step_part1: after phy_prep' |
---|
251 | CALL wrf_debug(200, message) |
---|
252 | WRITE(message, *)' t_tend: ',t_tendf(im2,km2,jm2), & |
---|
253 | ' u_tend: ', ru_tendf(im2,1,jm2) |
---|
254 | CALL wrf_debug(200, message) |
---|
255 | WRITE(message,*)' psfc_tend: ',grid%dpsdt(im2,jm2), & |
---|
256 | 'p sfc: ',p8w(im2,kms,jm2) |
---|
257 | CALL wrf_debug(200, message) |
---|
258 | WRITE(message,*)' p 1: ',grid%p(im2,kms,jm2), ' ph 1: ',grid%ph_2(im2,kms,jm2) |
---|
259 | CALL wrf_debug(200, message) |
---|
260 | #endif |
---|
261 | |
---|
262 | ! radiation |
---|
263 | CALL domain_clock_get( grid, current_time=currentTime, & |
---|
264 | current_timestr=mesg ) |
---|
265 | CALL WRFU_TimeGet( currentTime, YY=yr, dayOfYear=day, H=hr, M=minute, S=sec, rc=rc) |
---|
266 | IF( rc/= WRFU_SUCCESS)THEN |
---|
267 | CALL wrf_error_fatal('WRFU_TimeGet failed') |
---|
268 | ENDIF |
---|
269 | |
---|
270 | ! this driver is only needed to handle non-local shadowing effects |
---|
271 | CALL pre_radiation_driver ( grid, config_flags & |
---|
272 | & ,itimestep=grid%itimestep, ra_call_offset=grid%ra_call_offset & |
---|
273 | & ,XLAT=grid%xlat, XLONG=grid%xlong, GMT=grid%gmt & |
---|
274 | & ,julian=grid%julian, xtime=grid%xtime, RADT=grid%radt & |
---|
275 | & ,STEPRA=grid%stepra & |
---|
276 | & ,ht=grid%ht,dx=grid%dx,dy=grid%dy,sina=grid%sina,cosa=grid%cosa & |
---|
277 | & ,shadowmask=grid%shadowmask,slope_rad=config_flags%slope_rad & |
---|
278 | & ,topo_shading=config_flags%topo_shading & |
---|
279 | & ,shadlen=config_flags%shadlen,ht_shad=grid%ht_shad,ht_loc=ht_loc & |
---|
280 | & ,ht_shad_bxs=grid%ht_shad_bxs, ht_shad_bxe=grid%ht_shad_bxe & |
---|
281 | & ,ht_shad_bys=grid%ht_shad_bys, ht_shad_bye=grid%ht_shad_bye & |
---|
282 | & ,nested=config_flags%nested, min_ptchsz=grid%min_ptchsz & |
---|
283 | & ,spec_bdy_width=config_flags%spec_bdy_width & |
---|
284 | ! indexes |
---|
285 | & ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
286 | & ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
287 | & ,IPS=ips,IPE=ipe, JPS=jps,JPE=jpe, KPS=kps,KPE=kpe & |
---|
288 | & ,i_start=grid%i_start,i_end=min(grid%i_end, ide-1) & |
---|
289 | & ,j_start=grid%j_start,j_end=min(grid%j_end, jde-1) & |
---|
290 | & ,kts=k_start, kte=min(k_end,kde-1) & |
---|
291 | & ,num_tiles=grid%num_tiles ) |
---|
292 | |
---|
293 | CALL wrf_debug ( 200 , ' call radiation_driver' ) |
---|
294 | BENCH_START(rad_driver_tim) |
---|
295 | |
---|
296 | CALL radiation_driver( & |
---|
297 | & ACFRCV=grid%acfrcv ,ACFRST=grid%acfrst ,ALBEDO=grid%albedo & |
---|
298 | & ,CFRACH=grid%cfrach ,CFRACL=grid%cfracl ,CFRACM=grid%cfracm & |
---|
299 | & ,CUPPT=grid%cuppt ,CZMEAN=grid%czmean ,DT=grid%dt & |
---|
300 | & ,DZ8W=dz8w ,EMISS=grid%emiss ,GLW=grid%glw & |
---|
301 | & ,GMT=grid%gmt ,GSW=grid%gsw ,HBOT=grid%hbot & |
---|
302 | & ,HTOP=grid%htop ,HBOTR=grid%hbotr ,HTOPR=grid%htopr & |
---|
303 | & ,ICLOUD=config_flags%icloud & |
---|
304 | & ,ITIMESTEP=grid%itimestep,JULDAY=grid%julday , JULIAN=grid%julian & |
---|
305 | & ,JULYR=grid%julyr ,LW_PHYSICS=config_flags%ra_lw_physics & |
---|
306 | & ,NCFRCV=grid%ncfrcv ,NCFRST=grid%ncfrst ,NPHS=1 & |
---|
307 | & ,P8W=grid%p_hyd_w ,P=grid%p_hyd ,PI=pi_phy & |
---|
308 | & ,RADT=grid%radt ,RA_CALL_OFFSET=grid%ra_call_offset & |
---|
309 | & ,RHO=rho ,RLWTOA=grid%rlwtoa & |
---|
310 | & ,RSWTOA=grid%rswtoa ,RTHRATEN=grid%rthraten & |
---|
311 | & ,RTHRATENLW=grid%rthratenlw ,RTHRATENSW=grid%rthratensw & |
---|
312 | & ,SNOW=grid%snow ,STEPRA=grid%stepra ,SWDOWN=grid%swdown & |
---|
313 | & ,SWDOWNC=grid%swdownc ,SW_PHYSICS=config_flags%ra_sw_physics & |
---|
314 | & ,T8W=t8w ,T=grid%t_phy ,TAUCLDC=grid%taucldc & |
---|
315 | & ,TAUCLDI=grid%taucldi ,TSK=grid%tsk ,VEGFRA=grid%vegfra & |
---|
316 | & ,WARM_RAIN=grid%warm_rain ,XICE=grid%xice ,XLAND=grid%xland & |
---|
317 | & ,XLAT=grid%xlat ,XLONG=grid%xlong ,YR=yr & |
---|
318 | !Optional solar variables |
---|
319 | & ,DECLINX=grid%declin ,SOLCONX=grid%solcon ,COSZEN=grid%coszen ,HRANG=grid%hrang & |
---|
320 | & , CEN_LAT=grid%cen_lat & |
---|
321 | & ,Z=grid%z & |
---|
322 | & ,LEVSIZ=grid%levsiz, N_OZMIXM=num_ozmixm & |
---|
323 | & ,N_AEROSOLC=num_aerosolc & |
---|
324 | & ,PAERLEV=grid%paerlev & |
---|
325 | & ,CAM_ABS_DIM1=grid%cam_abs_dim1, CAM_ABS_DIM2=grid%cam_abs_dim2 & |
---|
326 | & ,CAM_ABS_FREQ_S=grid%cam_abs_freq_s & |
---|
327 | & ,XTIME=grid%xtime & |
---|
328 | ,CURR_SECS=curr_secs, ADAPT_STEP_FLAG=adapt_step_flag & |
---|
329 | ! indexes |
---|
330 | & ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
331 | & ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
332 | & ,i_start=grid%i_start,i_end=min(grid%i_end, ide-1) & |
---|
333 | & ,j_start=grid%j_start,j_end=min(grid%j_end, jde-1) & |
---|
334 | & ,kts=k_start, kte=min(k_end,kde-1) & |
---|
335 | & ,num_tiles=grid%num_tiles & |
---|
336 | ! Optional |
---|
337 | !JJS 20101020 vvvvv |
---|
338 | & , TLWDN=grid%tlwdn, TLWUP=grid%tlwup & ! goddard schemes |
---|
339 | & , SLWDN=grid%slwdn, SLWUP=grid%slwup & ! goddard schemes |
---|
340 | & , TSWDN=grid%tswdn, TSWUP=grid%tswup & ! goddard schemes |
---|
341 | & , SSWDN=grid%sswdn, SSWUP=grid%sswup & ! goddard schemes |
---|
342 | !JJS 20101020 ^^^^^ |
---|
343 | |
---|
344 | & , CLDFRA=grid%cldfra & |
---|
345 | & , PB=grid%pb & |
---|
346 | & , F_ICE_PHY=grid%f_ice_phy,F_RAIN_PHY=grid%f_rain_phy & |
---|
347 | & , QV=moist(ims,kms,jms,P_QV), F_QV=F_QV & |
---|
348 | & , QC=moist(ims,kms,jms,P_QC), F_QC=F_QC & |
---|
349 | & , QR=moist(ims,kms,jms,P_QR), F_QR=F_QR & |
---|
350 | & , QI=moist(ims,kms,jms,P_QI), F_QI=F_QI & |
---|
351 | & , QS=moist(ims,kms,jms,P_QS), F_QS=F_QS & |
---|
352 | & , QG=moist(ims,kms,jms,P_QG), F_QG=F_QG & |
---|
353 | & , QNDROP=scalar(ims,kms,jms,P_QNDROP), F_QNDROP=F_QNDROP & |
---|
354 | & ,ACSWUPT=grid%acswupt ,ACSWUPTC=grid%acswuptc & |
---|
355 | & ,ACSWDNT=grid%acswdnt ,ACSWDNTC=grid%acswdntc & |
---|
356 | & ,ACSWUPB=grid%acswupb ,ACSWUPBC=grid%acswupbc & |
---|
357 | & ,ACSWDNB=grid%acswdnb ,ACSWDNBC=grid%acswdnbc & |
---|
358 | & ,ACLWUPT=grid%aclwupt ,ACLWUPTC=grid%aclwuptc & |
---|
359 | & ,ACLWDNT=grid%aclwdnt ,ACLWDNTC=grid%aclwdntc & |
---|
360 | & ,ACLWUPB=grid%aclwupb ,ACLWUPBC=grid%aclwupbc & |
---|
361 | & ,ACLWDNB=grid%aclwdnb ,ACLWDNBC=grid%aclwdnbc & |
---|
362 | & ,SWUPT=grid%swupt ,SWUPTC=grid%swuptc & |
---|
363 | & ,SWDNT=grid%swdnt ,SWDNTC=grid%swdntc & |
---|
364 | & ,SWUPB=grid%swupb ,SWUPBC=grid%swupbc & |
---|
365 | & ,SWDNB=grid%swdnb ,SWDNBC=grid%swdnbc & |
---|
366 | & ,LWUPT=grid%lwupt ,LWUPTC=grid%lwuptc & |
---|
367 | & ,LWDNT=grid%lwdnt ,LWDNTC=grid%lwdntc & |
---|
368 | & ,LWUPB=grid%lwupb ,LWUPBC=grid%lwupbc & |
---|
369 | & ,LWDNB=grid%lwdnb ,LWDNBC=grid%lwdnbc & |
---|
370 | & ,LWCF=grid%lwcf & |
---|
371 | & ,SWCF=grid%swcf & |
---|
372 | & ,OLR=grid%olr & |
---|
373 | & ,OZMIXM=grid%ozmixm, PIN=grid%pin & |
---|
374 | & ,M_PS_1=grid%m_ps_1, M_PS_2=grid%m_ps_2, AEROSOLC_1=grid%aerosolc_1 & |
---|
375 | & ,AEROSOLC_2=grid%aerosolc_2, M_HYBI0=grid%m_hybi & |
---|
376 | & ,ABSTOT=grid%abstot, ABSNXT=grid%absnxt, EMSTOT=grid%emstot & |
---|
377 | #ifdef WRF_CHEM |
---|
378 | & ,CU_RAD_FEEDBACK=config_flags%cu_rad_feedback & |
---|
379 | & ,AER_RA_FEEDBACK=config_flags%aer_ra_feedback & |
---|
380 | & ,QC_ADJUST=grid%GD_CLOUD_B , QI_ADJUST=grid%GD_CLOUD2_B & |
---|
381 | & ,PM2_5_DRY=grid%pm2_5_dry, PM2_5_WATER=grid%pm2_5_water & |
---|
382 | & ,PM2_5_DRY_EC=grid%pm2_5_dry_ec & |
---|
383 | & ,TAUAER300=grid%tauaer1, TAUAER400=grid%tauaer2 & ! jcb |
---|
384 | & ,TAUAER600=grid%tauaer3, TAUAER999=grid%tauaer4 & ! jcb |
---|
385 | & ,GAER300=grid%gaer1, GAER400=grid%gaer2, GAER600=grid%gaer3, GAER999=grid%gaer4 & ! jcb |
---|
386 | & ,WAER300=grid%waer1, WAER400=grid%waer2, WAER600=grid%waer3, WAER999=grid%waer4 & ! jcb |
---|
387 | & ,TAUAERlw1 =grid%tauaerlw1, TAUAERlw2=grid%tauaerlw2 & |
---|
388 | & ,TAUAERlw3 =grid%tauaerlw3, TAUAERlw4=grid%tauaerlw4 & |
---|
389 | & ,TAUAERlw5 =grid%tauaerlw5, TAUAERlw6=grid%tauaerlw6 & |
---|
390 | & ,TAUAERlw7 =grid%tauaerlw7, TAUAERlw8=grid%tauaerlw8 & |
---|
391 | & ,TAUAERlw9 =grid%tauaerlw9, TAUAERlw10=grid%tauaerlw10 & |
---|
392 | & ,TAUAERlw11 =grid%tauaerlw11, TAUAERlw12=grid%tauaerlw12 & |
---|
393 | & ,TAUAERlw13 =grid%tauaerlw13, TAUAERlw14=grid%tauaerlw14 & |
---|
394 | & ,TAUAERlw15 =grid%tauaerlw15, TAUAERlw16=grid%tauaerlw16 & |
---|
395 | & ,progn=config_flags%progn & |
---|
396 | #endif |
---|
397 | & ,slope_rad=config_flags%slope_rad,topo_shading=config_flags%topo_shading & |
---|
398 | & ,shadowmask=grid%shadowmask,ht=grid%ht,dx=grid%dx,dy=grid%dy ) |
---|
399 | |
---|
400 | BENCH_END(rad_driver_tim) |
---|
401 | |
---|
402 | #ifdef LMDZ1 |
---|
403 | WRITE(message, *)' module_first_rk_step_part1: after radiation' |
---|
404 | CALL wrf_debug(200, message) |
---|
405 | WRITE(message, *)' t_tend: ',t_tendf(im2,km2,jm2), & |
---|
406 | ' u_tend: ', ru_tendf(im2,1,jm2) |
---|
407 | CALL wrf_debug(200, message) |
---|
408 | WRITE(message,*)' psfc_tend: ',grid%dpsdt(im2,jm2), & |
---|
409 | 'p sfc: ',p8w(im2,kms,jm2) |
---|
410 | CALL wrf_debug(200, message) |
---|
411 | WRITE(message,*)' p 1: ',grid%p(im2,kms,jm2), ' ph 1: ',grid%ph_2(im2,kms,jm2) |
---|
412 | CALL wrf_debug(200, message) |
---|
413 | #endif |
---|
414 | |
---|
415 | !********* Surface driver |
---|
416 | ! surface |
---|
417 | |
---|
418 | BENCH_START(surf_driver_tim) |
---|
419 | |
---|
420 | !----------------------------------------------------------------- |
---|
421 | ! urban related variable are added to arguments of surface_driver |
---|
422 | !----------------------------------------------------------------- |
---|
423 | num_roof_layers = grid%num_soil_layers !urban |
---|
424 | num_wall_layers = grid%num_soil_layers !urban |
---|
425 | num_road_layers = grid%num_soil_layers !urban |
---|
426 | CALL nl_get_iswater(grid%id, iswater) |
---|
427 | CALL nl_get_isurban(grid%id, isurban) |
---|
428 | call nl_get_mminlu(grid%id, mminlu) |
---|
429 | |
---|
430 | CALL wrf_debug ( 200 , ' call surface_driver' ) |
---|
431 | |
---|
432 | CALL surface_driver( & |
---|
433 | & ACGRDFLX=grid%acgrdflx ,ACHFX=grid%achfx ,ACLHF=grid%aclhf & |
---|
434 | & ,ACSNOM=grid%acsnom ,ACSNOW=grid%acsnow ,AKHS=grid%akhs & |
---|
435 | & ,AKMS=grid%akms ,ALBBCK=grid%albbck ,ALBEDO=grid%albedo & |
---|
436 | & ,EMBCK=grid%embck & |
---|
437 | & ,BR=br ,CANWAT=grid%canwat ,CHKLOWQ=chklowq & |
---|
438 | & ,CT=grid%ct ,DT=grid%dt ,DX=grid%dx & |
---|
439 | & ,DZ8W=dz8w ,DZS=grid%dzs ,FLHC=grid%flhc & |
---|
440 | & ,FLQC=grid%flqc ,GLW=grid%glw ,GRDFLX=grid%grdflx & |
---|
441 | & ,GSW=grid%gsw ,SWDOWN=grid%swdown ,GZ1OZ0=gz1oz0 ,HFX=grid%hfx & |
---|
442 | & ,HT=grid%ht ,IFSNOW=config_flags%ifsnow ,ISFFLX=config_flags%isfflx & |
---|
443 | & ,FRACTIONAL_SEAICE=config_flags%fractional_seaice & |
---|
444 | & ,TICE2TSK_IF2COLD=config_flags%tice2tsk_if2cold & |
---|
445 | & ,ISLTYP=grid%isltyp ,ITIMESTEP=grid%itimestep, JULIAN_IN=grid%julian & |
---|
446 | & ,IVGTYP=grid%ivgtyp ,LH=grid%lh ,LOWLYR=grid%lowlyr & |
---|
447 | & ,MAVAIL=grid%mavail ,NUM_SOIL_LAYERS=config_flags%num_soil_layers & |
---|
448 | & ,P8W=grid%p_hyd_w ,PBLH=grid%pblh ,PI_PHY=pi_phy & |
---|
449 | & ,PSFC=grid%psfc ,PSHLTR=grid%pshltr ,PSIH=psih & |
---|
450 | & ,BLDT=grid%bldt ,CURR_SECS=curr_secs, ADAPT_STEP_FLAG=adapt_step_flag & |
---|
451 | & ,PSIM=psim ,P_PHY=grid%p_hyd ,Q10=grid%q10 & |
---|
452 | & ,Q2=grid%q2 ,QFX=grid%qfx ,QSFC=grid%qsfc & |
---|
453 | & ,QSHLTR=grid%qshltr ,QZ0=grid%qz0 ,RAINCV=grid%raincv & |
---|
454 | & ,RA_LW_PHYSICS=config_flags%ra_lw_physics ,RHO=rho & |
---|
455 | & ,RMOL=grid%rmol ,SFCEVP=grid%sfcevp ,SFCEXC=grid%sfcexc & |
---|
456 | & ,SFCRUNOFF=grid%sfcrunoff & |
---|
457 | & ,SF_SFCLAY_PHYSICS=config_flags%sf_sfclay_physics & |
---|
458 | & ,SF_SURFACE_PHYSICS=config_flags%sf_surface_physics ,SH2O=grid%sh2o & |
---|
459 | & ,SHDMAX=grid%shdmax ,SHDMIN=grid%shdmin ,SMOIS=grid%smois & |
---|
460 | & ,SMSTAV=grid%smstav ,SMSTOT=grid%smstot ,SNOALB=grid%snoalb & |
---|
461 | & ,SNOW=grid%snow ,SNOWC=grid%snowc ,SNOWH=grid%snowh & |
---|
462 | & ,SMCREL=grid%smcrel & |
---|
463 | & ,SST=grid%sst ,SST_UPDATE=grid%sst_update & |
---|
464 | & ,SSTSK=grid%sstsk ,DTW=grid%dtw ,SST_SKIN=grid%sst_skin & |
---|
465 | & ,STEPBL=grid%stepbl ,TH10=grid%th10 ,TH2=grid%th2 & |
---|
466 | & ,THZ0=grid%thz0 ,TH_PHY=th_phy ,TKE_PBL=grid%tke_pbl & |
---|
467 | & ,TMN=grid%tmn ,TSHLTR=grid%tshltr ,TSK=grid%tsk & |
---|
468 | & ,TYR=grid%tyr ,TYRA=grid%tyra ,TDLY=grid%tdly & |
---|
469 | & ,TLAG=grid%tlag ,LAGDAY=config_flags%lagday ,NYEAR=grid%nyear & |
---|
470 | & ,NDAY=grid%nday ,TMN_UPDATE=grid%tmn_update ,YR=yr & |
---|
471 | & ,TSLB=grid%tslb ,T_PHY=t_phy ,U10=grid%u10 & |
---|
472 | & ,URATX=grid%uratx ,VRATX=grid%vratx ,TRATX=grid%tratx & |
---|
473 | & ,UDRUNOFF=grid%udrunoff ,UST=grid%ust ,UZ0=grid%uz0 & |
---|
474 | & ,U_FRAME=grid%u_frame ,U_PHY=u_phy ,V10=grid%v10 & |
---|
475 | & ,VEGFRA=grid%vegfra ,VZ0=grid%vz0 ,V_FRAME=grid%v_frame & |
---|
476 | & ,V_PHY=v_phy ,WARM_RAIN=grid%warm_rain & |
---|
477 | & ,WSPD=wspd ,XICE=grid%xice ,XLAND=grid%xland & |
---|
478 | & ,Z0=grid%z0 ,Z=grid%z ,ZNT=grid%znt & |
---|
479 | & ,ZS=grid%zs ,XICEM=grid%xicem ,ISICE=grid%landuse_isice& |
---|
480 | & ,USTM=grid%ustm ,CK=grid%ck ,CKA=grid%cka & |
---|
481 | & ,CD=grid%cd ,CDA=grid%cda & |
---|
482 | & ,ISFTCFLX=config_flags%isftcflx, IZ0TLND=config_flags%iz0tlnd & |
---|
483 | & ,OMLCALL=config_flags%omlcall ,OML_HML0=config_flags%oml_hml0 ,OML_GAMMA=config_flags%oml_gamma & |
---|
484 | & ,TML=grid%tml, T0ML=grid%t0ml, HML=grid%hml, H0ML=grid%h0ml, HUML=grid%huml, HVML=grid%hvml, F=grid%f & |
---|
485 | & ,TMOML=grid%TMOML,ISWATER=iswater & |
---|
486 | & ,SLOPE_RAD=config_flags%slope_rad,TOPO_SHADING=config_flags%topo_shading & ! solar |
---|
487 | & ,SHADOWMASK=grid%shadowmask & ! solar |
---|
488 | & ,SLOPE=grid%slope, SLP_AZI=grid%slp_azi, SWNORM=grid%swnorm & ! solar |
---|
489 | & ,DECLIN=grid%declin ,SOLCON=grid%solcon ,COSZEN=grid%coszen ,HRANG=grid%hrang & |
---|
490 | & ,xlat_urb2d=grid%XLAT & !I urban |
---|
491 | & ,NUM_ROOF_LAYERS=num_roof_layers & !I urban |
---|
492 | & ,NUM_WALL_LAYERS=num_wall_layers & !I urban |
---|
493 | & ,NUM_ROAD_LAYERS=num_road_layers & |
---|
494 | & ,DZR=grid%dzr ,DZB=grid%dzb ,DZG=grid%dzg & !I urban |
---|
495 | & ,TR_URB2D=grid%tr_urb2d ,TB_URB2D=grid%tb_urb2d & |
---|
496 | & ,TG_URB2D=grid%tg_urb2d & !H urban |
---|
497 | & ,TC_URB2D=grid%tc_urb2d ,QC_URB2D=grid%qc_urb2d & !H urban |
---|
498 | & ,UC_URB2D=grid%uc_urb2d & !H urban |
---|
499 | & ,XXXR_URB2D=grid%xxxr_urb2d & |
---|
500 | & ,XXXB_URB2D=grid%xxxb_urb2d & !H urban |
---|
501 | & ,XXXG_URB2D=grid%xxxg_urb2d & |
---|
502 | & ,XXXC_URB2D=grid%xxxc_urb2d & !H urban |
---|
503 | & ,TRL_URB3D=grid%trl_urb3d ,TBL_URB3D=grid%tbl_urb3d & !H urban |
---|
504 | & ,TGL_URB3D=grid%tgl_urb3d & !H urban |
---|
505 | & ,SH_URB2D=grid%sh_urb2d ,LH_URB2D=grid%lh_urb2d & |
---|
506 | & ,G_URB2D=grid%g_urb2d & !H urban |
---|
507 | & ,RN_URB2D=grid%rn_urb2d , TS_URB2D=grid%ts_urb2d & !H urban |
---|
508 | & ,FRC_URB2D=grid%frc_urb2d & !H urban |
---|
509 | & ,UTYPE_URB2D=grid%utype_urb2d & !H urban |
---|
510 | ! Optional urban for BEP scheme |
---|
511 | & ,SF_URBAN_PHYSICS=config_flags%sf_urban_physics & |
---|
512 | & ,NUM_URBAN_LAYERS=config_flags%num_urban_layers & !multi-layer urban |
---|
513 | & ,TRB_URB4D=grid%trb_urb4d,TW1_URB4D=grid%tw1_urb4d & !multi-layer urban |
---|
514 | & ,TW2_URB4D=grid%tw2_urb4d,TGB_URB4D=grid%tgb_urb4d & !multi-layer urban |
---|
515 | & ,TLEV_URB3D=grid%tlev_urb3d & !multi-layer urban |
---|
516 | & ,QLEV_URB3D=grid%qlev_urb3d & !multi-layer urban |
---|
517 | & ,TW1LEV_URB3D=grid%tw1lev_urb3d & !multi-layer urban |
---|
518 | & ,TW2LEV_URB3D=grid%tw2lev_urb3d & !multi-layer urban |
---|
519 | & ,TGLEV_URB3D=grid%tglev_urb3d & !multi-layer urban |
---|
520 | & ,TFLEV_URB3D=grid%tflev_urb3d & !multi-layer urban |
---|
521 | & ,SF_AC_URB3D=grid%sf_ac_urb3d & !multi-layer urban |
---|
522 | & ,LF_AC_URB3D=grid%lf_ac_urb3d & !multi-layer urban |
---|
523 | & ,CM_AC_URB3D=grid%cm_ac_urb3d & !multi-layer urban |
---|
524 | & ,SFVENT_URB3D=grid%sfvent_urb3d & !multi-layer urban |
---|
525 | & ,LFVENT_URB3D=grid%lfvent_urb3d & !multi-layer urban |
---|
526 | & ,SFWIN1_URB3D=grid%sfwin1_urb3d & !multi-layer urban |
---|
527 | & ,SFWIN2_URB3D=grid%sfwin2_urb3d & !multi-layer urban |
---|
528 | & ,SFW1_URB3D=grid%sfw1_urb3d,SFW2_URB3D=grid%sfw2_urb3d & !multi-layer urban |
---|
529 | & ,SFR_URB3D=grid%sfr_urb3d,SFG_URB3D=grid%sfg_urb3d & !multi-layer urban |
---|
530 | & ,GMT=grid%gmt,XLAT=grid%xlat,XLONG=grid%xlong,JULDAY=grid%julday & |
---|
531 | & ,A_U_BEP=grid%a_u_bep,A_V_BEP=grid%a_v_bep,A_T_BEP=grid%a_t_bep & |
---|
532 | & ,A_Q_BEP=grid%a_q_bep & |
---|
533 | & ,B_U_BEP=grid%b_u_bep,B_V_BEP=grid%b_v_bep,B_T_BEP=grid%b_t_bep & |
---|
534 | & ,B_Q_BEP=grid%b_q_bep & |
---|
535 | & ,SF_BEP=grid%sf_bep,VL_BEP=grid%vl_bep & |
---|
536 | & ,A_E_BEP=grid%a_e_bep,B_E_BEP=grid%b_e_bep,DLG_BEP=grid%dlg_bep & |
---|
537 | & ,DL_U_BEP=grid%dl_u_bep & |
---|
538 | & ,CMR_SFCDIF=grid%cmr_sfcdif, CHR_SFCDIF=grid%chr_sfcdif & !I/O urban |
---|
539 | & ,CMC_SFCDIF=grid%cmc_sfcdif, CHC_SFCDIF=grid%chc_sfcdif & !I/O urban |
---|
540 | ! P-X LSM Variables |
---|
541 | & ,LANDUSEF=grid%landusef, SOILCTOP=grid%soilctop & ! P-X LSM |
---|
542 | & ,SOILCBOT=grid%soilcbot & ! P-X LSM |
---|
543 | & ,RA=grid%ra, RS=grid%rs, LAI=grid%lai & ! P-X LSM |
---|
544 | & ,NLCAT=grid%num_land_cat, NSCAT=grid%num_soil_cat & ! P-X LSM |
---|
545 | & ,VEGF_PX=grid%vegf_px, SNOWNCV=grid%snowncv & ! P-X LSM |
---|
546 | & ,ANAL_INTERVAL=config_flags%auxinput9_interval_s+config_flags%auxinput9_interval_m*60 & ! P-X LSM |
---|
547 | & ,PXLSM_SMOIS_INIT=config_flags%pxlsm_smois_init & ! P-X LSM |
---|
548 | & ,PXLSM_SOIL_NUDGE=config_flags%pxlsm_soil_nudge & ! P-X LSM |
---|
549 | ! Optional PX LSM nudging |
---|
550 | & ,t2_ndg_old=grid%t2_ndg_old & |
---|
551 | & ,q2_ndg_old=grid%q2_ndg_old & |
---|
552 | & ,t2_ndg_new=grid%t2_ndg_new & |
---|
553 | & ,q2_ndg_new=grid%q2_ndg_new & |
---|
554 | & ,sn_ndg_old=grid%sn_ndg_old & |
---|
555 | & ,sn_ndg_new=grid%sn_ndg_new & |
---|
556 | ! Indexes |
---|
557 | & ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
558 | & ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
559 | & , I_START=grid%i_start,I_END=min(grid%i_end, ide-1) & |
---|
560 | & , J_START=grid%j_start,J_END=min(grid%j_end, jde-1) & |
---|
561 | & , KTS=k_start, KTE=min(k_end,kde-1) & |
---|
562 | & , NUM_TILES=grid%num_tiles & |
---|
563 | ! Variables required by TEMF PBL - WA 1/7/09 |
---|
564 | ,te_temf=grid%te_temf,hd_temf=grid%hd_temf & |
---|
565 | ,fCor=grid%f,exch_temf=exch_temf,wm_temf=grid%wm_temf & |
---|
566 | ! Variables required by IDEAL SCM sfc scheme - WA 1/6/10 |
---|
567 | ,hfx_force=grid%hfx_force,lh_force=grid%lh_force & |
---|
568 | ,tsk_force=grid%tsk_force & |
---|
569 | ,hfx_force_tend=grid%hfx_force_tend & |
---|
570 | ,lh_force_tend=grid%lh_force_tend & |
---|
571 | ,tsk_force_tend=grid%tsk_force_tend & |
---|
572 | ! Optional |
---|
573 | & ,QV_CURR=moist(ims,kms,jms,P_QV), F_QV=F_QV & |
---|
574 | & ,QC_CURR=moist(ims,kms,jms,P_QC), F_QC=F_QC & |
---|
575 | & ,QR_CURR=moist(ims,kms,jms,P_QR), F_QR=F_QR & |
---|
576 | & ,QI_CURR=moist(ims,kms,jms,P_QI), F_QI=F_QI & |
---|
577 | & ,QS_CURR=moist(ims,kms,jms,P_QS), F_QS=F_QS & |
---|
578 | & ,QG_CURR=moist(ims,kms,jms,P_QG), F_QG=F_QG & |
---|
579 | & ,CAPG=grid%capg, EMISS=grid%emiss, HOL=hol,MOL=grid%mol & |
---|
580 | & ,T2OBS=grid%t2obs, Q2OBS=grid%q2obs & |
---|
581 | & ,RAINBL=grid%rainbl,SR=grid%sr,RAINSHV=grid%rainshv & |
---|
582 | & ,RAINNCV=grid%rainncv,REGIME=grid%regime,T2=grid%t2,THC=grid%thc & |
---|
583 | & ,QSG=grid%qsg,QVG=grid%qvg,QCG=grid%qcg,SOILT1=grid%soilt1,TSNAV=grid%tsnav & ! ruc lsm |
---|
584 | & ,SMFR3D=grid%smfr3d,KEEPFR3DFLAG=grid%keepfr3dflag,DEW=grid%dew & ! ruc lsm |
---|
585 | & ,POTEVP=grid%POTEVP, SNOPCX=grid%SNOPCX, SOILTB=grid%SOILTB & ! ruc lsm |
---|
586 | & ,ISURBAN=isurban, MMINLU=TRIM(mminlu) & |
---|
587 | & ,SNOTIME = grid%SNOTIME & |
---|
588 | & ,RDLAI2D=config_flags%rdlai2d & |
---|
589 | & ,usemonalb=config_flags%usemonalb & |
---|
590 | & ,NOAHRES=grid%noahres & |
---|
591 | !mynn mp@ |
---|
592 | & ,ch=grid%ch,tsq=grid%tsq,qsq=grid%qsq,cov=grid%cov & |
---|
593 | & ) |
---|
594 | BENCH_END(surf_driver_tim) |
---|
595 | |
---|
596 | #ifdef LMDZ1 |
---|
597 | WRITE(message, *)' module_first_rk_step_part1: after surface' |
---|
598 | CALL wrf_debug(200, message) |
---|
599 | WRITE(message, *)' t_tend: ',t_tendf(im2,km2,jm2), & |
---|
600 | ' u_tend: ', ru_tendf(im2,1,jm2) |
---|
601 | CALL wrf_debug(200, message) |
---|
602 | WRITE(message,*)' psfc_tend: ',grid%dpsdt(im2,jm2), & |
---|
603 | 'p sfc: ',p8w(im2,kms,jm2) |
---|
604 | CALL wrf_debug(200, message) |
---|
605 | WRITE(message,*)' p 1: ',grid%p(im2,kms,jm2), ' ph 1: ',grid%ph_2(im2,kms,jm2) |
---|
606 | CALL wrf_debug(200, message) |
---|
607 | #endif |
---|
608 | |
---|
609 | !********* |
---|
610 | ! pbl |
---|
611 | |
---|
612 | CALL wrf_debug ( 200 , ' call pbl_driver' ) |
---|
613 | BENCH_START(pbl_driver_tim) |
---|
614 | CALL pbl_driver( & |
---|
615 | & AKHS=grid%akhs ,AKMS=grid%akms & |
---|
616 | & ,BL_PBL_PHYSICS=config_flags%bl_pbl_physics & |
---|
617 | & ,BLDT=grid%bldt, CURR_SECS=curr_secs, ADAPT_STEP_FLAG=adapt_step_flag & |
---|
618 | & ,BR=br ,CHKLOWQ=chklowq ,CT=grid%ct & |
---|
619 | & ,DT=grid%dt ,DX=grid%dx ,DZ8W=dz8w & |
---|
620 | & ,EXCH_H=grid%exch_h ,EXCH_M=grid%exch_m & |
---|
621 | & ,F=grid%f ,GRDFLX=grid%grdflx & |
---|
622 | & ,GZ1OZ0=gz1oz0 ,HFX=grid%hfx ,HT=grid%ht & |
---|
623 | & ,ID=grid%id ,ITIMESTEP=grid%itimestep ,KPBL=grid%kpbl & |
---|
624 | & ,LH=grid%lh ,LOWLYR=grid%lowlyr ,P8W=grid%p_hyd_w & |
---|
625 | & ,PBLH=grid%pblh ,PI_PHY=pi_phy ,PSIH=psih & |
---|
626 | & ,PSIM=psim ,P_PHY=grid%p_hyd ,QFX=grid%qfx & |
---|
627 | & ,QSFC=grid%qsfc ,QZ0=grid%qz0 ,MIXHT=mixht & |
---|
628 | & ,RA_LW_PHYSICS=config_flags%ra_lw_physics & |
---|
629 | & ,RHO=rho ,RQCBLTEN=grid%rqcblten ,RQIBLTEN=grid%rqiblten & |
---|
630 | & ,RQVBLTEN=grid%rqvblten ,RTHBLTEN=grid%rthblten ,RUBLTEN=grid%rublten & |
---|
631 | & ,RVBLTEN=grid%rvblten ,SNOW=grid%snow ,STEPBL=grid%stepbl & |
---|
632 | & ,THZ0=grid%thz0 ,TH_PHY=th_phy & |
---|
633 | & ,TSK=grid%tsk ,T_PHY=grid%t_phy ,UST=grid%ust & |
---|
634 | & ,U10=grid%u10 ,UZ0=grid%uz0 ,U_FRAME=grid%u_frame ,U_PHY=u_phy & |
---|
635 | & ,V10=grid%v10 ,VZ0=grid%vz0 ,V_FRAME=grid%v_frame ,V_PHY=v_phy & |
---|
636 | ,T2=grid%t2 & |
---|
637 | & ,WARM_RAIN=grid%warm_rain ,WSPD=wspd & |
---|
638 | & ,XICE=grid%xice ,XLAND=grid%xland ,Z=grid%z & |
---|
639 | & ,ZNT=grid%znt & |
---|
640 | ! variables added for BEP |
---|
641 | & ,FRC_URB2D=grid%frc_urb2d & |
---|
642 | & ,A_U_BEP=grid%a_u_bep,A_V_BEP=grid%a_v_bep,A_T_BEP=grid%a_t_bep & |
---|
643 | & ,A_Q_BEP=grid%a_q_bep & |
---|
644 | & ,B_U_BEP=grid%b_u_bep,B_V_BEP=grid%b_v_bep,B_T_BEP=grid%b_t_bep & |
---|
645 | & ,B_Q_BEP=grid%b_q_bep & |
---|
646 | & ,SF_BEP=grid%sf_bep,VL_BEP=grid%vl_bep & |
---|
647 | & ,A_E_BEP=grid%a_e_bep,B_E_BEP=grid%b_e_bep,DLG_BEP=grid%dlg_bep & |
---|
648 | & ,DL_U_BEP=grid%dl_u_bep & |
---|
649 | & ,SF_SFCLAY_PHYSICS=config_flags%sf_sfclay_physics & |
---|
650 | & ,SF_URBAN_PHYSICS=config_flags%sf_urban_physics & |
---|
651 | ! Bep changes end |
---|
652 | ! add tke_pbl, and turbulent fluxes |
---|
653 | & ,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 & |
---|
654 | ! end add tke_pbl, and turbulent fluxes |
---|
655 | & ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
656 | & ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
657 | & ,I_START=grid%i_start,I_END=min(grid%i_end, ide-1) & |
---|
658 | & ,J_START=grid%j_start,J_END=min(grid%j_end, jde-1) & |
---|
659 | & ,KTS=k_start, KTE=min(k_end,kde-1) & |
---|
660 | & ,NUM_TILES=grid%num_tiles & |
---|
661 | ! Variables Required by ACM PBL - jp |
---|
662 | & ,ZNU=grid%znu,ZNW=grid%znw,MUT=grid%mut,P_TOP=grid%p_top & |
---|
663 | ! Variables required by TEMF PBL - WA 9/9/08 |
---|
664 | ,te_temf=grid%te_temf & |
---|
665 | ,kh_temf=grid%kh_temf,km_temf=grid%km_temf & |
---|
666 | ,shf_temf=grid%shf_temf,qf_temf=grid%qf_temf & |
---|
667 | ,uw_temf=grid%uw_temf,vw_temf=grid%vw_temf & |
---|
668 | ,hd_temf=grid%hd_temf,lcl_temf=grid%lcl_temf & |
---|
669 | ,wupd_temf=grid%wupd_temf,mf_temf=grid%mf_temf & |
---|
670 | ,thup_temf=grid%thup_temf,qtup_temf=grid%qtup_temf & |
---|
671 | ,qlup_temf=grid%qlup_temf & |
---|
672 | ,cf3d_temf=grid%cf3d_temf,cfm_temf=grid%cfm_temf & |
---|
673 | ,hct_temf=grid%hct_temf & |
---|
674 | ,flhc=grid%flhc,flqc=grid%flqc & |
---|
675 | ,exch_temf=exch_temf & |
---|
676 | ! optional |
---|
677 | & ,QV_CURR=moist(ims,kms,jms,P_QV), F_QV=F_QV & |
---|
678 | & ,QC_CURR=moist(ims,kms,jms,P_QC), F_QC=F_QC & |
---|
679 | & ,QR_CURR=moist(ims,kms,jms,P_QR), F_QR=F_QR & |
---|
680 | & ,QI_CURR=moist(ims,kms,jms,P_QI), F_QI=F_QI & |
---|
681 | & ,QS_CURR=moist(ims,kms,jms,P_QS), F_QS=F_QS & |
---|
682 | & ,QG_CURR=moist(ims,kms,jms,P_QG), F_QG=F_QG & |
---|
683 | & ,HOL=HOL, MOL=grid%mol, REGIME=grid%REGIME & |
---|
684 | !mynn mp@ |
---|
685 | & ,QKE=scalar(ims,kms,jms,P_qke), tsq=grid%tsq, qsq=grid%qsq, cov=grid%cov & |
---|
686 | & ,rmol=grid%rmol, ch=grid%ch & |
---|
687 | & ,qcg=grid%qcg, grav_settling=grid%grav_settling & |
---|
688 | ! & ,K_m=grid%K_m, K_h=grid%K_h, K_q=grid%K_q & |
---|
689 | !GWD for ARW |
---|
690 | & ,GWD_OPT=config_flags%gwd_opt & |
---|
691 | & ,DTAUX3D=grid%dtaux3d,DTAUY3D=grid%dtauy3d & |
---|
692 | & ,DUSFCG=grid%dusfcg,DVSFCG=grid%dvsfcg & |
---|
693 | & ,VAR2D=grid%var2d,OC12D=grid%oc12d & |
---|
694 | & ,OA1=grid%oa1,OA2=grid%oa2,OA3=grid%oa3,OA4=grid%oa4 & |
---|
695 | & ,OL1=grid%ol1,OL2=grid%ol2,OL3=grid%ol3,OL4=grid%ol4 & |
---|
696 | ! For Wind Turbine Drag Parameterizations |
---|
697 | & ,phb=grid%phb & |
---|
698 | & ,XLAT_U=grid%xlat_u,XLONG_U=grid%xlong_u & |
---|
699 | !Variables required for camuwpbl scheme |
---|
700 | & ,Z_AT_W=grid%z_at_w,CLDFRA=grid%cldfra & |
---|
701 | & ,RTHRATENLW=grid%rthratenlw,TAURESX2D=grid%tauresx2d & |
---|
702 | & ,TAURESY2D=grid%tauresy2d & |
---|
703 | & ,TPERT2D=grid%tpert2d,QPERT2D=grid%qpert2d & |
---|
704 | & ,WPERT2D=grid%wpert2d & |
---|
705 | & ,XLAT_V=grid%xlat_v,XLONG_V=grid%xlong_v & |
---|
706 | & ) |
---|
707 | |
---|
708 | |
---|
709 | BENCH_END(pbl_driver_tim) |
---|
710 | #ifdef LMDZ1 |
---|
711 | WRITE(message, *)' module_first_rk_step_part1: after pbl' |
---|
712 | CALL wrf_debug(200, message) |
---|
713 | WRITE(message, *)' t_tend: ',t_tendf(im2,km2,jm2), & |
---|
714 | ' u_tend: ', ru_tendf(im2,1,jm2) |
---|
715 | CALL wrf_debug(200, message) |
---|
716 | WRITE(message,*)' psfc_tend: ',grid%dpsdt(im2,jm2), & |
---|
717 | 'p sfc: ',p8w(im2,kms,jm2) |
---|
718 | CALL wrf_debug(200, message) |
---|
719 | WRITE(message,*)' p 1: ',grid%p(im2,kms,jm2), ' ph 1: ',grid%ph_2(im2,kms,jm2) |
---|
720 | CALL wrf_debug(200, message) |
---|
721 | #endif |
---|
722 | |
---|
723 | !***** |
---|
724 | ! fire |
---|
725 | |
---|
726 | ! Jan Mandel's call to SFIRE |
---|
727 | |
---|
728 | IF ((grid%sr_x > 0 .OR. grid%sr_y > 0) .AND. config_flags%ifire == 2) THEN |
---|
729 | |
---|
730 | BENCH_START(fire_driver_tim) |
---|
731 | if(config_flags%ifire.eq.2)then |
---|
732 | ! initialization moved to start_em:start_domain_em |
---|
733 | ! if(grid%initestep.eq.1) & |
---|
734 | ! call sfire_driver_em_init ( grid , config_flags & |
---|
735 | ! ,ids,ide, kds,kde, jds,jde & |
---|
736 | ! ,ims,ime, kms,kme, jms,jme & |
---|
737 | ! ,ips,ipe, kps,kpe, jps,jpe ) |
---|
738 | ! one timestep of the fire model |
---|
739 | call sfire_driver_em_step ( grid , config_flags & |
---|
740 | ,ids,ide, kds,kde, jds,jde & |
---|
741 | ,ims,ime, kms,kme, jms,jme & |
---|
742 | ,ips,ipe, kps,kpe, jps,jpe & |
---|
743 | ,rho,grid%z_at_w,dz8w) |
---|
744 | endif |
---|
745 | |
---|
746 | BENCH_END(fire_driver_tim) |
---|
747 | ENDIF |
---|
748 | |
---|
749 | #ifdef LMDZ1 |
---|
750 | WRITE(message, *)' module_first_rk_step_part1: after fire' |
---|
751 | CALL wrf_debug(200, message) |
---|
752 | WRITE(message, *)' t_tend: ',t_tendf(im2,km2,jm2), & |
---|
753 | ' u_tend: ', ru_tendf(im2,1,jm2) |
---|
754 | CALL wrf_debug(200, message) |
---|
755 | WRITE(message,*)' psfc_tend: ',grid%dpsdt(im2,jm2), & |
---|
756 | 'p sfc: ',p8w(im2,kms,jm2) |
---|
757 | CALL wrf_debug(200, message) |
---|
758 | WRITE(message,*)' p 1: ',grid%p(im2,kms,jm2), ' ph 1: ',grid%ph_2(im2,kms,jm2) |
---|
759 | CALL wrf_debug(200, message) |
---|
760 | #endif |
---|
761 | |
---|
762 | ! cumulus para. |
---|
763 | |
---|
764 | CALL wrf_debug ( 200 , ' call cumulus_driver' ) |
---|
765 | |
---|
766 | #if ( WRF_DFI_RADAR == 1 ) |
---|
767 | do_capsupress=0 |
---|
768 | if (config_flags%dfi_radar == 1) then |
---|
769 | if(grid%dfi_stage == DFI_FWD ) do_capsupress=1 |
---|
770 | if(grid%itimestep <= 31 .and. grid%dfi_stage == DFI_FST ) do_capsupress=1 |
---|
771 | endif |
---|
772 | #endif |
---|
773 | |
---|
774 | BENCH_START(cu_driver_tim) |
---|
775 | CALL cumulus_driver(grid & |
---|
776 | ! Prognostic variables |
---|
777 | & ,U=u_phy ,V=v_phy ,TH=th_phy ,T=grid%t_phy & |
---|
778 | & ,W=grid%w_2 ,P=grid%p_hyd ,PI=pi_phy ,RHO=rho & |
---|
779 | ! Other arguments |
---|
780 | & ,ITIMESTEP=grid%itimestep ,DT=grid%dt ,DX=grid%dx & |
---|
781 | & ,CUDT=grid%cudt,CURR_SECS=curr_secs,ADAPT_STEP_FLAG=adapt_step_flag & |
---|
782 | & ,RAINC=grid%rainc ,RAINCV=grid%raincv ,PRATEC=grid%pratec & |
---|
783 | & ,NCA=grid%nca & |
---|
784 | & ,HTOP=grid%cutop ,HBOT=grid%cubot ,KPBL=grid%kpbl & |
---|
785 | & ,Z=grid%z ,Z_AT_W=grid%z_at_w ,MAVAIL=grid%mavail ,PBLH=grid%pblh & |
---|
786 | & ,DZ8W=dz8w ,P8W=grid%p_hyd_w, PSFC=grid%psfc, TSK=grid%tsk & |
---|
787 | & ,TKE_PBL=grid%tke_pbl, UST=grid%ust & |
---|
788 | & ,W0AVG=grid%w0avg ,STEPCU=grid%stepcu & |
---|
789 | & ,CLDEFI=grid%cldefi ,LOWLYR=grid%lowlyr ,XLAND=grid%xland & |
---|
790 | & ,APR_GR=grid%apr_gr ,APR_W=grid%apr_w ,APR_MC=grid%apr_mc & |
---|
791 | & ,APR_ST=grid%apr_st ,APR_AS=grid%apr_as ,APR_CAPMA=grid%apr_capma & |
---|
792 | & ,APR_CAPME=grid%apr_capme ,APR_CAPMI=grid%apr_capmi & |
---|
793 | & ,MASS_FLUX=grid%mass_flux ,XF_ENS=grid%xf_ens & |
---|
794 | & ,PR_ENS=grid%pr_ens ,HT=grid%ht,EDT_OUT=grid%edt_out & |
---|
795 | & ,imomentum=grid%imomentum,clos_choice=grid%clos_choice & |
---|
796 | & ,ishallow=config_flags%ishallow & |
---|
797 | & ,cugd_tten=grid%cugd_tten,cugd_qvten=grid%cugd_qvten,cugd_qcten=grid%cugd_qcten & |
---|
798 | & ,cugd_ttens=grid%cugd_ttens,cugd_qvtens=grid%cugd_qvtens & |
---|
799 | & ,ENSDIM=config_flags%ensdim ,MAXIENS=config_flags%maxiens ,MAXENS=config_flags%maxens & |
---|
800 | & ,MAXENS2=config_flags%maxens2 ,MAXENS3=config_flags%maxens3 & |
---|
801 | & ,CU_ACT_FLAG=cu_act_flag ,WARM_RAIN=grid%warm_rain & |
---|
802 | & ,HFX=grid%hfx, QFX=grid%qfx & |
---|
803 | & ,CLDFRA=grid%cldfra, TPERT2D=grid%tpert2d & |
---|
804 | & ,GSW=grid%gsw,cugd_avedx=config_flags%cugd_avedx & |
---|
805 | & ,k22_shallow=grid%k22_shallow,kbcon_shallow=grid%kbcon_shallow & |
---|
806 | & ,ktop_shallow=grid%ktop_shallow,xmb_shallow=grid%xmb_shallow & |
---|
807 | & ,PERIODIC_X=(config_flags%polar .OR. config_flags%periodic_x) & |
---|
808 | & ,PERIODIC_Y=config_flags%periodic_y & |
---|
809 | ! Zhang-McFarlane outputs |
---|
810 | & ,CAPE=grid%cape ,ZMMU=grid%zmmu ,ZMMD=grid%zmmd & |
---|
811 | & ,ZMDT=grid%zmdt ,ZMDQ=grid%zmdq & |
---|
812 | & ,DLF=grid%dlf, RLIQ=grid%rliq & |
---|
813 | & ,PCONVB=grid%pconvb, PCONVT=grid%pconvt & |
---|
814 | & ,EVAPTZM=grid%evaptzm, FZSNTZM=grid%fzsntzm, EVSNTZM=grid%evsntzm & |
---|
815 | & ,EVAPQZM=grid%evapqzm, ZMFLXPRC=grid%zmflxprc & |
---|
816 | & ,ZMFLXSNW=grid%zmflxsnw, ZMNTPRPD=grid%zmntprpd & |
---|
817 | & ,ZMNTSNPD=grid%zmntsnpd, ZMEIHEAT=grid%zmeiheat & |
---|
818 | & ,CMFMC=grid%cmfmc, CMFMCDZM=grid%cmfmcdzm & |
---|
819 | & ,PRECCDZM=grid%preccdzm, PRECZ=grid%precz & |
---|
820 | & ,ZMMTU=grid%zmmtu, ZMMTV=grid%zmmtv & |
---|
821 | & ,ZMUPGU=grid%zmupgu, ZMUPGD=grid%zmupgd & |
---|
822 | & ,ZMVPGU=grid%zmvpgu, ZMVPGD=grid%zmvpgd & |
---|
823 | & ,ZMICUU=grid%zmicuu, ZMICUD=grid%zmicud & |
---|
824 | & ,ZMICVU=grid%zmicvu, ZMICVD=grid%zmicvd & |
---|
825 | & ,ZMDICE=grid%zmdice, ZMDLIQ=grid%zmdliq & |
---|
826 | ! Selection flag |
---|
827 | & ,CU_PHYSICS=config_flags%cu_physics & |
---|
828 | & ,BL_PBL_PHYSICS=config_flags%bl_pbl_physics & |
---|
829 | & ,SF_SFCLAY_PHYSICS=config_flags%sf_sfclay_physics & |
---|
830 | & ,KFETA_TRIGGER=config_flags%kfeta_trigger & |
---|
831 | ! Dimension arguments |
---|
832 | & ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
833 | & ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
834 | & ,IPS=ips,IPE=ipe, JPS=jps,JPE=jpe, KPS=kps,KPE=kpe & |
---|
835 | & ,I_START=grid%i_start,I_END=min(grid%i_end, ide-1) & |
---|
836 | & ,J_START=grid%j_start,J_END=min(grid%j_end, jde-1) & |
---|
837 | & ,KTS=k_start, KTE=min(k_end,kde-1) & |
---|
838 | & ,NUM_TILES=grid%num_tiles & |
---|
839 | ! Moisture tendency arguments |
---|
840 | & ,RQVCUTEN=grid%rqvcuten , RQCCUTEN=grid%rqccuten & |
---|
841 | & ,RQSCUTEN=grid%rqscuten , RQICUTEN=grid%rqicuten & |
---|
842 | & ,RQRCUTEN=grid%rqrcuten & |
---|
843 | & ,RQVBLTEN=grid%rqvblten , RQVFTEN=grid%rqvften & |
---|
844 | ! Other tendency arguments |
---|
845 | & ,RTHRATEN=grid%rthraten , RTHBLTEN=grid%rthblten & |
---|
846 | & ,RUCUTEN=grid%rucuten , RVCUTEN=grid%rvcuten & |
---|
847 | & ,RTHCUTEN=grid%rthcuten , RTHFTEN=grid%rthften & |
---|
848 | ! Moisture tracer arguments |
---|
849 | & ,QV_CURR=moist(ims,kms,jms,P_QV), F_QV=F_QV & |
---|
850 | & ,QC_CURR=moist(ims,kms,jms,P_QC), F_QC=F_QC & |
---|
851 | & ,QR_CURR=moist(ims,kms,jms,P_QR), F_QR=F_QR & |
---|
852 | & ,QI_CURR=moist(ims,kms,jms,P_QI), F_QI=F_QI & |
---|
853 | & ,QS_CURR=moist(ims,kms,jms,P_QS), F_QS=F_QS & |
---|
854 | & ,QG_CURR=moist(ims,kms,jms,P_QG), F_QG=F_QG & |
---|
855 | ! Variables for Tiedtke and NSAS schemes |
---|
856 | & ,ZNU=grid%znu & |
---|
857 | & ,MP_PHYSICS=config_flags%mp_physics & |
---|
858 | #ifdef WRF_CHEM |
---|
859 | & ,GD_CLOUD=grid%GD_CLOUD,GD_CLOUD2=grid%GD_CLOUD2 & |
---|
860 | #endif |
---|
861 | #if ( WRF_DFI_RADAR == 1 ) |
---|
862 | & ,DO_CAPSUPPRESS=do_capsupress & |
---|
863 | #endif |
---|
864 | & ,cfu1=grid%cfu1,cfd1=grid%cfd1,dfu1=grid%dfu1,efu1=grid%efu1,dfd1=grid%dfd1,efd1=grid%efd1,f_flux=l_flux) |
---|
865 | BENCH_END(cu_driver_tim) |
---|
866 | ! |
---|
867 | ! this for calculating (G3 scheme only) time averaged variables for online (WRF-CHem) or offline (other models) chem runs |
---|
868 | ! |
---|
869 | if(config_flags%cu_diag.eq.1)then |
---|
870 | !$OMP PARALLEL DO & |
---|
871 | !$OMP PRIVATE ( ij ) |
---|
872 | DO ij = 1 , grid%num_tiles |
---|
873 | call convtrans_prep(grid%gd_cloud,grid%gd_cloud2,grid%gd_cloud_a,& |
---|
874 | & grid%gd_cloud_b,grid%raincv,grid%raincv_a,grid%raincv_b, & |
---|
875 | & grid%gd_cldfr,moist,p_QV,p_QC,p_qi,T_PHY,P_PHY,num_moist, & |
---|
876 | & grid%gd_cloud2_a,grid%gd_cloud2_b,grid%convtrans_avglen_m,& |
---|
877 | & adapt_step_flag,curr_secs, & |
---|
878 | & grid%itimestep,grid%dt, & |
---|
879 | & config_flags%cu_physics, & |
---|
880 | & ids,ide, jds,jde, kds,kde, & |
---|
881 | & ims,ime, jms,jme, kms,kme & |
---|
882 | & ,ITS=grid%i_start(ij),ITE=min(grid%i_end(ij), ide-1) & |
---|
883 | & ,JTS=grid%j_start(ij),JTE=min(grid%j_end(ij), jde-1) & |
---|
884 | & ,KTS=k_start, KTE=min(k_end,kde-1)) |
---|
885 | ENDDO |
---|
886 | !$OMP END PARALLEL DO |
---|
887 | endif |
---|
888 | #ifdef LMDZ1 |
---|
889 | WRITE(message, *)' module_first_rk_step_part1: after cumulus' |
---|
890 | CALL wrf_debug(200, message) |
---|
891 | WRITE(message, *)' t_tend: ',t_tendf(im2,km2,jm2), & |
---|
892 | ' u_tend: ', ru_tendf(im2,1,jm2) |
---|
893 | CALL wrf_debug(200, message) |
---|
894 | WRITE(message,*)' psfc_tend: ',grid%dpsdt(im2,jm2), & |
---|
895 | 'p sfc: ',p8w(im2,kms,jm2) |
---|
896 | CALL wrf_debug(200, message) |
---|
897 | WRITE(message,*)' p 1: ',grid%p(im2,kms,jm2), ' ph 1: ',grid%ph_2(im2,kms,jm2) |
---|
898 | CALL wrf_debug(200, message) |
---|
899 | #endif |
---|
900 | |
---|
901 | ! shallow cumulus parameterization |
---|
902 | CALL wrf_debug ( 200 , ' call shallow_cumulus_driver' ) |
---|
903 | |
---|
904 | BENCH_START(shcu_driver_tim) |
---|
905 | CALL shallowcu_driver( & |
---|
906 | & IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
907 | & ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
908 | & ,IPS=ips,IPE=ipe, JPS=jps,JPE=jpe, KPS=kps,KPE=kpe & |
---|
909 | & ,I_START=grid%i_start, I_END=min(grid%i_end, ide-1) & |
---|
910 | & ,J_START=grid%j_start, J_END=min(grid%j_end, jde-1) & |
---|
911 | & ,KTS=k_start, KTE=min(k_end, kde-1) & |
---|
912 | & ,NUM_TILES=grid%num_tiles & |
---|
913 | & ,U=u_phy, V=v_phy, TH=th_phy, T=t_phy & |
---|
914 | & ,P=grid%p_hyd, PI=pi_phy, RHO=rho, MOIST=moist & |
---|
915 | & ,NUM_MOIST=num_moist & |
---|
916 | & ,ITIMESTEP=grid%itimestep, DT=grid%dt, DX=grid%dx & |
---|
917 | & ,CUDT=grid%cudt & |
---|
918 | & ,CURR_SECS=curr_secs, ADAPT_STEP_FLAG=adapt_step_flag & |
---|
919 | & ,RAINSH=grid%rainsh, PRATESH=grid%pratesh, NCA=grid%nca& |
---|
920 | & ,RAINSHV=grid%rainshv & |
---|
921 | & ,Z=grid%z, Z_AT_W=grid%z_at_w, DZ8W=dz8w & |
---|
922 | & ,MAVAIL=grid%mavail, PBLH=grid%pblh, P8W=grid%p_hyd_w & |
---|
923 | & ,TKE_PBL=grid%tke_pbl & |
---|
924 | & ,CLDFRA=grid%cldfra, CLDFRA_OLD=grid%cldfra_old & |
---|
925 | & ,CLDFRASH=grid%cldfrash, HTOP=grid%htop, HBOT=grid%hbot& |
---|
926 | & ,SHCU_PHYSICS=grid%shcu_physics & |
---|
927 | & ,QV_CURR=moist(ims,kms,jms,P_QV) & |
---|
928 | & ,QC_CURR=moist(ims,kms,jms,P_QC) & |
---|
929 | & ,QR_CURR=moist(ims,kms,jms,P_QR) & |
---|
930 | & ,QI_CURR=moist(ims,kms,jms,P_QI) & |
---|
931 | & ,QS_CURR=moist(ims,kms,jms,P_QI) & |
---|
932 | & ,QG_CURR=moist(ims,kms,jms,P_QG) & |
---|
933 | & ,DLF=grid%dlf, RLIQ=grid%rliq, RLIQ2=grid%rliq2 & |
---|
934 | & ,CMFMC=grid%cmfmc, CMFMC2=grid%cmfmc2 & |
---|
935 | & ,CUSH=grid%cush, SNOWSH=grid%snowsh & |
---|
936 | & ,ICWMRSH=grid%icwmrsh, RPRDSH=grid%rprdsh & |
---|
937 | & ,CBMF=grid%cbmf_cu, CMFSL=grid%cmfsl, CMFLQ=grid%cmflq & |
---|
938 | & ,EVAPCSH=grid%evapcsh & |
---|
939 | & ,RQVSHTEN=grid%rqvshten, RQCSHTEN=grid%rqcshten & |
---|
940 | & ,RQRSHTEN=grid%rqrshten, RQISHTEN=grid%rqishten & |
---|
941 | & ,RQSSHTEN=grid%rqsshten, RQGSHTEN=grid%rqgshten & |
---|
942 | & ,RQVBLTEN=grid%rqvblten, RQVFTEN=grid%rqvften & |
---|
943 | & ,RUSHTEN=grid%rushten, RVSHTEN=grid%rvshten & |
---|
944 | & ,RTHSHTEN=grid%rthshten, RTHRATEN=grid%rthraten & |
---|
945 | & ,RTHBLTEN=grid%rthblten, RTHFTEN=grid%rthften & |
---|
946 | & ,F_QV=f_qv,F_QC=f_qc,F_QR=f_qr & |
---|
947 | & ,F_QI=f_qi,F_QS=f_qs,F_QG=f_qg & |
---|
948 | & ,HT=grid%ht & |
---|
949 | & ) |
---|
950 | BENCH_END(shcu_driver_tim) |
---|
951 | #ifdef LMDZ1 |
---|
952 | WRITE(message, *)' module_first_rk_step_part1: after shallow cumulus' |
---|
953 | CALL wrf_debug(200, message) |
---|
954 | WRITE(message, *)' t_tend: ',t_tendf(im2,km2,jm2), & |
---|
955 | ' u_tend: ', ru_tendf(im2,1,jm2) |
---|
956 | CALL wrf_debug(200, message) |
---|
957 | WRITE(message,*)' psfc_tend: ',grid%dpsdt(im2,jm2), & |
---|
958 | 'p sfc: ',p8w(im2,kms,jm2) |
---|
959 | CALL wrf_debug(200, message) |
---|
960 | WRITE(message,*)' p 1: ',grid%p(im2,kms,jm2), ' ph 1: ',grid%ph_2(im2,kms,jm2) |
---|
961 | CALL wrf_debug(200, message) |
---|
962 | #endif |
---|
963 | |
---|
964 | ! JPH call force_scm to update bl tendencies |
---|
965 | CALL force_scm(itimestep=grid%itimestep,dt=grid%dt & |
---|
966 | & ,scm_force=config_flags%scm_force & |
---|
967 | & ,dx=config_flags%scm_force_dx & |
---|
968 | & ,num_force_layers=grid%num_force_layers & |
---|
969 | & ,scm_th_adv=config_flags%scm_th_adv & |
---|
970 | & ,scm_qv_adv=config_flags%scm_qv_adv & |
---|
971 | & ,scm_ql_adv=config_flags%scm_ql_adv & |
---|
972 | & ,scm_wind_adv=config_flags%scm_wind_adv & |
---|
973 | & ,scm_vert_adv=config_flags%scm_vert_adv & |
---|
974 | & ,scm_soilT_force=config_flags%scm_soilT_force & |
---|
975 | & ,scm_soilQ_force=config_flags%scm_soilQ_force & |
---|
976 | & ,scm_force_th_largescale=config_flags%scm_force_th_largescale & |
---|
977 | & ,scm_force_qv_largescale=config_flags%scm_force_qv_largescale & |
---|
978 | & ,scm_force_ql_largescale=config_flags%scm_force_ql_largescale & |
---|
979 | & ,scm_force_wind_largescale=config_flags%scm_force_wind_largescale & |
---|
980 | & ,u_base=grid%u_base,v_base=grid%v_base & |
---|
981 | & ,z_base=grid%z_base & |
---|
982 | & ,z_force=grid%z_force,z_force_tend=grid%z_force_tend & |
---|
983 | & ,u_g=grid%u_g,v_g=grid%v_g & |
---|
984 | & ,u_g_tend=grid%u_g_tend,v_g_tend=grid%v_g_tend & |
---|
985 | & ,w_subs=grid%w_subs, w_subs_tend=grid%w_subs_tend & |
---|
986 | & ,th_upstream_x=grid%th_upstream_x & |
---|
987 | & ,th_upstream_x_tend=grid%th_upstream_x_tend & |
---|
988 | & ,th_upstream_y=grid%th_upstream_y & |
---|
989 | & ,th_upstream_y_tend=grid%th_upstream_y_tend & |
---|
990 | & ,qv_upstream_x=grid%qv_upstream_x & |
---|
991 | & ,qv_upstream_x_tend=grid%qv_upstream_x_tend & |
---|
992 | & ,qv_upstream_y=grid%qv_upstream_y & |
---|
993 | & ,qv_upstream_y_tend=grid%qv_upstream_y_tend & |
---|
994 | & ,ql_upstream_x=grid%ql_upstream_x & |
---|
995 | & ,ql_upstream_x_tend=grid%ql_upstream_x_tend & |
---|
996 | & ,ql_upstream_y=grid%ql_upstream_y & |
---|
997 | & ,ql_upstream_y_tend=grid%ql_upstream_y_tend & |
---|
998 | & ,u_upstream_x=grid%u_upstream_x & |
---|
999 | & ,u_upstream_x_tend=grid%u_upstream_x_tend & |
---|
1000 | & ,u_upstream_y=grid%u_upstream_y & |
---|
1001 | & ,u_upstream_y_tend=grid%u_upstream_y_tend & |
---|
1002 | & ,v_upstream_x=grid%v_upstream_x & |
---|
1003 | & ,v_upstream_x_tend=grid%v_upstream_x_tend & |
---|
1004 | & ,v_upstream_y=grid%v_upstream_y & |
---|
1005 | & ,v_upstream_y_tend=grid%v_upstream_y_tend & |
---|
1006 | & ,tau_x=grid%tau_x & |
---|
1007 | & ,tau_x_tend=grid%tau_x_tend & |
---|
1008 | & ,tau_y=grid%tau_y & |
---|
1009 | & ,tau_y_tend=grid%tau_y_tend & |
---|
1010 | & ,th_largescale=grid%th_largescale & |
---|
1011 | & ,th_largescale_tend=grid%th_largescale_tend & |
---|
1012 | & ,qv_largescale=grid%qv_largescale & |
---|
1013 | & ,qv_largescale_tend=grid%qv_largescale_tend & |
---|
1014 | & ,ql_largescale=grid%ql_largescale & |
---|
1015 | & ,ql_largescale_tend=grid%ql_largescale_tend & |
---|
1016 | & ,u_largescale=grid%u_largescale & |
---|
1017 | & ,u_largescale_tend=grid%u_largescale_tend & |
---|
1018 | & ,v_largescale=grid%v_largescale & |
---|
1019 | & ,v_largescale_tend=grid%v_largescale_tend & |
---|
1020 | & ,tau_largescale=grid%tau_largescale & |
---|
1021 | & ,tau_largescale_tend=grid%tau_largescale_tend & |
---|
1022 | & ,num_force_soil_layers=config_flags%num_force_soil_layers & |
---|
1023 | & ,num_soil_layers=config_flags%num_soil_layers & |
---|
1024 | & ,soil_depth_force=grid%soil_depth_force & |
---|
1025 | & ,zs=grid%zs & |
---|
1026 | & ,tslb=grid%tslb,smois=grid%smois & |
---|
1027 | & ,t_soil_forcing_val=grid%t_soil_forcing_val & |
---|
1028 | & ,t_soil_forcing_tend=grid%t_soil_forcing_tend & |
---|
1029 | & ,q_soil_forcing_val=grid%q_soil_forcing_val & |
---|
1030 | & ,q_soil_forcing_tend=grid%q_soil_forcing_tend & |
---|
1031 | & ,tau_soil=grid%tau_soil & |
---|
1032 | & ,z=grid%z,z_at_w=grid%z_at_w & |
---|
1033 | & ,th=th_phy, qv=moist(ims,kms,jms,P_QV) & |
---|
1034 | & ,ql=moist(ims,kms,jms,P_QC) & |
---|
1035 | & ,u=u_phy, v=v_phy & |
---|
1036 | & ,thten=grid%rthblten, qvten=grid%rqvblten & |
---|
1037 | & ,qlten=grid%rqcblten & |
---|
1038 | & ,uten=grid%rublten, vten=grid%rvblten & |
---|
1039 | & ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
1040 | & ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
1041 | & ,IPS=ips,IPE=ipe, JPS=jps,JPE=jpe, KPS=kps,KPE=kpe & |
---|
1042 | & ,KTS=k_start, KTE=min(k_end,kde-1) & |
---|
1043 | & ) |
---|
1044 | |
---|
1045 | #ifdef LMDZ1 |
---|
1046 | WRITE(message, *)' module_first_rk_step_part1: after scm update' |
---|
1047 | CALL wrf_debug(200, message) |
---|
1048 | WRITE(message, *)' t_tend: ',t_tendf(im2,km2,jm2), & |
---|
1049 | ' u_tend: ', ru_tendf(im2,1,jm2) |
---|
1050 | CALL wrf_debug(200, message) |
---|
1051 | WRITE(message,*)' psfc_tend: ',grid%dpsdt(im2,jm2), & |
---|
1052 | 'p sfc: ',p8w(im2,kms,jm2) |
---|
1053 | CALL wrf_debug(200, message) |
---|
1054 | WRITE(message,*)' p 1: ',grid%p(im2,kms,jm2), ' ph 1: ',grid%ph_2(im2,kms,jm2) |
---|
1055 | CALL wrf_debug(200, message) |
---|
1056 | #endif |
---|
1057 | |
---|
1058 | #ifdef DM_PARALLEL |
---|
1059 | # include "HALO_EM_FDDA_SFC.inc" |
---|
1060 | #endif |
---|
1061 | CALL wrf_debug ( 200 , ' call fddagd_driver' ) |
---|
1062 | |
---|
1063 | BENCH_START(fdda_driver_tim) |
---|
1064 | CALL fddagd_driver(itimestep=grid%itimestep,dt=grid%dt,xtime=grid%XTIME, & |
---|
1065 | id=grid%id, & |
---|
1066 | RUNDGDTEN=grid%rundgdten,RVNDGDTEN=grid%rvndgdten, & |
---|
1067 | RTHNDGDTEN=grid%rthndgdten,RPHNDGDTEN=grid%rphndgdten, & |
---|
1068 | RQVNDGDTEN=grid%rqvndgdten,RMUNDGDTEN=grid%rmundgdten, & |
---|
1069 | u_ndg_old=fdda3d(ims,kms,jms,P_u_ndg_old), & |
---|
1070 | v_ndg_old=fdda3d(ims,kms,jms,P_v_ndg_old), & |
---|
1071 | t_ndg_old=fdda3d(ims,kms,jms,P_t_ndg_old), & |
---|
1072 | ph_ndg_old=fdda3d(ims,kms,jms,P_ph_ndg_old), & |
---|
1073 | q_ndg_old=fdda3d(ims,kms,jms,P_q_ndg_old), & |
---|
1074 | mu_ndg_old=fdda2d(ims,1,jms,P_mu_ndg_old), & |
---|
1075 | u_ndg_new=fdda3d(ims,kms,jms,P_u_ndg_new), & |
---|
1076 | v_ndg_new=fdda3d(ims,kms,jms,P_v_ndg_new), & |
---|
1077 | t_ndg_new=fdda3d(ims,kms,jms,P_t_ndg_new), & |
---|
1078 | ph_ndg_new=fdda3d(ims,kms,jms,P_ph_ndg_new), & |
---|
1079 | q_ndg_new=fdda3d(ims,kms,jms,P_q_ndg_new), & |
---|
1080 | mu_ndg_new=fdda2d(ims,1,jms,P_mu_ndg_new), & |
---|
1081 | u3d=grid%u_2,v3d=grid%v_2,th_phy=th_phy, & |
---|
1082 | ph=grid%ph_2,rho=rho,moist=moist, & |
---|
1083 | p_phy=p_phy,pi_phy=pi_phy,p8w=p8w,t_phy=grid%t_phy, & |
---|
1084 | dz8w=dz8w,z=grid%z,z_at_w=grid%z_at_w, & |
---|
1085 | grid=grid,config_flags=config_flags,dx=grid%DX,n_moist=num_moist, & |
---|
1086 | STEPFG=grid%STEPFG, & |
---|
1087 | pblh=grid%pblh,ht=grid%ht,REGIME=grid%regime,ZNT=grid%znt & |
---|
1088 | ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde & |
---|
1089 | ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme & |
---|
1090 | ,I_START=grid%i_start,I_END=min(grid%i_end, ide-1) & |
---|
1091 | ,J_START=grid%j_start,J_END=min(grid%j_end, jde-1) & |
---|
1092 | ,KTS=k_start, KTE=min(k_end,kde-1) & |
---|
1093 | , num_tiles=grid%num_tiles, & |
---|
1094 | u10=grid%u10, v10=grid%v10, th2=grid%th2, q2=grid%q2, & |
---|
1095 | u10_ndg_old=grid%u10_ndg_old, & |
---|
1096 | v10_ndg_old=grid%v10_ndg_old, & |
---|
1097 | t2_ndg_old=grid%t2_ndg_old, & |
---|
1098 | th2_ndg_old=grid%th2_ndg_old, & |
---|
1099 | q2_ndg_old=grid%q2_ndg_old, & |
---|
1100 | rh_ndg_old=grid%rh_ndg_old, & |
---|
1101 | psl_ndg_old=grid%psl_ndg_old, & |
---|
1102 | ps_ndg_old=grid%ps_ndg_old, & |
---|
1103 | tob_ndg_old=grid%tob_ndg_old, & |
---|
1104 | odis_ndg_old=grid%odis_ndg_old, & |
---|
1105 | u10_ndg_new=grid%u10_ndg_new, & |
---|
1106 | v10_ndg_new=grid%v10_ndg_new, & |
---|
1107 | t2_ndg_new=grid%t2_ndg_new, & |
---|
1108 | th2_ndg_new=grid%th2_ndg_new, & |
---|
1109 | q2_ndg_new=grid%q2_ndg_new, & |
---|
1110 | rh_ndg_new=grid%rh_ndg_new, & |
---|
1111 | psl_ndg_new=grid%psl_ndg_new, & |
---|
1112 | ps_ndg_new=grid%ps_ndg_new, & |
---|
1113 | tob_ndg_new=grid%tob_ndg_new, & |
---|
1114 | odis_ndg_new=grid%odis_ndg_new & |
---|
1115 | ,IPS=ips,IPE=ipe, JPS=jps,JPE=jpe, KPS=kps,KPE=kpe & |
---|
1116 | ,IMSX=imsx,IMEX=imex,JMSX=jmsx,JMEX=jmex,KMSX=kmsx,KMEX=kmex & |
---|
1117 | ,IPSX=ipsx,IPEX=ipex,JPSX=jpsx,JPEX=jpex,KPSX=kpsx,KPEX=kpex & |
---|
1118 | ,IMSY=imsy,IMEY=imey,JMSY=jmsy,JMEY=jmey,KMSY=kmsy,KMEY=kmey & |
---|
1119 | ,IPSY=ipsy,IPEY=ipey,JPSY=jpsy,JPEY=jpey,KPSY=kpsy,KPEY=kpey ) |
---|
1120 | |
---|
1121 | BENCH_END(fdda_driver_tim) |
---|
1122 | |
---|
1123 | #ifdef LMDZ1 |
---|
1124 | WRITE(message, *)' module_first_rk_step_part1: after fdda' |
---|
1125 | CALL wrf_debug(200, message) |
---|
1126 | WRITE(message, *)' t_tend: ',t_tendf(im2,km2,jm2), & |
---|
1127 | ' u_tend: ', ru_tendf(im2,1,jm2) |
---|
1128 | CALL wrf_debug(200, message) |
---|
1129 | WRITE(message,*)' psfc_tend: ',grid%dpsdt(im2,jm2), & |
---|
1130 | 'p sfc: ',p8w(im2,kms,jm2) |
---|
1131 | CALL wrf_debug(200, message) |
---|
1132 | WRITE(message,*)' p 1: ',grid%p(im2,kms,jm2), ' ph 1: ',grid%ph_2(im2,kms,jm2) |
---|
1133 | CALL wrf_debug(200, message) |
---|
1134 | #endif |
---|
1135 | |
---|
1136 | END SUBROUTINE first_rk_step_part1 |
---|
1137 | |
---|
1138 | END MODULE module_first_rk_step_part1 |
---|