updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / chem / module_add_emiss_burn.F
blob76a33a80d86e465aabf9f3c8c2c9e5c3ba0167d8
1 Module module_add_emiss_burn
2 CONTAINS
3        subroutine add_emis_burn(id,dtstep,ktau,dz8w,rho_phy,chem,       &
4             julday,gmt,xlat,xlong,t_phy,p_phy,                          &
5             ebu,chem_opt,tracer_opt,biomass_burn_opt,                   &
6             num_c,ids,ide, jds,jde, kds,kde,                            &
7             ims,ime, jms,jme, kms,kme,                                  &
8             its,ite, jts,jte, kts,kte                                   )
9   USE module_configure, only: grid_config_rec_type
10   USE module_state_description
11   IMPLICIT NONE
14 !  TYPE(grid_config_rec_type),  INTENT(IN   )    :: config_flags
16    INTEGER,      INTENT(IN   ) :: id,julday,chem_opt,biomass_burn_opt,     &
17                                   num_c,ids,ide, jds,jde, kds,kde,      &
18                                   ims,ime, jms,jme, kms,kme,               &
19                                   its,ite, jts,jte, kts,kte,tracer_opt
20    INTEGER,      INTENT(IN   ) ::                                          &
21                                   ktau
22    REAL, DIMENSION( ims:ime, kms:kme, jms:jme, num_c ),                 &
23          INTENT(INOUT ) ::                                   chem
24    REAL, DIMENSION( ims:ime, kms:kme, jms:jme, num_ebu ),                 &
25          INTENT(IN    ) ::                           ebu
29    REAL,  DIMENSION( ims:ime ,  jms:jme )         ,               &
30           INTENT(IN   ) ::                                                 &
31                                                       xlat,xlong
32    REAL,  DIMENSION( ims:ime , kms:kme , jms:jme )         ,               &
33           INTENT(IN   ) ::                                                 &
34                                                       t_phy,               &
35                                                       p_phy,               &
36                                                       dz8w,                &
37                                                     rho_phy
39       REAL,      INTENT(IN   ) ::                                          &
40                              dtstep,gmt
41     integer ::imonth1,idate1,iyear1,itime1
42     integer :: i,j,k
43     real :: time,conv_rho
44     integer :: iweek,idays
45     real :: tign,timeq,r_q,r_antro
46     REAL :: conv_rho_gas(its:ite)
47     REAL :: conv_rho_aer(its:ite)
48     real, dimension(7) :: week_CYCLE
49     !                     dia da semana:  DOM   SEG   TER   QUA   QUI   SEX   SAB
50     !                            iweek=   1     2     3     4     5     6     7
51     !- dados cetesb/campinas/2005
52     data (week_CYCLE(iweek),iweek=1,7) /0.67, 1.1, 1.1, 1.1, 1.1, 1.1, 0.83/ !total = 7
53     real, parameter :: bx_bburn  = 18.041288 * 3600., & !- peak at 18 UTC
54                   cx        =  2.184936 * 3600., &
55                   rinti     =  2.1813936e-8    , &
56                   ax        = 2000.6038        , &
57                   bx_antro  = 15.041288 * 3600.    !- peak em 15 UTC
58     !itime1 : initial time of simulation (hour*100)
59     ! time  : time elapsed in seconds
60     ! r_q : gaussian function in 1/sec
62     !-------------biomass burning diurnal cycle --------------------
63     !number of days of simulation
64     itime1=0
65     time=0.
66     idays = int(( float(itime1)/100. + time/3600.)/24.+.00001)
67     tign  = real(idays)*24.*3600.
68     ! Modulacao da queimada media durante o ciclo diurno(unidade: 1/s)
69     ! com a int( r_q dt) (0 - 24h)= 1.
70     timeq= ( time + float(itime1)*0.01*3600. - tign )
71     timeq=gmt*3600.+float(ktau)*dtstep
72     timeq=mod(timeq,86400.)
73     r_q  = rinti*( ax * exp( -(timeq-bx_bburn)**2/(2.*cx**2) ) + 100. -  &
74            5.6712963e-4*( timeq ))
77     !------------- anthropogenic diurnal cycle (industrial,residencial, ...)
78     ! weekly cycle
79     ! week day
80     iweek= int(((float(julday)/7. - &
81            int(julday/7))*7.)) + 1
82     if(iweek.gt.7) iweek = iweek-7
83     !- weekly + diurnal cycle
84     r_q=r_q*86400.
85     r_q=1. ! no diurnal cycle
87 !tracer_opt has to come in as zero, if chem_opt is not =0!
88       temiss_select:  SELECT CASE(tracer_opt)
89          CASE (TRACER_SMOKE)
91 ! for smoke only
93           do j=jts,jte
94           do i=its,ite
95           do k=kts,kte
96              conv_rho=r_q*4.828e-4/rho_phy(i,k,j)*dtstep/(dz8w(i,k,j)*60.)
97              chem(i,k,j,p_smoke)  =  chem(i,k,j,p_smoke)+ebu(i,k,j,p_ebu_co)*conv_rho
98           enddo
99           enddo
100           enddo
101          CASE (TRACER_TEST2)
102           do j=jts,jte
103           do i=its,ite
104           do k=kts,kte
105              conv_rho=r_q*4.828e-4/rho_phy(i,k,j)*dtstep/(dz8w(i,k,j)*60.)
106              chem(i,k,j,p_tr17_3)  =  chem(i,k,j,p_tr17_3)+ebu(i,k,j,p_ebu_co)*conv_rho
107              chem(i,k,j,p_tr17_4)  =  chem(i,k,j,p_tr17_4)+ebu(i,k,j,p_ebu_co)*conv_rho
108           enddo
109           enddo
110           enddo
111          CASE DEFAULT
112              call wrf_debug(15,'nothing done with burn emissions for tracers here')
113       END SELECT temiss_select
114       emiss_select:  SELECT CASE(chem_opt)
115       CASE (RACMPM_KPP)
116           do j=jts,jte
117           do i=its,ite
118            do k=kts,kte
119         conv_rho=r_q*4.828e-4/rho_phy(i,k,j)*dtstep/(dz8w(i,k,j)*60.)
120         chem(i,k,j,p_so2)  =  chem(i,k,j,p_so2)                        &
121                          +ebu(i,k,j,p_ebu_so2)*conv_rho
122         chem(i,k,j,p_sulf)  =  chem(i,k,j,p_sulf)                        &
123                          +ebu(i,k,j,p_ebu_sulf)*conv_rho
124         chem(i,k,j,p_csl)  =  chem(i,k,j,p_csl)                        &
125                          +ebu(i,k,j,p_ebu_csl)*conv_rho
126         chem(i,k,j,p_iso)  = chem(i,k,j,p_iso)                         &
127                          +ebu(i,k,j,p_ebu_iso)*conv_rho
128         chem(i,k,j,p_no)   = chem(i,k,j,p_no)                          &
129                          +ebu(i,k,j,p_ebu_no)*conv_rho
130         chem(i,k,j,p_no2)  = chem(i,k,j,p_no2)                         &
131                          +ebu(i,k,j,p_ebu_no2)*conv_rho
132         chem(i,k,j,p_ald)  = chem(i,k,j,p_ald)                         &
133                          +ebu(i,k,j,p_ebu_ald)*conv_rho
134         chem(i,k,j,p_hcho) = chem(i,k,j,p_hcho)                        &
135                          +ebu(i,k,j,p_ebu_hcho)*conv_rho
136         chem(i,k,j,p_ora2)  = chem(i,k,j,p_ora2)                       &
137                          +ebu(i,k,j,p_ebu_ora2)*conv_rho
138         chem(i,k,j,p_hc3)  = chem(i,k,j,p_hc3)                         &
139                          +ebu(i,k,j,p_ebu_hc3)*conv_rho
140         chem(i,k,j,p_hc5)  = chem(i,k,j,p_hc5)                         &
141                          +ebu(i,k,j,p_ebu_hc5)*conv_rho
142         chem(i,k,j,p_hc8)  = chem(i,k,j,p_hc8)                         &
143                          +ebu(i,k,j,p_ebu_hc8)*conv_rho
144         chem(i,k,j,p_eth)  = chem(i,k,j,p_eth)                         &
145                          +ebu(i,k,j,p_ebu_eth)*conv_rho
146         chem(i,k,j,p_co)  = chem(i,k,j,p_co)                           &
147                          +ebu(i,k,j,p_ebu_co)*conv_rho
148         chem(i,k,j,p_olt)  = chem(i,k,j,p_olt)                         &
149                          +ebu(i,k,j,p_ebu_olt)*conv_rho
150         chem(i,k,j,p_oli)  = chem(i,k,j,p_oli)                         &
151                          +ebu(i,k,j,p_ebu_oli)*conv_rho
152         chem(i,k,j,p_tol)  = chem(i,k,j,p_tol)                         &
153                          +ebu(i,k,j,p_ebu_tol)*conv_rho
154         chem(i,k,j,p_xyl)  = chem(i,k,j,p_xyl)                         &
155                          +ebu(i,k,j,p_ebu_xyl)*conv_rho
156         chem(i,k,j,p_ket)  =  chem(i,k,j,p_ket)                        &
157                          +ebu(i,k,j,p_ebu_ket)*conv_rho
158         chem(i,k,j,p_pm_25)  =  chem(i,k,j,p_pm_25)                        &
159                          +r_q*ebu(i,k,j,p_ebu_pm25)/rho_phy(i,k,j)*dtstep/dz8w(i,k,j)
160         chem(i,k,j,p_pm_10)  =  chem(i,k,j,p_pm_10)                        &
161                          +r_q*ebu(i,k,j,p_ebu_pm10)/rho_phy(i,k,j)*dtstep/dz8w(i,k,j)
162         enddo
163         enddo
164         enddo
165       CASE (RADM2SORG,RACMSORG_KPP, RADM2SORG_KPP,RACM_ESRLSORG_KPP,RACM_SOA_VBS_KPP,RACM_SOA_VBS_AQCHEM_KPP,RACM_SOA_VBS_HET_KPP, &
166             RADM2SORG_AQ, RADM2SORG_AQCHEM,RACMSORG_AQ,RACMSORG_AQCHEM_KPP,RACM_ESRLSORG_AQCHEM_KPP)
167           do j=jts,jte
168           do i=its,ite
169            do k=kts,kte
170         conv_rho=r_q*4.828e-4/rho_phy(i,k,j)*dtstep/60./dz8w(i,k,j)
172         chem(i,k,j,p_so2)  =  chem(i,k,j,p_so2)                        &
173                          +ebu(i,k,j,p_ebu_so2)*conv_rho
174         chem(i,k,j,p_sulf)  =  chem(i,k,j,p_sulf)                        &
175                          +ebu(i,k,j,p_ebu_sulf)*conv_rho
176         chem(i,k,j,p_csl)  =  chem(i,k,j,p_csl)                        &
177                          +ebu(i,k,j,p_ebu_csl)*conv_rho
178         chem(i,k,j,p_iso)  = chem(i,k,j,p_iso)                         &
179                          +ebu(i,k,j,p_ebu_iso)*conv_rho
180         chem(i,k,j,p_no)   = chem(i,k,j,p_no)                          &
181                          +ebu(i,k,j,p_ebu_no)*conv_rho
182         chem(i,k,j,p_no2)  = chem(i,k,j,p_no2)                         &
183                          +ebu(i,k,j,p_ebu_no2)*conv_rho
184         chem(i,k,j,p_ald)  = chem(i,k,j,p_ald)                         &
185                          +ebu(i,k,j,p_ebu_ald)*conv_rho
186         chem(i,k,j,p_hcho) = chem(i,k,j,p_hcho)                        &
187                          +ebu(i,k,j,p_ebu_hcho)*conv_rho
188         chem(i,k,j,p_ora2)  = chem(i,k,j,p_ora2)                       &
189                          +ebu(i,k,j,p_ebu_ora2)*conv_rho
190         chem(i,k,j,p_hc3)  = chem(i,k,j,p_hc3)                         &
191                          +ebu(i,k,j,p_ebu_hc3)*conv_rho
192         chem(i,k,j,p_hc5)  = chem(i,k,j,p_hc5)                         &
193                          +ebu(i,k,j,p_ebu_hc5)*conv_rho
194         chem(i,k,j,p_hc8)  = chem(i,k,j,p_hc8)                         &
195                          +ebu(i,k,j,p_ebu_hc8)*conv_rho
196         chem(i,k,j,p_eth)  = chem(i,k,j,p_eth)                         &
197                          +ebu(i,k,j,p_ebu_eth)*conv_rho
198         chem(i,k,j,p_co)  = chem(i,k,j,p_co)                           &
199                          +ebu(i,k,j,p_ebu_co)*conv_rho
200         chem(i,k,j,p_olt)  = chem(i,k,j,p_olt)                         &
201                          +ebu(i,k,j,p_ebu_olt)*conv_rho
202         chem(i,k,j,p_oli)  = chem(i,k,j,p_oli)                         &
203                          +ebu(i,k,j,p_ebu_oli)*conv_rho
204         chem(i,k,j,p_tol)  = chem(i,k,j,p_tol)                         &
205                          +ebu(i,k,j,p_ebu_tol)*conv_rho
206         chem(i,k,j,p_xyl)  = chem(i,k,j,p_xyl)                         &
207                          +ebu(i,k,j,p_ebu_xyl)*conv_rho
208         chem(i,k,j,p_ket)  =  chem(i,k,j,p_ket)                        &
209                          +ebu(i,k,j,p_ebu_ket)*conv_rho
210         chem(i,k,j,p_ch4)  =  chem(i,k,j,p_ch4)                        &
211                           +ebu(i,k,j,p_ebu_ch4)*conv_rho
212         chem(i,k,j,p_co2)  =  chem(i,k,j,p_co2)                        &
213                           +ebu(i,k,j,p_ebu_co2)*conv_rho
214         chem(i,k,j,p_nh3)  =  chem(i,k,j,p_nh3)                        &
215                          +ebu(i,k,j,p_ebu_nh3)*conv_rho
216         enddo
217         enddo
218         enddo
219       CASE (GOCART_SIMPLE)
220           do j=jts,jte
221           do i=its,ite
222           do k=kts,kte
223         conv_rho=r_q*4.828e-4/rho_phy(i,k,j)*dtstep/(dz8w(i,k,j)*60.)
224         chem(i,k,j,p_so2)  =  chem(i,k,j,p_so2)                        &
225                          +ebu(i,k,j,p_ebu_so2)*conv_rho
226         chem(i,k,j,p_sulf)  =  chem(i,k,j,p_sulf)                        &
227                          +ebu(i,k,j,p_ebu_sulf)*conv_rho
228         chem(i,k,j,p_dms)  =  chem(i,k,j,p_dms)                        &
229                          +ebu(i,k,j,p_ebu_dms)*conv_rho
230         chem(i,k,j,p_oc1)  =  chem(i,k,j,p_oc1)                        &
231                          +r_q*ebu(i,k,j,p_ebu_oc)/rho_phy(i,k,j)*dtstep/dz8w(i,k,j)
232         chem(i,k,j,p_bc1)  =  chem(i,k,j,p_bc1)                        &
233                          +r_q*ebu(i,k,j,p_ebu_bc)/rho_phy(i,k,j)*dtstep/dz8w(i,k,j)
234         chem(i,k,j,p_p25)  =  chem(i,k,j,p_p25)                        &
235                          +r_q*ebu(i,k,j,p_ebu_pm25)/rho_phy(i,k,j)*dtstep/dz8w(i,k,j)
236         chem(i,k,j,p_p10)  =  chem(i,k,j,p_p10)                        &
237                          +r_q*ebu(i,k,j,p_ebu_pm10)/rho_phy(i,k,j)*dtstep/dz8w(i,k,j)
238         enddo
239         enddo
240         enddo
241       CASE (GOCARTRACM_KPP,GOCARTRADM2)
242           do j=jts,jte
243           do i=its,ite
244            do k=kts,kte
245         conv_rho=r_q*4.828e-4/rho_phy(i,k,j)*dtstep/(dz8w(i,k,j)*60.)
246         chem(i,k,j,p_so2)  =  chem(i,k,j,p_so2)                        &
247                          +ebu(i,k,j,p_ebu_so2)*conv_rho
248         chem(i,k,j,p_sulf)  =  chem(i,k,j,p_sulf)                        &
249                          +ebu(i,k,j,p_ebu_sulf)*conv_rho
250         chem(i,k,j,p_dms)  =  chem(i,k,j,p_dms)                        &
251                          +ebu(i,k,j,p_ebu_dms)*conv_rho
252         chem(i,k,j,p_csl)  =  chem(i,k,j,p_csl)                        &
253                          +ebu(i,k,j,p_ebu_csl)*conv_rho
254         chem(i,k,j,p_iso)  = chem(i,k,j,p_iso)                         &
255                          +ebu(i,k,j,p_ebu_iso)*conv_rho
256         chem(i,k,j,p_no)   = chem(i,k,j,p_no)                          &
257                          +ebu(i,k,j,p_ebu_no)*conv_rho
258         chem(i,k,j,p_no2)  = chem(i,k,j,p_no2)                         &
259                          +ebu(i,k,j,p_ebu_no2)*conv_rho
260         chem(i,k,j,p_ald)  = chem(i,k,j,p_ald)                         &
261                          +ebu(i,k,j,p_ebu_ald)*conv_rho
262         chem(i,k,j,p_hcho) = chem(i,k,j,p_hcho)                        &
263                          +ebu(i,k,j,p_ebu_hcho)*conv_rho
264         chem(i,k,j,p_ora2)  = chem(i,k,j,p_ora2)                       &
265                          +ebu(i,k,j,p_ebu_ora2)*conv_rho
266         chem(i,k,j,p_hc3)  = chem(i,k,j,p_hc3)                         &
267                          +ebu(i,k,j,p_ebu_hc3)*conv_rho
268         chem(i,k,j,p_hc5)  = chem(i,k,j,p_hc5)                         &
269                          +ebu(i,k,j,p_ebu_hc5)*conv_rho
270         chem(i,k,j,p_hc8)  = chem(i,k,j,p_hc8)                         &
271                          +ebu(i,k,j,p_ebu_hc8)*conv_rho
272         chem(i,k,j,p_eth)  = chem(i,k,j,p_eth)                         &
273                          +ebu(i,k,j,p_ebu_eth)*conv_rho
274         chem(i,k,j,p_co)  = chem(i,k,j,p_co)                           &
275                          +ebu(i,k,j,p_ebu_co)*conv_rho
276         chem(i,k,j,p_olt)  = chem(i,k,j,p_olt)                         &
277                          +ebu(i,k,j,p_ebu_olt)*conv_rho
278         chem(i,k,j,p_oli)  = chem(i,k,j,p_oli)                         &
279                          +ebu(i,k,j,p_ebu_oli)*conv_rho
280         chem(i,k,j,p_tol)  = chem(i,k,j,p_tol)                         &
281                          +ebu(i,k,j,p_ebu_tol)*conv_rho
282         chem(i,k,j,p_xyl)  = chem(i,k,j,p_xyl)                         &
283                          +ebu(i,k,j,p_ebu_xyl)*conv_rho
284         chem(i,k,j,p_ket)  =  chem(i,k,j,p_ket)                        &
285                          +ebu(i,k,j,p_ebu_ket)*conv_rho
286         chem(i,k,j,p_oc1)  =  chem(i,k,j,p_oc1)                        &
287                          +r_q*ebu(i,k,j,p_ebu_oc)/rho_phy(i,k,j)*dtstep/dz8w(i,k,j)
288         chem(i,k,j,p_bc1)  =  chem(i,k,j,p_bc1)                        &
289                          +r_q*ebu(i,k,j,p_ebu_bc)/rho_phy(i,k,j)*dtstep/dz8w(i,k,j)
290         chem(i,k,j,p_p25)  =  chem(i,k,j,p_p25)                        &
291                          +r_q*ebu(i,k,j,p_ebu_pm25)/rho_phy(i,k,j)*dtstep/dz8w(i,k,j)
292         chem(i,k,j,p_p10)  =  chem(i,k,j,p_p10)                        &
293                          +r_q*ebu(i,k,j,p_ebu_pm10)/rho_phy(i,k,j)*dtstep/dz8w(i,k,j)
294         enddo
295         enddo
296         enddo
297       CASE (RADM2,RACM_KPP,RACM_MIM_KPP,SAPRC99_KPP,SAPRC99_MOSAIC_4BIN_VBS2_KPP, &
298            SAPRC99_MOSAIC_8BIN_VBS2_AQ_KPP, SAPRC99_MOSAIC_8BIN_VBS2_KPP)!BSINGH(12/03/2013): Added SAPRC 8 bin and non-aq on (04/07/2014)
299           do j=jts,jte
300           do i=its,ite
301            do k=kts,kte
302         conv_rho=r_q*4.828e-4/rho_phy(i,k,j)*dtstep/60./dz8w(i,k,j)
303         chem(i,k,j,p_csl)  =  chem(i,k,j,p_csl)                        &
304                          +ebu(i,k,j,p_ebu_csl)*conv_rho
305         chem(i,k,j,p_iso)  = chem(i,k,j,p_iso)                         &
306                          +ebu(i,k,j,p_ebu_iso)*conv_rho
307         chem(i,k,j,p_no)   = chem(i,k,j,p_no)                          &
308                          +ebu(i,k,j,p_ebu_no)*conv_rho
309         chem(i,k,j,p_no2)  = chem(i,k,j,p_no2)                         &
310                          +ebu(i,k,j,p_ebu_no2)*conv_rho
311         chem(i,k,j,p_ald)  = chem(i,k,j,p_ald)                         &
312                          +ebu(i,k,j,p_ebu_ald)*conv_rho
313         chem(i,k,j,p_hcho) = chem(i,k,j,p_hcho)                        &
314                          +ebu(i,k,j,p_ebu_hcho)*conv_rho
315         chem(i,k,j,p_ora2)  = chem(i,k,j,p_ora2)                       &
316                          +ebu(i,k,j,p_ebu_ora2)*conv_rho
317         chem(i,k,j,p_hc3)  = chem(i,k,j,p_hc3)                         &
318                          +ebu(i,k,j,p_ebu_hc3)*conv_rho
319         chem(i,k,j,p_hc5)  = chem(i,k,j,p_hc5)                         &
320                          +ebu(i,k,j,p_ebu_hc5)*conv_rho
321         chem(i,k,j,p_hc8)  = chem(i,k,j,p_hc8)                         &
322                          +ebu(i,k,j,p_ebu_hc8)*conv_rho
323         chem(i,k,j,p_eth)  = chem(i,k,j,p_eth)                         &
324                          +ebu(i,k,j,p_ebu_eth)*conv_rho
325         chem(i,k,j,p_co)  = chem(i,k,j,p_co)                           &
326                          +ebu(i,k,j,p_ebu_co)*conv_rho
327         chem(i,k,j,p_olt)  = chem(i,k,j,p_olt)                         &
328                          +ebu(i,k,j,p_ebu_olt)*conv_rho
329         chem(i,k,j,p_oli)  = chem(i,k,j,p_oli)                         &
330                          +ebu(i,k,j,p_ebu_oli)*conv_rho
331         chem(i,k,j,p_tol)  = chem(i,k,j,p_tol)                         &
332                          +ebu(i,k,j,p_ebu_tol)*conv_rho
333         chem(i,k,j,p_xyl)  = chem(i,k,j,p_xyl)                         &
334                          +ebu(i,k,j,p_ebu_xyl)*conv_rho
335         chem(i,k,j,p_ket)  =  chem(i,k,j,p_ket)                        &
336                          +ebu(i,k,j,p_ebu_ket)*conv_rho
337         enddo
338         enddo
339         enddo
340       CASE (MOZART_KPP,MOZCART_KPP,T1_MOZCART_KPP,MOZART_MOSAIC_4BIN_KPP, MOZART_MOSAIC_4BIN_AQ_KPP )
341         if( biomass_burn_opt == BIOMASSB_MOZC .or. biomass_burn_opt == BIOMASSB_MOZ &
342                                               .or. biomass_burn_opt == BIOMASSB_T1_MOZCART ) then
343           do j=jts,jte
344             do k=kts,kte
345               do i=its,ite
346                 conv_rho = (r_q*4.828e-4*dtstep)/(rho_phy(i,k,j)*60.*dz8w(i,k,j))
347                 chem(i,k,j,p_co)  = chem(i,k,j,p_co) + ebu(i,k,j,p_ebu_co)*conv_rho
348                 chem(i,k,j,p_no)  = chem(i,k,j,p_no) + ebu(i,k,j,p_ebu_no)*conv_rho
349                 chem(i,k,j,p_no2) = chem(i,k,j,p_no2) + ebu(i,k,j,p_ebu_no2)*conv_rho
350                 chem(i,k,j,p_bigalk) =  chem(i,k,j,p_bigalk) + ebu(i,k,j,p_ebu_bigalk)*conv_rho
351                 chem(i,k,j,p_bigene) =  chem(i,k,j,p_bigene) + ebu(i,k,j,p_ebu_bigene)*conv_rho
352                 chem(i,k,j,p_c2h4)   = chem(i,k,j,p_c2h4) + ebu(i,k,j,p_ebu_c2h4)*conv_rho
353                 chem(i,k,j,p_c2h5oh) = chem(i,k,j,p_c2h5oh) + ebu(i,k,j,p_ebu_c2h5oh)*conv_rho
354                 chem(i,k,j,p_c2h6) = chem(i,k,j,p_c2h6) + ebu(i,k,j,p_ebu_c2h6)*conv_rho
355                 chem(i,k,j,p_c3h6) = chem(i,k,j,p_c3h6) + ebu(i,k,j,p_ebu_c3h6)*conv_rho
356                 chem(i,k,j,p_c3h8) = chem(i,k,j,p_c3h8) + ebu(i,k,j,p_ebu_c3h8)*conv_rho
357                 chem(i,k,j,p_hcho) = chem(i,k,j,p_hcho) +ebu(i,k,j,p_ebu_ch2o)*conv_rho
358                 chem(i,k,j,p_ald)  = chem(i,k,j,p_ald) +ebu(i,k,j,p_ebu_ch3cho)*conv_rho
359                 chem(i,k,j,p_acetol) = chem(i,k,j,p_acetol) +ebu(i,k,j,p_ebu_acetol)*conv_rho
360                 chem(i,k,j,p_isopr)  = chem(i,k,j,p_isopr) +ebu(i,k,j,p_ebu_isop)*conv_rho
361                 chem(i,k,j,p_macr) = chem(i,k,j,p_macr) +ebu(i,k,j,p_ebu_macr)*conv_rho
362                 chem(i,k,j,p_mvk)  = chem(i,k,j,p_mvk) +ebu(i,k,j,p_ebu_mvk)*conv_rho
363                 chem(i,k,j,p_acet)  = chem(i,k,j,p_acet) + ebu(i,k,j,p_ebu_ch3coch3)*conv_rho
364                 chem(i,k,j,p_ch3oh) = chem(i,k,j,p_ch3oh) + ebu(i,k,j,p_ebu_ch3oh)*conv_rho
365                 chem(i,k,j,p_ch3cooh) = chem(i,k,j,p_ch3cooh) + ebu(i,k,j,p_ebu_ch3cooh)*conv_rho
366                 chem(i,k,j,p_mek)  = chem(i,k,j,p_mek) + ebu(i,k,j,p_ebu_mek)*conv_rho
367                 chem(i,k,j,p_so2)  =  chem(i,k,j,p_so2) +ebu(i,k,j,p_ebu_so2)*conv_rho
368                 chem(i,k,j,p_tol)  = chem(i,k,j,p_tol) +ebu(i,k,j,p_ebu_toluene)*conv_rho
369                 chem(i,k,j,p_nh3)  = chem(i,k,j,p_nh3) + ebu(i,k,j,p_ebu_nh3)*conv_rho
370                 chem(i,k,j,p_open) = chem(i,k,j,p_open) + ebu(i,k,j,p_ebu_open)*conv_rho
371                 chem(i,k,j,p_cres)   = chem(i,k,j,p_cres) + ebu(i,k,j,p_ebu_cres)*conv_rho
372                 chem(i,k,j,p_glyald) = chem(i,k,j,p_glyald) + ebu(i,k,j,p_ebu_glyald)*conv_rho
373                 chem(i,k,j,p_gly)    = chem(i,k,j,p_gly) + ebu(i,k,j,p_ebu_gly)*conv_rho
374                 chem(i,k,j,p_mgly)   = chem(i,k,j,p_mgly) + ebu(i,k,j,p_ebu_mgly)*conv_rho
375                 chem(i,k,j,p_dms)    = chem(i,k,j,p_dms) + ebu(i,k,j,p_ebu_dms)*conv_rho
376               enddo
377             enddo
378           enddo
379 ! Adding simple SOA scheme emissions from biomass burning.
380 ! WARNING: do not provide e_co_bb in wrfchemi* files if you use
381 ! the online plume rise - you would be double counting emissions!
382           IF( (biomass_burn_opt == BIOMASSB_MOZC .or. biomass_burn_opt == BIOMASSB_MOZ) .and. chem_opt == MOZCART_KPP ) THEN
383             do j=jts,jte
384               do k=kts,kte
385                 conv_rho_gas(its:ite) = (r_q*4.828e-4*dtstep)/(rho_phy(its:ite,k,j)*dz8w(its:ite,k,j)*60.)
386                 chem(its:ite,k,j,p_c10h16) = chem(its:ite,k,j,p_c10h16) + ebu(its:ite,k,j,p_ebu_c10h16)*conv_rho_gas(its:ite)
387               enddo
388             enddo
389           ENDIF
390           IF( chem_opt == T1_MOZCART_KPP .and. biomass_burn_opt == BIOMASSB_T1_MOZCART ) THEN
391             do j=jts,jte
392               do k=kts,kte
393                 conv_rho_gas(its:ite) = (r_q*4.828e-4*dtstep)/(rho_phy(its:ite,k,j)*dz8w(its:ite,k,j)*60.)
394                 chem(its:ite,k,j,p_apin)  = chem(its:ite,k,j,p_apin) + ebu(its:ite,k,j,p_ebu_apin)*conv_rho_gas(its:ite)
395                 chem(its:ite,k,j,p_benzene)  = chem(its:ite,k,j,p_benzene) + ebu(its:ite,k,j,p_ebu_benzene)*conv_rho_gas(its:ite)
396                 chem(its:ite,k,j,p_ch3cn) = chem(its:ite,k,j,p_ch3cn) + ebu(its:ite,k,j,p_ebu_ch3cn)*conv_rho_gas(its:ite)
397                 chem(its:ite,k,j,p_hcn)   = chem(its:ite,k,j,p_hcn) + ebu(its:ite,k,j,p_ebu_hcn)*conv_rho_gas(its:ite)
398                 chem(its:ite,k,j,p_hcooh) = chem(its:ite,k,j,p_hcooh) + ebu(its:ite,k,j,p_ebu_hcooh)*conv_rho_gas(its:ite)
399                 chem(its:ite,k,j,p_c2h2)  = chem(its:ite,k,j,p_c2h2) + ebu(its:ite,k,j,p_ebu_c2h2)*conv_rho_gas(its:ite)
400                 chem(its:ite,k,j,p_xylenes)  = chem(its:ite,k,j,p_xylenes) + ebu(its:ite,k,j,p_ebu_xylenes)*conv_rho_gas(its:ite)
401               enddo
402             enddo
403           ELSEIF (chem_opt == MOZART_MOSAIC_4BIN_KPP .OR. chem_opt == MOZART_MOSAIC_4BIN_AQ_KPP) THEN
404             do j=jts,jte
405               do k=kts,kte
406                 conv_rho_gas(its:ite) = (r_q*4.828e-4*dtstep)/(rho_phy(its:ite,k,j)*dz8w(its:ite,k,j)*60.)*.04*28./250.
407                 chem(its:ite,k,j,p_vocbb) = chem(its:ite,k,j,p_vocbb) + ebu(its:ite,k,j,p_ebu_co)*conv_rho_gas(its:ite)
408               enddo
409             enddo
410           ENDIF
411           IF( (biomass_burn_opt == BIOMASSB_MOZC .and. chem_opt == MOZCART_KPP) .or.  &
412               (biomass_burn_opt == BIOMASSB_T1_MOZCART .and. chem_opt == T1_MOZCART_KPP) ) THEN
413             do j=jts,jte
414               do k=kts,kte
415                 conv_rho_aer(its:ite) = (r_q*dtstep)/(rho_phy(its:ite,k,j)*dz8w(its:ite,k,j))
416                 chem(its:ite,k,j,p_oc1) = chem(its:ite,k,j,p_oc1) + conv_rho_aer(its:ite)*ebu(its:ite,k,j,p_ebu_oc)
417                 chem(its:ite,k,j,p_bc1) = chem(its:ite,k,j,p_bc1) + conv_rho_aer(its:ite)*ebu(its:ite,k,j,p_ebu_bc)
418                 chem(its:ite,k,j,p_p10) = chem(its:ite,k,j,p_p10) + conv_rho_aer(its:ite)*ebu(its:ite,k,j,p_ebu_pm10)
419                 chem(its:ite,k,j,p_p25) = chem(its:ite,k,j,p_p25) + conv_rho_aer(its:ite)*ebu(its:ite,k,j,p_ebu_pm25)
420               enddo
421             enddo
422           ENDIF
423         endif
424       CASE (CHEM_TRACE2)
425           do j=jts,jte
426           do i=its,ite
427           do k=kts+1,kte-1
428         conv_rho=r_q*4.828e-4/rho_phy(i,k,j)*dtstep/60./dz8w(i,k,j)
429         chem(i,k,j,p_tracer_1)  =  chem(i,k,j,p_tracer_1)                        &
430                          +ebu(i,k,j,p_ebu_co)*conv_rho
431         enddo
432         k=kts
433         conv_rho=r_q*4.828e-4/rho_phy(i,k,j)*dtstep/(dz8w(i,k,j)*60.)
434         chem(i,k,j,p_tracer_1)  =  chem(i,k,j,p_tracer_1)                        &
435                          +ebu(i,k,j,p_ebu_co)*conv_rho
436         enddo
437         enddo
438       CASE (GHG_TRACER)
439         if( biomass_burn_opt == BIOMASSB_GHG ) then
440           do j=jts,jte
441           do k=kts,kte
442           do i=its,ite
443              conv_rho=r_q*4.828e-4/rho_phy(i,k,j)*dtstep/60./dz8w(i,k,j)
444              chem(i,k,j,p_co_bbu)  = chem(i,k,j,p_co_bbu)   +ebu(i,k,j,p_ebu_co)*conv_rho
445              chem(i,k,j,p_co2_bbu)   = chem(i,k,j,p_co2_bbu)  +ebu(i,k,j,p_ebu_co2)*conv_rho
446              chem(i,k,j,p_ch4_bbu) =  chem(i,k,j,p_ch4_bbu) + ebu(i,k,j,p_ebu_ch4)*conv_rho
447           enddo
448           enddo
449           enddo
450         endif
451     CASE DEFAULT
452        call wrf_debug(15,'nothing done with burn emissions for chem array')
453     END SELECT emiss_select
456     END subroutine add_emis_burn
458 END Module module_add_emiss_burn