1 !WRF:MODEL_LAYER:CHEMISTRY
3 SUBROUTINE photolysis_driver (id,curr_secs,ktau,dtstep, &
4 config_flags,haveaer, &
5 dt_cld,af_dir,af_dn,af_up,par,erythema, &
6 gmt,julday,t_phy,moist,aerwrf,p8w,t8w,p_phy, &
7 chem,rho_phy,dz8w,xlat,xlong,z,z_at_w,gd_cloud,gd_cloud2, &
9 ph_macr,ph_o31d,ph_o33p,ph_no2, &
12 ph_no3o,ph_hno2,ph_hno3,ph_hno4,ph_h2o2, &
13 ph_ch2or,ph_ch2om,ph_ch3cho,ph_ch3coch3, &
14 ph_ch3coc2h5,ph_hcocho,ph_ch3cocho, &
15 ph_hcochest,ph_ch3o2h,ph_ch3coo2h,ph_ch3ono2, &
16 ph_hcochob, ph_n2o5,ph_o2,ph_n2o, &
17 ph_pan,ph_mpan,ph_acetol,ph_gly, &
18 ph_bigald,ph_mek,ph_c2h5ooh,ph_c3h7ooh,ph_pooh, &
19 ph_rooh,ph_xooh,ph_isopooh,ph_alkooh, &
20 ph_mekooh,ph_tolooh,ph_terpooh,ph_mvk, &
22 ph_cl2,ph_hocl,ph_fmcl, &
23 nref0, nw0, tuv_jmax0, &
24 ph_radfld, ph_adjcoe, ph_prate, &
26 tauaer1,tauaer2,tauaer3,tauaer4, &
27 gaer1,gaer2,gaer3,gaer4, &
28 waer1,waer2,waer3,waer4, &
29 bscoef1,bscoef2,bscoef3,bscoef4, &
30 l2aer,l3aer,l4aer,l5aer,l6aer,l7aer, &
31 pm2_5_dry,pm2_5_water,uvrad,ivgtyp, &
33 ids,ide, jds,jde, kds,kde, &
34 ims,ime, jms,jme, kms,kme, &
35 its,ite, jts,jte, kts,kte )
37 !------------------------------------------------------------------------
39 USE module_state_description
40 USE module_model_constants
43 USE module_ftuv_driver
44 USE module_phot_tuv, only : tuv_driver
46 INTEGER, INTENT(IN ) :: id,julday, &
47 ids,ide, jds,jde, kds,kde, &
48 ims,ime, jms,jme, kms,kme, &
49 its,ite, jts,jte, kts,kte
50 INTEGER, INTENT(IN ) :: ktau
51 REAL(KIND=8), INTENT(IN ) :: curr_secs
52 REAL, INTENT(IN ) :: dtstep,gmt
54 ! advected moisture variables
56 REAL, DIMENSION( ims:ime, kms:kme, jms:jme, num_moist ), &
61 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
63 pm2_5_dry,pm2_5_water, aerwrf
65 ! arrays that hold the photolysis rates
68 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
70 ph_macr,ph_o31d,ph_o33p,ph_no2, &
72 ph_no3o2,ph_no3o,ph_hno2, &
73 ph_hno3,ph_hno4,ph_h2o2,ph_ch2or,ph_ch2om,ph_ch3cho, &
74 ph_ch3coch3,ph_ch3coc2h5,ph_hcocho,ph_ch3cocho, &
75 ph_hcochest,ph_ch3o2h,ph_ch3coo2h,ph_ch3ono2,ph_hcochob, &
76 ph_n2o5,ph_o2,ph_n2o,ph_pan,ph_mpan,ph_acetol,ph_gly, &
77 ph_bigald,ph_mek,ph_c2h5ooh,ph_c3h7ooh,ph_pooh,ph_rooh, &
78 ph_xooh,ph_isopooh,ph_alkooh,ph_mekooh,ph_tolooh, &
79 ph_terpooh,ph_mvk,ph_glyald,ph_hyac, &
80 ph_cl2,ph_hocl,ph_fmcl
82 REAL, INTENT(INOUT) :: &
83 dt_cld(ims:ime,kms:kme,jms:jme), &
84 af_dir(ims:ime,kms:kme,jms:jme), &
85 af_dn(ims:ime,kms:kme,jms:jme), &
86 af_up(ims:ime,kms:kme,jms:jme), &
87 par(ims:ime,kms:kme,jms:jme), &
88 erythema(ims:ime,kms:kme,jms:jme)
90 INTEGER, INTENT(IN ) :: nref0, nw0, tuv_jmax0
91 real, dimension( ims:ime, nref0, jms:jme, nw0 ), &
92 intent(out ) :: ph_radfld
93 real, dimension( ims:ime, nref0, jms:jme, tuv_jmax0 ), &
94 intent(out ) :: ph_adjcoe
95 real, dimension( ims:ime, nref0, jms:jme, tuv_jmax0 ), &
96 intent(out ) :: ph_prate
97 real, dimension(nw0), &
99 real, dimension(nref0), &
101 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
104 gd_cloud,gd_cloud2,bl_cld,bl_cld2
106 ! arrays that hold the aerosol optical properties
108 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
110 tauaer1,tauaer2,tauaer3,tauaer4, &
111 gaer1,gaer2,gaer3,gaer4, &
112 waer1,waer2,waer3,waer4, &
113 bscoef1,bscoef2,bscoef3,bscoef4
114 REAL, DIMENSION( ims:ime, kms:kme, jms:jme, 1:4 ), &
116 l2aer,l3aer,l4aer,l5aer,l6aer,l7aer
118 ! array that holds all advected chemical species
120 REAL, DIMENSION( ims:ime, kms:kme, jms:jme, num_chem ), &
121 INTENT(INOUT ) :: chem
123 ! on input from meteorological part of model
125 REAL, DIMENSION( ims:ime , kms:kme , jms:jme ) , &
132 REAL, DIMENSION( ims:ime , jms:jme ) , &
133 INTENT(INOUT ) :: uvrad
134 REAL, DIMENSION( ims:ime , jms:jme ) , &
138 REAL, DIMENSION( ims:ime, jms:jme ), &
139 OPTIONAL, INTENT(IN ) :: o3_gfs_du
141 TYPE(grid_config_rec_type), INTENT(IN ) :: config_flags
143 LOGICAL, INTENT(IN) :: haveaer
144 integer, INTENT(IN ) :: ivgtyp(ims:ime,jms:jme)
145 character(len=132) :: dbg_msg
151 !-----------------------------------------------------------------
153 IF (config_flags%phot_opt .eq. 0) return
155 write(dbg_msg,*) 'photolysis_driver: called for domain ',id
156 CALL wrf_message( trim(dbg_msg) )
158 ! select photolysis option
160 chem_phot_select: SELECT CASE(config_flags%phot_opt)
163 CALL wrf_debug(15,'calling madronich1_driver')
164 call madronich1_driver(id,curr_secs,ktau,config_flags,haveaer, &
165 gmt,julday,t_phy,moist,aerwrf,p8w,t8w,p_phy, &
166 chem,rho_phy,dz8w,xlat,xlong,z_at_w,gd_cloud,gd_cloud2, &
167 ph_macr,ph_o31d,ph_o33p,ph_no2, &
169 ph_cl2,ph_hocl,ph_clno2,ph_fmcl, &
171 ph_no3o2,ph_no3o,ph_hno2,&
172 ph_hno3,ph_hno4,ph_h2o2,ph_ch2or,ph_ch2om,ph_ch3cho, &
173 ph_ch3coch3,ph_ch3coc2h5,ph_hcocho,ph_ch3cocho, &
174 ph_hcochest,ph_ch3o2h,ph_ch3coo2h,ph_ch3ono2,ph_hcochob,&
175 pm2_5_dry,pm2_5_water,uvrad, &
176 ids,ide, jds,jde, kds,kde, &
177 ims,ime, jms,jme, kms,kme, &
178 its,ite, jts,jte, kts,kte )
180 call wrf_debug(15,'calling fastj_driver')
181 call fastj_driver(id,curr_secs,dtstep,config_flags, &
182 gmt,julday,t_phy,moist,p8w,p_phy, &
183 chem,rho_phy,dz8w,xlat,xlong,z_at_w, &
184 ph_o2,ph_o31d,ph_o33p,ph_no2,ph_no3o2,ph_no3o,ph_hno2, &
185 ph_hno3,ph_hno4,ph_h2o2,ph_ch2or,ph_ch2om,ph_ch3cho, &
186 ph_ch3coch3,ph_ch3coc2h5,ph_hcocho,ph_ch3cocho, &
187 ph_hcochest,ph_ch3o2h,ph_ch3coo2h,ph_ch3ono2,ph_hcochob,&
189 tauaer1,tauaer2,tauaer3,tauaer4, &
190 gaer1,gaer2,gaer3,gaer4, &
191 waer1,waer2,waer3,waer4, &
192 bscoef1,bscoef2,bscoef3,bscoef4, &
193 l2aer,l3aer,l4aer,l5aer,l6aer,l7aer, &
194 ids,ide, jds,jde, kds,kde, &
195 ims,ime, jms,jme, kms,kme, &
196 its,ite, jts,jte, kts,kte )
198 call wrf_debug(15,'calling ftuv_driver')
199 call ftuv_driver( id, curr_secs, dtstep, config_flags, &
201 p_phy, t_phy, rho_phy, p8w, t8w, &
202 xlat, xlong, z_at_w, &
203 moist, chem, gd_cloud,gd_cloud2, &
204 ph_no2,ph_o31d,ph_o33p,ph_hno2, &
205 ph_hno3,ph_hno4,ph_no3o2,ph_no3o, &
206 ph_h2o2,ph_ch2om,ph_ch2or,ph_ch3cho, &
207 ph_ch3o2h,ph_o2,ph_ch3coo2h,ph_ch3coch3,ph_hcocho, &
208 ph_hcochob,ph_ch3cocho,ph_hcochest,ph_ch3ono2, &
209 ph_macr,ph_ch3coc2h5,ph_n2o, &
210 ph_pan,ph_mpan,ph_acetol,ph_gly, &
211 ph_bigald,ph_mek,ph_c2h5ooh,ph_c3h7ooh, &
212 ph_pooh,ph_rooh,ph_xooh,ph_isopooh, &
213 ph_alkooh,ph_mekooh,ph_tolooh,ph_terpooh,&
214 ph_n2o5,ph_mvk,ph_glyald,ph_hyac, &
215 ph_cl2,ph_hocl,ph_fmcl, &
217 nref0, nw0, tuv_jmax0, &
218 ph_radfld, ph_adjcoe, ph_prate, &
220 tauaer1, tauaer2, tauaer3, tauaer4, & !rajesh
221 waer1, waer2, waer3, waer4, & !rajesh
222 gaer1, gaer2, gaer3, gaer4, & !rajesh
223 ids,ide, jds,jde, kds,kde, &
224 ims,ime, jms,jme, kms,kme, &
225 its,ite, jts,jte, kts,kte )
227 CALL wrf_debug(15,'calling tuv driver')
229 id, curr_secs, ktau, config_flags, haveaer, &
230 gmt, julday, t_phy, moist, aerwrf, &
231 p8w, t8w, p_phy, chem, rho_phy, &
232 dz8w, xlat, xlong, z, z_at_w, gd_cloud, gd_cloud2, &
234 tauaer1,tauaer2,tauaer3,tauaer4, &
235 gaer1,gaer2,gaer3,gaer4, &
236 waer1,waer2,waer3,waer4, &
237 ph_macr,ph_o31d,ph_o33p,ph_no2,ph_no3o2,ph_no3o,ph_hno2,&
238 ph_hno3,ph_hno4,ph_h2o2,ph_ch2or,ph_ch2om,ph_ch3cho, &
239 ph_ch3coch3,ph_ch3coc2h5,ph_hcocho,ph_ch3cocho, &
240 ph_hcochest,ph_ch3o2h,ph_ch3coo2h,ph_ch3ono2,ph_hcochob,&
241 ph_n2o5,ph_o2,ph_n2o,ph_pooh,ph_pan,ph_mvk,ph_hyac, &
242 ph_glyald,ph_mek,ph_gly, &
243 pm2_5_dry, pm2_5_water, uvrad, &
244 dt_cld,af_dir,af_dn,af_up,par,erythema, &
246 ids,ide, jds,jde, kds,kde, &
247 ims,ime, jms,jme, kms,kme, &
248 its,ite, jts,jte, kts,kte )
251 END SELECT chem_phot_select
253 END SUBROUTINE photolysis_driver