updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / chem / module_cbmz_addemiss.F
blobe2362ff99f7c40e8fd664aaad791cbbc63d265bd
1 !**************************************************************************
2 ! This computer software was prepared by Battelle Memorial Institute, hereinafter
3 ! the Contractor, under Contract No. DE-AC05-76RL0 1830 with the Department of 
4 ! Energy (DOE). NEITHER THE GOVERNMENT NOR THE CONTRACTOR MAKES ANY WARRANTY,
5 ! EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE USE OF THIS SOFTWARE.
7 ! CBMZ module: see module_cbmz.F for references and terms of use
8 !**********************************************************************************  
10 MODULE module_cbmz_addemiss
11 !WRF:MODEL_LAYER:CHEMICS
15    integer, parameter :: cbmz_addemiss_masscheck = -1
16                        ! only do emissions masscheck calcs when this is positive
20 CONTAINS
24 !----------------------------------------------------------------------
25    subroutine cbmz_addemiss_anthro( id, dtstep, dz8w, config_flags,       &
26                rho_phy, chem,emis_ant,alt,                                &
27                ids,ide, jds,jde, kds,kde,                                 &
28                ims,ime, jms,jme, kms,kme,                                 &
29                its,ite, jts,jte, kts,kte                                  )
31 ! adds emissions for cbmz trace gas species
32 ! (i.e., emissions tendencies over time dtstep are applied 
33 ! to the trace gas concentrations)
36   USE module_configure
37   USE module_state_description
38   USE module_data_radm2
40   IMPLICIT NONE
42    TYPE(grid_config_rec_type),  INTENT(IN   )    :: config_flags
44    INTEGER,      INTENT(IN   ) :: id,                                      &
45                                   ids,ide, jds,jde, kds,kde,               &
46                                   ims,ime, jms,jme, kms,kme,               &
47                                   its,ite, jts,jte, kts,kte
49    REAL, INTENT(IN   ) ::    dtstep
51 ! trace species mixing ratios (gases=ppm)
52    REAL, DIMENSION( ims:ime, kms:kme, jms:jme, num_chem ),                 &
53          INTENT(INOUT ) ::   chem
55 ! emissions arrays (v.1: ppm m/min; v.2: mole km^-2 hr^-1)
57 !   REAL, DIMENSION( ims:ime, kms:kme, jms:jme ),                          &
58    REAL, DIMENSION( ims:ime, kms:config_flags%kemit, jms:jme,num_emis_ant),&
59          INTENT(IN ) ::                                                    &
60                          emis_ant
61 ! layer thickness (m)
62    REAL,  DIMENSION( ims:ime , kms:kme , jms:jme )         ,               &
63           INTENT(IN   ) ::   dz8w, rho_phy,alt
65 ! local variables
66    integer :: i,j,k
67    real, parameter :: efact1 = 1.0/60.0
68    real :: conv,conv3
69    double precision :: chem_sum(num_chem)
72 ! do mass check initial calc
73       if (cbmz_addemiss_masscheck > 0) call addemiss_masscheck(               &
74                id, config_flags, 1, 'cbmz_addemiss',                          &
75                dtstep, efact1, dz8w, chem, chem_sum,                          &
76                ids,ide, jds,jde, kds,kde,                                     &
77                ims,ime, jms,jme, kms,kme,                                     &
78                its,ite, jts,jte, kts,kte,                                     &
79                21,                                                            &
80                emis_ant(ims,kms,jms,p_e_so2),emis_ant(ims,kms,jms,p_e_no),    &
81                emis_ant(ims,kms,jms,p_e_co),emis_ant(ims,kms,jms,p_e_eth),    &
82                emis_ant(ims,kms,jms,p_e_hc3),emis_ant(ims,kms,jms,p_e_hc5),   &
83                emis_ant(ims,kms,jms,p_e_hc8),emis_ant(ims,kms,jms,p_e_xyl),   &
84                emis_ant(ims,kms,jms,p_e_ol2),emis_ant(ims,kms,jms,p_e_olt),   &
85                emis_ant(ims,kms,jms,p_e_oli),emis_ant(ims,kms,jms,p_e_tol),   &
86                emis_ant(ims,kms,jms,p_e_csl),emis_ant(ims,kms,jms,p_e_hcho),  &
87                emis_ant(ims,kms,jms,p_e_ald),emis_ant(ims,kms,jms,p_e_ket),   &
88                emis_ant(ims,kms,jms,p_e_ora2),emis_ant(ims,kms,jms,p_e_nh3),  &
89                emis_ant(ims,kms,jms,p_e_no2),emis_ant(ims,kms,jms,p_e_ch3oh), &
90                emis_ant(ims,kms,jms,p_e_c2h5oh))
94 !       
95 ! add emissions
97       do 100 j=jts,jte  
98       do 100 i=its,ite  
100       DO k=kts,min(config_flags%kemit,kte)
101 !v1 units:        conv = dtstep/(dz8w(i,k,j)*60.)
102 !v2 units:
103         conv = 4.828e-4/rho_phy(i,k,j)*dtstep/(dz8w(i,k,j)*60.)
104         conv3 = (dtstep/dz8w(i,k,j))*alt(i,k,j)*28/250*1e-3
106 #if (defined(CHEM_DBG_I) && defined(CHEM_DBG_J) && defined(CHEM_DBG_K))
107        if( (i <= CHEM_DBG_I .and. i >= CHEM_DBG_I) .and. &
108            (j <= CHEM_DBG_J .and. j >= CHEM_DBG_J) .and. &
109            (k <= CHEM_DBG_K .and. k >= CHEM_DBG_K)  ) then
110           print*
111           print*,"Converted emissions for CBMZ:"
112           print*,"e_csl=",emis_ant(i,k,j,p_e_csl)*conv
113           print*,"e_so2=",emis_ant(i,k,j,p_e_so2)*conv
114           print*,"e_no=",emis_ant(i,k,j,p_e_no)*conv
115           print*,"e_ald=",emis_ant(i,k,j,p_e_ald)*conv
116           print*,"e_hcho=",emis_ant(i,k,j,p_e_hcho)*conv
117           print*,"e_ora2=",emis_ant(i,k,j,p_e_ora2)*conv
118           print*,"e_nh3=",emis_ant(i,k,j,p_e_nh3)*conv
119           print*,"e_hc3=",emis_ant(i,k,j,p_e_hc3)*conv
120           print*,"e_hc5=",emis_ant(i,k,j,p_e_hc5)*conv
121           print*,"e_hc8=",emis_ant(i,k,j,p_e_hc8)*conv
122           print*,"e_eth=",emis_ant(i,k,j,p_e_eth)*conv
123           print*,"e_co=",emis_ant(i,k,j,p_e_co)*conv
124           print*,"e_ol2=",emis_ant(i,k,j,p_e_ol2)*conv
125           print*,"e_olt=",emis_ant(i,k,j,p_e_olt)*conv
126           print*,"e_oli=",emis_ant(i,k,j,p_e_oli)*conv
127           print*,"e_tol=",emis_ant(i,k,j,p_e_tol)*conv
128           print*,"e_xyl=",emis_ant(i,k,j,p_e_xyl)*conv
129           print*,"e_ket=",emis_ant(i,k,j,p_e_ket)*conv
130        end if
131 #endif
133         chem(i,k,j,p_csl)  =  chem(i,k,j,p_csl)                        &
134                          +emis_ant(i,k,j,p_e_csl)*conv 
135         chem(i,k,j,p_so2)  = chem(i,k,j,p_so2)                         &
136                          +emis_ant(i,k,j,p_e_so2)*conv
137         chem(i,k,j,p_no)   = chem(i,k,j,p_no)                          &
138                          +emis_ant(i,k,j,p_e_no)*conv
139         chem(i,k,j,p_ald)  = chem(i,k,j,p_ald)                         &
140                          +emis_ant(i,k,j,p_e_ald)*conv
141         chem(i,k,j,p_hcho) = chem(i,k,j,p_hcho)                        &
142                          +emis_ant(i,k,j,p_e_hcho)*conv
143         chem(i,k,j,p_ora2)  = chem(i,k,j,p_ora2)                       &
144                          +emis_ant(i,k,j,p_e_ora2)*conv 
145         chem(i,k,j,p_nh3)  = chem(i,k,j,p_nh3)                         &
146                          +emis_ant(i,k,j,p_e_nh3)*conv
147         chem(i,k,j,p_eth)  = chem(i,k,j,p_eth)                         &
148                          +emis_ant(i,k,j,p_e_eth)*conv
149         chem(i,k,j,p_co)  = chem(i,k,j,p_co)                           &
150                          +emis_ant(i,k,j,p_e_co)*conv
151         chem(i,k,j,p_ol2)  = chem(i,k,j,p_ol2)                         &
152                          +emis_ant(i,k,j,p_e_ol2)*conv
153         chem(i,k,j,p_olt)  = chem(i,k,j,p_olt)                         &
154                          +emis_ant(i,k,j,p_e_olt)*conv
155         chem(i,k,j,p_oli)  = chem(i,k,j,p_oli)                         &
156                          +emis_ant(i,k,j,p_e_oli)*conv
157         chem(i,k,j,p_tol)  = chem(i,k,j,p_tol)                         &
158                          +emis_ant(i,k,j,p_e_tol)*conv
159         chem(i,k,j,p_xyl)  = chem(i,k,j,p_xyl)                         &
160                          +emis_ant(i,k,j,p_e_xyl)*conv       
161         chem(i,k,j,p_ket)  =  chem(i,k,j,p_ket)                        &
162                          +emis_ant(i,k,j,p_e_ket)*conv      
164          chem_select_2 : SELECT CASE( config_flags%chem_opt )
166          END SELECT  chem_select_2
171 ! when emissions input file is "radm2sorg" variety, calc par emissions as a 
172 !   combination of the anthropogenic emissions for radm2 primary voc species
173         if ( (config_flags%emiss_inpt_opt == EMISS_INPT_DEFAULT) .or.   &
174              (config_flags%emiss_inpt_opt == EMISS_INPT_PNNL_RS) ) then
175             chem(i,k,j,p_par) = chem(i,k,j,p_par)             &
176                 + conv*                                       &
177                   ( 0.4*emis_ant(i,k,j,p_e_ald) + 2.9*emis_ant(i,k,j,p_e_hc3)       &
178                   + 4.8*emis_ant(i,k,j,p_e_hc5) + 7.9*emis_ant(i,k,j,p_e_hc8)       &
179                   + 0.9*emis_ant(i,k,j,p_e_ket) + 2.8*emis_ant(i,k,j,p_e_oli)       &
180                   + 1.8*emis_ant(i,k,j,p_e_olt) + 1.0*emis_ant(i,k,j,p_e_ora2) )
182 ! when emissions input file is "cbmzmosaic" variety, 
183 !   the par emissions are read into e_hc5
184 !   and there are emissions for other species
185         else
186             chem(i,k,j,p_par) = chem(i,k,j,p_par)             &
187                 + conv*emis_ant(i,k,j,p_e_hc5)
189             chem(i,k,j,p_no2) = chem(i,k,j,p_no2)             &
190                 + conv*emis_ant(i,k,j,p_e_no2)
191             chem(i,k,j,p_ch3oh)  = chem(i,k,j,p_ch3oh)        &
192                 + conv*emis_ant(i,k,j,p_e_ch3oh)
193             chem(i,k,j,p_c2h5oh) = chem(i,k,j,p_c2h5oh)       &
194                 + conv*emis_ant(i,k,j,p_e_c2h5oh)
195         end if
197         !BSINGH(01/24/2013): Added for DMS emissions
198         !PMA DMS emission [added by BSINGH - 01/20/2014]        
199         if ( (config_flags%emiss_inpt_opt == EMISS_INPT_PNNL_MAM)) then
200            chem(i,k,j,p_dms) = chem(i,k,j,p_dms)             &
201                 + conv*emis_ant(i,k,j,p_e_dms)
202         end if
204       END DO                                                          
205  100  continue
208 ! do mass check final calc
209       if (cbmz_addemiss_masscheck > 0) call addemiss_masscheck(               &
210                id, config_flags, 2, 'cbmz_addemiss',                          &
211                dtstep, efact1, dz8w, chem, chem_sum,                          &
212                ids,ide, jds,jde, kds,kde,                                     &
213                ims,ime, jms,jme, kms,kme,                                     &
214                its,ite, jts,jte, kts,kte,                                     &
215                21,                                                            &
216                emis_ant(ims,kms,jms,p_e_so2),emis_ant(ims,kms,jms,p_e_no),    &
217                emis_ant(ims,kms,jms,p_e_co),emis_ant(ims,kms,jms,p_e_eth),    &
218                emis_ant(ims,kms,jms,p_e_hc3),emis_ant(ims,kms,jms,p_e_hc5),   &
219                emis_ant(ims,kms,jms,p_e_hc8),emis_ant(ims,kms,jms,p_e_xyl),   &
220                emis_ant(ims,kms,jms,p_e_ol2),emis_ant(ims,kms,jms,p_e_olt),   &
221                emis_ant(ims,kms,jms,p_e_oli),emis_ant(ims,kms,jms,p_e_tol),   &
222                emis_ant(ims,kms,jms,p_e_csl),emis_ant(ims,kms,jms,p_e_hcho),  &
223                emis_ant(ims,kms,jms,p_e_ald),emis_ant(ims,kms,jms,p_e_ket),   &
224                emis_ant(ims,kms,jms,p_e_ora2),emis_ant(ims,kms,jms,p_e_nh3),  &
225                emis_ant(ims,kms,jms,p_e_no2),emis_ant(ims,kms,jms,p_e_ch3oh), &
226                emis_ant(ims,kms,jms,p_e_c2h5oh))
229    END subroutine cbmz_addemiss_anthro
233 !----------------------------------------------------------------------
234   subroutine cbmz_addemiss_bio( id, dtstep, dz8w, config_flags,       &
235         rho_phy, chem, e_bio, ne_area, e_iso,                         &
236         ids,ide, jds,jde, kds,kde,                                    &
237         ims,ime, jms,jme, kms,kme,                                    &
238         its,ite, jts,jte, kts,kte                                     )
240   USE module_configure
241   USE module_state_description
242   USE module_data_radm2
243   USE module_aerosols_sorgam
245   IMPLICIT NONE
247 ! subr arguments
248    TYPE(grid_config_rec_type),  INTENT(IN   )    :: config_flags
250    INTEGER,      INTENT(IN   ) :: id, ne_area,                             &
251                                   ids,ide, jds,jde, kds,kde,               &
252                                   ims,ime, jms,jme, kms,kme,               &
253                                   its,ite, jts,jte, kts,kte
255    REAL,      INTENT(IN   ) ::    dtstep
257    REAL, DIMENSION( ims:ime, kms:kme, jms:jme, num_chem ),                 &
258          INTENT(INOUT ) ::        chem
260    REAL, DIMENSION( ims:ime, jms:jme,ne_area ),                            &
261          INTENT(IN ) ::           e_bio
262          
263    REAL, DIMENSION( ims:ime, kms:config_flags%kemit, jms:jme ),            &
264          INTENT(IN ) ::           e_iso
266    REAL,  DIMENSION( ims:ime , kms:kme , jms:jme )         ,               &
267           INTENT(IN   ) ::        dz8w, rho_phy            
270 ! local variables
271    integer i,j,k,n
272    real, parameter :: efact1 = 1.0/60.0
273    double precision :: chem_sum(num_chem)
277 ! apply gunther online biogenic gas emissions when bio_emiss_opt == GUNTHER1
279    if (config_flags%bio_emiss_opt == GUNTHER1) then
281       if (cbmz_addemiss_masscheck > 0) call addemiss_masscheck(         &
282                id, config_flags, 1, 'cbmz_addemiss_bioaa',              &
283                dtstep, efact1, dz8w, chem, chem_sum,                    &
284                ids,ide, jds,jde, kds,kde,                               &
285                ims,ime, jms,jme, kms,kme,                               &
286                its,ite, jts,jte, kts,kte,                               &
287                13,                                                      &
288                e_bio(ims,jms,lald),  e_bio(ims,jms,lhc3),               &
289                e_bio(ims,jms,lhc5),  e_bio(ims,jms,lhc8),               &
290                e_bio(ims,jms,lhcho), e_bio(ims,jms,liso),               &
291                e_bio(ims,jms,lket),  e_bio(ims,jms,lno),                &
292                e_bio(ims,jms,loli),  e_bio(ims,jms,lolt),               &
293                e_bio(ims,jms,lora1), e_bio(ims,jms,lora2),              &
294                e_bio(ims,jms,lxyl),                                     &
295                e_bio(ims,jms,lxyl),  e_bio(ims,jms,lxyl),               &
296                e_bio(ims,jms,lxyl),  e_bio(ims,jms,lxyl),               &
297                e_bio(ims,jms,lxyl),  e_bio(ims,jms,lxyl),               &
298                e_bio(ims,jms,lxyl),  e_bio(ims,jms,lxyl)                )
300       do j=jts,jte  
301       do i=its,ite  
302         chem(i,kts,j,p_so2) = chem(i,kts,j,p_so2)    &
303                           + e_bio(i,j,lso2)/(dz8w(i,kts,j)*60.)*dtstep
304         chem(i,kts,j,p_sulf) = chem(i,kts,j,p_sulf)    &
305                           + e_bio(i,j,lsulf)/(dz8w(i,kts,j)*60.)*dtstep
306         chem(i,kts,j,p_no2) = chem(i,kts,j,p_no2)    &
307                           + e_bio(i,j,lno2)/(dz8w(i,kts,j)*60.)*dtstep
308         chem(i,kts,j,p_no) = chem(i,kts,j,p_no)    &
309                           + e_bio(i,j,lno)/(dz8w(i,kts,j)*60.)*dtstep
310         chem(i,kts,j,p_o3) = chem(i,kts,j,p_o3)    &
311                           + e_bio(i,j,lo3)/(dz8w(i,kts,j)*60.)*dtstep
312         chem(i,kts,j,p_hno3) = chem(i,kts,j,p_hno3)    &
313                           + e_bio(i,j,lhno3)/(dz8w(i,kts,j)*60.)*dtstep
314         chem(i,kts,j,p_h2o2) = chem(i,kts,j,p_h2o2)    &
315                           + e_bio(i,j,lh2o2)/(dz8w(i,kts,j)*60.)*dtstep
316         chem(i,kts,j,p_ald) = chem(i,kts,j,p_ald)    &
317                           + e_bio(i,j,lald)/(dz8w(i,kts,j)*60.)*dtstep
318         chem(i,kts,j,p_hcho) = chem(i,kts,j,p_hcho)    &
319                           + e_bio(i,j,lhcho)/(dz8w(i,kts,j)*60.)*dtstep
320         chem(i,kts,j,p_op1) = chem(i,kts,j,p_op1)    &
321                           + e_bio(i,j,lop1)/(dz8w(i,kts,j)*60.)*dtstep
322         chem(i,kts,j,p_op2) = chem(i,kts,j,p_op2)    &
323                           + e_bio(i,j,lop2)/(dz8w(i,kts,j)*60.)*dtstep
324         chem(i,kts,j,p_ora1) = chem(i,kts,j,p_ora1)    &
325                           + e_bio(i,j,lora1)/(dz8w(i,kts,j)*60.)*dtstep
326         chem(i,kts,j,p_ora2) = chem(i,kts,j,p_ora2)    &
327                           + e_bio(i,j,lora2)/(dz8w(i,kts,j)*60.)*dtstep
328         chem(i,kts,j,p_nh3) = chem(i,kts,j,p_nh3)    &
329                           + e_bio(i,j,lnh3)/(dz8w(i,kts,j)*60.)*dtstep
330         chem(i,kts,j,p_n2o5) = chem(i,kts,j,p_n2o5)    &
331                           + e_bio(i,j,ln2o5)/(dz8w(i,kts,j)*60.)*dtstep
332         chem(i,kts,j,p_no2) = chem(i,kts,j,p_no2)    &
333                           + e_bio(i,j,lno2)/(dz8w(i,kts,j)*60.)*dtstep
334         chem(i,kts,j,p_pan) = chem(i,kts,j,p_pan)    &
335                           + e_bio(i,j,lpan)/(dz8w(i,kts,j)*60.)*dtstep
336         chem(i,kts,j,p_eth) = chem(i,kts,j,p_eth)    &
337                           + e_bio(i,j,leth)/(dz8w(i,kts,j)*60.)*dtstep
338         chem(i,kts,j,p_co) = chem(i,kts,j,p_co)    &
339                           + e_bio(i,j,lco)/(dz8w(i,kts,j)*60.)*dtstep
340         chem(i,kts,j,p_ol2) = chem(i,kts,j,p_ol2)    &
341                           + e_bio(i,j,lol2)/(dz8w(i,kts,j)*60.)*dtstep
342         chem(i,kts,j,p_olt) = chem(i,kts,j,p_olt)    &
343                           + e_bio(i,j,lolt)/(dz8w(i,kts,j)*60.)*dtstep
344         chem(i,kts,j,p_oli) = chem(i,kts,j,p_oli)    &
345                           + e_bio(i,j,loli)/(dz8w(i,kts,j)*60.)*dtstep
346         chem(i,kts,j,p_tol) = chem(i,kts,j,p_tol)    &
347                           + e_bio(i,j,ltol)/(dz8w(i,kts,j)*60.)*dtstep
348         chem(i,kts,j,p_xyl) = chem(i,kts,j,p_xyl)    &
349                           + e_bio(i,j,lxyl)/(dz8w(i,kts,j)*60.)*dtstep
350         chem(i,kts,j,p_hono) = chem(i,kts,j,p_hono)    &
351                           + e_bio(i,j,lhono)/(dz8w(i,kts,j)*60.)*dtstep
352         chem(i,kts,j,p_hno4) = chem(i,kts,j,p_hno4)    &
353                           + e_bio(i,j,lhno4)/(dz8w(i,kts,j)*60.)*dtstep
354         chem(i,kts,j,p_ket) = chem(i,kts,j,p_ket)    &
355                           + e_bio(i,j,lket)/(dz8w(i,kts,j)*60.)*dtstep
356         chem(i,kts,j,p_mgly) = chem(i,kts,j,p_mgly)    &
357                           + e_bio(i,j,lmgly)/(dz8w(i,kts,j)*60.)*dtstep
358         chem(i,kts,j,p_onit) = chem(i,kts,j,p_onit)    &
359                           + e_bio(i,j,lonit)/(dz8w(i,kts,j)*60.)*dtstep
360         chem(i,kts,j,p_csl) = chem(i,kts,j,p_csl)    &
361                           + e_bio(i,j,lcsl)/(dz8w(i,kts,j)*60.)*dtstep
362         chem(i,kts,j,p_iso) = chem(i,kts,j,p_iso)    &
363                           + e_bio(i,j,liso)/(dz8w(i,kts,j)*60.)*dtstep
364       end do
365       end do
367 ! calc par emissions as a combination of the biogenic emissions
368 ! for radm2 primary voc species
369       do j = jts, jte
370       do i = its, ite
371          chem(i,kts,j,p_par)  =  chem(i,kts,j,p_par)               &
372              + (dtstep/(dz8w(i,kts,j)*60.))*                       &
373                ( 0.4*e_bio(i,j,lald) + 2.9*e_bio(i,j,lhc3)         &
374                + 4.8*e_bio(i,j,lhc5) + 7.9*e_bio(i,j,lhc8)         &
375                + 0.9*e_bio(i,j,lket) + 2.8*e_bio(i,j,loli)         &
376                + 1.8*e_bio(i,j,lolt) + 1.0*e_bio(i,j,lora2)        )
377       end do
378       end do
380       if (cbmz_addemiss_masscheck > 0) call addemiss_masscheck(         &
381                id, config_flags, 2, 'cbmz_addemiss_bioaa',              &
382                dtstep, efact1, dz8w, chem, chem_sum,                    &
383                ids,ide, jds,jde, kds,kde,                               &
384                ims,ime, jms,jme, kms,kme,                               &
385                its,ite, jts,jte, kts,kte,                               &
386                13,                                                      &
387                e_bio(ims,jms,lald),  e_bio(ims,jms,lhc3),               &
388                e_bio(ims,jms,lhc5),  e_bio(ims,jms,lhc8),               &
389                e_bio(ims,jms,lhcho), e_bio(ims,jms,liso),               &
390                e_bio(ims,jms,lket),  e_bio(ims,jms,lno),                &
391                e_bio(ims,jms,loli),  e_bio(ims,jms,lolt),               &
392                e_bio(ims,jms,lora1), e_bio(ims,jms,lora2),              &
393                e_bio(ims,jms,lxyl),                                     &
394                e_bio(ims,jms,lxyl),  e_bio(ims,jms,lxyl),               &
395                e_bio(ims,jms,lxyl),  e_bio(ims,jms,lxyl),               &
396                e_bio(ims,jms,lxyl),  e_bio(ims,jms,lxyl),               &
397                e_bio(ims,jms,lxyl),  e_bio(ims,jms,lxyl)                )
399    end if
403 ! apply offline isoprene emissions when bio_emiss_opt /= GUNTHER1
405    if (config_flags%bio_emiss_opt /= GUNTHER1) then
407       if (cbmz_addemiss_masscheck > 0) call addemiss_masscheck(            &
408                id, config_flags, 1, 'cbmz_addemiss_biobb',                 &
409                dtstep, efact1, dz8w, chem, chem_sum,                       &
410                ids,ide, jds,jde, kds,kde,                                  &
411                ims,ime, jms,jme, kms,kme,                                  &
412                its,ite, jts,jte, kts,kte,                                  &
413                1,                                                          &
414                e_iso,e_iso,e_iso,e_iso,e_iso,e_iso,e_iso,                  &
415                e_iso,e_iso,e_iso,e_iso,e_iso,e_iso,e_iso,                  &
416                e_iso,e_iso,e_iso,e_iso,e_iso,e_iso,e_iso                   )
418       do j = jts, jte
419       do k = kts, min(config_flags%kemit,kte)
420       do i = its, ite
421          chem(i,k,j,p_iso) = chem(i,k,j,p_iso) + e_iso(i,k,j)              &
422               *4.828e-4/rho_phy(i,k,j)*(dtstep/(dz8w(i,k,j)*60.))
423       end do
424       end do
425       end do
427       if (cbmz_addemiss_masscheck > 0) call addemiss_masscheck(            &
428                id, config_flags, 2, 'cbmz_addemiss_biobb',                 &
429                dtstep, efact1, dz8w, chem, chem_sum,                       &
430                ids,ide, jds,jde, kds,kde,                                  &
431                ims,ime, jms,jme, kms,kme,                                  &
432                its,ite, jts,jte, kts,kte,                                  &
433                1,                                                          &
434                e_iso,e_iso,e_iso,e_iso,e_iso,e_iso,e_iso,                  &
435                e_iso,e_iso,e_iso,e_iso,e_iso,e_iso,e_iso,                  &
436                e_iso,e_iso,e_iso,e_iso,e_iso,e_iso,e_iso                   )
438    end if
441    END subroutine cbmz_addemiss_bio
444 END MODULE module_cbmz_addemiss