updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / chem / chemics_init.F
blob59f05468831084cfc451bc7a67b34d1d3d706519
1 !WRF:MODEL_LAYER:INITIALIZATION
3    subroutine chem_init (id,chem,emis_ant,scalar,dt,bioemdt,photdt,chemdt,stepbioe, &
4                stepphot,stepchem,stepfirepl,plumerisefire_frq,z_at_w,xlat,xlong,    &
5                g,aerwrf,config_flags,grid,alt,t,p,CONVFAC,ttday,tcosz,julday,gmt,   &
6                tauaer1,tauaer2,tauaer3,tauaer4,                      &
7                gaer1,gaer2,gaer3,gaer4,                              &
8                waer1,waer2,waer3,waer4,                              &
9                l2aer,l3aer,l4aer,l5aer,l6aer,l7aer,                  &
10                extaerlw1,extaerlw2,extaerlw3,extaerlw4,              &
11                extaerlw5,extaerlw6,extaerlw7,extaerlw8,              &
12                extaerlw9,extaerlw10,extaerlw11,extaerlw12,           &
13                extaerlw13,extaerlw14,extaerlw15,extaerlw16,          &
14                tauaerlw1,tauaerlw2,tauaerlw3,tauaerlw4,              &
15                tauaerlw5,tauaerlw6,tauaerlw7,tauaerlw8,              &
16                tauaerlw9,tauaerlw10,tauaerlw11,tauaerlw12,           &
17                tauaerlw13,tauaerlw14,tauaerlw15,tauaerlw16,          &
18                dgnum4d, dgnumwet4d, dgnum_a1, dgnum_a2, dgnum_a3,    & 
19                dgnumwet_a1, dgnumwet_a2, dgnumwet_a3,                & 
20                pm2_5_dry,pm2_5_water,pm2_5_dry_ec,                   &
21                tsoa,asoa,bsoa,                                       &
22                last_chem_time_year, last_chem_time_month,            &
23                last_chem_time_day, last_chem_time_hour,              &
24                last_chem_time_minute, last_chem_time_second,         &
25                chem_in_opt, kemit, num_vert_mix, numgas_out,         &
26                ids,ide, jds,jde, kds,kde,                            &
27                ims,ime, jms,jme, kms,kme,                            &
28                its,ite, jts,jte, kts,kte                             )
30    USE module_domain
31    USE module_configure
32    USE module_state_description
33    USE module_phot_mad
35    USE module_ftuv_driver, only : ftuv_init
36    USE module_phot_tuv,    only : tuv_init
37    USE module_mozcart_wetscav, only : wetscav_mozcart_init
38    USE module_aerosols_sorgam
39    USE module_aerosols_soa_vbs, only: aerosols_soa_vbs_init
40    USE module_aerosols_sorgam_vbs, only: aerosols_sorgam_vbs_init
41    USE module_dep_simple
42    USE module_data_gocart_dust
43    USE module_data_gocart_seas
44    USE module_data_gocartchem
45    USE module_gocart_chem ! , only: szangle
46    USE module_cbm4_initmixrats, only:     cbm4_init_wrf_mixrats
47    USE module_cbmz_initmixrats, only:     cbmz_init_wrf_mixrats
48    USE module_mosaic_driver, only:        init_data_mosaic_asect
49    USE module_mosaic_initmixrats, only:   mosaic_init_wrf_mixrats
50    USE module_input_chem_data, only:      gasprofile_init_pnnl,      &
51                                           mozcart_lbc_init,          &
52                                           last_chem_time,            &
53                                           setup_gasprofile_maps,     &
54                                           initial_pvo3
55    USE module_chem_share, only: get_last_gas
56    USE module_mixactivate_wrappers, only: mosaic_mixactivate_init
57    USE module_upper_bc_driver, only: upper_bc_init
58    USE module_tropopause,      only: tropopause_init
59    USE module_cam_mam_init, only: cam_mam_init
60    USE module_cam_mam_initmixrats, only: cam_mam_initmixrats
62    USE module_cam_mam_wetscav, only:wetscav_cam_mam_driver_init
63    USE module_cam_support, only: numgas_mam, gas_pcnst_modal_aero,gas_pcnst_modal_aero_pos !BSINGH - Fix for non-MAM simulations
64    USE module_HLawConst, only: init_HLawConst
65    USE module_ctrans_grell, only: conv_tr_wetscav_init
67 !!! TUCCELLA (BUG)
68    USE module_prep_wetscav_sorgam, only: aerosols_sorgam_init_aercld_ptrs, aerosols_soa_vbs_init_aercld_ptrs 
70 !!CYY
71    USE module_model_constants, only:t0
73    IMPLICIT NONE
75    real  , intent(in) :: bioemdt,photdt,chemdt,dt,gmt
76    INTEGER,      INTENT(IN   ) :: plumerisefire_frq
77    INTEGER,      INTENT(IN   ) :: chem_in_opt
78    INTEGER,      INTENT(INOUT) :: num_vert_mix
79    INTEGER,      INTENT(INOUT) :: numgas_out
80    INTEGER,      INTENT(IN   ) :: id,julday,kemit,                   &
81                                   last_chem_time_year,               &
82                                   last_chem_time_month,              &
83                                   last_chem_time_day,                &
84                                   last_chem_time_hour,               &
85                                   last_chem_time_minute,             &
86                                   last_chem_time_second,             &
87                                   ids,ide, jds,jde, kds,kde,         &
88                                   ims,ime, jms,jme, kms,kme,         &
89                                   its,ite, jts,jte, kts,kte
90    REAL,  DIMENSION( ims:ime , kms:kme , jms:jme )         ,         &
91           INTENT(INOUT   ) ::                                        &
92                                pm2_5_dry,pm2_5_water,pm2_5_dry_ec,   &
93                                tsoa,asoa,bsoa,                       &
94                                tauaer1,tauaer2,tauaer3,tauaer4,      &
95                                extaerlw1,extaerlw2,extaerlw3,extaerlw4,      &
96                                extaerlw5,extaerlw6,extaerlw7,extaerlw8,      &
97                                extaerlw9,extaerlw10,extaerlw11,extaerlw12,   &
98                                extaerlw13,extaerlw14,extaerlw15,extaerlw16,  &
99                                tauaerlw1,tauaerlw2,tauaerlw3,tauaerlw4,      &
100                                tauaerlw5,tauaerlw6,tauaerlw7,tauaerlw8,      &
101                                tauaerlw9,tauaerlw10,tauaerlw11,tauaerlw12,   &
102                                tauaerlw13,tauaerlw14,tauaerlw15,tauaerlw16,  &
103                                gaer1,gaer2,gaer3,gaer4,              &
104                                waer1,waer2,waer3,waer4
105 !-- Arrays needed to output dgnum when restarting
106    REAL, DIMENSION( ims:ime , kms:kme , jms:jme, 3 ) ,              &
107           INTENT(INOUT ) ::                                         &
108                                dgnum4d, dgnumwet4d
109    REAL, DIMENSION( ims:ime , kms:kme , jms:jme ) ,                 &
110           INTENT(INOUT ) ::                                         &
111                                dgnum_a1, dgnum_a2, dgnum_a3,        &
112                                dgnumwet_a1, dgnumwet_a2, dgnumwet_a3
113 !-- end dgnum restart arrays
115    REAL,  DIMENSION( ims:ime , kms:kme , jms:jme , 1:4 )   ,         &
116           INTENT(INOUT   ) ::                                        &
117                                l2aer,l3aer,l4aer,l5aer,l6aer,l7aer
118    REAL,  DIMENSION( ims:ime , kms:kme , jms:jme )         ,         &
119           INTENT(IN   ) ::                                           &
120                                z_at_w,t,p,alt,convfac
121    REAL,  DIMENSION( ims:ime , kms:kme , jms:jme, num_chem ) ,       &
122           INTENT(INOUT   ) ::                                        &
123                               chem 
124    REAL,  DIMENSION( ims:ime , 1:kemit , jms:jme, num_emis_ant ) ,       &
125           INTENT(INOUT   ) ::                                        &
126                               emis_ant
127    REAL,  DIMENSION( ims:ime , kms:kme , jms:jme, num_scalar ) ,     &
128           INTENT(INOUT   ) ::                                        &
129                               scalar
130    REAL,  DIMENSION( ims:ime , kms:kme , jms:jme )         ,         &
131           INTENT(INOUT   ) ::                                        &
132                                aerwrf
133    REAL,  DIMENSION( ims:ime ,  jms:jme )         ,         &
134           INTENT(INOUT   ) ::                                        &
135                                ttday,tcosz,xlat,xlong
136    real, INTENT (IN) :: g
137    integer, intent(out) :: stepbioe,stepphot,stepchem,stepfirepl
138    TYPE (grid_config_rec_type) , INTENT (in) ::     config_flags
139    TYPE(domain) ,             INTENT (inout) ::     grid
140    
141    REAL,DIMENSION(ims:ime,kms:kme,jms:jme) :: si_zsigf, si_zsig
144 ! local stuff
146    CHARACTER*256 :: mminlu_loc
147    CHARACTER*256 :: message_txt
148    TYPE(WRFU_TimeInterval) :: tmpTimeInterval
149    integer :: i,j,k,l,numgas,ixhour,n,ndystep,kk,nv
150    real, DIMENSION (1,1) :: sza,cosszax
151    real :: xtime,xhour,xmin,gmtp,xlonn,rlat
152    logical :: is_moz_chm
153 #include "version_decl"
154 #include "commit_decl"
155 #ifdef CHEM_DBG_I
156     call print_chem_species_index( config_flags%chem_opt )
157 #endif
158    program_name = "*             PROGRAM:WRF-Chem " // TRIM(release_version) // " MODEL"
160 call wrf_message("*********************************************************************")
161 call wrf_message(program_name)
162 call wrf_message(commit_version)
163 call wrf_message("*                                                                   *")
164 call wrf_message("*    PLEASE REPORT ANY BUGS TO WRF-Chem HELP at                     *")
165 call wrf_message("*                                                                   *")
166 call wrf_message("*              wrfchemhelp.gsd@noaa.gov                             *")
167 call wrf_message("*                                                                   *")
168 call wrf_message("*********************************************************************")
170     numgas = get_last_gas(config_flags%chem_opt)
171     numgas_out = numgas
173    chem_select: SELECT CASE(config_flags%chem_opt)
174      CASE (GOCART_SIMPLE)
175        CALL wrf_debug(15,'calling only gocart aerosols driver from chem_driver')
176      CASE (GOCARTRADM2)
177        CALL wrf_debug(15,'calling gocart and radm driver from chem_driver')
178      CASE (GOCARTRACM_KPP)
179        CALL wrf_debug(15,'calling gocart and racmkpp driver from chem_driver')
180      CASE (CRIMECH_KPP, CRI_MOSAIC_8BIN_AQ_KPP, CRI_MOSAIC_4BIN_AQ_KPP)
181        CALL wrf_debug(15,'calling crimech driver from chem_driver')
182        call wrf_message("WARNING: CRIMECH chemistry option is highly experimental and not recommended for use.")
183 !       call wrf_error_fatal("ERROR: experimental option selected, please contact G.MCFIGGANS for assistance")
184      CASE (CBM4_KPP )
185        CALL wrf_debug(15,'calling CB4 from chem_driver')
186        call wrf_message("WARNING: CB4 chemistry option is highly experimental and not recommended for use.")
187 !      call wrf_error_fatal("ERROR: experimental option selected, please contact wrfchemhelp for assistance")
188      CASE (NMHC9_KPP )
189        CALL wrf_debug(15,'calling NMHC9 from chem_driver')
190        call wrf_message("WARNING: NMHC9 chemistry option is highly experimental and not recommended for use.")
191        call wrf_error_fatal("ERROR: experimental option selected, please contact wrfchemhelp for assistance")
192      CASE (SAPRC99_KPP )
193        CALL wrf_debug(15,'calling SAPRC99 from chem_driver')
194        call wrf_message("WARNING: SAPRC99 chemistry option is highly experimental and not recommended for use.")
195      CASE (SAPRC99_MOSAIC_4BIN_VBS2_KPP )
196        CALL wrf_debug(15,'calling SAPRC99_MOSAIC_4BIN_VBS2_4BIN from chem_driver')
197        call wrf_message("WARNING: SAPRC99_MOSAIC_4BIN_VBS2_4BIN chemistry option is highly experimental and not recommended for use.")
198 !jdf   call wrf_error_fatal("WARNING: SAPRC99_MOSAIC_4BIN_VBS2_4BIN chemistry option is useable but does not fully pass regtesting. It is recommended that you contact Jerome.Fast@pnl.gov for information regarding this option.")
199        !BSINGH(04/03/2014): Added SAPRC 8 bin non-aq
200     CASE (SAPRC99_MOSAIC_8BIN_VBS2_KPP )
201        CALL wrf_debug(15,'calling SAPRC99_MOSAIC_8BIN_VBS2_4BIN from chem_driver')
202        call wrf_message("WARNING: SAPRC99_MOSAIC_8BIN_VBS2_4BIN chemistry option is highly experimental and not recommended for use.")
203        !BSINGH(12/03/2013): Added SAPRC 8 bin aq
204     CASE (SAPRC99_MOSAIC_8BIN_VBS2_AQ_KPP )
205        CALL wrf_debug(15,'calling SAPRC99_MOSAIC_8BIN_VBS2_AQ_KPP from chem_driver')
206        call wrf_message("WARNING: SAPRC99_MOSAIC_8BIN_VBS2_AQ_KPP chemistry option is highly experimental and not recommended for use.")
207        !BSINGH -ENDS
208      CASE (MOZART_MOSAIC_4BIN_KPP )
209        CALL wrf_debug(15,'calling MOZART_MOSAIC_4BIN_KPP from chem_driver')
210      CASE (MOZART_MOSAIC_4BIN_AQ_KPP )
211        CALL wrf_debug(15,'calling MOZART_MOSAIC_4BIN_AQ_KPP from chem_driver')
212      CASE (RADM2SORG_AQ )
213        CALL wrf_debug(15,'calling RADM2/MADE/SORGAM with AQ chemistry from chem_driver')
214        call wrf_message("WARNING: RADM2SORG_AQ chemistry option is experimental and not yet fully tested.")
215        call wrf_message("         We recommend contacting wrfchemhelp for assistance.")
216      CASE (RACMSORG_AQ )
217        CALL wrf_debug(15,'calling RACM/MADE/SORGAM with AQ chemistry from chem_driver')
218        call wrf_message("WARNING: RACMSORG_AQ chemistry option is highly experimental and not recommended for use.")
219        call wrf_error_fatal("ERROR: experimental option selected, please contact wrfchemhelp for assistance")
220      CASE (RADM2SORG_AQCHEM )
221        numgas_mam = numgas
222        CALL wrf_debug(15,'calling RADM2/MADE/SORGAM with AQCHEM chemistry from chem_driver')
223        call wrf_message("WARNING: RADM2SORG_AQCHEM chemistry option is experimental and not yet fully tested.")
224        call wrf_message("         We recommend contacting wrfchemhelp for assistance.")
225      CASE (RACMSORG_AQCHEM_KPP )
226        numgas_mam = numgas
227        CALL wrf_debug(15,'calling RACM/MADE/SORGAM with AQCHEM chemistry from chem_driver')
228        call wrf_message("WARNING: RACMSORG_AQCHEM_KPP chemistry option is highly experimental and not recommended for use.")
229 !      call wrf_error_fatal("ERROR: experimental option selected, please contact wrfchemhelp for assistance")
230      CASE (RACM_ESRLSORG_AQCHEM_KPP )
231        numgas_mam = numgas
232        CALL wrf_debug(15,'calling RACM/MADE/SORGAM with AQCHEM chemistry from chem_driver')
233        call wrf_message("WARNING: RACM_ESRLSORG_AQCHEM_KPP chemistry option is highly experimental and not recommended for use.")
234 !      call wrf_error_fatal("ERROR: experimental option selected, please contact wrfchemhelp for assistance")
235      CASE (RACM_SOA_VBS_AQCHEM_KPP )
236        numgas_mam = numgas
237        CALL wrf_debug(15,'calling RACM/MADE/SOA-VBS with AQCHEM chemistry from chem_driver')
238 !       call wrf_message("WARNING: RACM_SOA_VBS_AQCHEM_KPP chemistry option is highly experimental and not recommended for use.")
239      CASE (CO2_TRACER, GHG_TRACER )
240        call wrf_message("WARNING: Users interested in the GHG options should check the comments/references in header of module_ghg_fluxes")
241      CASE (CBMZ_CAM_MAM3_NOAQ)
242         numgas_mam = numgas
243         CALL wrf_debug(15,'calling CBMZ_CAM_MAM3_NOAQ chemistry from chem_driver')
244      CASE (CBMZ_CAM_MAM3_AQ)
245         numgas_mam = numgas
246         CALL wrf_debug(15,'calling CBMZ_CAM_MAM3_AQ with AQCHEM chemistry from chem_driver')
247      CASE (CBMZ_CAM_MAM7_NOAQ)
248         numgas_mam = numgas
249         CALL wrf_debug(15,'calling CBMZ_CAM_MAM7_NOAQ chemistry from chem_driver')
250         call wrf_message("WARNING: CBMZ_CAM_MAM7_NOAQ  chemistry option is highly experimental and not recommended for use.")
251         call wrf_message("WARNING: In CBMZ_CAM_MAM7_NOAQ  chemistry option, DMS is not implemented yet.")
252         call wrf_error_fatal("ERROR: It is recommended that you contact phil.rasch at pnnl.gov for information regarding this option")
253      CASE (CBMZ_CAM_MAM7_AQ)
254         numgas_mam = numgas
255         CALL wrf_debug(15,'calling CBMZ_CAM_MAM7_AQ with AQCHEM chemistry from chem_driver')
256         call wrf_message("WARNING: CBMZ_CAM_MAM7_AQ  chemistry option is highly experimental and not recommended for use.")
257         call wrf_error_fatal("ERROR: It is recommended that you contact phil.rasch at pnnl.gov for information regarding this option")
258      CASE(CB05_SORG_AQ_KPP)
259         numgas_mam = numgas
260         CALL wrf_debug(15,'calling CB05_SORG_AQ_KPP chemistry from chem_driver')
261      CASE(CB05_SORG_VBS_AQ_KPP)
262         numgas_mam = numgas
263         CALL wrf_debug(15,'calling CB05_SORG_VBS_AQ_KPP chemistry from chem_driver')
264    END SELECT chem_select
266    if ( config_flags%dust_opt == 1 ) then
267        call wrf_message("WARNING: dust option 1 currently works only with the GOCART aerosol option.")
268    endif
270    if ( config_flags%dust_opt == 2 ) then
271        call wrf_error_fatal("WARNING: dust option 2 currently does not function properly and has been disabled.")
272    endif
274    if ( config_flags%seas_opt == 1 ) then
275        call wrf_message("WARNING: sea salt option 1 currently works only with the GOCART aerosol option.")
276    endif
278    if ( config_flags%biomass_burn_opt > 0 .or. config_flags%biomass_burn_opt < 4 ) then
279        CALL wrf_debug(15,'calling biomass burning')
280    endif
282    if ( config_flags%biomass_burn_opt == 5 ) then
283        CALL wrf_debug(15,'calling biomass burning for GHGs')
284    endif
286    is_moz_chm = config_flags%chem_opt == MOZCART_KPP .or. &
287                 config_flags%chem_opt == T1_MOZCART_KPP .or. &
288                 config_flags%chem_opt == MOZART_KPP .or. &
289                 config_flags%chem_opt == MOZART_MOSAIC_4BIN_KPP .or. &
290                 config_flags%chem_opt == MOZART_MOSAIC_4BIN_AQ_KPP
292    if( is_moz_chm ) then
293        write(message_txt,*) 'chem_init: calling mozcart_lbc_init for domain ',id
294        call wrf_message( trim(message_txt) )
295        call mozcart_lbc_init( chem, num_chem, id, &
296                               ims, ime, jms, jme, kms, kme,    &
297                               its, ite, jts, jte, kts )
298    endif
299 !-----------------------------------------------------------------------
300 !  Check TUV photolysis for chem_opt compatability
301 !-----------------------------------------------------------------------
302    if (config_flags%phot_opt == TUV ) then
303      if (config_flags%chem_opt /= mozart_mosaic_4bin_kpp .and. &
304          config_flags%chem_opt /= mozart_mosaic_4bin_aq_kpp .and. &
305          config_flags%chem_opt /= mozcart_kpp .and. &
306          config_flags%chem_opt /= t1_mozcart_kpp) THEN
307        write(message_txt,'(''--- ERROR: chem_opt '',i3,'' not setup for TUV photolysis at this time'')') &
308               config_flags%chem_opt
309        CALL wrf_error_fatal( trim(message_txt) )
310      endif
311    endif
313    if( is_moz_chm .and. id == 1 ) then
314      write(message_txt,*) 'chem_init: calling init_HLawConst for domain ',id
315      call wrf_message( trim(message_txt) )
316 !  Initialize Henrys Law constants
317      call init_HLawConst( id )
318      if( config_flags%conv_tr_wetscav == 1 ) then
319 !  Initialize Henrys Law constants
320        call conv_tr_wetscav_init( numgas, num_chem )
321      endif
322    endif
324 !!! TUCCELLA
325    if ( config_flags%wetscav_onoff == 1 ) then
326      if( .not. is_moz_chm ) then
327        if(  ( config_flags%chem_opt >= 8 .AND. config_flags%chem_opt <= 13) .OR.  &
328             ( config_flags%chem_opt >= 31 .AND. config_flags%chem_opt <= 36) .OR. &
329             ( config_flags%chem_opt >= 41 .AND. config_flags%chem_opt <= 43) .OR. &
330             ( config_flags%chem_opt == 131 ) .OR. ( config_flags%chem_opt == 132 ) .OR. &
331             ( config_flags%chem_opt == 503 .OR. config_flags%chem_opt == 504) .OR. &
332             ( config_flags%chem_opt == 203).OR.                                    & !BSINGH(12/17/2013): Added for SAPRC 8 bin vbs
333             ( config_flags%chem_opt == 601 .OR. config_flags%chem_opt == 611) .OR. &
334               (config_flags%chem_opt == 109) ) then
335          call wrf_debug( 15, 'Chemics_init: Wet scavenging turned on' )
336        else
337          call wrf_error_fatal("ERROR: wet scavenging option requires chem_opt = 8 through 13 or 31 to 36 or 41 to 42 or 109 or 503 or 504 or 601 or 611 to function.")
338        endif
339        if ( config_flags%mp_physics /= 2 .and. config_flags%mp_physics /= 10 .and. config_flags%mp_physics /= 11  &
340             .and. config_flags%mp_physics /= 17 .and. config_flags%mp_physics /= 18 .and. config_flags%mp_physics /= 22) then
341          call wrf_error_fatal("ERROR: wet scavenging option requires mp_phys = 2 (Lin et al.) or 10 (Morrison) or 11 (CAMMGMP) or 17/18/22 NSSL_2mom to function.")
342        endif
343      elseif( id == 1 ) then
344        if ( config_flags%mp_physics /= 6 .and. config_flags%mp_physics /= 8 .and. config_flags%mp_physics /= 10 .and. config_flags%mp_physics /= 17  &
345             .and. config_flags%mp_physics /= 18 .and. config_flags%mp_physics /= 22) then
346          call wrf_error_fatal("ERROR: wet scavenging option for MOZART,MOZCART requires mp_phys = 6 (WSM6) or 8 (Thompson) or 10 (Morrison) .or 17/18/22 (NSSL 2-moment) to function.")
347        else
348          write(message_txt,*) 'chem_init: calling wetscav_mozcart_init for domain ',id
349          call wrf_message( trim(message_txt) )
350          call wetscav_mozcart_init( id, numgas, config_flags )
351        endif
352      endif
353    endif
355 !!! TUCCELLA
356    if ( config_flags%cldchem_onoff == 1 ) then
357       if(  ( config_flags%chem_opt >= 8 .AND. config_flags%chem_opt <= 13)    .OR. &
358            ( config_flags%chem_opt >= 31 .AND. config_flags%chem_opt <= 36)   .OR. &
359            ( config_flags%chem_opt >= 501 .AND. config_flags%chem_opt <= 504) .OR. &
360            ( config_flags%chem_opt >= 41 .AND. config_flags%chem_opt <= 43)  .OR. &
361            ( config_flags%chem_opt == 203).OR.                                    &
362            ( config_flags%chem_opt == 131 ) .OR. ( config_flags%chem_opt == 132 ) .OR. &
363            ( config_flags%chem_opt >= 601 .AND. config_flags%chem_opt <= 611)  .OR. &
364              config_flags%chem_opt == 109 .OR. config_flags%chem_opt == MOZART_MOSAIC_4BIN_AQ_KPP ) then
365            call wrf_debug( 15, 'Chemics_init: Cloud chemistry turned on' )
366       else
367         call wrf_error_fatal("ERROR: cloud chemistry option requires chem_opt = 8 through 13 or 31 to 36 or 41 to 43 or 109 to function.")
368       endif
369        if ( config_flags%mp_physics /= 2 .and. config_flags%mp_physics /= 10 .and. config_flags%mp_physics /= 11  &
370             .and. config_flags%mp_physics /= 17 .and. config_flags%mp_physics /= 18 .and. config_flags%mp_physics /= 22 ) then
371          call wrf_error_fatal("ERROR: cloud chemistry option requires mp_phys = 2 (Lin et al.) or 10 (Morrison) or 11 (CAMMGMP) or 17/18/22 NSSL_2mom to function.")
372        endif
373    endif
375    !BSINGH - kfcup schme only works with Mosaic aqueoue packages:
376    ! *** NOTE ***
377    ! KFCUP should in theory work with any chem_opt package that uses MOSAIC and has cloud-borne aerosols (*_aq*).
378    ! However, it was only tested with chem_opt=203 (saprc99_mosaic_8bin_vbs2_aq_kpp) 
379    ! during implementation into WRF-Chem in April 2017 at PNNL.   
380    if ( config_flags%cu_physics == 10)  then
381       if(  config_flags%chem_opt /= 9   .and.  config_flags%chem_opt /= 10  .and. &
382            config_flags%chem_opt /= 32  .and.  config_flags%chem_opt /= 34  .and.  &
383            config_flags%chem_opt /= 202 .and.  config_flags%chem_opt /= 203 .and.  &
384            config_flags%chem_opt /= 601 .and.  config_flags%chem_opt /= 611 ) then
385          call wrf_error_fatal("ERROR: kfcupscheme requires chem_opt = 9, 10, 32, 34, 202, 203, 601 or 611  to function.")
386       endif
387    endif
390    if ( config_flags%cu_physics == 5 .OR. config_flags%cu_physics == 3) then
391    if ( config_flags%cu_diag == 0) then
392          call wrf_message(" No time averaged variables. Time averaged chem variables requires cu_diag = 1")
393    endif
394    endif
396    if ( config_flags%cu_diag == 1) then
397    !BSINGH (12/17/2013): Added Kain-Fritsch Cumulus Potential (KF-CuP) scheme (cu_physics = 10)
398    !HSBADR (02/12/2019): Added Grell-Devenyi (GD) ensemble scheme (cu_physics = 93)
399    if ( config_flags%cu_physics /= 3 .AND. config_flags%cu_physics /= 5 .AND. &
400         config_flags%cu_physics /= 10 .AND. config_flags%cu_physics /= 93 ) then
401          call wrf_error_fatal(" Time averaged variables (cu_diag = 1) requires cu_physics = 3 or 5 or 10 or 93")
402    endif
403    endif
405    if ( config_flags%chem_opt /= 0 .AND. &
406       ( config_flags%chem_conv_tr == 1 .and. config_flags%cu_diag == 0) ) then
407          call wrf_error_fatal("ERROR: chem_conv_tr=1 requires cu_diag=1")
408    endif
410    if ( config_flags%cu_physics == 10 .and. config_flags%kfcup_diag == 0) then
411       call wrf_error_fatal("ERROR: cu_physics == 10 requires kfcup_diag == 1")
412    endif
414     if ( config_flags%chem_conv_tr == 0 .and. config_flags%kfcup_diag == 1) then
415       call wrf_error_fatal("ERROR: kfcup_diag == 1 requires chem_conv_tr == 1")
416    endif
418    if ( config_flags%cu_physics /= 10 .and. config_flags%kfcup_diag == 1) then
419       call wrf_error_fatal("ERROR: kfcup_diag == 1 requires cu_physics == 10")
420    endif
423    if ( config_flags%bio_emiss_opt .EQ. 3 .AND. config_flags%ne_area .LT. num_chem ) then
424       write(message_txt,'(''ERROR: MEGAN biogenics requires ne_area('',i6,'') >= num_chem('',i6,'')'')') config_flags%ne_area,num_chem
425 !     call wrf_error_fatal("ERROR: MEGAN biogenics requires ne_area to be equal or greater than num_chem")
426       call wrf_error_fatal( trim(message_txt) )
427    endif
429     IF ( config_flags%chem_opt == 0 .AND. config_flags%aer_ra_feedback .NE. 0 ) THEN
430 !       config_flags%aer_ra_feedback = 0
431         call wrf_error_fatal(" ERROR: CHEM_INIT: FOR CHEM_OPT = 0, AER_RA_FEEDBACK MUST = 0 ")
432     ENDIF
434     IF ( config_flags%calc_clean_atm_diag .gt. 0 .AND. config_flags%aer_ra_feedback .EQ. 0 ) THEN
435         call wrf_error_fatal("ERROR: clean_atm_diag > 0 requires aer_ra_feedback > 0")
436     ENDIF
438     IF ( config_flags%aer_ra_feedback .EQ. 1   .AND.   &
439         ( config_flags%chem_opt == RADM2 .or. &
440           config_flags%chem_opt == CBMZ .or. &
441           config_flags%chem_opt == CBMZ_BB .or. &
442           config_flags%chem_opt == CO2_TRACER .or. &
443           config_flags%chem_opt == RADM2_KPP .or. &
444           config_flags%chem_opt == RACM_MIM_KPP .or. &
445           config_flags%chem_opt == RACM_KPP .or. &
446           config_flags%chem_opt == CBM4_KPP .or. &
447           config_flags%chem_opt == SAPRC99_KPP  .or. &
448           config_flags%chem_opt == NMHC9_KPP  ) ) then
449         call wrf_error_fatal(" ERROR: CHEM_INIT: MUST HAVE AEROSOLS TO INCLUDE AEROSOL RADIATION FEEDBACK. SET AER_RA_FEEDBACK = 0 ")
450     ENDIF
452     if ( config_flags%n2o5_hetchem == 1 )then 
453         if( (config_flags%chem_opt >= 7   .AND. config_flags%chem_opt <= 10)  .OR. &
454             (config_flags%chem_opt >= 31  .AND. config_flags%chem_opt <= 34)  .OR. &
455              config_flags%chem_opt == 170 .OR.  config_flags%chem_opt == 198  .OR. &
456              config_flags%chem_opt == 199 .OR.  config_flags%chem_opt == 201  .OR. &
457              config_flags%chem_opt == 202 .OR.  config_flags%chem_opt == 203  .OR. &
458              config_flags%chem_opt == 601 .OR.  config_flags%chem_opt == 611 ) then
459             call wrf_debug( 15, 'using N2O5 heterogeneous chemistry without Cl- pathway')
460         else
461             call wrf_error_fatal("ERROR: N2O5 heterogenous chemistry (without Cl- pathway) must be run with MOSAIC aerosol")
462         endif
463     elseif ( config_flags%n2o5_hetchem == 2 ) then
464         if( config_flags%chem_opt == 601 .OR. config_flags%chem_opt == 611 ) then
465             call wrf_debug( 15, 'using full N2O5 heterogeneous chemistry')
466         else
467             call wrf_error_fatal("ERROR: full N2O5 heterogenous chemistry must be run with MOSAIC aerosol coupled with gas-phase scheme which deals with ClNO2")
468         endif
469     endif
471 !   IF ( config_flags%chem_opt == 2 .AND. config_flags%dust_opt .NE. 2 ) THEN
472 !       call wrf_error_fatal(" ERROR: USE dust_opt = 2 when using MADE/SORGAM aerosol option ")
473 !   ENDIF
475     CALL nl_get_mminlu( 1, mminlu_loc )
477     IF (trim(mminlu_loc) /= 'USGS' .and. trim(mminlu_loc) /= 'MODIFIED_IGBP_MODIS_NOAH' ) THEN
478       print*,mminlu_loc
479       message_txt = " ERROR: CHEM_INIT: Chemistry routines require USGS or MODIS_NOAH land use maps. Need to change land use option."
480       call wrf_error_fatal( trim(message_txt) )
481     ELSE
482       IF (trim(mminlu_loc) == 'USGS' .and. grid%num_land_cat <= 23 ) THEN
483         message_txt = " ERROR: CHEM_INIT: USGS land use map should have 24 or more catagories."
484         call wrf_error_fatal( trim(message_txt) )
485       ELSEIF (trim(mminlu_loc) == 'MODIFIED_IGBP_MODIS_NOAH' .and. grid%num_land_cat <= 19 ) THEN
486         message_txt = " ERROR: CHEM_INIT: MODIS_NOAH land use map should have 20 or more catagories."
487         call wrf_error_fatal( trim(message_txt) )
488       ENDIF
489     ENDIF
491     
492 !-- Load dgnum arrays when restart is active
493 IF ( config_flags%restart ) THEN
494        do j=jts,jte
495           do k=kts,kte
496              do i=its,ite
497                 dgnum4d(i, k, j, 1) = dgnum_a1(i, k, j)
498                 dgnum4d(i, k, j, 2) = dgnum_a2(i, k, j)
499                 dgnum4d(i, k, j, 3) = dgnum_a3(i, k, j)
500                 
501                 dgnumwet4d(i, k, j, 1) = dgnumwet_a1(i, k, j)
502                 dgnumwet4d(i, k, j, 2) = dgnumwet_a2(i, k, j)
503                 dgnumwet4d(i, k, j, 3) = dgnumwet_a3(i, k, j)
504              end do
505           end do
506        end do
507 ENDIF
508 !-- end load dgnum arrays
510     if( .NOT. config_flags%restart ) then
511        do j=jts,jte
512           do k=kts,kte
513              do i=its,ite
514                 tauaer1(i,k,j) = 0.
515                 tauaer2(i,k,j) = 0.
516                 tauaer3(i,k,j) = 0.
517                 tauaer4(i,k,j) = 0.
518                 gaer1(i,k,j) = 0.
519                 gaer2(i,k,j) = 0.
520                 gaer3(i,k,j) = 0.
521                 gaer4(i,k,j) = 0.
522                 waer1(i,k,j) = 0.
523                 waer2(i,k,j) = 0.
524                 waer3(i,k,j) = 0.
525                 waer4(i,k,j) = 0.
526                 l2aer(i,k,j,1) = 0.
527                 l2aer(i,k,j,2) = 0.
528                 l2aer(i,k,j,3) = 0.
529                 l2aer(i,k,j,4) = 0.
530                 l3aer(i,k,j,1) = 0.
531                 l3aer(i,k,j,2) = 0.
532                 l3aer(i,k,j,3) = 0.
533                 l3aer(i,k,j,4) = 0.
534                 l4aer(i,k,j,1) = 0.
535                 l4aer(i,k,j,2) = 0.
536                 l4aer(i,k,j,3) = 0.
537                 l4aer(i,k,j,4) = 0.
538                 l5aer(i,k,j,1) = 0.
539                 l5aer(i,k,j,2) = 0.
540                 l5aer(i,k,j,3) = 0.
541                 l5aer(i,k,j,4) = 0.
542                 l6aer(i,k,j,1) = 0.
543                 l6aer(i,k,j,2) = 0.
544                 l6aer(i,k,j,3) = 0.
545                 l6aer(i,k,j,4) = 0.
546                 l7aer(i,k,j,1) = 0.
547                 l7aer(i,k,j,2) = 0.
548                 l7aer(i,k,j,3) = 0.
549                 l7aer(i,k,j,4) = 0.
550                 extaerlw1(i,k,j) = 0.
551                 extaerlw2(i,k,j) = 0.
552                 extaerlw3(i,k,j) = 0.
553                 extaerlw4(i,k,j) = 0.
554                 extaerlw5(i,k,j) = 0.
555                 extaerlw6(i,k,j) = 0.
556                 extaerlw7(i,k,j) = 0.
557                 extaerlw8(i,k,j) = 0.
558                 extaerlw9(i,k,j) = 0.
559                 extaerlw10(i,k,j) = 0.
560                 extaerlw11(i,k,j) = 0.
561                 extaerlw12(i,k,j) = 0.
562                 extaerlw13(i,k,j) = 0.
563                 extaerlw14(i,k,j) = 0.
564                 extaerlw15(i,k,j) = 0.
565                 extaerlw16(i,k,j) = 0.
566                 tauaerlw1(i,k,j) = 0.
567                 tauaerlw2(i,k,j) = 0.
568                 tauaerlw3(i,k,j) = 0.
569                 tauaerlw4(i,k,j) = 0.
570                 tauaerlw5(i,k,j) = 0.
571                 tauaerlw6(i,k,j) = 0.
572                 tauaerlw7(i,k,j) = 0.
573                 tauaerlw8(i,k,j) = 0.
574                 tauaerlw9(i,k,j) = 0.
575                 tauaerlw10(i,k,j) = 0.
576                 tauaerlw11(i,k,j) = 0.
577                 tauaerlw12(i,k,j) = 0.
578                 tauaerlw13(i,k,j) = 0.
579                 tauaerlw14(i,k,j) = 0.
580                 tauaerlw15(i,k,j) = 0.
581                 tauaerlw16(i,k,j) = 0.
582              end do
583           end do
584        end do
585        do l=1,num_emis_ant
586        do j=jts,jte
587           do k=1,kemit
588              do i=its,ite
589                 emis_ant(i,k,j,l) = 0.
590              end do
591           end do
592        end do
593        end do
594     end if
595 ! Read VPRM parameters and put them into wrfinput file
596 !     for diagnostics purposes only!
597 !write(6,*)'config_flags%chem_opt, CO2_TRACER', config_flags%chem_opt, CO2_TRACER
599 if  ( config_flags%chem_opt==CO2_TRACER .OR. config_flags%chem_opt==GHG_TRACER )   then
600      call VPRM_par_initialize ( grid%rad_vprm, grid%lambda_vprm, grid%alpha_vprm, grid%resp_vprm, config_flags )
601      call wrf_message("Warning: the VPRM parameters may need to be optimized depending on the season, year and region!")
602      call wrf_message("The parameters provided here should be used for testing purposes only!")
603 end if
604 ! Read parameters for the termite model and put them into wrfinput file
605 if (config_flags%chem_opt .EQ. GHG_TRACER) then
606    CALL termite_initialize(grid%biomt_par,grid%emit_par,config_flags)
607 end if
608 !--------------------------------------------------------------------------------------------------------
610 !   RETURN IF CHEMISTRY IS NOT RUNNING
611     IF ( config_flags%chem_opt == 0 ) RETURN
613 ! Set the num_vert_mix variable if using ACM
614     num_vert_mix = 0
615     IF ( config_flags%bl_pbl_physics == ACMPBLSCHEME .or. config_flags%bl_pbl_physics == MYNNPBLSCHEME) THEN
616          mix_select: SELECT CASE(config_flags%chem_opt)
617          CASE (RADM2SORG_AQ, RADM2SORG_AQCHEM, RACMSORG_AQ, RACMSORG_AQCHEM_KPP, CBMZ_MOSAIC_4BIN_AQ, CBMZ_MOSAIC_8BIN_AQ, CBMZSORG_AQ, &
618               CBMZ_MOSAIC_DMS_4BIN, CBMZ_MOSAIC_DMS_8BIN, CBMZ_MOSAIC_DMS_4BIN_AQ, CBMZ_MOSAIC_DMS_8BIN_AQ, &
619               CRI_MOSAIC_8BIN_AQ_KPP, CRI_MOSAIC_4BIN_AQ_KPP)
620             num_vert_mix = numgas
621          CASE DEFAULT
622             IF (config_flags%mynn_chem_vertmx) THEN
623                num_vert_mix = num_chem
624             ELSE
625                num_vert_mix = 0
626             ENDIF
627          END SELECT mix_select
628         if(num_vert_mix .gt. config_flags%ndepvel) then
629          write(message_txt,'(A30,2(I8,2x))') 'chem_init: num_vert_mix and ndepvel ',num_vert_mix,config_flags%ndepvel
630          call wrf_message( trim(message_txt) )
631         call wrf_error_fatal(" ERROR: CHEM_INIT: num_vert_mix > ndepvel ")
632         endif
633     ENDIF
635     stepbioe=nint(bioemdt*60./dt)
636     stepphot=nint(photdt*60./dt)
637     stepchem=nint(chemdt*60./dt)
638   ! stepfirepl=plumerisefire_frq*60/nint(dt)
639     stepfirepl=nint(plumerisefire_frq*60/dt)
640     stepbioe=max(stepbioe,1)
641     stepphot=max(stepphot,1)
642     stepchem=max(stepchem,1)
643     stepfirepl=max(stepfirepl,1)
644     call wrf_debug( 15, 'in chem_init' )
645 !   print *,'stepbioe,stepphot,stepchem,stepfirepl',stepbioe,stepphot,stepchem,stepfirepl
647 ! Setup the cross reference mappings between the default profiles and
648 ! the gas mechanism species (wig, 2-May-2007)
650    call setup_gasprofile_maps(config_flags%chem_opt,numgas)
652 ! An alternative ozone profile option
654     if ( (config_flags%gas_bc_opt == GAS_BC_PNNL) .or.   &
655          (config_flags%gas_ic_opt == GAS_IC_PNNL) ) then
656        call gasprofile_init_pnnl( config_flags%chem_opt )
657     end if
659 ! we are doing initialization here, first photolysis
661    phot_select: SELECT CASE(config_flags%phot_opt)
662      CASE (PHOTMAD)
663      CALL wrf_debug(00,'call madronich phot initialization')
664        call photmad_init(z_at_w,aerwrf,g,                            &
665                ids,ide, jds,jde, kds,kde,                            &
666                ims,ime, jms,jme, kms,kme,                            &
667                its,ite, jts,jte, kts,kte                             )
668       CASE (FTUV)
669         CALL wrf_debug(00,'call ftuv phot initialization')
671         call ftuv_init( id, its, ite, jts, jte, kte, &
672                   ide, jde, config_flags,config_flags%num_land_cat,mminlu_loc )
673      CASE (TUV)
674        if( config_flags%cld_od_opt > 3 .or. config_flags%cld_od_opt < 1 ) then
675          call wrf_error_fatal("cld_od_opt must be {1,2,3}")
676        endif
677        if( config_flags%pht_cldfrc_opt > 2 .or. config_flags%pht_cldfrc_opt < 1 ) then
678          call wrf_error_fatal("pht_cldfrc_opt must be {1,2}")
679        endif
680        write(message_txt,'(''chemics_init('',i2.2,''): call tuv phot initialization'')') id
681        CALL wrf_debug( 0,trim(message_txt) )
682        call tuv_init( id, config_flags, z_at_w, aerwrf, g, &
683                       grid%af_lambda_start, grid%af_lambda_end,grid%lambda_cutoff,&
684                       ids,ide, jds,jde, kds,kde, &
685                       ims,ime, jms,jme, kms,kme, &
686                       its,ite, jts,jte, kts,kte  )
687 !---
689   END SELECT phot_select
691 ! initialization for aerosols
694 ! Technically, we are doing a no-no here. The array is_aerosol is being
695 ! "re-allocated" and overwritten by each domain. Therefore, if different
696 ! chemistry settings are used for each nest level, we will get errors. I
697 ! have a feeling that this is not the only place that will have a problem
698 ! though so I am not worrying about it for now. The dilemma is that we
699 ! cannot declare and allocate is_aerosol via the registry because the
700 ! number of aerosols is not known at compile time. I have not figured out
701 ! a way to allocate a separate array for each nest outside of the
702 ! regiistry. For now, we will do a simple check to trap a change in the
703 ! desired size of num_chem and assume that if the size is the same, the
704 ! species will be too.  wig, 24-Oct-2005
705      if( .not.allocated(is_aerosol) ) then
706         allocate (is_aerosol(num_chem))
707      else
708         if( size(is_aerosol) /= num_chem ) &
709              call wrf_error_fatal("The number of chemistry species has changed between nests. Are you trying to mix chem_opt settings between nests? Shame on you!")
710      end if
712 !!! TUCCELLA
713    if( .NOT. config_flags%restart ) then
714    kpp_select: SELECT CASE(config_flags%chem_opt)
715 CASE(GOCARTRACM_KPP,RACM_KPP,RACMPM_KPP,RACMSORG_KPP,RACM_MIM_KPP,RACM_ESRLSORG_KPP,&
716            RACMSORG_AQCHEM_KPP,RACM_ESRLSORG_AQCHEM_KPP,RACM_SOA_VBS_KPP,RACM_SOA_VBS_AQCHEM_KPP)
717         if(config_flags%chem_in_opt == 0 )then
718           do j=jts,jte
719              do k=kts,kte
720                 do i=its,ite
721                    chem(i,k,j,p_co2)=400. 
722                    chem(i,k,j,p_ch4)=1.7
723                    chem(i,k,j,p_ete)=chem(i,k,j,p_olt)
724                    chem(i,k,j,p_ete)=epsilc
725                    chem(i,k,j,p_udd)=chem(i,k,j,p_ete)
726                    chem(i,k,j,p_hket)=chem(i,k,j,p_ete)
727                    chem(i,k,j,p_api)=chem(i,k,j,p_ete)
728                    chem(i,k,j,p_lim)=chem(i,k,j,p_ete)
729                    chem(i,k,j,p_dien)=chem(i,k,j,p_ete)
730                    chem(i,k,j,p_macr)=chem(i,k,j,p_ete)
731                 enddo
732              enddo
733           enddo
734         endif
735      CASE (RADM2_KPP,RADM2SORG_KPP,GOCARTRADM2,SAPRC99_KPP)
736         if(config_flags%chem_in_opt == 0 )then
737           do j=jts,jte
738              do k=kts,kte
739                 do i=its,ite
740                    chem(i,k,j,p_co2)=380.
741                    chem(i,k,j,p_ch4)=1.7
742                 enddo
743              enddo
744           enddo
745         endif
746         CASE (CBMZ_BB_KPP)
747         if(config_flags%chem_in_opt == 0 )then
748           do j=jts,jte
749              do k=kts,kte
750                 do i=its,ite
751                    chem(i,k,j,p_ch4)=1.7
752                 enddo
753              enddo
754           enddo
755         endif
756       CASE (CB05_SORG_AQ_KPP)
757         do j=jts,jte
758            do k=kts,kte
759               do i=its,ite
760                  chem(i,k,j,p_apin)=chem(i,k,j,p_terp) * 0.248   ! 0.0885
761                  chem(i,k,j,p_bpin)=chem(i,k,j,p_terp) * 0.294   ! 0.069
762                  chem(i,k,j,p_lim) =chem(i,k,j,p_terp) * 0.164   ! 0.135
763                  chem(i,k,j,p_ter) =chem(i,k,j,p_terp) * 0.006   ! 0.158
764                  chem(i,k,j,p_oci) =chem(i,k,j,p_terp) * 0.213   ! 0.217
765                  chem(i,k,j,p_hum) =chem(i,k,j,p_terp) * 0.074   ! 0.331
766                  chem(i,k,j,p_h2)  = 0.5
767                  chem(i,k,j,p_ch4) =1.7
768               enddo
769            enddo
770         enddo
771       CASE (CB05_SORG_VBS_AQ_KPP)
772         do j=jts,jte
773            do k=kts,kte
774               do i=its,ite
775                  chem(i,k,j,p_apin)=chem(i,k,j,p_terp) * 0.248   ! 0.0885
776                  chem(i,k,j,p_bpin)=chem(i,k,j,p_terp) * 0.294   ! 0.069
777                  chem(i,k,j,p_lim) =chem(i,k,j,p_terp) * 0.164   ! 0.135
778                  chem(i,k,j,p_ter) =chem(i,k,j,p_terp) * 0.006   ! 0.158
779                  chem(i,k,j,p_oci) =chem(i,k,j,p_terp) * 0.213   ! 0.217
780                  chem(i,k,j,p_hum) =chem(i,k,j,p_terp) * 0.074   ! 0.331
781                  chem(i,k,j,p_h2)  = 0.5
782                  chem(i,k,j,p_ch4) =1.7
783               enddo
784            enddo
785         enddo
786         CASE (CBMZ_MOSAIC_KPP)
787         if(config_flags%chem_in_opt == 0 )then
788           do j=jts,jte
789              do k=kts,kte
790                 do i=its,ite
791                    chem(i,k,j,p_ch4)=1.7
792                    chem(i,k,j,p_aro1)=0.0
793                    chem(i,k,j,p_aro2)=0.0
794                    chem(i,k,j,p_alk1)=0.0
795                    chem(i,k,j,p_ole1)=0.0
796                    chem(i,k,j,p_api1)=0.0
797                    chem(i,k,j,p_api2)=0.0
798                    chem(i,k,j,p_lim1)=0.0
799                    chem(i,k,j,p_lim2)=0.0
800                    chem(i,k,j,p_api)=0.0
801                    chem(i,k,j,p_lim)=0.0
802                 enddo
803              enddo
804           enddo
805         endif 
806         CASE (MOZART_MOSAIC_4BIN_KPP, MOZART_MOSAIC_4BIN_AQ_KPP)
807         grid%vbs_nbin=0
808         if (config_flags%chem_opt == MOZART_MOSAIC_4BIN_AQ_KPP) then
809           grid%vbs_nbin=4
810         endif
811         if(config_flags%chem_in_opt == 0 )then
812           do j=jts,jte
813              do k=kts,kte
814                 do i=its,ite
815           !         chem(i,k,j,p_co2)=380.
816           !         chem(i,k,j,p_ch4)=1.7
817          if (p_ant1_c.gt.1)    chem(i,k,j,p_ant1_c)=0.0
818          if (p_ant2_c.gt.1)    chem(i,k,j,p_ant2_c)=0.0
819          if (p_ant3_c.gt.1)    chem(i,k,j,p_ant3_c)=0.0
820          if (p_ant4_c.gt.1)    chem(i,k,j,p_ant4_c)=0.0
821          if (p_ant1_o.gt.1)    chem(i,k,j,p_ant1_o)=0.0
822          if (p_ant2_o.gt.1)    chem(i,k,j,p_ant2_o)=0.0
823          if (p_ant3_o.gt.1)    chem(i,k,j,p_ant3_o)=0.0
824          if (p_ant4_o.gt.1)    chem(i,k,j,p_ant4_o)=0.0
825          if (p_biog1_c.gt.1)    chem(i,k,j,p_biog1_c)=0.0
826          if (p_biog2_c.gt.1)    chem(i,k,j,p_biog2_c)=0.0
827          if (p_biog3_c.gt.1)    chem(i,k,j,p_biog3_c)=0.0
828          if (p_biog4_c.gt.1)    chem(i,k,j,p_biog4_c)=0.0
829          if (p_biog1_o.gt.1)    chem(i,k,j,p_biog1_o)=0.0
830          if (p_biog2_o.gt.1)    chem(i,k,j,p_biog2_o)=0.0
831          if (p_biog3_o.gt.1)    chem(i,k,j,p_biog3_o)=0.0
832          if (p_biog4_o.gt.1)    chem(i,k,j,p_biog4_o)=0.0
833          if (p_smpa.gt.1)       chem(i,k,j,p_smpa)=0.0
834          if (p_smpbb.gt.1)       chem(i,k,j,p_smpbb)=0.0
836          if (p_cvasoaX.gt.1)    chem(i,k,j,p_cvasoaX)=0.0
837          if (p_cvasoa1.gt.1)    chem(i,k,j,p_cvasoa1)=0.0
838          if (p_cvasoa2.gt.1)    chem(i,k,j,p_cvasoa2)=0.0
839          if (p_cvasoa3.gt.1)    chem(i,k,j,p_cvasoa3)=0.0
840          if (p_cvasoa4.gt.1)    chem(i,k,j,p_cvasoa4)=0.0
841          if (p_cvbsoaX.gt.1)    chem(i,k,j,p_cvbsoaX)=0.0
842          if (p_cvbsoa1.gt.1)    chem(i,k,j,p_cvbsoa1)=0.0
843          if (p_cvbsoa2.gt.1)    chem(i,k,j,p_cvbsoa2)=0.0
844          if (p_cvbsoa3.gt.1)    chem(i,k,j,p_cvbsoa3)=0.0
845          if (p_cvbsoa4.gt.1)    chem(i,k,j,p_cvbsoa4)=0.0
847          if (p_asoaX_a01.gt.1)    chem(i,k,j,p_asoaX_a01)=0.0
848          if (p_asoa1_a01.gt.1)    chem(i,k,j,p_asoa1_a01)=0.0
849          if (p_asoa2_a01.gt.1)    chem(i,k,j,p_asoa2_a01)=0.0
850          if (p_asoa3_a01.gt.1)    chem(i,k,j,p_asoa3_a01)=0.0
851          if (p_asoa4_a01.gt.1)    chem(i,k,j,p_asoa4_a01)=0.0
852          if (p_bsoaX_a01.gt.1)    chem(i,k,j,p_bsoaX_a01)=0.0
853          if (p_bsoa1_a01.gt.1)    chem(i,k,j,p_bsoa1_a01)=0.0
854          if (p_bsoa2_a01.gt.1)    chem(i,k,j,p_bsoa2_a01)=0.0
855          if (p_bsoa3_a01.gt.1)    chem(i,k,j,p_bsoa3_a01)=0.0
856          if (p_bsoa4_a01.gt.1)    chem(i,k,j,p_bsoa4_a01)=0.0
858          if (p_asoaX_a02.gt.1)    chem(i,k,j,p_asoaX_a02)=0.0
859          if (p_asoa1_a02.gt.1)    chem(i,k,j,p_asoa1_a02)=0.0
860          if (p_asoa2_a02.gt.1)    chem(i,k,j,p_asoa2_a02)=0.0
861          if (p_asoa3_a02.gt.1)    chem(i,k,j,p_asoa3_a02)=0.0
862          if (p_asoa4_a02.gt.1)    chem(i,k,j,p_asoa4_a02)=0.0
863          if (p_bsoaX_a02.gt.1)    chem(i,k,j,p_bsoaX_a02)=0.0
864          if (p_bsoa1_a02.gt.1)    chem(i,k,j,p_bsoa1_a02)=0.0
865          if (p_bsoa2_a02.gt.1)    chem(i,k,j,p_bsoa2_a02)=0.0
866          if (p_bsoa3_a02.gt.1)    chem(i,k,j,p_bsoa3_a02)=0.0
867          if (p_bsoa4_a02.gt.1)    chem(i,k,j,p_bsoa4_a02)=0.0
869          if (p_asoaX_a03.gt.1)    chem(i,k,j,p_asoaX_a03)=0.0
870          if (p_asoa1_a03.gt.1)    chem(i,k,j,p_asoa1_a03)=0.0
871          if (p_asoa2_a03.gt.1)    chem(i,k,j,p_asoa2_a03)=0.0
872          if (p_asoa3_a03.gt.1)    chem(i,k,j,p_asoa3_a03)=0.0
873          if (p_asoa4_a03.gt.1)    chem(i,k,j,p_asoa4_a03)=0.0
874          if (p_bsoaX_a03.gt.1)    chem(i,k,j,p_bsoaX_a03)=0.0
875          if (p_bsoa1_a03.gt.1)    chem(i,k,j,p_bsoa1_a03)=0.0
876          if (p_bsoa2_a03.gt.1)    chem(i,k,j,p_bsoa2_a03)=0.0
877          if (p_bsoa3_a03.gt.1)    chem(i,k,j,p_bsoa3_a03)=0.0
878          if (p_bsoa4_a03.gt.1)    chem(i,k,j,p_bsoa4_a03)=0.0
880          if (p_asoaX_a04.gt.1)    chem(i,k,j,p_asoaX_a04)=0.0
881          if (p_asoa1_a04.gt.1)    chem(i,k,j,p_asoa1_a04)=0.0
882          if (p_asoa2_a04.gt.1)    chem(i,k,j,p_asoa2_a04)=0.0
883          if (p_asoa3_a04.gt.1)    chem(i,k,j,p_asoa3_a04)=0.0
884          if (p_asoa4_a04.gt.1)    chem(i,k,j,p_asoa4_a04)=0.0
885          if (p_bsoaX_a04.gt.1)    chem(i,k,j,p_bsoaX_a04)=0.0
886          if (p_bsoa1_a04.gt.1)    chem(i,k,j,p_bsoa1_a04)=0.0
887          if (p_bsoa2_a04.gt.1)    chem(i,k,j,p_bsoa2_a04)=0.0
888          if (p_bsoa3_a04.gt.1)    chem(i,k,j,p_bsoa3_a04)=0.0
889          if (p_bsoa4_a04.gt.1)    chem(i,k,j,p_bsoa4_a04)=0.0
891          if (p_glysoa_r1_a01.gt.1)  chem(i,k,j,p_glysoa_r1_a01)=0.0
892          if (p_glysoa_r2_a01.gt.1)  chem(i,k,j,p_glysoa_r2_a01)=0.0
893          if (p_glysoa_oh_a01.gt.1) chem(i,k,j,p_glysoa_oh_a01)=0.0
894          if (p_glysoa_nh4_a01.gt.1) chem(i,k,j,p_glysoa_nh4_a01)=0.0
895          if (p_glysoa_sfc_a01.gt.1) chem(i,k,j,p_glysoa_sfc_a01)=0.0
897          if (p_glysoa_r1_a02.gt.1) chem(i,k,j,p_glysoa_r1_a02)=0.0
898          if (p_glysoa_r2_a02.gt.1) chem(i,k,j,p_glysoa_r2_a02)=0.0
899          if (p_glysoa_oh_a02.gt.1) chem(i,k,j,p_glysoa_oh_a02)=0.0
900          if (p_glysoa_nh4_a02.gt.1) chem(i,k,j,p_glysoa_nh4_a02)=0.0
901          if (p_glysoa_sfc_a02.gt.1) chem(i,k,j,p_glysoa_sfc_a02)=0.0
903          if (p_glysoa_r1_a03.gt.1) chem(i,k,j,p_glysoa_r1_a03)=0.0
904          if (p_glysoa_r2_a03.gt.1) chem(i,k,j,p_glysoa_r2_a03)=0.0
905          if (p_glysoa_oh_a03.gt.1) chem(i,k,j,p_glysoa_oh_a03)=0.0
906          if (p_glysoa_nh4_a03.gt.1) chem(i,k,j,p_glysoa_nh4_a03)=0.0
907          if (p_glysoa_sfc_a03.gt.1) chem(i,k,j,p_glysoa_sfc_a03)=0.0
909          if (p_glysoa_r1_a04.gt.1) chem(i,k,j,p_glysoa_r1_a04)=0.0
910          if (p_glysoa_r2_a04.gt.1) chem(i,k,j,p_glysoa_r2_a04)=0.0
911          if (p_glysoa_oh_a04.gt.1) chem(i,k,j,p_glysoa_oh_a04)=0.0
912          if (p_glysoa_nh4_a04.gt.1) chem(i,k,j,p_glysoa_nh4_a04)=0.0
913          if (p_glysoa_sfc_a04.gt.1) chem(i,k,j,p_glysoa_sfc_a04)=0.0
915 !         chem(i,k,j,p_voca)=0.0
916 !         chem(i,k,j,p_vocbb)=0.0
917          if (p_voca.gt.1) chem(i,k,j,p_voca)=0.0
918          if (p_vocbb.gt.1) chem(i,k,j,p_vocbb)=0.0
920          if (p_smpa_a01.gt.1)       chem(i,k,j,p_smpa_a01)=1.e-16
921          if (p_smpa_a02.gt.1)       chem(i,k,j,p_smpa_a02)=1.e-16
922          if (p_smpa_a03.gt.1)       chem(i,k,j,p_smpa_a03)=1.e-16
923          if (p_smpa_a04.gt.1)       chem(i,k,j,p_smpa_a04)=1.e-16
924          
925          if (p_smpbb_a01.gt.1)       chem(i,k,j,p_smpbb_a01)=1.e-16
926          if (p_smpbb_a02.gt.1)       chem(i,k,j,p_smpbb_a02)=1.e-16
927          if (p_smpbb_a03.gt.1)       chem(i,k,j,p_smpbb_a03)=1.e-16
928          if (p_smpbb_a04.gt.1)       chem(i,k,j,p_smpbb_a04)=1.e-16
930          if (p_nh4_a01.gt.1)       chem(i,k,j,p_nh4_a01)=1.e-16
931          if (p_nh4_a02.gt.1)       chem(i,k,j,p_nh4_a02)=1.e-16
932          if (p_nh4_a03.gt.1)       chem(i,k,j,p_nh4_a03)=1.e-16
933          if (p_nh4_a04.gt.1)       chem(i,k,j,p_nh4_a04)=1.e-16
936                 enddo
937              enddo
938           enddo
939         endif
943         CASE (SAPRC99_MOSAIC_4BIN_VBS2_KPP)
944         if(config_flags%chem_in_opt == 0 )then
945                    grid%vbs_nbin(1)=2
946           do j=jts,jte
947              do k=kts,kte
948                 do i=its,ite
949                    chem(i,k,j,p_co2)=380.
950                    chem(i,k,j,p_ch4)=1.7
951          if (p_pcg1_b_c.gt.1) chem(i,k,j,p_pcg1_b_c)=0.00
952          if (p_pcg2_b_c.gt.1) chem(i,k,j,p_pcg2_b_c)=0.00
953          if (p_pcg3_b_c.gt.1) chem(i,k,j,p_pcg3_b_c)=0.00
954          if (p_pcg4_b_c.gt.1) chem(i,k,j,p_pcg4_b_c)=0.00
955          if (p_pcg5_b_c.gt.1) chem(i,k,j,p_pcg5_b_c)=0.00
956          if (p_pcg6_b_c.gt.1) chem(i,k,j,p_pcg6_b_c)=0.00
957          if (p_pcg7_b_c.gt.1) chem(i,k,j,p_pcg7_b_c)=0.00
958          if (p_pcg8_b_c.gt.1) chem(i,k,j,p_pcg8_b_c)=0.00
959          if (p_pcg9_b_c.gt.1) chem(i,k,j,p_pcg9_b_c)=0.00
960          if (p_pcg1_b_o.gt.1) chem(i,k,j,p_pcg1_b_o)=0.00
961          if (p_pcg2_b_o.gt.1) chem(i,k,j,p_pcg2_b_o)=0.00
962          if (p_pcg3_b_o.gt.1) chem(i,k,j,p_pcg3_b_o)=0.00
963          if (p_pcg4_b_o.gt.1) chem(i,k,j,p_pcg4_b_o)=0.00
964          if (p_pcg5_b_o.gt.1) chem(i,k,j,p_pcg5_b_o)=0.00
965          if (p_pcg6_b_o.gt.1) chem(i,k,j,p_pcg6_b_o)=0.00
966          if (p_pcg7_b_o.gt.1) chem(i,k,j,p_pcg7_b_o)=0.00
967          if (p_pcg8_b_o.gt.1) chem(i,k,j,p_pcg8_b_o)=0.00
968          if (p_pcg9_b_o.gt.1) chem(i,k,j,p_pcg9_b_o)=0.00
969          if (p_opcg1_b_c.gt.1) chem(i,k,j,p_opcg1_b_c)=0.00
970          if (p_opcg2_b_c.gt.1) chem(i,k,j,p_opcg2_b_c)=0.00
971          if (p_opcg3_b_c.gt.1) chem(i,k,j,p_opcg3_b_c)=0.00
972          if (p_opcg4_b_c.gt.1) chem(i,k,j,p_opcg4_b_c)=0.00
973          if (p_opcg5_b_c.gt.1) chem(i,k,j,p_opcg5_b_c)=0.00
974          if (p_opcg6_b_c.gt.1) chem(i,k,j,p_opcg6_b_c)=0.00
975          if (p_opcg7_b_c.gt.1) chem(i,k,j,p_opcg7_b_c)=0.00
976          if (p_opcg8_b_c.gt.1) chem(i,k,j,p_opcg8_b_c)=0.00
977          if (p_opcg1_b_o.gt.1) chem(i,k,j,p_opcg1_b_o)=0.00
978          if (p_opcg2_b_o.gt.1) chem(i,k,j,p_opcg2_b_o)=0.00
979          if (p_opcg3_b_o.gt.1) chem(i,k,j,p_opcg3_b_o)=0.00
980          if (p_opcg4_b_o.gt.1) chem(i,k,j,p_opcg4_b_o)=0.00
981          if (p_opcg5_b_o.gt.1) chem(i,k,j,p_opcg5_b_o)=0.00
982          if (p_opcg6_b_o.gt.1) chem(i,k,j,p_opcg6_b_o)=0.00
983          if (p_opcg7_b_o.gt.1) chem(i,k,j,p_opcg7_b_o)=0.00
984          if (p_opcg8_b_o.gt.1) chem(i,k,j,p_opcg8_b_o)=0.00
985          if (p_pcg1_f_c.gt.1) chem(i,k,j,p_pcg1_f_c)=0.00
986          if (p_pcg2_f_c.gt.1) chem(i,k,j,p_pcg2_f_c)=0.00
987          if (p_pcg3_f_c.gt.1) chem(i,k,j,p_pcg3_f_c)=0.00
988          if (p_pcg4_f_c.gt.1) chem(i,k,j,p_pcg4_f_c)=0.00
989          if (p_pcg5_f_c.gt.1) chem(i,k,j,p_pcg5_f_c)=0.00
990          if (p_pcg6_f_c.gt.1) chem(i,k,j,p_pcg6_f_c)=0.00
991          if (p_pcg7_f_c.gt.1) chem(i,k,j,p_pcg7_f_c)=0.00
992          if (p_pcg8_f_c.gt.1) chem(i,k,j,p_pcg8_f_c)=0.00
993          if (p_pcg9_f_c.gt.1) chem(i,k,j,p_pcg9_f_c)=0.00
994          if (p_pcg1_f_o.gt.1) chem(i,k,j,p_pcg1_f_o)=0.00
995          if (p_pcg2_f_o.gt.1) chem(i,k,j,p_pcg2_f_o)=0.00
996          if (p_pcg3_f_o.gt.1) chem(i,k,j,p_pcg3_f_o)=0.00
997          if (p_pcg4_f_o.gt.1) chem(i,k,j,p_pcg4_f_o)=0.00
998          if (p_pcg5_f_o.gt.1) chem(i,k,j,p_pcg5_f_o)=0.00
999          if (p_pcg6_f_o.gt.1) chem(i,k,j,p_pcg6_f_o)=0.00
1000          if (p_pcg7_f_o.gt.1) chem(i,k,j,p_pcg7_f_o)=0.00
1001          if (p_pcg8_f_o.gt.1) chem(i,k,j,p_pcg8_f_o)=0.00
1002          if (p_pcg9_f_o.gt.1) chem(i,k,j,p_pcg9_f_o)=0.00
1003          if (p_opcg1_f_c.gt.1) chem(i,k,j,p_opcg1_f_c)=0.00
1004          if (p_opcg2_f_c.gt.1) chem(i,k,j,p_opcg2_f_c)=0.00
1005          if (p_opcg3_f_c.gt.1) chem(i,k,j,p_opcg3_f_c)=0.00
1006          if (p_opcg4_f_c.gt.1) chem(i,k,j,p_opcg4_f_c)=0.00
1007          if (p_opcg5_f_c.gt.1) chem(i,k,j,p_opcg5_f_c)=0.00
1008          if (p_opcg6_f_c.gt.1) chem(i,k,j,p_opcg6_f_c)=0.00
1009          if (p_opcg7_f_c.gt.1) chem(i,k,j,p_opcg7_f_c)=0.00
1010          if (p_opcg8_f_c.gt.1) chem(i,k,j,p_opcg8_f_c)=0.00
1011          if (p_opcg1_f_o.gt.1) chem(i,k,j,p_opcg1_f_o)=0.00
1012          if (p_opcg2_f_o.gt.1) chem(i,k,j,p_opcg2_f_o)=0.00
1013          if (p_opcg3_f_o.gt.1) chem(i,k,j,p_opcg3_f_o)=0.00
1014          if (p_opcg4_f_o.gt.1) chem(i,k,j,p_opcg4_f_o)=0.00
1015          if (p_opcg5_f_o.gt.1) chem(i,k,j,p_opcg5_f_o)=0.00
1016          if (p_opcg6_f_o.gt.1) chem(i,k,j,p_opcg6_f_o)=0.00
1017          if (p_opcg7_f_o.gt.1) chem(i,k,j,p_opcg7_f_o)=0.00
1018          if (p_opcg8_f_o.gt.1) chem(i,k,j,p_opcg8_f_o)=0.00
1019          if (p_ant1_c.gt.1)    chem(i,k,j,p_ant1_c)=0.0
1020          if (p_ant2_c.gt.1)    chem(i,k,j,p_ant2_c)=0.0
1021          if (p_ant3_c.gt.1)    chem(i,k,j,p_ant3_c)=0.0
1022          if (p_ant4_c.gt.1)    chem(i,k,j,p_ant4_c)=0.0
1023          if (p_ant1_o.gt.1)    chem(i,k,j,p_ant1_o)=0.0
1024          if (p_ant2_o.gt.1)    chem(i,k,j,p_ant2_o)=0.0
1025          if (p_ant3_o.gt.1)    chem(i,k,j,p_ant3_o)=0.0
1026          if (p_ant4_o.gt.1)    chem(i,k,j,p_ant4_o)=0.0
1027          if (p_biog1_c.gt.1)    chem(i,k,j,p_biog1_c)=0.0
1028          if (p_biog2_c.gt.1)    chem(i,k,j,p_biog2_c)=0.0
1029          if (p_biog3_c.gt.1)    chem(i,k,j,p_biog3_c)=0.0
1030          if (p_biog4_c.gt.1)    chem(i,k,j,p_biog4_c)=0.0
1031          if (p_biog1_o.gt.1)    chem(i,k,j,p_biog1_o)=0.0
1032          if (p_biog2_o.gt.1)    chem(i,k,j,p_biog2_o)=0.0
1033          if (p_biog3_o.gt.1)    chem(i,k,j,p_biog3_o)=0.0
1034          if (p_biog4_o.gt.1)    chem(i,k,j,p_biog4_o)=0.0
1038                 enddo
1039              enddo
1040           enddo
1041        endif
1042        
1043        !BSINGH(04/03/2014): Added 8 bin vbs non-aq pakage
1044     CASE (SAPRC99_MOSAIC_8BIN_VBS2_KPP)
1045        if(config_flags%chem_in_opt == 0 )then
1046           grid%vbs_nbin=2
1047           do j=jts,jte
1048              do k=kts,kte
1049                 do i=its,ite
1050                    chem(i,k,j,p_co2)=370.
1051                    chem(i,k,j,p_ch4)=1.7
1052                    if (p_pcg1_b_c.gt.1) chem(i,k,j,p_pcg1_b_c)=0.00
1053                    if (p_pcg2_b_c.gt.1) chem(i,k,j,p_pcg2_b_c)=0.00
1054                    if (p_pcg3_b_c.gt.1) chem(i,k,j,p_pcg3_b_c)=0.00
1055                    if (p_pcg4_b_c.gt.1) chem(i,k,j,p_pcg4_b_c)=0.00
1056                    if (p_pcg5_b_c.gt.1) chem(i,k,j,p_pcg5_b_c)=0.00
1057                    if (p_pcg6_b_c.gt.1) chem(i,k,j,p_pcg6_b_c)=0.00
1058                    if (p_pcg7_b_c.gt.1) chem(i,k,j,p_pcg7_b_c)=0.00
1059                    if (p_pcg8_b_c.gt.1) chem(i,k,j,p_pcg8_b_c)=0.00
1060                    if (p_pcg9_b_c.gt.1) chem(i,k,j,p_pcg9_b_c)=0.00
1061                    if (p_pcg1_b_o.gt.1) chem(i,k,j,p_pcg1_b_o)=0.00
1062                    if (p_pcg2_b_o.gt.1) chem(i,k,j,p_pcg2_b_o)=0.00
1063                    if (p_pcg3_b_o.gt.1) chem(i,k,j,p_pcg3_b_o)=0.00
1064                    if (p_pcg4_b_o.gt.1) chem(i,k,j,p_pcg4_b_o)=0.00
1065                    if (p_pcg5_b_o.gt.1) chem(i,k,j,p_pcg5_b_o)=0.00
1066                    if (p_pcg6_b_o.gt.1) chem(i,k,j,p_pcg6_b_o)=0.00
1067                    if (p_pcg7_b_o.gt.1) chem(i,k,j,p_pcg7_b_o)=0.00
1068                    if (p_pcg8_b_o.gt.1) chem(i,k,j,p_pcg8_b_o)=0.00
1069                    if (p_pcg9_b_o.gt.1) chem(i,k,j,p_pcg9_b_o)=0.00
1070                    if (p_opcg1_b_c.gt.1) chem(i,k,j,p_opcg1_b_c)=0.00
1071                    if (p_opcg2_b_c.gt.1) chem(i,k,j,p_opcg2_b_c)=0.00
1072                    if (p_opcg3_b_c.gt.1) chem(i,k,j,p_opcg3_b_c)=0.00
1073                    if (p_opcg4_b_c.gt.1) chem(i,k,j,p_opcg4_b_c)=0.00
1074                    if (p_opcg5_b_c.gt.1) chem(i,k,j,p_opcg5_b_c)=0.00
1075                    if (p_opcg6_b_c.gt.1) chem(i,k,j,p_opcg6_b_c)=0.00
1076                    if (p_opcg7_b_c.gt.1) chem(i,k,j,p_opcg7_b_c)=0.00
1077                    if (p_opcg8_b_c.gt.1) chem(i,k,j,p_opcg8_b_c)=0.00
1078                    if (p_opcg1_b_o.gt.1) chem(i,k,j,p_opcg1_b_o)=0.00
1079                    if (p_opcg2_b_o.gt.1) chem(i,k,j,p_opcg2_b_o)=0.00
1080                    if (p_opcg3_b_o.gt.1) chem(i,k,j,p_opcg3_b_o)=0.00
1081                    if (p_opcg4_b_o.gt.1) chem(i,k,j,p_opcg4_b_o)=0.00
1082                    if (p_opcg5_b_o.gt.1) chem(i,k,j,p_opcg5_b_o)=0.00
1083                    if (p_opcg6_b_o.gt.1) chem(i,k,j,p_opcg6_b_o)=0.00
1084                    if (p_opcg7_b_o.gt.1) chem(i,k,j,p_opcg7_b_o)=0.00
1085                    if (p_opcg8_b_o.gt.1) chem(i,k,j,p_opcg8_b_o)=0.00
1086                    if (p_pcg1_f_c.gt.1) chem(i,k,j,p_pcg1_f_c)=0.00
1087                    if (p_pcg2_f_c.gt.1) chem(i,k,j,p_pcg2_f_c)=0.00
1088                    if (p_pcg3_f_c.gt.1) chem(i,k,j,p_pcg3_f_c)=0.00
1089                    if (p_pcg4_f_c.gt.1) chem(i,k,j,p_pcg4_f_c)=0.00
1090                    if (p_pcg5_f_c.gt.1) chem(i,k,j,p_pcg5_f_c)=0.00
1091                    if (p_pcg6_f_c.gt.1) chem(i,k,j,p_pcg6_f_c)=0.00
1092                    if (p_pcg7_f_c.gt.1) chem(i,k,j,p_pcg7_f_c)=0.00
1093                    if (p_pcg8_f_c.gt.1) chem(i,k,j,p_pcg8_f_c)=0.00
1094                    if (p_pcg9_f_c.gt.1) chem(i,k,j,p_pcg9_f_c)=0.00
1095                    if (p_pcg1_f_o.gt.1) chem(i,k,j,p_pcg1_f_o)=0.00
1096                    if (p_pcg2_f_o.gt.1) chem(i,k,j,p_pcg2_f_o)=0.00
1097                    if (p_pcg3_f_o.gt.1) chem(i,k,j,p_pcg3_f_o)=0.00
1098                    if (p_pcg4_f_o.gt.1) chem(i,k,j,p_pcg4_f_o)=0.00
1099                    if (p_pcg5_f_o.gt.1) chem(i,k,j,p_pcg5_f_o)=0.00
1100                    if (p_pcg6_f_o.gt.1) chem(i,k,j,p_pcg6_f_o)=0.00
1101                    if (p_pcg7_f_o.gt.1) chem(i,k,j,p_pcg7_f_o)=0.00
1102                    if (p_pcg8_f_o.gt.1) chem(i,k,j,p_pcg8_f_o)=0.00
1103                    if (p_pcg9_f_o.gt.1) chem(i,k,j,p_pcg9_f_o)=0.00
1104                    if (p_opcg1_f_c.gt.1) chem(i,k,j,p_opcg1_f_c)=0.00
1105                    if (p_opcg2_f_c.gt.1) chem(i,k,j,p_opcg2_f_c)=0.00
1106                    if (p_opcg3_f_c.gt.1) chem(i,k,j,p_opcg3_f_c)=0.00
1107                    if (p_opcg4_f_c.gt.1) chem(i,k,j,p_opcg4_f_c)=0.00
1108                    if (p_opcg5_f_c.gt.1) chem(i,k,j,p_opcg5_f_c)=0.00
1109                    if (p_opcg6_f_c.gt.1) chem(i,k,j,p_opcg6_f_c)=0.00
1110                    if (p_opcg7_f_c.gt.1) chem(i,k,j,p_opcg7_f_c)=0.00
1111                    if (p_opcg8_f_c.gt.1) chem(i,k,j,p_opcg8_f_c)=0.00
1112                    if (p_opcg1_f_o.gt.1) chem(i,k,j,p_opcg1_f_o)=0.00
1113                    if (p_opcg2_f_o.gt.1) chem(i,k,j,p_opcg2_f_o)=0.00
1114                    if (p_opcg3_f_o.gt.1) chem(i,k,j,p_opcg3_f_o)=0.00
1115                    if (p_opcg4_f_o.gt.1) chem(i,k,j,p_opcg4_f_o)=0.00
1116                    if (p_opcg5_f_o.gt.1) chem(i,k,j,p_opcg5_f_o)=0.00
1117                    if (p_opcg6_f_o.gt.1) chem(i,k,j,p_opcg6_f_o)=0.00
1118                    if (p_opcg7_f_o.gt.1) chem(i,k,j,p_opcg7_f_o)=0.00
1119                    if (p_opcg8_f_o.gt.1) chem(i,k,j,p_opcg8_f_o)=0.00
1120                    if (p_ant1_c.gt.1)    chem(i,k,j,p_ant1_c)=0.0
1121                    if (p_ant2_c.gt.1)    chem(i,k,j,p_ant2_c)=0.0
1122                    if (p_ant3_c.gt.1)    chem(i,k,j,p_ant3_c)=0.0
1123                    if (p_ant4_c.gt.1)    chem(i,k,j,p_ant4_c)=0.0
1124                    if (p_ant1_o.gt.1)    chem(i,k,j,p_ant1_o)=0.0
1125                    if (p_ant2_o.gt.1)    chem(i,k,j,p_ant2_o)=0.0
1126                    if (p_ant3_o.gt.1)    chem(i,k,j,p_ant3_o)=0.0
1127                    if (p_ant4_o.gt.1)    chem(i,k,j,p_ant4_o)=0.0
1128                    if (p_biog1_c.gt.1)    chem(i,k,j,p_biog1_c)=0.0
1129                    if (p_biog2_c.gt.1)    chem(i,k,j,p_biog2_c)=0.0
1130                    if (p_biog3_c.gt.1)    chem(i,k,j,p_biog3_c)=0.0
1131                    if (p_biog4_c.gt.1)    chem(i,k,j,p_biog4_c)=0.0
1132                    if (p_biog1_o.gt.1)    chem(i,k,j,p_biog1_o)=0.0
1133                    if (p_biog2_o.gt.1)    chem(i,k,j,p_biog2_o)=0.0
1134                    if (p_biog3_o.gt.1)    chem(i,k,j,p_biog3_o)=0.0
1135                    if (p_biog4_o.gt.1)    chem(i,k,j,p_biog4_o)=0.0
1136                    if (p_bgas.gt.1)    chem(i,k,j,p_bgas)=0.0
1137                    if (p_agas.gt.1)    chem(i,k,j,p_agas)=0.0
1138                    if (p_nume.gt.1)    chem(i,k,j,p_nume)=0.0
1139                    if (p_den.gt.1)    chem(i,k,j,p_den)=0.0
1140                    if (p_psd1.gt.1)    chem(i,k,j,p_psd1)=0.0
1141                    if (p_psd2.gt.1)    chem(i,k,j,p_psd2)=0.0
1142                    if (p_isoprene.gt.1)    chem(i,k,j,p_isoprene)=0.0
1143                    if (p_terp.gt.1)    chem(i,k,j,p_terp)=0.0
1144                    if (p_sesq.gt.1)    chem(i,k,j,p_sesq)=0.0
1145                    if (p_aro1.gt.1)    chem(i,k,j,p_aro1)=0.0
1146                    if (p_aro2.gt.1)    chem(i,k,j,p_aro2)=0.0
1147                    
1148                    
1149                    if (p_pcg1_b_c_a01.gt.1)    chem(i,k,j,p_pcg1_b_c_a01)=0.0
1150                    if (p_pcg1_b_o_a01.gt.1)    chem(i,k,j,p_pcg1_b_o_a01)=0.0
1151                    if (p_opcg1_b_c_a01.gt.1)    chem(i,k,j,p_opcg1_b_c_a01)=0.0
1152                    if (p_opcg1_b_o_a01.gt.1)    chem(i,k,j,p_opcg1_b_o_a01)=0.0
1153                    if (p_pcg1_f_c_a01.gt.1)    chem(i,k,j,p_pcg1_f_c_a01)=0.0
1154                    if (p_pcg1_f_o_a01.gt.1)    chem(i,k,j,p_pcg1_f_o_a01)=0.0
1155                    if (p_opcg1_f_c_a01.gt.1)    chem(i,k,j,p_opcg1_f_c_a01)=0.0
1156                    if (p_opcg1_f_o_a01.gt.1)    chem(i,k,j,p_opcg1_f_o_a01)=0.0
1157                    if (p_ant1_c_a01.gt.1)    chem(i,k,j,p_ant1_c_a01)=0.0
1158                    if (p_biog1_c_a01.gt.1)    chem(i,k,j,p_biog1_c_a01)=0.0
1159                    if (p_ant2_c_a01.gt.1)    chem(i,k,j,p_ant2_c_a01)=0.0
1160                    if (p_biog2_c_a01.gt.1)    chem(i,k,j,p_biog2_c_a01)=0.0
1161                    if (p_biog3_c_a01.gt.1)    chem(i,k,j,p_biog3_c_a01)=0.0
1162                    if (p_biog4_c_a01.gt.1)    chem(i,k,j,p_biog4_c_a01)=0.0
1163                    if (p_biog1_o_a01.gt.1)    chem(i,k,j,p_biog1_o_a01)=0.0
1164                    if (p_biog2_o_a01.gt.1)    chem(i,k,j,p_biog2_o_a01)=0.0
1165                    if (p_ant3_c_a01.gt.1)    chem(i,k,j,p_ant3_c_a01)=0.0
1166                    if (p_ant4_c_a01.gt.1)    chem(i,k,j,p_ant4_c_a01)=0.0
1167                    
1168                    
1169                    if (p_pcg1_b_c_a02.gt.1)    chem(i,k,j,p_pcg1_b_c_a02)=0.0
1170                    if (p_pcg1_b_o_a02.gt.1)    chem(i,k,j,p_pcg1_b_o_a02)=0.0
1171                    if (p_opcg1_b_c_a02.gt.1)    chem(i,k,j,p_opcg1_b_c_a02)=0.0
1172                    if (p_opcg1_b_o_a02.gt.1)    chem(i,k,j,p_opcg1_b_o_a02)=0.0
1173                    if (p_pcg1_f_c_a02.gt.1)    chem(i,k,j,p_pcg1_f_c_a02)=0.0
1174                    if (p_pcg1_f_o_a02.gt.1)    chem(i,k,j,p_pcg1_f_o_a02)=0.0
1175                    if (p_opcg1_f_c_a02.gt.1)    chem(i,k,j,p_opcg1_f_c_a02)=0.0
1176                    if (p_opcg1_f_o_a02.gt.1)    chem(i,k,j,p_opcg1_f_o_a02)=0.0
1177                    if (p_ant1_c_a02.gt.1)    chem(i,k,j,p_ant1_c_a02)=0.0
1178                    if (p_biog1_c_a02.gt.1)    chem(i,k,j,p_biog1_c_a02)=0.0
1179                    if (p_ant2_c_a02.gt.1)    chem(i,k,j,p_ant2_c_a02)=0.0
1180                    if (p_biog2_c_a02.gt.1)    chem(i,k,j,p_biog2_c_a02)=0.0
1181                    if (p_biog3_c_a02.gt.1)    chem(i,k,j,p_biog3_c_a02)=0.0
1182                    if (p_biog4_c_a02.gt.1)    chem(i,k,j,p_biog4_c_a02)=0.0
1183                    if (p_biog1_o_a02.gt.1)    chem(i,k,j,p_biog1_o_a02)=0.0
1184                    if (p_biog2_o_a02.gt.1)    chem(i,k,j,p_biog2_o_a02)=0.0
1185                    if (p_ant3_c_a02.gt.1)    chem(i,k,j,p_ant3_c_a02)=0.0
1186                    if (p_ant4_c_a02.gt.1)    chem(i,k,j,p_ant4_c_a02)=0.0
1187                    
1188                    
1189                    
1190                    if (p_pcg1_b_c_a03.gt.1)    chem(i,k,j,p_pcg1_b_c_a03)=0.0
1191                    if (p_pcg1_b_o_a03.gt.1)    chem(i,k,j,p_pcg1_b_o_a03)=0.0
1192                    if (p_opcg1_b_c_a03.gt.1)    chem(i,k,j,p_opcg1_b_c_a03)=0.0
1193                    if (p_opcg1_b_o_a03.gt.1)    chem(i,k,j,p_opcg1_b_o_a03)=0.0
1194                    if (p_pcg1_f_c_a03.gt.1)    chem(i,k,j,p_pcg1_f_c_a03)=0.0
1195                    if (p_pcg1_f_o_a03.gt.1)    chem(i,k,j,p_pcg1_f_o_a03)=0.0
1196                    if (p_opcg1_f_c_a03.gt.1)    chem(i,k,j,p_opcg1_f_c_a03)=0.0
1197                    if (p_opcg1_f_o_a03.gt.1)    chem(i,k,j,p_opcg1_f_o_a03)=0.0
1198                    if (p_ant1_c_a03.gt.1)    chem(i,k,j,p_ant1_c_a03)=0.0
1199                    if (p_biog1_c_a03.gt.1)    chem(i,k,j,p_biog1_c_a03)=0.0
1200                    if (p_ant2_c_a03.gt.1)    chem(i,k,j,p_ant2_c_a03)=0.0
1201                    if (p_biog2_c_a03.gt.1)    chem(i,k,j,p_biog2_c_a03)=0.0
1202                    if (p_biog3_c_a03.gt.1)    chem(i,k,j,p_biog3_c_a03)=0.0
1203                    if (p_biog4_c_a03.gt.1)    chem(i,k,j,p_biog4_c_a03)=0.0
1204                    if (p_biog1_o_a03.gt.1)    chem(i,k,j,p_biog1_o_a03)=0.0
1205                    if (p_biog2_o_a03.gt.1)    chem(i,k,j,p_biog2_o_a03)=0.0
1206                    if (p_ant3_c_a03.gt.1)    chem(i,k,j,p_ant3_c_a03)=0.0
1207                    if (p_ant4_c_a03.gt.1)    chem(i,k,j,p_ant4_c_a03)=0.0
1208                    
1209                    
1210                    if (p_pcg1_b_c_a04.gt.1)    chem(i,k,j,p_pcg1_b_c_a04)=0.0
1211                    if (p_pcg1_b_o_a04.gt.1)    chem(i,k,j,p_pcg1_b_o_a04)=0.0
1212                    if (p_opcg1_b_c_a04.gt.1)    chem(i,k,j,p_opcg1_b_c_a04)=0.0
1213                    if (p_opcg1_b_o_a04.gt.1)    chem(i,k,j,p_opcg1_b_o_a04)=0.0
1214                    if (p_pcg1_f_c_a04.gt.1)    chem(i,k,j,p_pcg1_f_c_a04)=0.0
1215                    if (p_pcg1_f_o_a04.gt.1)    chem(i,k,j,p_pcg1_f_o_a04)=0.0
1216                    if (p_opcg1_f_c_a04.gt.1)    chem(i,k,j,p_opcg1_f_c_a04)=0.0
1217                    if (p_opcg1_f_o_a04.gt.1)    chem(i,k,j,p_opcg1_f_o_a04)=0.0
1218                    if (p_ant1_c_a04.gt.1)    chem(i,k,j,p_ant1_c_a04)=0.0
1219                    if (p_biog1_c_a04.gt.1)    chem(i,k,j,p_biog1_c_a04)=0.0
1220                    if (p_ant2_c_a04.gt.1)    chem(i,k,j,p_ant2_c_a04)=0.0
1221                    if (p_biog2_c_a04.gt.1)    chem(i,k,j,p_biog2_c_a04)=0.0
1222                    if (p_biog3_c_a04.gt.1)    chem(i,k,j,p_biog3_c_a04)=0.0
1223                    if (p_biog4_c_a04.gt.1)    chem(i,k,j,p_biog4_c_a04)=0.0
1224                    if (p_biog1_o_a04.gt.1)    chem(i,k,j,p_biog1_o_a04)=0.0
1225                    if (p_biog2_o_a04.gt.1)    chem(i,k,j,p_biog2_o_a04)=0.0
1226                    if (p_ant3_c_a04.gt.1)    chem(i,k,j,p_ant3_c_a04)=0.0
1227                    if (p_ant4_c_a04.gt.1)    chem(i,k,j,p_ant4_c_a04)=0.0
1228                    
1229                    
1230                    if (p_pcg1_b_c_a05.gt.1)    chem(i,k,j,p_pcg1_b_c_a05)=0.0
1231                    if (p_pcg1_b_o_a05.gt.1)    chem(i,k,j,p_pcg1_b_o_a05)=0.0
1232                    if (p_opcg1_b_c_a05.gt.1)    chem(i,k,j,p_opcg1_b_c_a05)=0.0
1233                    if (p_opcg1_b_o_a05.gt.1)    chem(i,k,j,p_opcg1_b_o_a05)=0.0
1234                    if (p_pcg1_f_c_a05.gt.1)    chem(i,k,j,p_pcg1_f_c_a05)=0.0
1235                    if (p_pcg1_f_o_a05.gt.1)    chem(i,k,j,p_pcg1_f_o_a05)=0.0
1236                    if (p_opcg1_f_c_a05.gt.1)    chem(i,k,j,p_opcg1_f_c_a05)=0.0
1237                    if (p_opcg1_f_o_a05.gt.1)    chem(i,k,j,p_opcg1_f_o_a05)=0.0
1238                    if (p_ant1_c_a05.gt.1)    chem(i,k,j,p_ant1_c_a05)=0.0
1239                    if (p_biog1_c_a05.gt.1)    chem(i,k,j,p_biog1_c_a05)=0.0
1240                    if (p_ant2_c_a05.gt.1)    chem(i,k,j,p_ant2_c_a05)=0.0
1241                    if (p_biog2_c_a05.gt.1)    chem(i,k,j,p_biog2_c_a05)=0.0
1242                    if (p_biog3_c_a05.gt.1)    chem(i,k,j,p_biog3_c_a05)=0.0
1243                    if (p_biog4_c_a05.gt.1)    chem(i,k,j,p_biog4_c_a05)=0.0
1244                    if (p_biog1_o_a05.gt.1)    chem(i,k,j,p_biog1_o_a05)=0.0
1245                    if (p_biog2_o_a05.gt.1)    chem(i,k,j,p_biog2_o_a05)=0.0
1246                    if (p_ant3_c_a05.gt.1)    chem(i,k,j,p_ant3_c_a05)=0.0
1247                    if (p_ant4_c_a05.gt.1)    chem(i,k,j,p_ant4_c_a05)=0.0
1248                    
1249                    
1250                    if (p_pcg1_b_c_a06.gt.1)    chem(i,k,j,p_pcg1_b_c_a06)=0.0
1251                    if (p_pcg1_b_o_a06.gt.1)    chem(i,k,j,p_pcg1_b_o_a06)=0.0
1252                    if (p_opcg1_b_c_a06.gt.1)    chem(i,k,j,p_opcg1_b_c_a06)=0.0
1253                    if (p_opcg1_b_o_a06.gt.1)    chem(i,k,j,p_opcg1_b_o_a06)=0.0
1254                    if (p_pcg1_f_c_a06.gt.1)    chem(i,k,j,p_pcg1_f_c_a06)=0.0
1255                    if (p_pcg1_f_o_a06.gt.1)    chem(i,k,j,p_pcg1_f_o_a06)=0.0
1256                    if (p_opcg1_f_c_a06.gt.1)    chem(i,k,j,p_opcg1_f_c_a06)=0.0
1257                    if (p_opcg1_f_o_a06.gt.1)    chem(i,k,j,p_opcg1_f_o_a06)=0.0
1258                    if (p_ant1_c_a06.gt.1)    chem(i,k,j,p_ant1_c_a06)=0.0
1259                    if (p_biog1_c_a06.gt.1)    chem(i,k,j,p_biog1_c_a06)=0.0
1260                    if (p_ant2_c_a06.gt.1)    chem(i,k,j,p_ant2_c_a06)=0.0
1261                    if (p_biog2_c_a06.gt.1)    chem(i,k,j,p_biog2_c_a06)=0.0
1262                    if (p_biog3_c_a06.gt.1)    chem(i,k,j,p_biog3_c_a06)=0.0
1263                    if (p_biog4_c_a06.gt.1)    chem(i,k,j,p_biog4_c_a06)=0.0
1264                    if (p_biog1_o_a06.gt.1)    chem(i,k,j,p_biog1_o_a06)=0.0
1265                    if (p_biog2_o_a06.gt.1)    chem(i,k,j,p_biog2_o_a06)=0.0
1266                    if (p_ant3_c_a06.gt.1)    chem(i,k,j,p_ant3_c_a06)=0.0
1267                    if (p_ant4_c_a06.gt.1)    chem(i,k,j,p_ant4_c_a06)=0.0
1268                    
1269                    
1270                    if (p_pcg1_b_c_a07.gt.1)    chem(i,k,j,p_pcg1_b_c_a07)=0.0
1271                    if (p_pcg1_b_o_a07.gt.1)    chem(i,k,j,p_pcg1_b_o_a07)=0.0
1272                    if (p_opcg1_b_c_a07.gt.1)    chem(i,k,j,p_opcg1_b_c_a07)=0.0
1273                    if (p_opcg1_b_o_a07.gt.1)    chem(i,k,j,p_opcg1_b_o_a07)=0.0
1274                    if (p_pcg1_f_c_a07.gt.1)    chem(i,k,j,p_pcg1_f_c_a07)=0.0
1275                    if (p_pcg1_f_o_a07.gt.1)    chem(i,k,j,p_pcg1_f_o_a07)=0.0
1276                    if (p_opcg1_f_c_a07.gt.1)    chem(i,k,j,p_opcg1_f_c_a07)=0.0
1277                    if (p_opcg1_f_o_a07.gt.1)    chem(i,k,j,p_opcg1_f_o_a07)=0.0
1278                    if (p_ant1_c_a07.gt.1)    chem(i,k,j,p_ant1_c_a07)=0.0
1279                    if (p_biog1_c_a07.gt.1)    chem(i,k,j,p_biog1_c_a07)=0.0
1280                    if (p_ant2_c_a07.gt.1)    chem(i,k,j,p_ant2_c_a07)=0.0
1281                    if (p_biog2_c_a07.gt.1)    chem(i,k,j,p_biog2_c_a07)=0.0
1282                    if (p_biog3_c_a07.gt.1)    chem(i,k,j,p_biog3_c_a07)=0.0
1283                    if (p_biog4_c_a07.gt.1)    chem(i,k,j,p_biog4_c_a07)=0.0
1284                    if (p_biog1_o_a07.gt.1)    chem(i,k,j,p_biog1_o_a07)=0.0
1285                    if (p_biog2_o_a07.gt.1)    chem(i,k,j,p_biog2_o_a07)=0.0
1286                    if (p_ant3_c_a07.gt.1)    chem(i,k,j,p_ant3_c_a07)=0.0
1287                    if (p_ant4_c_a07.gt.1)    chem(i,k,j,p_ant4_c_a07)=0.0
1288                    
1289                    
1290                    if (p_pcg1_b_c_a08.gt.1)    chem(i,k,j,p_pcg1_b_c_a08)=0.0
1291                    if (p_pcg1_b_o_a08.gt.1)    chem(i,k,j,p_pcg1_b_o_a08)=0.0
1292                    if (p_opcg1_b_c_a08.gt.1)    chem(i,k,j,p_opcg1_b_c_a08)=0.0
1293                    if (p_opcg1_b_o_a08.gt.1)    chem(i,k,j,p_opcg1_b_o_a08)=0.0
1294                    if (p_pcg1_f_c_a08.gt.1)    chem(i,k,j,p_pcg1_f_c_a08)=0.0
1295                    if (p_pcg1_f_o_a08.gt.1)    chem(i,k,j,p_pcg1_f_o_a08)=0.0
1296                    if (p_opcg1_f_c_a08.gt.1)    chem(i,k,j,p_opcg1_f_c_a08)=0.0
1297                    if (p_opcg1_f_o_a08.gt.1)    chem(i,k,j,p_opcg1_f_o_a08)=0.0
1298                    if (p_ant1_c_a08.gt.1)    chem(i,k,j,p_ant1_c_a08)=0.0
1299                    if (p_biog1_c_a08.gt.1)    chem(i,k,j,p_biog1_c_a08)=0.0
1300                    if (p_ant2_c_a08.gt.1)    chem(i,k,j,p_ant2_c_a08)=0.0
1301                    if (p_biog2_c_a08.gt.1)    chem(i,k,j,p_biog2_c_a08)=0.0
1302                    if (p_biog3_c_a08.gt.1)    chem(i,k,j,p_biog3_c_a08)=0.0
1303                    if (p_biog4_c_a08.gt.1)    chem(i,k,j,p_biog4_c_a08)=0.0
1304                    if (p_biog1_o_a08.gt.1)    chem(i,k,j,p_biog1_o_a08)=0.0
1305                    if (p_biog2_o_a08.gt.1)    chem(i,k,j,p_biog2_o_a08)=0.0
1306                    if (p_ant3_c_a08.gt.1)    chem(i,k,j,p_ant3_c_a08)=0.0
1307                    if (p_ant4_c_a08.gt.1)    chem(i,k,j,p_ant4_c_a08)=0.0
1308                    
1309                    
1310                    
1311                 enddo
1312              enddo
1313           enddo
1314        endif
1315        !BSINGH(04/03/2014):ENDS
1316        
1317        
1318        !BSINGH(12/03/2013) - Added case statement for SAPRC 8 bin 
1319     CASE (SAPRC99_MOSAIC_8BIN_VBS2_AQ_KPP )!BSINGH (12/11/13): Got rid of SAPRC99_MOSAIC_4BIN_VBS2_AQ_KPP and SAPRC99_MOSAIC_4BIN_VBS2_KPP
1320        
1321        if(config_flags%chem_in_opt == 1 ) grid%vbs_nbin=2
1322        if(config_flags%chem_in_opt == 0 )then
1323           grid%vbs_nbin=2
1324           do j=jts,jte
1325              do k=kts,kte
1326                 do i=its,ite
1327                    chem(i,k,j,p_co2)=370.
1328                    chem(i,k,j,p_ch4)=1.7
1329                    if (p_pcg1_b_c.gt.1)        chem(i,k,j,p_pcg1_b_c)=0.00
1330                    if (p_pcg2_b_c.gt.1)        chem(i,k,j,p_pcg2_b_c)=0.00
1331                    if (p_pcg3_b_c.gt.1)        chem(i,k,j,p_pcg3_b_c)=0.00
1332                    if (p_pcg4_b_c.gt.1)        chem(i,k,j,p_pcg4_b_c)=0.00
1333                    if (p_pcg5_b_c.gt.1)        chem(i,k,j,p_pcg5_b_c)=0.00
1334                    if (p_pcg6_b_c.gt.1)        chem(i,k,j,p_pcg6_b_c)=0.00
1335                    if (p_pcg7_b_c.gt.1)        chem(i,k,j,p_pcg7_b_c)=0.00
1336                    if (p_pcg8_b_c.gt.1)        chem(i,k,j,p_pcg8_b_c)=0.00
1337                    if (p_pcg9_b_c.gt.1)        chem(i,k,j,p_pcg9_b_c)=0.00
1338                    if (p_pcg1_b_o.gt.1)        chem(i,k,j,p_pcg1_b_o)=0.00
1339                    if (p_pcg2_b_o.gt.1)        chem(i,k,j,p_pcg2_b_o)=0.00
1340                    if (p_pcg3_b_o.gt.1)        chem(i,k,j,p_pcg3_b_o)=0.00
1341                    if (p_pcg4_b_o.gt.1)        chem(i,k,j,p_pcg4_b_o)=0.00
1342                    if (p_pcg5_b_o.gt.1)        chem(i,k,j,p_pcg5_b_o)=0.00
1343                    if (p_pcg6_b_o.gt.1)        chem(i,k,j,p_pcg6_b_o)=0.00
1344                    if (p_pcg7_b_o.gt.1)        chem(i,k,j,p_pcg7_b_o)=0.00
1345                    if (p_pcg8_b_o.gt.1)        chem(i,k,j,p_pcg8_b_o)=0.00
1346                    if (p_pcg9_b_o.gt.1)        chem(i,k,j,p_pcg9_b_o)=0.00
1347                    if (p_opcg1_b_c.gt.1)       chem(i,k,j,p_opcg1_b_c)=0.00
1348                    if (p_opcg2_b_c.gt.1)       chem(i,k,j,p_opcg2_b_c)=0.00
1349                    if (p_opcg3_b_c.gt.1)       chem(i,k,j,p_opcg3_b_c)=0.00
1350                    if (p_opcg4_b_c.gt.1)       chem(i,k,j,p_opcg4_b_c)=0.00
1351                    if (p_opcg5_b_c.gt.1)       chem(i,k,j,p_opcg5_b_c)=0.00
1352                    if (p_opcg6_b_c.gt.1)       chem(i,k,j,p_opcg6_b_c)=0.00
1353                    if (p_opcg7_b_c.gt.1)       chem(i,k,j,p_opcg7_b_c)=0.00
1354                    if (p_opcg8_b_c.gt.1)       chem(i,k,j,p_opcg8_b_c)=0.00
1355                    if (p_opcg1_b_o.gt.1)       chem(i,k,j,p_opcg1_b_o)=0.00
1356                    if (p_opcg2_b_o.gt.1)       chem(i,k,j,p_opcg2_b_o)=0.00
1357                    if (p_opcg3_b_o.gt.1)       chem(i,k,j,p_opcg3_b_o)=0.00
1358                    if (p_opcg4_b_o.gt.1)       chem(i,k,j,p_opcg4_b_o)=0.00
1359                    if (p_opcg5_b_o.gt.1)       chem(i,k,j,p_opcg5_b_o)=0.00
1360                    if (p_opcg6_b_o.gt.1)       chem(i,k,j,p_opcg6_b_o)=0.00
1361                    if (p_opcg7_b_o.gt.1)       chem(i,k,j,p_opcg7_b_o)=0.00
1362                    if (p_opcg8_b_o.gt.1)       chem(i,k,j,p_opcg8_b_o)=0.00
1363                    if (p_pcg1_f_c.gt.1)        chem(i,k,j,p_pcg1_f_c)=0.00
1364                    if (p_pcg2_f_c.gt.1)        chem(i,k,j,p_pcg2_f_c)=0.00
1365                    if (p_pcg3_f_c.gt.1)        chem(i,k,j,p_pcg3_f_c)=0.00
1366                    if (p_pcg4_f_c.gt.1)        chem(i,k,j,p_pcg4_f_c)=0.00
1367                    if (p_pcg5_f_c.gt.1)        chem(i,k,j,p_pcg5_f_c)=0.00
1368                    if (p_pcg6_f_c.gt.1)        chem(i,k,j,p_pcg6_f_c)=0.00
1369                    if (p_pcg7_f_c.gt.1)        chem(i,k,j,p_pcg7_f_c)=0.00
1370                    if (p_pcg8_f_c.gt.1)        chem(i,k,j,p_pcg8_f_c)=0.00
1371                    if (p_pcg9_f_c.gt.1)        chem(i,k,j,p_pcg9_f_c)=0.00
1372                    if (p_pcg1_f_o.gt.1)        chem(i,k,j,p_pcg1_f_o)=0.00
1373                    if (p_pcg2_f_o.gt.1)        chem(i,k,j,p_pcg2_f_o)=0.00
1374                    if (p_pcg3_f_o.gt.1)        chem(i,k,j,p_pcg3_f_o)=0.00
1375                    if (p_pcg4_f_o.gt.1)        chem(i,k,j,p_pcg4_f_o)=0.00
1376                    if (p_pcg5_f_o.gt.1)        chem(i,k,j,p_pcg5_f_o)=0.00
1377                    if (p_pcg6_f_o.gt.1)        chem(i,k,j,p_pcg6_f_o)=0.00
1378                    if (p_pcg7_f_o.gt.1)        chem(i,k,j,p_pcg7_f_o)=0.00
1379                    if (p_pcg8_f_o.gt.1)        chem(i,k,j,p_pcg8_f_o)=0.00
1380                    if (p_pcg9_f_o.gt.1)        chem(i,k,j,p_pcg9_f_o)=0.00
1381                    if (p_opcg1_f_c.gt.1)       chem(i,k,j,p_opcg1_f_c)=0.00
1382                    if (p_opcg2_f_c.gt.1)       chem(i,k,j,p_opcg2_f_c)=0.00
1383                    if (p_opcg3_f_c.gt.1)       chem(i,k,j,p_opcg3_f_c)=0.00
1384                    if (p_opcg4_f_c.gt.1)       chem(i,k,j,p_opcg4_f_c)=0.00
1385                    if (p_opcg5_f_c.gt.1)       chem(i,k,j,p_opcg5_f_c)=0.00
1386                    if (p_opcg6_f_c.gt.1)       chem(i,k,j,p_opcg6_f_c)=0.00
1387                    if (p_opcg7_f_c.gt.1)       chem(i,k,j,p_opcg7_f_c)=0.00
1388                    if (p_opcg8_f_c.gt.1)       chem(i,k,j,p_opcg8_f_c)=0.00
1389                    if (p_opcg1_f_o.gt.1)       chem(i,k,j,p_opcg1_f_o)=0.00
1390                    if (p_opcg2_f_o.gt.1)       chem(i,k,j,p_opcg2_f_o)=0.00
1391                    if (p_opcg3_f_o.gt.1)       chem(i,k,j,p_opcg3_f_o)=0.00
1392                    if (p_opcg4_f_o.gt.1)       chem(i,k,j,p_opcg4_f_o)=0.00
1393                    if (p_opcg5_f_o.gt.1)       chem(i,k,j,p_opcg5_f_o)=0.00
1394                    if (p_opcg6_f_o.gt.1)       chem(i,k,j,p_opcg6_f_o)=0.00
1395                    if (p_opcg7_f_o.gt.1)       chem(i,k,j,p_opcg7_f_o)=0.00
1396                    if (p_opcg8_f_o.gt.1)       chem(i,k,j,p_opcg8_f_o)=0.00
1397                    if (p_ant1_c.gt.1)          chem(i,k,j,p_ant1_c)=0.0
1398                    if (p_ant2_c.gt.1)          chem(i,k,j,p_ant2_c)=0.0
1399                    if (p_ant3_c.gt.1)          chem(i,k,j,p_ant3_c)=0.0
1400                    if (p_ant4_c.gt.1)          chem(i,k,j,p_ant4_c)=0.0
1401                    if (p_ant1_o.gt.1)          chem(i,k,j,p_ant1_o)=0.0
1402                    if (p_ant2_o.gt.1)          chem(i,k,j,p_ant2_o)=0.0
1403                    if (p_ant3_o.gt.1)          chem(i,k,j,p_ant3_o)=0.0
1404                    if (p_ant4_o.gt.1)          chem(i,k,j,p_ant4_o)=0.0
1405                    if (p_biog1_c.gt.1)         chem(i,k,j,p_biog1_c)=0.0
1406                    if (p_biog2_c.gt.1)         chem(i,k,j,p_biog2_c)=0.0
1407                    if (p_biog3_c.gt.1)         chem(i,k,j,p_biog3_c)=0.0
1408                    if (p_biog4_c.gt.1)         chem(i,k,j,p_biog4_c)=0.0
1409                    if (p_biog1_o.gt.1)         chem(i,k,j,p_biog1_o)=0.0
1410                    if (p_biog2_o.gt.1)         chem(i,k,j,p_biog2_o)=0.0
1411                    if (p_biog3_o.gt.1)         chem(i,k,j,p_biog3_o)=0.0
1412                    if (p_biog4_o.gt.1)         chem(i,k,j,p_biog4_o)=0.0
1413                    
1414                    if (p_pcg1_b_c_a01.gt.1)    chem(i,k,j,p_pcg1_b_c_a01)=0.0
1415                    if (p_pcg1_b_o_a01.gt.1)    chem(i,k,j,p_pcg1_b_o_a01)=0.0
1416                    if (p_opcg1_b_c_a01.gt.1)   chem(i,k,j,p_opcg1_b_c_a01)=0.0
1417                    if (p_opcg1_b_o_a01.gt.1)   chem(i,k,j,p_opcg1_b_o_a01)=0.0
1418                    if (p_pcg1_f_c_a01.gt.1)    chem(i,k,j,p_pcg1_f_c_a01)=0.0
1419                    if (p_pcg1_f_o_a01.gt.1)    chem(i,k,j,p_pcg1_f_o_a01)=0.0
1420                    if (p_opcg1_f_c_a01.gt.1)   chem(i,k,j,p_opcg1_f_c_a01)=0.0
1421                    if (p_opcg1_f_o_a01.gt.1)   chem(i,k,j,p_opcg1_f_o_a01)=0.0
1422                    if (p_ant1_c_a01.gt.1)      chem(i,k,j,p_ant1_c_a01)=0.0
1423                    if (p_biog1_c_a01.gt.1)     chem(i,k,j,p_biog1_c_a01)=0.0
1424                    
1425                    if (p_pcg1_b_c_a02.gt.1)    chem(i,k,j,p_pcg1_b_c_a02)=0.0
1426                    if (p_pcg1_b_o_a02.gt.1)    chem(i,k,j,p_pcg1_b_o_a02)=0.0
1427                    if (p_opcg1_b_c_a02.gt.1)   chem(i,k,j,p_opcg1_b_c_a02)=0.0
1428                    if (p_opcg1_b_o_a02.gt.1)   chem(i,k,j,p_opcg1_b_o_a02)=0.0
1429                    if (p_pcg1_f_c_a02.gt.1)    chem(i,k,j,p_pcg1_f_c_a02)=0.0
1430                    if (p_pcg1_f_o_a02.gt.1)    chem(i,k,j,p_pcg1_f_o_a02)=0.0
1431                    if (p_opcg1_f_c_a02.gt.1)   chem(i,k,j,p_opcg1_f_c_a02)=0.0
1432                    if (p_opcg1_f_o_a02.gt.1)   chem(i,k,j,p_opcg1_f_o_a02)=0.0
1433                    if (p_ant1_c_a02.gt.1)      chem(i,k,j,p_ant1_c_a02)=0.0
1434                    if (p_biog1_c_a02.gt.1)     chem(i,k,j,p_biog1_c_a02)=0.0
1435                    
1436                    if (p_pcg1_b_c_a03.gt.1)    chem(i,k,j,p_pcg1_b_c_a03)=0.0
1437                    if (p_pcg1_b_o_a03.gt.1)    chem(i,k,j,p_pcg1_b_o_a03)=0.0
1438                    if (p_opcg1_b_c_a03.gt.1)   chem(i,k,j,p_opcg1_b_c_a03)=0.0
1439                    if (p_opcg1_b_o_a03.gt.1)   chem(i,k,j,p_opcg1_b_o_a03)=0.0
1440                    if (p_pcg1_f_c_a03.gt.1)    chem(i,k,j,p_pcg1_f_c_a03)=0.0
1441                    if (p_pcg1_f_o_a03.gt.1)    chem(i,k,j,p_pcg1_f_o_a03)=0.0
1442                    if (p_opcg1_f_c_a03.gt.1)   chem(i,k,j,p_opcg1_f_c_a03)=0.0
1443                    if (p_opcg1_f_o_a03.gt.1)   chem(i,k,j,p_opcg1_f_o_a03)=0.0
1444                    if (p_ant1_c_a03.gt.1)      chem(i,k,j,p_ant1_c_a03)=0.0
1445                    if (p_biog1_c_a03.gt.1)     chem(i,k,j,p_biog1_c_a03)=0.0
1446                    
1447                    if (p_pcg1_b_c_a04.gt.1)    chem(i,k,j,p_pcg1_b_c_a04)=0.0
1448                    if (p_pcg1_b_o_a04.gt.1)    chem(i,k,j,p_pcg1_b_o_a04)=0.0
1449                    if (p_opcg1_b_c_a04.gt.1)   chem(i,k,j,p_opcg1_b_c_a04)=0.0
1450                    if (p_opcg1_b_o_a04.gt.1)   chem(i,k,j,p_opcg1_b_o_a04)=0.0
1451                    if (p_pcg1_f_c_a04.gt.1)    chem(i,k,j,p_pcg1_f_c_a04)=0.0
1452                    if (p_pcg1_f_o_a04.gt.1)    chem(i,k,j,p_pcg1_f_o_a04)=0.0
1453                    if (p_opcg1_f_c_a04.gt.1)   chem(i,k,j,p_opcg1_f_c_a04)=0.0
1454                    if (p_opcg1_f_o_a04.gt.1)   chem(i,k,j,p_opcg1_f_o_a04)=0.0
1455                    if (p_ant1_c_a04.gt.1)      chem(i,k,j,p_ant1_c_a04)=0.0
1456                    if (p_biog1_c_a04.gt.1)     chem(i,k,j,p_biog1_c_a04)=0.0
1457                    
1458                    if (p_pcg1_b_c_a05.gt.1)    chem(i,k,j,p_pcg1_b_c_a05)=0.0
1459                    if (p_pcg1_b_o_a05.gt.1)    chem(i,k,j,p_pcg1_b_o_a05)=0.0
1460                    if (p_opcg1_b_c_a05.gt.1)   chem(i,k,j,p_opcg1_b_c_a05)=0.0
1461                    if (p_opcg1_b_o_a05.gt.1)   chem(i,k,j,p_opcg1_b_o_a05)=0.0
1462                    if (p_pcg1_f_c_a05.gt.1)    chem(i,k,j,p_pcg1_f_c_a05)=0.0
1463                    if (p_pcg1_f_o_a05.gt.1)    chem(i,k,j,p_pcg1_f_o_a05)=0.0
1464                    if (p_opcg1_f_c_a05.gt.1)   chem(i,k,j,p_opcg1_f_c_a05)=0.0
1465                    if (p_opcg1_f_o_a05.gt.1)   chem(i,k,j,p_opcg1_f_o_a05)=0.0
1466                    if (p_ant1_c_a05.gt.1)      chem(i,k,j,p_ant1_c_a05)=0.0
1467                    if (p_biog1_c_a05.gt.1)     chem(i,k,j,p_biog1_c_a05)=0.0
1468                    
1469                    if (p_pcg1_b_c_a06.gt.1)    chem(i,k,j,p_pcg1_b_c_a06)=0.0
1470                    if (p_pcg1_b_o_a06.gt.1)    chem(i,k,j,p_pcg1_b_o_a06)=0.0
1471                    if (p_opcg1_b_c_a06.gt.1)   chem(i,k,j,p_opcg1_b_c_a06)=0.0
1472                    if (p_opcg1_b_o_a06.gt.1)   chem(i,k,j,p_opcg1_b_o_a06)=0.0
1473                    if (p_pcg1_f_c_a06.gt.1)    chem(i,k,j,p_pcg1_f_c_a06)=0.0
1474                    if (p_pcg1_f_o_a06.gt.1)    chem(i,k,j,p_pcg1_f_o_a06)=0.0
1475                    if (p_opcg1_f_c_a06.gt.1)   chem(i,k,j,p_opcg1_f_c_a06)=0.0
1476                    if (p_opcg1_f_o_a06.gt.1)   chem(i,k,j,p_opcg1_f_o_a06)=0.0
1477                    if (p_ant1_c_a06.gt.1)      chem(i,k,j,p_ant1_c_a06)=0.0
1478                    if (p_biog1_c_a06.gt.1)     chem(i,k,j,p_biog1_c_a06)=0.0
1479                    
1480                    if (p_pcg1_b_c_a07.gt.1)    chem(i,k,j,p_pcg1_b_c_a07)=0.0
1481                    if (p_pcg1_b_o_a07.gt.1)    chem(i,k,j,p_pcg1_b_o_a07)=0.0
1482                    if (p_opcg1_b_c_a07.gt.1)   chem(i,k,j,p_opcg1_b_c_a07)=0.0
1483                    if (p_opcg1_b_o_a07.gt.1)   chem(i,k,j,p_opcg1_b_o_a07)=0.0
1484                    if (p_pcg1_f_c_a07.gt.1)    chem(i,k,j,p_pcg1_f_c_a07)=0.0
1485                    if (p_pcg1_f_o_a07.gt.1)    chem(i,k,j,p_pcg1_f_o_a07)=0.0
1486                    if (p_opcg1_f_c_a07.gt.1)   chem(i,k,j,p_opcg1_f_c_a07)=0.0
1487                    if (p_opcg1_f_o_a07.gt.1)   chem(i,k,j,p_opcg1_f_o_a07)=0.0
1488                    if (p_ant1_c_a07.gt.1)      chem(i,k,j,p_ant1_c_a07)=0.0
1489                    if (p_biog1_c_a07.gt.1)     chem(i,k,j,p_biog1_c_a07)=0.0
1490                    
1491                    if (p_pcg1_b_c_a08.gt.1)    chem(i,k,j,p_pcg1_b_c_a08)=0.0
1492                    if (p_pcg1_b_o_a08.gt.1)    chem(i,k,j,p_pcg1_b_o_a08)=0.0
1493                    if (p_opcg1_b_c_a08.gt.1)   chem(i,k,j,p_opcg1_b_c_a08)=0.0
1494                    if (p_opcg1_b_o_a08.gt.1)   chem(i,k,j,p_opcg1_b_o_a08)=0.0
1495                    if (p_pcg1_f_c_a08.gt.1)    chem(i,k,j,p_pcg1_f_c_a08)=0.0
1496                    if (p_pcg1_f_o_a08.gt.1)    chem(i,k,j,p_pcg1_f_o_a08)=0.0
1497                    if (p_opcg1_f_c_a08.gt.1)   chem(i,k,j,p_opcg1_f_c_a08)=0.0
1498                    if (p_opcg1_f_o_a08.gt.1)   chem(i,k,j,p_opcg1_f_o_a08)=0.0
1499                    if (p_ant1_c_a08.gt.1)      chem(i,k,j,p_ant1_c_a08)=0.0
1500                    if (p_biog1_c_a08.gt.1)     chem(i,k,j,p_biog1_c_a08)=0.0
1501                    
1502                    
1503                    
1504                    if (p_pcg1_b_c_cw01.gt.1)   chem(i,k,j,p_pcg1_b_c_cw01)=0.0
1505                    if (p_pcg1_b_o_cw01.gt.1)   chem(i,k,j,p_pcg1_b_o_cw01)=0.0
1506                    if (p_opcg1_b_c_cw01.gt.1)  chem(i,k,j,p_opcg1_b_c_cw01)=0.0
1507                    if (p_opcg1_b_o_cw01.gt.1)  chem(i,k,j,p_opcg1_b_o_cw01)=0.0
1508                    if (p_pcg1_f_c_cw01.gt.1)   chem(i,k,j,p_pcg1_f_c_cw01)=0.0
1509                    if (p_pcg1_f_o_cw01.gt.1)   chem(i,k,j,p_pcg1_f_o_cw01)=0.0
1510                    if (p_opcg1_f_c_cw01.gt.1)  chem(i,k,j,p_opcg1_f_c_cw01)=0.0
1511                    if (p_opcg1_f_o_cw01.gt.1)  chem(i,k,j,p_opcg1_f_o_cw01)=0.0
1512                    if (p_ant1_c_cw01.gt.1)     chem(i,k,j,p_ant1_c_cw01)=0.0
1513                    if (p_biog1_c_cw01.gt.1)    chem(i,k,j,p_biog1_c_cw01)=0.0
1514                    
1515                    if (p_pcg1_b_c_cw02.gt.1)   chem(i,k,j,p_pcg1_b_c_cw02)=0.0
1516                    if (p_pcg1_b_o_cw02.gt.1)   chem(i,k,j,p_pcg1_b_o_cw02)=0.0
1517                    if (p_opcg1_b_c_cw02.gt.1)  chem(i,k,j,p_opcg1_b_c_cw02)=0.0
1518                    if (p_opcg1_b_o_cw02.gt.1)  chem(i,k,j,p_opcg1_b_o_cw02)=0.0
1519                    if (p_pcg1_f_c_cw02.gt.1)   chem(i,k,j,p_pcg1_f_c_cw02)=0.0
1520                    if (p_pcg1_f_o_cw02.gt.1)   chem(i,k,j,p_pcg1_f_o_cw02)=0.0
1521                    if (p_opcg1_f_c_cw02.gt.1)  chem(i,k,j,p_opcg1_f_c_cw02)=0.0
1522                    if (p_opcg1_f_o_cw02.gt.1)  chem(i,k,j,p_opcg1_f_o_cw02)=0.0
1523                    if (p_ant1_c_cw02.gt.1)     chem(i,k,j,p_ant1_c_cw02)=0.0
1524                    if (p_biog1_c_cw02.gt.1)    chem(i,k,j,p_biog1_c_cw02)=0.0
1525                    
1526                    if (p_pcg1_b_c_cw03.gt.1)   chem(i,k,j,p_pcg1_b_c_cw03)=0.0
1527                    if (p_pcg1_b_o_cw03.gt.1)   chem(i,k,j,p_pcg1_b_o_cw03)=0.0
1528                    if (p_opcg1_b_c_cw03.gt.1)  chem(i,k,j,p_opcg1_b_c_cw03)=0.0
1529                    if (p_opcg1_b_o_cw03.gt.1)  chem(i,k,j,p_opcg1_b_o_cw03)=0.0
1530                    if (p_pcg1_f_c_cw03.gt.1)   chem(i,k,j,p_pcg1_f_c_cw03)=0.0
1531                    if (p_pcg1_f_o_cw03.gt.1)   chem(i,k,j,p_pcg1_f_o_cw03)=0.0
1532                    if (p_opcg1_f_c_cw03.gt.1)  chem(i,k,j,p_opcg1_f_c_cw03)=0.0
1533                    if (p_opcg1_f_o_cw03.gt.1)  chem(i,k,j,p_opcg1_f_o_cw03)=0.0
1534                    if (p_ant1_c_cw03.gt.1)     chem(i,k,j,p_ant1_c_cw03)=0.0
1535                    if (p_biog1_c_cw03.gt.1)    chem(i,k,j,p_biog1_c_cw03)=0.0
1536                    
1537                    if (p_pcg1_b_c_cw04.gt.1)   chem(i,k,j,p_pcg1_b_c_cw04)=0.0
1538                    if (p_pcg1_b_o_cw04.gt.1)   chem(i,k,j,p_pcg1_b_o_cw04)=0.0
1539                    if (p_opcg1_b_c_cw04.gt.1)  chem(i,k,j,p_opcg1_b_c_cw04)=0.0
1540                    if (p_opcg1_b_o_cw04.gt.1)  chem(i,k,j,p_opcg1_b_o_cw04)=0.0
1541                    if (p_pcg1_f_c_cw04.gt.1)   chem(i,k,j,p_pcg1_f_c_cw04)=0.0
1542                    if (p_pcg1_f_o_cw04.gt.1)   chem(i,k,j,p_pcg1_f_o_cw04)=0.0
1543                    if (p_opcg1_f_c_cw04.gt.1)  chem(i,k,j,p_opcg1_f_c_cw04)=0.0
1544                    if (p_opcg1_f_o_cw04.gt.1)  chem(i,k,j,p_opcg1_f_o_cw04)=0.0
1545                    if (p_ant1_c_cw04.gt.1)     chem(i,k,j,p_ant1_c_cw04)=0.0
1546                    if (p_biog1_c_cw04.gt.1)    chem(i,k,j,p_biog1_c_cw04)=0.0
1547                    
1548                    if (p_pcg1_b_c_cw05.gt.1)   chem(i,k,j,p_pcg1_b_c_cw05)=0.0
1549                    if (p_pcg1_b_o_cw05.gt.1)   chem(i,k,j,p_pcg1_b_o_cw05)=0.0
1550                    if (p_opcg1_b_c_cw05.gt.1)  chem(i,k,j,p_opcg1_b_c_cw05)=0.0
1551                    if (p_opcg1_b_o_cw05.gt.1)  chem(i,k,j,p_opcg1_b_o_cw05)=0.0
1552                    if (p_pcg1_f_c_cw05.gt.1)   chem(i,k,j,p_pcg1_f_c_cw05)=0.0
1553                    if (p_pcg1_f_o_cw05.gt.1)   chem(i,k,j,p_pcg1_f_o_cw05)=0.0
1554                    if (p_opcg1_f_c_cw05.gt.1)  chem(i,k,j,p_opcg1_f_c_cw05)=0.0
1555                    if (p_opcg1_f_o_cw05.gt.1)  chem(i,k,j,p_opcg1_f_o_cw05)=0.0
1556                    if (p_ant1_c_cw05.gt.1)     chem(i,k,j,p_ant1_c_cw05)=0.0
1557                    if (p_biog1_c_cw05.gt.1)    chem(i,k,j,p_biog1_c_cw05)=0.0
1558                    
1559                    if (p_pcg1_b_c_cw06.gt.1)   chem(i,k,j,p_pcg1_b_c_cw06)=0.0
1560                    if (p_pcg1_b_o_cw06.gt.1)   chem(i,k,j,p_pcg1_b_o_cw06)=0.0
1561                    if (p_opcg1_b_c_cw06.gt.1)  chem(i,k,j,p_opcg1_b_c_cw06)=0.0
1562                    if (p_opcg1_b_o_cw06.gt.1)  chem(i,k,j,p_opcg1_b_o_cw06)=0.0
1563                    if (p_pcg1_f_c_cw06.gt.1)   chem(i,k,j,p_pcg1_f_c_cw06)=0.0
1564                    if (p_pcg1_f_o_cw06.gt.1)   chem(i,k,j,p_pcg1_f_o_cw06)=0.0
1565                    if (p_opcg1_f_c_cw06.gt.1)  chem(i,k,j,p_opcg1_f_c_cw06)=0.0
1566                    if (p_opcg1_f_o_cw06.gt.1)  chem(i,k,j,p_opcg1_f_o_cw06)=0.0
1567                    if (p_ant1_c_cw06.gt.1)     chem(i,k,j,p_ant1_c_cw06)=0.0
1568                    if (p_biog1_c_cw06.gt.1)    chem(i,k,j,p_biog1_c_cw06)=0.0
1569                    
1570                    if (p_pcg1_b_c_cw07.gt.1)   chem(i,k,j,p_pcg1_b_c_cw07)=0.0
1571                    if (p_pcg1_b_o_cw07.gt.1)   chem(i,k,j,p_pcg1_b_o_cw07)=0.0
1572                    if (p_opcg1_b_c_cw07.gt.1)  chem(i,k,j,p_opcg1_b_c_cw07)=0.0
1573                    if (p_opcg1_b_o_cw07.gt.1)  chem(i,k,j,p_opcg1_b_o_cw07)=0.0
1574                    if (p_pcg1_f_c_cw07.gt.1)   chem(i,k,j,p_pcg1_f_c_cw07)=0.0
1575                    if (p_pcg1_f_o_cw07.gt.1)   chem(i,k,j,p_pcg1_f_o_cw07)=0.0
1576                    if (p_opcg1_f_c_cw07.gt.1)  chem(i,k,j,p_opcg1_f_c_cw07)=0.0
1577                    if (p_opcg1_f_o_cw07.gt.1)  chem(i,k,j,p_opcg1_f_o_cw07)=0.0
1578                    if (p_ant1_c_cw07.gt.1)     chem(i,k,j,p_ant1_c_cw07)=0.0
1579                    if (p_biog1_c_cw07.gt.1)    chem(i,k,j,p_biog1_c_cw07)=0.0
1580                    
1581                    if (p_pcg1_b_c_cw08.gt.1)   chem(i,k,j,p_pcg1_b_c_cw08)=0.0
1582                    if (p_pcg1_b_o_cw08.gt.1)   chem(i,k,j,p_pcg1_b_o_cw08)=0.0
1583                    if (p_opcg1_b_c_cw08.gt.1)  chem(i,k,j,p_opcg1_b_c_cw08)=0.0
1584                    if (p_opcg1_b_o_cw08.gt.1)  chem(i,k,j,p_opcg1_b_o_cw08)=0.0
1585                    if (p_pcg1_f_c_cw08.gt.1)   chem(i,k,j,p_pcg1_f_c_cw08)=0.0
1586                    if (p_pcg1_f_o_cw08.gt.1)   chem(i,k,j,p_pcg1_f_o_cw08)=0.0
1587                    if (p_opcg1_f_c_cw08.gt.1)  chem(i,k,j,p_opcg1_f_c_cw08)=0.0
1588                    if (p_opcg1_f_o_cw08.gt.1)  chem(i,k,j,p_opcg1_f_o_cw08)=0.0
1589                    if (p_ant1_c_cw08.gt.1)     chem(i,k,j,p_ant1_c_cw08)=0.0
1590                    if (p_biog1_c_cw08.gt.1)    chem(i,k,j,p_biog1_c_cw08)=0.0
1591                 enddo
1592              enddo
1593           enddo
1594        endif
1595        !BSINGH - ENDS
1597    END SELECT kpp_select
1598    endif
1600    IF( config_flags%do_pvozone .and. p_o3.gt.1 .and. (.not. config_flags%restart) ) THEN
1601       si_zsigf = (grid%ph_1 + grid%phb)/grav
1602       do k=1,kde-1
1603          si_zsig(:,k,:) = 0.5 * ( si_zsigf(:,k,:) + si_zsigf(:,k+1,:) )
1604       enddo
1605       si_zsig(:,kde,:) = 0.5 * ( 3. * si_zsigf(:,kde,:) - si_zsigf(:,kde-1,:) )
1606       CALL initial_pvo3 (ims, ime, jms, jme, kms, kme, num_chem, numgas, &
1607                               grid%chem_opt, si_zsig, chem(:,:,:,p_o3),       &
1608                               grid%u_2, grid%v_2, grid%t_2+t0, p, grid%pb,    &
1609                               grid%znu, grid%msft, grid%msfu, grid%msfv,      &
1610                               grid%f, grid%mub,grid%dx,xlat,grid%julday,      &
1611                               ids,ide,jds,jde,kds,kde,its,ite,jts,jte,kts,kte)
1613    ENDIF
1614    
1615 !! Initialize some greenhouse gas species for 16th and 17th chemistry options:
1616 !! CO2 mixing ratios for the background GHG tracers are set as a constant value.
1617 !! Some spin-up is necessary to get spatial variability right!
1618 !! Warning: initial values for CO2 components have to be subtracted from the output!
1619 !! The purpose of this is to avoid negative values due to the biospheric uptake!
1620 !! This subroutine is called at every initialization, however it's carried out if
1621 !! restart=0 and chem_in_opt=0
1622 ghg_block: IF (config_flags%gas_ic_opt==GAS_IC_GHG) THEN
1623    IF( (.not. config_flags%restart) .AND. config_flags%chem_in_opt==0 ) THEN
1624 ! CO2 tracers:
1625        do j=jts,jte
1626         do k=kts,kte
1627          do i=its,ite
1628             chem(i,k,j,p_co2_bck)=380.  ! background CO2 tracer
1629             chem(i,k,j,p_co2_bio)=380.  ! A user should subtract this from the output fields!
1630             chem(i,k,j,p_co2_oce)=380.   ! A user should subtract this from the output fields!
1631             chem(i,k,j,p_co2_ant)=380.   ! A user should subtract this from the output fields!
1632             chem(i,k,j,p_co2_tst)=380.   ! A user should subtract this from the output fields!
1634             if (p_co2_bbu>1) chem(i,k,j,p_co2_bbu)=380.  ! A user should subtract this from the output fields!
1636          enddo
1637         enddo
1638        enddo
1640 ! CO tracers:
1641        do j=jts,jte
1642         do k=kts,kte
1643          do i=its,ite
1644             chem(i,k,j,p_co_bck)=0.1  ! background CO tracer
1645             chem(i,k,j,p_co_ant)=0.1  ! A user should subtract this from the output fields!
1646             if (p_co_tst>1) chem(i,k,j,p_co_tst)=0.1     ! A user should subtract this from the output fields!
1647             if (p_co_bbu>1) chem(i,k,j,p_co_bbu)=0.1     ! A user should subtract this from the output fields!
1648          enddo
1649         enddo
1650        enddo
1652 ! CH4 tracers:
1653      IF (p_ch4_bck.gt.1) THEN
1654       do j=jts,jte
1655        do k=kts,kte
1656         do i=its,ite
1657            chem(i,k,j,p_ch4_bck)=1.77   ! background CH4 tracer
1658            chem(i,k,j,p_ch4_bio)=1.77   ! A user should subtract this from the output fields!
1659            chem(i,k,j,p_ch4_ant)=1.77   ! A user should subtract this from the output fields!
1660            chem(i,k,j,p_ch4_bbu)=1.77   ! A user should subtract this from the output fields!
1661            chem(i,k,j,p_ch4_tst)=1.77   ! A user should subtract this from the output fields!
1662         enddo
1663        enddo
1664       enddo
1665       ENDIF
1667    ENDIF
1668 ENDIF ghg_block
1670    aer_select: SELECT CASE(config_flags%chem_opt)
1671      CASE (RACMPM_KPP)
1672         if(config_flags%chem_in_opt == 0 )then
1673           if( .NOT. config_flags%restart ) then
1674             do l=numgas+1,num_chem
1675                do j=jts,jte
1676                   do k=kts,kte
1677                      do i=its,ite
1678                         chem(i,k,j,l)=1.
1679                      enddo
1680                   enddo
1681                enddo
1682             enddo
1683           endif
1684         endif
1685      CASE (GOCARTRACM_KPP,GOCARTRADM2)
1686        CALL wrf_debug(15,'call GOCARTRACM_KPP chem/aerosols initialization')
1687         ch_dust(:,:)=0.8D-9
1688         ch_ss(:,:)=1.
1689         if(config_flags%chem_in_opt == 0 )then
1690         if( .NOT. config_flags%restart )then
1691            do j=jts,jte
1692               do k=kts,kte
1693                  do i=its,ite
1694 !                  do n=1,num_chem
1695 !                    chem(i,k,j,n)=1.e-12
1696 !                  enddo
1697                    chem(i,k,j,p_dms)=0.1e-6
1698                    chem(i,k,j,p_so2)=5.e-6
1699                    chem(i,k,j,p_sulf)=3.e-6
1700                    chem(i,k,j,p_msa)=0.1e-6
1701                    chem(i,k,j,p_bc1)=0.1e-3
1702                    chem(i,k,j,p_bc2)=0.1e-3
1703                    chem(i,k,j,p_oc1)=0.1e-3
1704                    chem(i,k,j,p_oc2)=0.1e-3
1705                    chem(i,k,j,p_p25)=1.
1706                  enddo
1707               enddo
1708            enddo
1709          endif
1710          endif
1711      CASE (DUST)
1712        if(config_flags%phot_opt .NE. 0 )then
1713          call wrf_error_fatal("Dust only simple initialization, phot_opt  MUST BE ZERO")
1714        endif
1715        CALL wrf_debug(15,'call dust aerosols initialization')
1716         ch_dust(:,:)=0.8D-9
1717         if(config_flags%chem_in_opt == 0 )then
1718         if( .NOT. config_flags%restart )then
1719            do j=jts,jte
1720               do k=kts,kte
1721                  do i=its,ite
1722                    do n=1,num_chem
1723                      chem(i,k,j,n)=0.
1724                    enddo
1725                  enddo
1726                enddo
1727            enddo
1728          endif
1729          endif
1730      CASE (GOCART_SIMPLE)
1731        if(config_flags%phot_opt .NE. 0 )then
1732          call wrf_error_fatal("GOCART simple initialization, phot_opt  MUST BE ZERO")
1733        endif
1734        CALL wrf_debug(15,'call GOCART chem/aerosols initialization')
1735         ch_dust(:,:)=0.8D-9
1736         ch_ss(:,:)=1.
1737         if( .NOT. config_flags%restart )then
1738         if(config_flags%chem_in_opt == 0 )then
1739            do j=jts,jte
1740               do k=kts,kte
1741                  do i=its,ite
1742                    do n=1,num_chem
1743                      chem(i,k,j,n)=1.e-12
1744                    enddo
1745                    chem(i,k,j,p_dms)=0.1e-6
1746                    chem(i,k,j,p_so2)=5.e-6
1747                    chem(i,k,j,p_sulf)=3.e-6
1748                    chem(i,k,j,p_msa)=0.1e-6
1749                    chem(i,k,j,p_bc1)=0.1e-3
1750                    chem(i,k,j,p_bc2)=0.1e-3
1751                    chem(i,k,j,p_oc1)=0.1e-3
1752                    chem(i,k,j,p_oc2)=0.1e-3
1753                    chem(i,k,j,p_p25)=1.
1754                  enddo
1755               enddo
1756            enddo
1757          endif
1759 ! next is done to scale background oh and no3 in dependence on average zenith angle and day/night for no3
1760 ! this is done since background values are only available as average/month. It will not be necessary if other
1761 ! chemistry packages are used that provide oh,no3,h2o2
1763          endif
1764            ndystep=86400/ifix(dt)
1765            do j=jts,jte
1766                  do i=its,ite
1767                    tcosz(i,j)=0.
1768                    ttday(i,j)=0.
1769                    rlat=xlat(i,j)*3.1415926535590/180.
1770                    xlonn=xlong(i,j)
1771                    do n=1,ndystep
1772                       xtime=n*dt/60.
1773                       ixhour=ifix(gmt+.01)+ifix(xtime/60.)
1774                       xhour=float(ixhour)
1775                       xmin=60.*gmt+(xtime-xhour*60.)
1776                       gmtp=mod(xhour,24.)
1777                       gmtp=gmtp+xmin/60.
1778                       CALL szangle(1, 1, julday, gmtp, sza, cosszax,xlonn,rlat)
1779                       TCOSZ(i,j)=TCOSZ(I,J)+cosszax(1,1) 
1780                       if(cosszax(1,1).gt.0.)ttday(i,j)=ttday(i,j)+dt
1781                     enddo
1782 !                if(i.eq.19.and.j.eq.19)write(0,*)'in cheminit'
1783 !                if(i.eq.19.and.j.eq.19)write(0,*)TCOSZ(i,j),ttday(i,j),julday, gmtp, sza, cosszax,xlonn,rlat
1784            enddo
1785           enddo
1786       CASE (MOZCART_KPP,T1_MOZCART_KPP)
1787         CALL wrf_debug(15,'MOZCART dust initialization')
1788         ch_dust(:,:) = 0.8D-9
1790      CASE (RADM2SORG, RADM2SORG_AQ, RADM2SORG_AQCHEM, RACMSORG_AQ, RACMSORG_AQCHEM_KPP, RACM_ESRLSORG_AQCHEM_KPP, RADM2SORG_KPP, &
1791            RACMSORG_KPP, RACM_ESRLSORG_KPP, CBMZSORG, CBMZSORG_AQ, &
1792            CB05_SORG_AQ_KPP)
1793        CALL wrf_debug(15,'call MADE/SORGAM aerosols initialization')
1795        call aerosols_sorgam_init(chem,convfac,z_at_w,                &
1796                pm2_5_dry,pm2_5_water,pm2_5_dry_ec,                   &
1797                chem_in_opt,config_flags%aer_ic_opt,is_aerosol,       &
1798                ids,ide, jds,jde, kds,kde,                            &
1799                ims,ime, jms,jme, kms,kme,                            &
1800                its,ite, jts,jte, kts,kte, config_flags               )
1802 !!!TUCCELLA (BUG, before it was called in module_aerosols_sorgam.F)
1803        ! initialize pointers used by aerosol-cloud-interaction routines
1804         call aerosols_sorgam_init_aercld_ptrs( &
1805            num_chem, is_aerosol, config_flags )
1807 !...Convert aerosols to mixing ratio
1808         if( .NOT. config_flags%restart ) then
1809         if(config_flags%chem_in_opt == 0 .and. num_chem.gt.numgas)then
1810         do l=numgas+1,num_chem
1811            do j=jts,jte
1812               do k=kts,kte
1813                  kk = min(k,kde-1)
1814                  do i=its,ite
1815                     chem(i,k,j,l)=chem(i,kk,j,l)*alt(i,kk,j)
1816                  enddo
1817               enddo
1818            enddo
1819         enddo
1820         endif
1821         endif
1822         chem(its:ite,kts:min(kte,kde-1),jts:jte,:)=max(chem(its:ite,kts:min(kte,kde-1),jts:jte,:),epsilc)
1824     CASE (CB05_SORG_VBS_AQ_KPP)
1825        CALL wrf_debug(15,'call MADE/SOA_VBS aerosols initialization')
1827        call aerosols_sorgam_vbs_init(chem,convfac,z_at_w,                &
1828                pm2_5_dry,pm2_5_water,pm2_5_dry_ec,                   &
1829                tsoa,asoa,bsoa,                                       &
1830                chem_in_opt,config_flags%aer_ic_opt,is_aerosol,       &
1831                ids,ide, jds,jde, kds,kde,                            &
1832                ims,ime, jms,jme, kms,kme,                            &
1833                its,ite, jts,jte, kts,kte, config_flags               )
1834 !...Convert aerosols to mixing ratio
1835         if( .NOT. config_flags%restart ) then
1836         if(config_flags%chem_in_opt == 0 .and. num_chem.gt.numgas)then
1837         do l=numgas+1,num_chem
1838            do j=jts,jte
1839               do k=kts,kte
1840                  kk = min(k,kde-1)
1841                  do i=its,ite
1842                     chem(i,k,j,l)=chem(i,kk,j,l)*alt(i,kk,j)
1843                  enddo
1844               enddo
1845            enddo
1846         enddo
1847         endif
1848         endif
1849         chem(its:ite,kts:min(kte,kde-1),jts:jte,:)=max(chem(its:ite,kts:min(kte,kde-1),jts:jte,:),epsilc)
1850     CASE (RACM_SOA_VBS_KPP,RACM_SOA_VBS_AQCHEM_KPP,RACM_SOA_VBS_HET_KPP)
1851        CALL wrf_debug(15,'call MADE/SOA_VBS aerosols initialization')
1853        call aerosols_soa_vbs_init(chem,convfac,z_at_w,                &
1854                pm2_5_dry,pm2_5_water,pm2_5_dry_ec,                   &
1855                chem_in_opt,config_flags%aer_ic_opt,is_aerosol,       &
1856                ids,ide, jds,jde, kds,kde,                            &
1857                ims,ime, jms,jme, kms,kme,                            &
1858                its,ite, jts,jte, kts,kte, config_flags               )
1860 !!!TUCCELLA (BUG, before it was called in module_aerosols_soa_vbs.F)
1861        ! initialize pointers used by aerosol-cloud-interaction routines
1862         call aerosols_soa_vbs_init_aercld_ptrs( &
1863            num_chem, is_aerosol, config_flags )
1865 !...Convert aerosols to mixing ratio
1866         if( .NOT. config_flags%restart ) then
1867         if(config_flags%chem_in_opt == 0 .and. num_chem.gt.numgas)then
1868         do l=numgas+1,num_chem
1869            do j=jts,jte
1870               do k=kts,kte
1871                  kk = min(k,kde-1)
1872                  do i=its,ite
1873                     chem(i,k,j,l)=chem(i,kk,j,l)*alt(i,kk,j)
1874                  enddo
1875               enddo
1876            enddo
1877         enddo
1878         endif
1879         endif
1880         chem(its:ite,kts:min(kte,kde-1),jts:jte,:)=max(chem(its:ite,kts:min(kte,kde-1),jts:jte,:),epsilc)
1881 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1882      CASE ( CBMZ_CAM_MAM3_NOAQ, CBMZ_CAM_MAM3_AQ, CBMZ_CAM_MAM7_NOAQ, CBMZ_CAM_MAM7_AQ )
1883        call wrf_debug(15,'call CAM_MODAL aerosols initialization')
1884        call cam_mam_init(                                            &
1885                id, numgas, config_flags,                             &
1886                ids,ide, jds,jde, kds,kde,                            &
1887                ims,ime, jms,jme, kms,kme,                            &
1888                its,ite, jts,jte, kts,kte                             )
1889        if(config_flags%chem_in_opt == 0 )then
1890            if( .NOT. config_flags%restart ) &
1891            call cam_mam_initmixrats(                                 &
1892                id, numgas, config_flags,                             &
1893                chem, convfac, alt, z_at_w, g,                        &
1894                ids,ide, jds,jde, kds,kde,                            &
1895                ims,ime, jms,jme, kms,kme,                            &
1896                its,ite, jts,jte, kts,kte                             )
1897        endif
1898        if(config_flags%wetscav_onoff == 1  ) then 
1899           if(config_flags%mp_physics == CAMMGMPSCHEME ) then
1900              call wetscav_cam_mam_driver_init(ids,ide, jds,jde, kds,kde, &
1901                   ims,ime, jms,jme, kms,kme,                             &
1902                   its,ite, jts,jte, kts,kte                              )
1903           else
1904              call wrf_error_fatal("ERROR: wet scavaging option requires mp_phys = CAMMGMP SCHEME to function.")
1905           endif
1906        endif
1907      CASE (CBMZ_MOSAIC_4BIN, CBMZ_MOSAIC_KPP, CBMZ_MOSAIC_8BIN, CBMZ_MOSAIC_4BIN_AQ, CBMZ_MOSAIC_8BIN_AQ, &
1908            CBMZ_MOSAIC_DMS_4BIN, CBMZ_MOSAIC_DMS_8BIN, CBMZ_MOSAIC_DMS_4BIN_AQ, CBMZ_MOSAIC_DMS_8BIN_AQ, &
1909            SAPRC99_MOSAIC_4BIN_VBS2_KPP, &
1910            MOZART_MOSAIC_4BIN_KPP,MOZART_MOSAIC_4BIN_AQ_KPP, &
1911            CRI_MOSAIC_8BIN_AQ_KPP, CRI_MOSAIC_4BIN_AQ_KPP,SAPRC99_MOSAIC_8BIN_VBS2_AQ_KPP, &  !BSINGH(12/03/2013): Added SAPRC 8 bin
1912            SAPRC99_MOSAIC_8BIN_VBS2_KPP) !BSINGH(04/03/2014): Added SAPRC 8 bin non-aq
1913        call wrf_debug(15,'call MOSAIC aerosols initialization')
1914        call init_data_mosaic_asect( id, config_flags, grid%vbs_nbin, is_aerosol )
1915        if(config_flags%chem_in_opt == 0 )then
1916        if( .NOT. config_flags%restart ) &
1917             call mosaic_init_wrf_mixrats(                            &
1918                0, config_flags,                                      &
1919                chem, alt, z_at_w, g,                                 &
1920                ids,ide, jds,jde, kds,kde,                            &
1921                ims,ime, jms,jme, kms,kme,                            &
1922                its,ite, jts,jte, kts,kte                             )
1923        endif
1925    END SELECT aer_select
1927 !!! TUCCELLA
1928    progn_sanity_check : SELECT CASE(config_flags%chem_opt)
1929    CASE (RADM2SORG_AQ, RADM2SORG_AQCHEM, RACMSORG_AQ, RACMSORG_AQCHEM_KPP, RACM_ESRLSORG_AQCHEM_KPP, &
1930          RACM_SOA_VBS_AQCHEM_KPP, CBMZ_MOSAIC_4BIN_AQ, CBMZ_MOSAIC_8BIN_AQ, CBMZ_MOSAIC_DMS_4BIN_AQ, &
1931          CBMZ_MOSAIC_DMS_8BIN_AQ,CBMZSORG_AQ,CRI_MOSAIC_8BIN_AQ_KPP, CRI_MOSAIC_4BIN_AQ_KPP, &
1932          MOZART_MOSAIC_4BIN_AQ_KPP,SAPRC99_MOSAIC_8BIN_VBS2_AQ_KPP,   &
1933          CB05_SORG_AQ_KPP, CB05_SORG_VBS_AQ_KPP)
1934       if( config_flags%progn /= 1 ) &
1935            call wrf_error_fatal( &
1936            "ERROR: When using a ..._AQ chemistry package, progn must be 1")
1937    END SELECT progn_sanity_check
1939    do nv=1,num_chem
1940       do j=jts,jte
1941          do i=its,ite
1942             chem(i,kde,j,nv)=chem(i,kde-1,j,nv)
1943          enddo
1944       enddo
1945    enddo
1946         ch_dust(:,:)=0.8D-9
1947         ch_ss(:,:)=1.
1950 ! initialization for wesely (gas) dry deposition
1952    drydep_select: SELECT CASE(config_flags%gas_drydep_opt)
1953      CASE (WESELY)
1954         IF (numgas .eq. 0) THEN
1955             CALL wrf_error_fatal("ERROR: numgas = 0, SELECTED CHEM OPT IS &
1956             &NOT COMPATIBLE WITH WESELY DRY DEPOSITION")
1957         ENDIF
1958         CALL wrf_debug(15,'initializing dry dep (wesely)') 
1960         call dep_init( id, config_flags, numgas, mminlu_loc, &
1961                       its, ite, jts, jte, ide, jde )
1964    END SELECT drydep_select
1966 ! initialization for cbmz gas-phase chemistry
1968    cbmz_select: SELECT CASE(config_flags%chem_opt)
1969      CASE (CBMZ, CBMZ_BB, CBMZ_BB_KPP,CBMZ_MOSAIC_KPP,  CBMZ_MOSAIC_4BIN, &
1970            CBMZ_MOSAIC_8BIN, CBMZ_MOSAIC_4BIN_AQ, CBMZ_MOSAIC_8BIN_AQ, CBMZSORG,CBMZSORG_AQ, &
1971            CBMZ_MOSAIC_DMS_4BIN, CBMZ_MOSAIC_DMS_8BIN, CBMZ_MOSAIC_DMS_4BIN_AQ, & 
1972            CBMZ_MOSAIC_DMS_8BIN_AQ, CBMZ_CAM_MAM3_NOAQ, CBMZ_CAM_MAM3_AQ, CBMZ_CAM_MAM7_NOAQ, CBMZ_CAM_MAM7_AQ )
1973        CALL wrf_debug(15,'initializing cbmz gas-phase chemistry')
1974        if(config_flags%chem_in_opt == 0 )then
1975        if( .NOT. config_flags%restart ) &
1976             call cbmz_init_wrf_mixrats(config_flags,   &
1977                z_at_w, g,                              &
1978                chem, numgas,                           &
1979                ids,ide, jds,jde, kds,kde,              &
1980                ims,ime, jms,jme, kms,kme,              &
1981                its,ite, jts,jte, kts,kte               )
1982        endif
1983    END SELECT cbmz_select
1985 ! initialization for cb4 gas-phase chemistry
1987      cb4_select: SELECT CASE(config_flags%chem_opt)
1988        CASE (CBM4_KPP)
1989          CALL wrf_debug(15,'initializing cbm4 gas-phase chemistry')
1990          if(config_flags%chem_in_opt == 0 )then
1991          if( .NOT. config_flags%restart ) &
1992               call cbm4_init_wrf_mixrats(config_flags,   &
1993                  z_at_w, g,                              &
1994                  chem, numgas,                           &
1995                  ids,ide, jds,jde, kds,kde,              &
1996                  ims,ime, jms,jme, kms,kme,              &
1997                  its,ite, jts,jte, kts,kte               )
1998          endif
1999      END SELECT cb4_select
2001 ! Initialize the cloud droplet number and mass
2003     if( (.not.config_flags%restart) .and. (config_flags%progn > 0) ) then
2004 !BSINGH(12/03/2013): send chem_in_opt as an arg
2005 !    For chem_in_opt==1 modified the mosaic_mixactivate_init
2006 !    The sum of mass from interstitial and cloud borne aerosols is attributed to interstitial aerosols
2007 !    Cloud drop number and cloud aerosol mass are then initialized to zero
2008        call mosaic_mixactivate_init(                   &
2009             config_flags, chem, scalar,                &
2010             chem_in_opt,                               & !BSINGH(12/03/2013):send chem_in_opt as an arg
2011             ims,ime, jms,jme, kms,kme,                 &
2012             its,ite, jts,jte, kts,kte                  )
2013     end if
2015 ! Setup time info for chemistry
2017     if( config_flags%restart ) then
2018        call wrf_debug( 15, "Setting last_chem_time from restart file" )
2019 ! Do not know if I need the following nl_gets.
2020 ! domain_get_sim_start_time uses them for simulation_start_...
2021 !          CALL nl_get_start_year   ( 1, last_chem_time_year   )
2022 !          CALL nl_get_start_month  ( 1, last_chem_time_month  )
2023 !          CALL nl_get_start_day    ( 1, last_chem_time_day    )
2024 !          CALL nl_get_start_hour   ( 1, last_chem_time_hour   )
2025 !          CALL nl_get_start_minute ( 1, last_chem_time_minute )
2026 !          CALL nl_get_start_second ( 1, last_chem_time_second )
2027        call WRFU_TimeSet( last_chem_time(id),         &
2028                           YY = last_chem_time_year,   &
2029                           MM = last_chem_time_month,  &
2030                           DD = last_chem_time_day,    &
2031                           H  = last_chem_time_hour,   &
2032                           M  = last_chem_time_minute, &
2033                           S  = last_chem_time_second  )
2034     else
2035        call wrf_debug( 15, "Setting last_chem_time to model start time-dt" )
2036        call WRFU_TimeIntervalSet(tmpTimeInterval, s_=real(dt,8))
2037        last_chem_time(id) = domain_get_current_time(grid) - tmpTimeInterval
2038     end if
2041 !-- initialization upper bounary and tropopause modules
2043     if( config_flags%have_bcs_upper ) then
2044         CALL wrf_debug(00,'call upper boundary initialization')
2045         call upper_bc_init( id, xlat, dt, config_flags,  &
2046                             ids,ide, jds,jde, kds,kde,   &
2047                             ims,ime, jms,jme, kms,kme,   &
2048                             its,ite, jts,jte, kts,kte    )
2050         call tropopause_init( id, xlat, xlong, config_flags, &
2051                             ids,ide, jds,jde, kds,kde,       &
2052                             ims,ime, jms,jme, kms,kme,       &
2053                             its,ite, jts,jte, kts,kte        )
2054     end if
2055     gas_pcnst_modal_aero_pos = max(1,gas_pcnst_modal_aero) !BSINGH - Fix for non-MAM simulations
2056     END SUBROUTINE chem_init
2058 !---------------------------------------------------------------------------------------------
2059 !Subroutine initializes VPRM parameters based on namelist option for "vprm_opt"
2061 SUBROUTINE VPRM_par_initialize(rad_vprm,lambda_vprm,alpha_vprm,resp_vprm,config_flags)
2063 USE module_configure,only:  grid_config_rec_type
2065 ! VPRM parameters initialization section
2066 IMPLICIT NONE
2068 REAL, DIMENSION(8), INTENT(OUT) ::  rad_vprm, lambda_vprm, alpha_vprm, resp_vprm
2069 REAL, DIMENSION(8,4)    ::  vprm_table_us, vprm_table_europe, vprm_table_tropics, vprm_par
2071 DATA vprm_table_us &
2072      / 261.0, 324.0, 206.0, 363.0, 682.0, 757.0, 157.0, 0.0, &
2073       -0.2492, -0.1729, -0.2555, -0.08736, -0.1141, -0.15330, -0.13335, 0.00000, &
2074        0.3301, 0.3258, 0.3422, 0.0239, 0.0049, 0.2680, 0.0269, 0.0000, &
2075        0., 0., 0., 0., 0., 0., 0., 0. /
2077 DATA vprm_table_europe &
2078      / 270.2, 271.4, 236.6, 363.0, 682.0, 690.3, 229.1, 0.0, &
2079       -0.3084, -0.1955, -0.2856, -0.0874, -0.1141, -0.1350, -0.1748, 0.0000, &
2080        0.1797, 0.1495, 0.2258, 0.0239, 0.0049, 0.1699, 0.0881, 0.0000, &
2081        0.8800, 0.8233, 0.4321, 0.0000, 0.0000, -0.0144, 0.5843, 0.0000 /
2083 ! Tropics are still preliminary, too strong SWDOWN might cause too high uptake
2084 DATA vprm_table_tropics &
2085      / 501.0, 324.0, 206.0, 303.0, 682.0, 646.0, 157.0, 0.0, &
2086       -0.2101, -0.1729, -0.2555, -0.0874, -0.1141, -0.1209, -0.1334, 0.0000, &
2087        0.1601, 0.3258, 0.3422, 0.0239, 0.0049, 0.0043, 0.0269, 0.0000, &
2088        0., 0., 0., 0., 0., 0., 0., 0. /
2090 TYPE (grid_config_rec_type) , INTENT (IN) :: config_flags
2092 sel_pars: SELECT CASE(config_flags%vprm_opt)
2093 CASE ('VPRM_table_US')
2094   vprm_par=vprm_table_us
2095 CASE ('VPRM_table_EUROPE')
2096   vprm_par=vprm_table_europe
2097 CASE ('VPRM_table_TROPICS')
2098   vprm_par=vprm_table_tropics
2099 CASE DEFAULT
2100   CALL wrf_message("check vprm_opt in namelist.input")
2101   CALL wrf_error_fatal ( "NO PARAMETER TABLE IS INCLUDED FOR THIS VPRM TABLE OPTION!")
2102 END SELECT sel_pars
2104 rad_vprm=     vprm_par(1:8,1)
2105 lambda_vprm=  vprm_par(1:8,2)
2106 alpha_vprm=   vprm_par(1:8,3)
2107 resp_vprm=    vprm_par(1:8,4)
2109 END SUBROUTINE VPRM_par_initialize
2110 !******************************************************************************
2112 SUBROUTINE termite_initialize( biom,emch4,config_flags)
2113 !Subroutine initializes the termite emission parameters provided by Sanderson et al. 1996
2114 ! parameters for termite emission initialization
2116 USE module_configure,only:  grid_config_rec_type
2118 IMPLICIT NONE
2120 REAL, DIMENSION(14,3)   ::  term_em
2121 REAL, DIMENSION(14)     ::  biom, emch4
2123 DATA term_em &
2124       /11.0, 8.0,  11.26, 3.0,  0.96, 10.6,  5.2,  0.98, 8.43, 5.38, 2.25, 5.3, 2.7,  5.3,  &
2125        5.64, 5.64, 5.64, 1.77, 2.9, 3.2, 1.77, 2.9, 3.2, 3.0, 3.0, 4.13, 4.13, 4.13, &
2126        6.16, 6.16, 6.16, 1.77, 7.60,  7.00, 1.77, 7.60, 7.0, 3.9, 3.9, 4.13,  4.13,  4.13/
2128 TYPE (grid_config_rec_type) , INTENT (IN) :: config_flags
2130 sel_pars: SELECT CASE(config_flags%term_opt)
2131  CASE ('CH4_termite_NW')
2132    biom= term_em(1:14,1)
2133    emch4 = term_em(1:14,2)
2134  CASE ('CH4_termite_OW')
2135    biom= term_em(1:14,1)
2136    emch4 = term_em(1:14,3)
2137  CASE DEFAULT
2138    CALL wrf_error_fatal ( "NO PARAMETER TABLE IS INCLUDED FOR THIS TERMITE CH4 OPTION!")
2139 END SELECT sel_pars
2141 END SUBROUTINE termite_initialize
2142 !-----------------------------------------------------------------------
2144 #ifdef CHEM_DBG_I
2145 subroutine print_chem_species_index( chem_opt )
2146   use module_state_description
2147   implicit none
2149   integer, intent(in) :: chem_opt
2151   print*,'Index numbers for chemistry species:'
2153 ! Gas species...
2155   select case (chem_opt)
2156   case (RADM2, RADM2SORG, RADM2SORG_AQ, RADM2SORG_AQCHEM, RADM2_KPP, RADM2SORG_KPP, GOCARTRADM2)
2157      print*,p_so2,"so2"
2158      print*,p_sulf,"sulf"
2159      print*,p_no2,"no2"
2160      print*,p_no,"no"
2161      print*,p_o3,"o3"
2162      print*,p_hno3,"hno3"
2163      print*,p_h2o2,"h2o2"
2164      print*,p_ald,"ald"
2165      print*,p_hcho,"hcho"
2166      print*,p_op1,"op1"
2167      print*,p_op2,"op2"
2168      print*,p_paa,"paa"
2169      print*,p_ora1,"ora1"
2170      print*,p_ora2,"ora2"
2171      print*,p_nh3,"nh3"
2172      print*,p_n2o5,"n2o5"
2173      print*,p_no3,"no3"
2174      print*,p_pan,"pan"
2175      print*,p_hc3,"hc3"
2176      print*,p_hc5,"hc5"
2177      print*,p_hc8,"hc8"
2178      print*,p_eth,"eth"
2179      print*,p_co,"co"
2180      print*,p_ol2,"ol2"
2181      print*,p_olt,"olt"
2182      print*,p_oli,"oli"
2183      print*,p_tol,"tol"
2184      print*,p_xyl,"xyl"
2185      print*,p_aco3,"aco3"
2186      print*,p_tpan,"tpan"
2187      print*,p_hono,"hono"
2188      print*,p_hno4,"hno4"
2189      print*,p_ket,"ket"
2190      print*,p_gly,"gly"
2191      print*,p_mgly,"mgly"
2192      print*,p_dcb,"dcb"
2193      print*,p_onit,"onit"
2194      print*,p_csl,"csl"
2195      print*,p_iso,"iso"
2196      print*,p_ho,"ho"
2197      print*,p_ho2,"ho2"
2198 !!! TUCCELLA
2199   case (RACMSORG_AQ, RACMSORG_AQCHEM_KPP, RACM_ESRLSORG_AQCHEM_KPP,RACM_KPP,RACMPM_KPP, RACMSORG_KPP, &
2200         RACM_ESRLSORG_KPP,RACM_SOA_VBS_KPP,RACM_SOA_VBS_AQCHEM_KPP,RACM_SOA_VBS_HET_KPP)
2201      print*,p_so2,"so2"
2202      print*,p_sulf,"sulf"
2203      print*,p_no2,"no2"
2204      print*,p_no,"no"
2205      print*,p_o3,"o3"
2206      print*,p_hno3,"hno3"
2207      print*,p_h2o2,"h2o2"
2208      print*,p_ald,"ald"
2209      print*,p_hcho,"hcho"
2210      print*,p_op1,"op1"
2211      print*,p_op2,"op2"
2212      print*,p_paa,"paa"
2213      print*,p_ora1,"ora1"
2214      print*,p_ora2,"ora2"
2215      print*,p_nh3,"nh3"
2216      print*,p_n2o5,"n2o5"
2217      print*,p_no3,"no3"
2218      print*,p_pan,"pan"
2219      print*,p_hc3,"hc3"
2220      print*,p_hc5,"hc5"
2221      print*,p_hc8,"hc8"
2222      print*,p_eth,"eth"
2223      print*,p_co,"co"
2224      print*,p_ete,"ete"
2225      print*,p_olt,"olt"
2226      print*,p_oli,"oli"
2227      print*,p_tol,"tol"
2228      print*,p_xyl,"xyl"
2229      print*,p_aco3,"aco3"
2230      print*,p_tpan,"tpan"
2231      print*,p_hono,"hono"
2232      print*,p_hno4,"hno4"
2233      print*,p_ket,"ket"
2234      print*,p_gly,"gly"
2235      print*,p_mgly,"mgly"
2236      print*,p_dcb,"dcb"
2237      print*,p_onit,"onit"
2238      print*,p_csl,"csl"
2239      print*,p_iso,"iso"
2240      print*,p_co2,"co2"
2241      print*,p_ch4,"ch4"
2242      print*,p_udd,"udd"
2243      print*,p_hket,"hket"
2244      print*,p_api,"api"
2245      print*,p_lim,"lim"
2246      print*,p_dien,"dien"
2247      print*,p_macr,"macr"
2248      print*,p_ho,"ho"
2249      print*,p_ho2,"ho2"
2250   case (CBMZ)
2251      print*,p_so2,"so2"
2252      print*,p_sulf,"sulf"
2253      print*,p_no2,"no2"
2254      print*,p_no,"no"
2255      print*,p_o3,"o3"
2256      print*,p_hno3,"hno3"
2257      print*,p_h2o2,"h2o2"
2258      print*,p_ald,"ald"
2259      print*,p_hcho,"hcho"
2260      print*,p_op1,"op1"
2261      print*,p_op2,"op2"
2262      print*,p_paa,"paa"
2263      print*,p_ora1,"ora1"
2264      print*,p_ora2,"ora2"
2265      print*,p_nh3,"nh3"
2266      print*,p_n2o5,"n2o5"
2267      print*,p_no3,"no3"
2268      print*,p_pan,"pan"
2269      print*,p_hc3,"hc3"
2270      print*,p_hc5,"hc5"
2271      print*,p_hc8,"hc8"
2272      print*,p_eth,"eth"
2273      print*,p_co,"co"
2274      print*,p_ol2,"ol2"
2275      print*,p_olt,"olt"
2276      print*,p_oli,"oli"
2277      print*,p_tol,"tol"
2278      print*,p_xyl,"xyl"
2279      print*,p_aco3,"aco3"
2280      print*,p_tpan,"tpan"
2281      print*,p_hono,"hono"
2282      print*,p_hno4,"hno4"
2283      print*,p_ket,"ket"
2284      print*,p_gly,"gly"
2285      print*,p_mgly,"mgly"
2286      print*,p_dcb,"dcb"
2287      print*,p_onit,"onit"
2288      print*,p_csl,"csl"
2289      print*,p_iso,"iso"
2290      print*,p_ho,"ho"
2291      print*,p_ho2,"ho2"
2292      print*,p_hcl,"hcl"
2293      print*,p_ch3o2,"ch3o2"
2294      print*,p_ethp,"ethp"
2295      print*,p_ch3oh,"ch3oh"
2296      print*,p_c2h5oh,"c2h5oh"
2297      print*,p_par,"par"
2298      print*,p_to2,"to2"
2299      print*,p_cro,"cro"
2300      print*,p_open,"open"
2301      print*,p_op3,"op3"
2302      print*,p_c2o3,"c2o3"
2303      print*,p_ro2,"ro2"
2304      print*,p_ano2,"ano2"
2305      print*,p_nap,"nap"
2306      print*,p_xo2,"xo2"
2307      print*,p_xpar,"xpar"
2308      print*,p_isoprd,"isoprd"
2309      print*,p_isopp,"isopp"
2310      print*,p_isopn,"isopn"
2311      print*,p_isopo2,"isopo2"
2312      print*,p_dms,"dms"
2313      print*,p_msa,"msa"
2314      print*,p_dmso,"dmso"
2315      print*,p_dmso2,"dmso2"
2316      print*,p_ch3so2h,"ch3so2h"
2317      print*,p_ch3sch2oo,"ch3sch2oo"
2318      print*,p_ch3so2,"ch3so2"
2319      print*,p_ch3so3,"ch3so3"
2320      print*,p_ch3so2oo,"ch3so2oo"
2321      print*,p_ch3so2ch2oo,"ch3so2ch2oo"
2322      print*,p_mtf,"mtf"
2323   case (CBMZ_BB, CBMZ_BB_KPP, CBMZ_MOSAIC_4BIN, CBMZ_MOSAIC_8BIN, CBMZ_MOSAIC_4BIN_AQ, CBMZ_MOSAIC_8BIN_AQ, CBMZSORG,CBMZSORG_AQ, &
2324         CBMZ_CAM_MAM3_NOAQ, CBMZ_CAM_MAM3_AQ, CBMZ_CAM_MAM7_NOAQ, CBMZ_CAM_MAM7_AQ)
2325      print*,p_so2,"so2"
2326      print*,p_sulf,"sulf"
2327      print*,p_no2,"no2"
2328      print*,p_no,"no"
2329      print*,p_o3,"o3"
2330      print*,p_hno3,"hno3"
2331      print*,p_h2o2,"h2o2"
2332      print*,p_ald,"ald"
2333      print*,p_hcho,"hcho"
2334      print*,p_op1,"op1"
2335      print*,p_op2,"op2"
2336      print*,p_paa,"paa"
2337      print*,p_ora1,"ora1"
2338      print*,p_ora2,"ora2"
2339      print*,p_nh3,"nh3"
2340      print*,p_n2o5,"n2o5"
2341      print*,p_no3,"no3"
2342      print*,p_pan,"pan"
2343      print*,p_hc3,"hc3"
2344      print*,p_hc5,"hc5"
2345      print*,p_hc8,"hc8"
2346      print*,p_eth,"eth"
2347      print*,p_ch4,"ch4"
2348      print*,p_co,"co"
2349      print*,p_ol2,"ol2"
2350      print*,p_olt,"olt"
2351      print*,p_oli,"oli"
2352      print*,p_tol,"tol"
2353      print*,p_xyl,"xyl"
2354      print*,p_aco3,"aco3"
2355      print*,p_tpan,"tpan"
2356      print*,p_hono,"hono"
2357      print*,p_hno4,"hno4"
2358      print*,p_ket,"ket"
2359      print*,p_gly,"gly"
2360      print*,p_mgly,"mgly"
2361      print*,p_dcb,"dcb"
2362      print*,p_onit,"onit"
2363      print*,p_csl,"csl"
2364      print*,p_iso,"iso"
2365      print*,p_ho,"ho"
2366      print*,p_ho2,"ho2"
2367      print*,p_hcl,"hcl"
2368      print*,p_ch3o2,"ch3o2"
2369      print*,p_ethp,"ethp"
2370      print*,p_ch3oh,"ch3oh"
2371      print*,p_c2h5oh,"c2h5oh"
2372      print*,p_par,"par"
2373      print*,p_to2,"to2"
2374      print*,p_cro,"cro"
2375      print*,p_open,"open"
2376      print*,p_op3,"op3"
2377      print*,p_c2o3,"c2o3"
2378      print*,p_ro2,"ro2"
2379      print*,p_ano2,"ano2"
2380      print*,p_nap,"nap"
2381      print*,p_xo2,"xo2"
2382      print*,p_xpar,"xpar"
2383      print*,p_isoprd,"isoprd"
2384      print*,p_isopp,"isopp"
2385      print*,p_isopn,"isopn"
2386      print*,p_isopo2,"isopo2"
2388      case (SAPRC99_MOSAIC_8BIN_VBS2_KPP) !BSINGh -  Added for 8bin vbs pkg
2389      print*,p_o3,"o3"
2390      print*,p_h2o2,"h2o2"
2391      print*,p_no,"no"
2392      print*,p_no2,"no2"
2393      print*,p_no3,"no3"
2394      print*,p_n2o5,"n2o5"
2395      print*,p_hono,"hono"
2396      print*,p_hno3,"hno3"
2397      print*,p_hno4,"hno4"
2398      print*,p_so2,"so2"
2399      print*,p_h2so4,"h2so4"
2400      print*,p_co,"co"
2401      print*,p_hcho,"hcho"
2402      print*,p_ccho,"ccho"
2403      print*,p_rcho,"rcho"
2404      print*,p_acet,"acet"
2405      print*,p_mek,"mek"
2406      print*,p_hcooh,"hcooh"
2407      print*,p_meoh,"meoh"
2408      print*,p_etoh,"etoh"
2409      print*,p_cco_oh,"cco_oh"
2410      print*,p_rco_oh,"rco_oh"
2411      print*,p_gly,"gly"
2412      print*,p_mgly,"mgly"
2413      print*,p_bacl,"bacl"
2414      print*,p_cres,"cres"
2415      print*,p_bald,"bald"
2416      print*,p_isoprod,"isoprod"
2417      print*,p_methacro,"methacro"
2418      print*,p_mvk,"mvk"
2419      print*,p_prod2,"prod2"
2420      print*,p_dcb1,"dcb1"
2421      print*,p_dcb2,"dcb2"
2422      print*,p_dcb3,"dcb3"
2423      print*,p_ethene,"ethene"
2424      print*,p_isoprene,"isoprene"
2425      print*,p_c2h6,"c2h6"
2426      print*,p_c3h8,"c3h8"
2427      print*,p_c2h2,"c2h2"
2428      print*,p_c3h6,"c3h6"
2429      print*,p_alk3,"alk3"
2430      print*,p_alk4,"alk4"
2431      print*,p_alk5,"alk5"
2432      print*,p_aro1,"aro1"
2433      print*,p_aro2,"aro2"
2434      print*,p_ole1,"ole1"
2435      print*,p_ole2,"ole2"
2436      print*,p_terp,"terp"
2437      print*,p_sesq,"sesq"
2438      print*,p_rno3,"rno3"
2439      print*,p_nphe,"nphe"
2440      print*,p_phen,"phen"
2441      print*,p_pan,"pan"
2442      print*,p_pan2,"pan2"
2443      print*,p_pbzn,"pbzn"
2444      print*,p_ma_pan,"ma_pan"
2445      print*,p_bc_spr,"bc_spr"
2446      print*,p_oc_spr,"oc_spr"
2447      print*,p_ssf,"ssf"
2448      print*,p_ssc,"ssc"
2449      print*,p_pm10_spr,"pm10_spr"
2450      print*,p_pm25_spr,"pm25_spr"
2451      print*,p_dms,"dms"
2452      print*,p_dst1,"dst1"
2453      print*,p_dst2,"dst2"
2454      print*,p_dst3,"dst3"
2455      print*,p_co2,"co2"
2456      print*,p_cco_ooh,"cco_ooh"
2457      print*,p_rco_o2,"rco_o2"
2458      print*,p_rco_ooh,"rco_ooh"
2459      print*,p_xn,"xn"
2460      print*,p_xc,"xc"
2461      print*,p_ho,"oh"
2462      print*,p_ho2,"ho2"
2463      print*,p_c_o2,"c_o2"
2464      print*,p_cooh,"cooh"
2465      print*,p_rooh,"rooh"
2466      print*,p_ro2_r,"ro2_r"
2467      print*,p_r2o2,"r2o2"
2468      print*,p_ro2_n,"ro2_n"
2469      print*,p_cco_o2,"cco_o2"
2470      print*,p_bzco_o2,"bzco_o2"
2471      print*,p_ma_rco3,"ma_rco3"
2472      print*,p_ch4,"ch4"
2474   select case (chem_opt)
2475   case( CBMZ_CAM_MAM3_NOAQ, CBMZ_CAM_MAM3_AQ, CBMZ_CAM_MAM7_NOAQ, CBMZ_CAM_MAM7_AQ )
2476         print*,p_soag,"soag"
2477      end select
2478   end select
2479   
2480   case (CBMZ_MOSAIC_KPP)
2481     print*,p_so2,"so2"
2482      print*,p_sulf,"sulf"
2483      print*,p_no2,"no2"
2484      print*,p_no,"no"
2485      print*,p_o3,"o3"
2486      print*,p_hno3,"hno3"
2487      print*,p_h2o2,"h2o2"
2488      print*,p_ald,"ald"
2489      print*,p_hcho,"hcho"
2490      print*,p_op1,"op1"
2491      print*,p_op2,"op2"
2492      print*,p_paa,"paa"
2493      print*,p_ora1,"ora1"
2494      print*,p_ora2,"ora2"
2495      print*,p_nh3,"nh3"
2496      print*,p_n2o5,"n2o5"
2497      print*,p_no3,"no3"
2498      print*,p_pan,"pan"
2499      print*,p_hc3,"hc3"
2500      print*,p_hc5,"hc5"
2501      print*,p_hc8,"hc8"
2502      print*,p_eth,"eth"
2503      print*,p_ch4,"ch4"
2504      print*,p_co,"co"
2505      print*,p_ol2,"ol2"
2506      print*,p_olt,"olt"
2507      print*,p_oli,"oli"
2508      print*,p_tol,"tol"
2509      print*,p_xyl,"xyl"
2510      print*,p_aco3,"aco3"
2511      print*,p_tpan,"tpan"
2512      print*,p_hono,"hono"
2513      print*,p_hno4,"hno4"
2514      print*,p_ket,"ket"
2515      print*,p_gly,"gly"
2516      print*,p_mgly,"mgly"
2517      print*,p_dcb,"dcb"
2518      print*,p_onit,"onit"
2519      print*,p_csl,"csl"
2520      print*,p_iso,"iso"
2521      print*,p_ho,"ho"
2522      print*,p_ho2,"ho2"
2523      print*,p_hcl,"hcl"
2524      print*,p_ch3o2,"ch3o2"
2525      print*,p_ethp,"ethp"
2526      print*,p_ch3oh,"ch3oh"
2527      print*,p_c2h5oh,"c2h5oh"
2528      print*,p_par,"par"
2529      print*,p_to2,"to2"
2530      print*,p_cro,"cro"
2531      print*,p_open,"open"
2532      print*,p_op3,"op3"
2533      print*,p_c2o3,"c2o3"
2534      print*,p_ro2,"ro2"
2535      print*,p_ano2,"ano2"
2536      print*,p_nap,"nap"
2537      print*,p_xo2,"xo2"
2538      print*,p_xpar,"xpar"
2539      print*,p_isoprd,"isoprd"
2540      print*,p_isopp,"isopp"
2541      print*,p_isopn,"isopn"
2542      print*,p_isopo2,"isopo2"
2543      print*,p_aro1,"aro1"
2544      print*,p_aro2,"aro2"
2545      print*,p_alk1,"alk1"
2546      print*,p_ole1,"ole1"
2547      print*,p_api1,"api1"
2548      print*,p_api2,"api2"
2549      print*,p_lim1,"lim1"
2550      print*,p_lim2,"lim2"
2551      print*,p_api,"api"
2552      print*,p_lim,"lim"
2554   case (SAPRC99_KPP,SAPRC99_MOSAIC_4BIN_VBS2_KPP,SAPRC99_MOSAIC_8BIN_VBS2_AQ_KPP)!BSINGH(12/03/2013): Added SAPRC 8 bin 
2555      print*,p_o3,"o3"
2556      print*,p_h2o2,"h2o2"
2557      print*,p_no,"no"
2558      print*,p_no2,"no2"
2559      print*,p_no3,"no3"
2560      print*,p_n2o5,"n2o5"
2561      print*,p_hono,"hono"
2562      print*,p_hno3,"hno3"
2563      print*,p_hno4,"hno4"
2564      print*,p_so2,"so2"
2565      print*,p_h2so4,"h2so4"
2566      print*,p_co,"co"
2567      print*,p_hcho,"hcho"
2568      print*,p_ccho,"ccho"
2569      print*,p_rcho,"rcho"
2570      print*,p_acet,"acet"
2571      print*,p_mek,"mek"
2572      print*,p_hcooh,"hcooh"
2573      print*,p_meoh,"meoh"
2574      print*,p_etoh,"etoh"
2575      print*,p_cco_oh,"cco_oh"
2576      print*,p_rco_oh,"rco_oh"
2577      print*,p_gly,"gly"
2578      print*,p_mgly,"mgly"
2579      print*,p_bacl,"bacl"
2580      print*,p_cres,"cres"
2581      print*,p_bald,"bald"
2582      print*,p_isoprod,"isoprod"
2583      print*,p_methacro,"methacro"
2584      print*,p_mvk,"mvk"
2585      print*,p_prod2,"prod2"
2586      print*,p_dcb1,"dcb1"
2587      print*,p_dcb2,"dcb2"
2588      print*,p_dcb3,"dcb3"
2589      print*,p_ethene,"ethene"
2590      print*,p_isoprene,"isoprene"
2591      print*,p_c2h6,"c2h6"
2592      print*,p_c3h8,"c3h8"
2593      print*,p_c2h2,"c2h2"
2594      print*,p_c3h6,"c3h6"
2595      print*,p_alk3,"alk3"
2596      print*,p_alk4,"alk4"
2597      print*,p_alk5,"alk5"
2598      print*,p_aro1,"aro1"
2599      print*,p_aro2,"aro2"
2600      print*,p_ole1,"ole1"
2601      print*,p_ole2,"ole2"
2602      print*,p_terp,"terp"
2603      print*,p_sesq,"sesq"
2604      print*,p_rno3,"rno3"
2605      print*,p_nphe,"nphe"
2606      print*,p_phen,"phen"
2607      print*,p_pan,"pan"
2608      print*,p_pan2,"pan2"
2609      print*,p_pbzn,"pbzn"
2610      print*,p_ma_pan,"ma_pan"
2611      print*,p_bc_spr,"bc_spr"
2612      print*,p_oc_spr,"oc_spr"
2613      print*,p_ssf,"ssf"
2614      print*,p_ssc,"ssc"
2615      print*,p_pm10_spr,"pm10_spr"
2616      print*,p_pm25_spr,"pm25_spr"
2617      print*,p_dms,"dms"
2618      print*,p_dst1,"dst1"
2619      print*,p_dst2,"dst2"
2620      print*,p_dst3,"dst3"
2621      print*,p_co2,"co2"
2622      print*,p_cco_ooh,"cco_ooh"
2623      print*,p_rco_o2,"rco_o2"
2624      print*,p_rco_ooh,"rco_ooh"
2625      print*,p_xn,"xn"
2626      print*,p_xc,"xc"
2627      print*,p_ho,"oh"
2628      print*,p_ho2,"ho2"
2629      print*,p_c_o2,"c_o2"
2630      print*,p_cooh,"cooh"
2631      print*,p_rooh,"rooh"
2632      print*,p_ro2_r,"ro2_r"
2633      print*,p_r2o2,"r2o2"
2634      print*,p_ro2_n,"ro2_n"
2635      print*,p_cco_o2,"cco_o2"
2636      print*,p_bzco_o2,"bzco_o2"
2637      print*,p_ma_rco3,"ma_rco3"
2638      print*,p_ch4,"ch4"
2639   case (CB05_SORG_AQ_KPP, CB05_SORG_VBS_AQ_KPP)
2640      print*,p_nh3,"nh3"
2641   end select
2643 ! Aerosol species...
2645   select case (chem_opt)
2646   case (RADM2SORG, RADM2SORG_AQ, RADM2SORG_AQCHEM, RADM2SORG_KPP, RACMSORG_AQ, RACMSORG_AQCHEM_KPP, &
2647         RACM_ESRLSORG_AQCHEM_KPP, RACMSORG_KPP, RACM_ESRLSORG_KPP, CBMZSORG, CBMZSORG_AQ,RACMSORG,  &
2648         CB05_SORG_AQ_KPP, CB05_SORG_VBS_AQ_KPP)
2649      print*,p_so4aj,"so4aj"
2650      print*,p_so4ai,"so4ai"
2651      print*,p_nh4aj,"nh4aj"
2652      print*,p_nh4ai,"nh4ai"
2653      print*,p_no3aj,"no3aj"
2654      print*,p_no3ai,"no3ai"
2655      print*,p_orgaro1j,"orgaro1j"
2656      print*,p_orgaro1i,"orgaro1i"
2657      print*,p_orgaro2j,"orgaro2j"
2658      print*,p_orgaro2i,"orgaro2i"
2659      print*,p_orgalk1j,"orgalk1j"
2660      print*,p_orgalk1i,"orgalk1i"
2661      print*,p_orgole1j,"orgole1j"
2662      print*,p_orgole1i,"orgole1i"
2663      print*,p_orgba1j,"orgba1j"
2664      print*,p_orgba1i,"orgba1i"
2665      print*,p_orgba2j,"orgba2j"
2666      print*,p_orgba2i,"orgba2i"
2667      print*,p_orgba3j,"orgba3j"
2668      print*,p_orgba3i,"orgba3i"
2669      print*,p_orgba4j,"orgba4j"
2670      print*,p_orgba4i,"orgba4i"
2671      print*,p_orgpaj,"orgpaj"
2672      print*,p_orgpai,"orgpai"
2673      print*,p_ecj,"ecj"
2674      print*,p_eci,"eci"
2675      print*,p_p25j,"p25j"
2676      print*,p_p25i,"p25i"
2677      print*,p_antha,"antha"
2678      print*,p_seas,"seas"
2679      print*,p_soila,"soila"
2680      print*,p_nu0,"nu0"
2681      print*,p_ac0,"ac0"
2682      print*,p_corn,"corn"
2683   case (CBMZ_MOSAIC_4BIN)
2684      print*,p_so4_a01,"so4_a01"
2685      print*,p_no3_a01,"no3_a01"
2686      print*,p_cl_a01,"cl_a01"
2687      print*,p_nh4_a01,"nh4_a01"
2688      print*,p_na_a01,"na_a01"
2689      print*,p_oin_a01,"oin_a01"
2690      print*,p_oc_a01,"oc_a01"
2691      print*,p_bc_a01,"bc_a01"
2692      print*,p_hysw_a01,"hysw_a01"
2693      print*,p_water_a01,"water_a01"
2694      print*,p_num_a01,"num_a01"
2695      print*,p_so4_a02,"so4_a02"
2696      print*,p_no3_a02,"no3_a02"
2697      print*,p_cl_a02,"cl_a02"
2698      print*,p_nh4_a02,"nh4_a02"
2699      print*,p_na_a02,"na_a02"
2700      print*,p_oin_a02,"oin_a02"
2701      print*,p_oc_a02,"oc_a02"
2702      print*,p_bc_a02,"bc_a02"
2703      print*,p_hysw_a02,"hysw_a02"
2704      print*,p_water_a02,"water_a02"
2705      print*,p_num_a02,"num_a02"
2706      print*,p_so4_a03,"so4_a03"
2707      print*,p_no3_a03,"no3_a03"
2708      print*,p_cl_a03,"cl_a03"
2709      print*,p_nh4_a03,"nh4_a03"
2710      print*,p_na_a03,"na_a03"
2711      print*,p_oin_a03,"oin_a03"
2712      print*,p_oc_a03,"oc_a03"
2713      print*,p_bc_a03,"bc_a03"
2714      print*,p_hysw_a03,"hysw_a03"
2715      print*,p_water_a03,"water_a03"
2716      print*,p_num_a03,"num_a03"
2717      print*,p_so4_a04,"so4_a04"
2718      print*,p_no3_a04,"no3_a04"
2719      print*,p_cl_a04,"cl_a04"
2720      print*,p_nh4_a04,"nh4_a04"
2721      print*,p_na_a04,"na_a04"
2722      print*,p_oin_a04,"oin_a04"
2723      print*,p_oc_a04,"oc_a04"
2724      print*,p_bc_a04,"bc_a04"
2725      print*,p_hysw_a04,"hysw_a04"
2726      print*,p_water_a04,"water_a04"
2727      print*,p_num_a04,"num_a04"
2728   case (MOZART_MOSAIC_4BIN_KPP, MOZART_MOSAIC_4BIN_AQ_KPP)
2729      print*,p_no3_a01,"no3_a01"
2730      print*,p_cl_a01,"cl_a01"
2731      print*,p_nh4_a01,"nh4_a01"
2732      print*,p_na_a01,"na_a01"
2733      print*,p_oin_a01,"oin_a01"
2734      print*,p_oc_a01,"oc_a01"
2735      print*,p_bc_a01,"bc_a01"
2736      print*,p_hysw_a01,"hysw_a01"
2737      print*,p_water_a01,"water_a01"
2738      print*,p_num_a01,"num_a01"
2739      print*,p_so4_a02,"so4_a02"
2740      print*,p_no3_a02,"no3_a02"
2741      print*,p_cl_a02,"cl_a02"
2742      print*,p_nh4_a02,"nh4_a02"
2743      print*,p_na_a02,"na_a02"
2744      print*,p_oin_a02,"oin_a02"
2745      print*,p_oc_a02,"oc_a02"
2746      print*,p_bc_a02,"bc_a02"
2747      print*,p_hysw_a02,"hysw_a02"
2748      print*,p_water_a02,"water_a02"
2749      print*,p_num_a02,"num_a02"
2750      print*,p_so4_a03,"so4_a03"
2751      print*,p_no3_a03,"no3_a03"
2752      print*,p_cl_a03,"cl_a03"
2753      print*,p_nh4_a03,"nh4_a03"
2754      print*,p_na_a03,"na_a03"
2755      print*,p_oin_a03,"oin_a03"
2756      print*,p_oc_a03,"oc_a03"
2757      print*,p_bc_a03,"bc_a03"
2758      print*,p_hysw_a03,"hysw_a03"
2759      print*,p_water_a03,"water_a03"
2760      print*,p_num_a03,"num_a03"
2761      print*,p_so4_a04,"so4_a04"
2762      print*,p_no3_a04,"no3_a04"
2763      print*,p_cl_a04,"cl_a04"
2764      print*,p_nh4_a04,"nh4_a04"
2765      print*,p_na_a04,"na_a04"
2766      print*,p_oin_a04,"oin_a04"
2767      print*,p_oc_a04,"oc_a04"
2768      print*,p_bc_a04,"bc_a04"
2769      print*,p_hysw_a04,"hysw_a04"
2770      print*,p_water_a04,"water_a04"
2771      print*,p_num_a04,"num_a04"
2772   case (CBMZ_MOSAIC_8BIN)
2773      print*,p_so4_a01,"so4_a01"
2774      print*,p_no3_a01,"no3_a01"
2775      print*,p_cl_a01,"cl_a01"
2776      print*,p_nh4_a01,"nh4_a01"
2777      print*,p_na_a01,"na_a01"
2778      print*,p_oin_a01,"oin_a01"
2779      print*,p_oc_a01,"oc_a01"
2780      print*,p_bc_a01,"bc_a01"
2781      print*,p_hysw_a01,"hysw_a01"
2782      print*,p_water_a01,"water_a01"
2783      print*,p_num_a01,"num_a01"
2784      print*,p_so4_a02,"so4_a02"
2785      print*,p_no3_a02,"no3_a02"
2786      print*,p_cl_a02,"cl_a02"
2787      print*,p_nh4_a02,"nh4_a02"
2788      print*,p_na_a02,"na_a02"
2789      print*,p_oin_a02,"oin_a02"
2790      print*,p_oc_a02,"oc_a02"
2791      print*,p_bc_a02,"bc_a02"
2792      print*,p_hysw_a02,"hysw_a02"
2793      print*,p_water_a02,"water_a02"
2794      print*,p_num_a02,"num_a02"
2795      print*,p_so4_a03,"so4_a03"
2796      print*,p_no3_a03,"no3_a03"
2797      print*,p_cl_a03,"cl_a03"
2798      print*,p_nh4_a03,"nh4_a03"
2799      print*,p_na_a03,"na_a03"
2800      print*,p_oin_a03,"oin_a03"
2801      print*,p_oc_a03,"oc_a03"
2802      print*,p_bc_a03,"bc_a03"
2803      print*,p_hysw_a03,"hysw_a03"
2804      print*,p_water_a03,"water_a03"
2805      print*,p_num_a03,"num_a03"
2806      print*,p_so4_a04,"so4_a04"
2807      print*,p_no3_a04,"no3_a04"
2808      print*,p_cl_a04,"cl_a04"
2809      print*,p_nh4_a04,"nh4_a04"
2810      print*,p_na_a04,"na_a04"
2811      print*,p_oin_a04,"oin_a04"
2812      print*,p_oc_a04,"oc_a04"
2813      print*,p_bc_a04,"bc_a04"
2814      print*,p_hysw_a04,"hysw_a04"
2815      print*,p_water_a04,"water_a04"
2816      print*,p_num_a04,"num_a04"
2817      print*,p_so4_a05,"so4_a05"
2818      print*,p_no3_a05,"no3_a05"
2819      print*,p_cl_a05,"cl_a05"
2820      print*,p_nh4_a05,"nh4_a05"
2821      print*,p_na_a05,"na_a05"
2822      print*,p_oin_a05,"oin_a05"
2823      print*,p_oc_a05,"oc_a05"
2824      print*,p_bc_a05,"bc_a05"
2825      print*,p_hysw_a05,"hysw_a05"
2826      print*,p_water_a05,"water_a05"
2827      print*,p_num_a05,"num_a05"
2828      print*,p_so4_a06,"so4_a06"
2829      print*,p_no3_a06,"no3_a06"
2830      print*,p_cl_a06,"cl_a06"
2831      print*,p_nh4_a06,"nh4_a06"
2832      print*,p_na_a06,"na_a06"
2833      print*,p_oin_a06,"oin_a06"
2834      print*,p_oc_a06,"oc_a06"
2835      print*,p_bc_a06,"bc_a06"
2836      print*,p_hysw_a06,"hysw_a06"
2837      print*,p_water_a06,"water_a06"
2838      print*,p_num_a06,"num_a06"
2839      print*,p_so4_a07,"so4_a07"
2840      print*,p_no3_a07,"no3_a07"
2841      print*,p_cl_a07,"cl_a07"
2842      print*,p_nh4_a07,"nh4_a07"
2843      print*,p_na_a07,"na_a07"
2844      print*,p_oin_a07,"oin_a07"
2845      print*,p_oc_a07,"oc_a07"
2846      print*,p_bc_a07,"bc_a07"
2847      print*,p_hysw_a07,"hysw_a07"
2848      print*,p_water_a07,"water_a07"
2849      print*,p_num_a07,"num_a07"
2850      print*,p_so4_a08,"so4_a08"
2851      print*,p_no3_a08,"no3_a08"
2852      print*,p_cl_a08,"cl_a08"
2853      print*,p_nh4_a08,"nh4_a08"
2854      print*,p_na_a08,"na_a08"
2855      print*,p_oin_a08,"oin_a08"
2856      print*,p_oc_a08,"oc_a08"
2857      print*,p_bc_a08,"bc_a08"
2858      print*,p_hysw_a08,"hysw_a08"
2859      print*,p_water_a08,"water_a08"
2860      print*,p_num_a08,"num_a08"
2861   case (CBMZ_MOSAIC_KPP)
2862      print*,p_so4_a01,"so4_a01"
2863      print*,p_no3_a01,"no3_a01"
2864      print*,p_cl_a01,"cl_a01"
2865      print*,p_nh4_a01,"nh4_a01"
2866      print*,p_na_a01,"na_a01"
2867      print*,p_oin_a01,"oin_a01"
2868      print*,p_oc_a01,"oc_a01"
2869      print*,p_bc_a01,"bc_a01"
2870      print*,p_hysw_a01,"hysw_a01"
2871      print*,p_water_a01,"water_a01"
2872      print*,p_num_a01,"num_a01"
2873      print*,p_aro1_a01,"aro1_a01"
2874      print*,p_aro2_a01,"aro2_a01"
2875      print*,p_alk1_a01,"alk1_a01"
2876      print*,p_ole1_a01,"ole1_a01"
2877      print*,p_api1_a01,"api1_a01"
2878      print*,p_api2_a01,"api2_a01"
2879      print*,p_lim1_a01,"lim1_a01"
2880      print*,p_lim2_a01,"lim2_a01"
2881      print*,p_so4_a02,"so4_a02"
2882      print*,p_no3_a02,"no3_a02"
2883      print*,p_cl_a02,"cl_a02"
2884      print*,p_nh4_a02,"nh4_a02"
2885      print*,p_na_a02,"na_a02"
2886      print*,p_oin_a02,"oin_a02"
2887      print*,p_oc_a02,"oc_a02"
2888      print*,p_bc_a02,"bc_a02"
2889      print*,p_hysw_a02,"hysw_a02"
2890      print*,p_water_a02,"water_a02"
2891      print*,p_num_a02,"num_a02"
2892      print*,p_aro1_a02,"aro1_a02"
2893      print*,p_aro2_a02,"aro2_a02"
2894      print*,p_alk1_a02,"alk1_a02"
2895      print*,p_ole1_a02,"ole1_a02"
2896      print*,p_api1_a02,"api1_a02"
2897      print*,p_api2_a02,"api2_a02"
2898      print*,p_lim1_a02,"lim1_a02"
2899      print*,p_lim2_a02,"lim2_a02"
2900      print*,p_so4_a03,"so4_a03"
2901      print*,p_no3_a03,"no3_a03"
2902      print*,p_cl_a03,"cl_a03"
2903      print*,p_nh4_a03,"nh4_a03"
2904      print*,p_na_a03,"na_a03"
2905      print*,p_oin_a03,"oin_a03"
2906      print*,p_oc_a03,"oc_a03"
2907      print*,p_bc_a03,"bc_a03"
2908      print*,p_hysw_a03,"hysw_a03"
2909      print*,p_water_a03,"water_a03"
2910      print*,p_num_a03,"num_a03"
2911      print*,p_aro1_a03,"aro1_a03"
2912      print*,p_aro2_a03,"aro2_a03"
2913      print*,p_alk1_a03,"alk1_a03"
2914      print*,p_ole1_a03,"ole1_a03"
2915      print*,p_api1_a03,"api1_a03"
2916      print*,p_api2_a03,"api2_a03"
2917      print*,p_lim1_a03,"lim1_a03"
2918      print*,p_lim2_a03,"lim2_a03"
2919      print*,p_so4_a04,"so4_a04"
2920      print*,p_no3_a04,"no3_a04"
2921      print*,p_cl_a04,"cl_a04"
2922      print*,p_nh4_a04,"nh4_a04"
2923      print*,p_na_a04,"na_a04"
2924      print*,p_oin_a04,"oin_a04"
2925      print*,p_oc_a04,"oc_a04"
2926      print*,p_bc_a04,"bc_a04"
2927      print*,p_hysw_a04,"hysw_a04"
2928      print*,p_water_a04,"water_a04"
2929      print*,p_num_a04,"num_a04"
2930      print*,p_aro1_a04,"aro1_a04"
2931      print*,p_aro2_a04,"aro2_a04"
2932      print*,p_alk1_a04,"alk1_a04"
2933      print*,p_ole1_a04,"ole1_a04"
2934      print*,p_api1_a04,"api1_a04"
2935      print*,p_api2_a04,"api2_a04"
2936      print*,p_lim1_a04,"lim1_a04"
2937      print*,p_lim2_a04,"lim2_a04"
2938      print*,p_so4_a05,"so4_a05"
2939      print*,p_no3_a05,"no3_a05"
2940      print*,p_cl_a05,"cl_a05"
2941      print*,p_nh4_a05,"nh4_a05"
2942      print*,p_na_a05,"na_a05"
2943      print*,p_oin_a05,"oin_a05"
2944      print*,p_oc_a05,"oc_a05"
2945      print*,p_bc_a05,"bc_a05"
2946      print*,p_hysw_a05,"hysw_a05"
2947      print*,p_water_a05,"water_a05"
2948      print*,p_num_a05,"num_a05"
2949      print*,p_aro1_a05,"aro1_a05"
2950      print*,p_aro2_a05,"aro2_a05"
2951      print*,p_alk1_a05,"alk1_a05"
2952      print*,p_ole1_a05,"ole1_a05"
2953      print*,p_api1_a05,"api1_a05"
2954      print*,p_api2_a05,"api2_a05"
2955      print*,p_lim1_a05,"lim1_a05"
2956      print*,p_lim2_a05,"lim2_a05"
2957      print*,p_so4_a06,"so4_a06"
2958      print*,p_no3_a06,"no3_a06"
2959      print*,p_cl_a06,"cl_a06"
2960      print*,p_nh4_a06,"nh4_a06"
2961      print*,p_na_a06,"na_a06"
2962      print*,p_oin_a06,"oin_a06"
2963      print*,p_oc_a06,"oc_a06"
2964      print*,p_bc_a06,"bc_a06"
2965      print*,p_hysw_a06,"hysw_a06"
2966      print*,p_water_a06,"water_a06"
2967      print*,p_num_a06,"num_a06"
2968      print*,p_aro1_a06,"aro1_a06"
2969      print*,p_aro2_a06,"aro2_a06"
2970      print*,p_alk1_a06,"alk1_a06"
2971      print*,p_ole1_a06,"ole1_a06"
2972      print*,p_api1_a06,"api1_a06"
2973      print*,p_api2_a06,"api2_a06"
2974      print*,p_lim1_a06,"lim1_a06"
2975      print*,p_lim2_a06,"lim2_a06"
2976      print*,p_so4_a07,"so4_a07"
2977      print*,p_no3_a07,"no3_a07"
2978      print*,p_cl_a07,"cl_a07"
2979      print*,p_nh4_a07,"nh4_a07"
2980      print*,p_na_a07,"na_a07"
2981      print*,p_oin_a07,"oin_a07"
2982      print*,p_oc_a07,"oc_a07"
2983      print*,p_bc_a07,"bc_a07"
2984      print*,p_hysw_a07,"hysw_a07"
2985      print*,p_water_a07,"water_a07"
2986      print*,p_num_a07,"num_a07"
2987      print*,p_aro1_a07,"aro1_a07"
2988      print*,p_aro2_a07,"aro2_a07"
2989      print*,p_alk1_a07,"alk1_a07"
2990      print*,p_ole1_a07,"ole1_a07"
2991      print*,p_api1_a07,"api1_a07"
2992      print*,p_api2_a07,"api2_a07"
2993      print*,p_lim1_a07,"lim1_a07"
2994      print*,p_lim2_a07,"lim2_a07"
2995      print*,p_so4_a08,"so4_a08"
2996      print*,p_no3_a08,"no3_a08"
2997      print*,p_cl_a08,"cl_a08"
2998      print*,p_nh4_a08,"nh4_a08"
2999      print*,p_na_a08,"na_a08"
3000      print*,p_oin_a08,"oin_a08"
3001      print*,p_oc_a08,"oc_a08"
3002      print*,p_bc_a08,"bc_a08"
3003      print*,p_hysw_a08,"hysw_a08"
3004      print*,p_water_a08,"water_a08"
3005      print*,p_num_a08,"num_a08"
3006      print*,p_aro1_a08,"aro1_a08"
3007      print*,p_aro2_a08,"aro2_a08"
3008      print*,p_alk1_a08,"alk1_a08"
3009      print*,p_ole1_a08,"ole1_a08"
3010      print*,p_api1_a08,"api1_a08"
3011      print*,p_api2_a08,"api2_a08"
3012      print*,p_lim1_a08,"lim1_a08"
3013      print*,p_lim2_a08,"lim2_a08"
3014      print*,p_ca_a01,"ca_a01"
3015      print*,p_ca_a02,"ca_a02"
3016      print*,p_ca_a03,"ca_a03"
3017      print*,p_ca_a04,"ca_a04"
3018      print*,p_ca_a05,"ca_a05"
3019      print*,p_ca_a06,"ca_a06"
3020      print*,p_ca_a07,"ca_a07"
3021      print*,p_ca_a08,"ca_a08"
3022      print*,p_co3_a01,"co3_a01"
3023      print*,p_co3_a02,"co3_a02"
3024      print*,p_co3_a03,"co3_a03"
3025      print*,p_co3_a04,"co3_a04"
3026      print*,p_co3_a05,"co3_a05"
3027      print*,p_co3_a06,"co3_a06"
3028      print*,p_co3_a07,"co3_a07"
3029      print*,p_co3_a08,"co3_a08"
3031   case (CBMZ_MOSAIC_4BIN_AQ)
3032      print*,p_so4_a01,"so4_a01"
3033      print*,p_no3_a01,"no3_a01"
3034      print*,p_cl_a01,"cl_a01"
3035      print*,p_nh4_a01,"nh4_a01"
3036      print*,p_na_a01,"na_a01"
3037      print*,p_oin_a01,"oin_a01"
3038      print*,p_oc_a01,"oc_a01"
3039      print*,p_bc_a01,"bc_a01"
3040      print*,p_hysw_a01,"hysw_a01"
3041      print*,p_water_a01,"water_a01"
3042      print*,p_num_a01,"num_a01"
3043      print*,p_so4_a02,"so4_a02"
3044      print*,p_no3_a02,"no3_a02"
3045      print*,p_cl_a02,"cl_a02"
3046      print*,p_nh4_a02,"nh4_a02"
3047      print*,p_na_a02,"na_a02"
3048      print*,p_oin_a02,"oin_a02"
3049      print*,p_oc_a02,"oc_a02"
3050      print*,p_bc_a02,"bc_a02"
3051      print*,p_hysw_a02,"hysw_a02"
3052      print*,p_water_a02,"water_a02"
3053      print*,p_num_a02,"num_a02"
3054      print*,p_so4_a03,"so4_a03"
3055      print*,p_no3_a03,"no3_a03"
3056      print*,p_cl_a03,"cl_a03"
3057      print*,p_nh4_a03,"nh4_a03"
3058      print*,p_na_a03,"na_a03"
3059      print*,p_oin_a03,"oin_a03"
3060      print*,p_oc_a03,"oc_a03"
3061      print*,p_bc_a03,"bc_a03"
3062      print*,p_hysw_a03,"hysw_a03"
3063      print*,p_water_a03,"water_a03"
3064      print*,p_num_a03,"num_a03"
3065      print*,p_so4_a04,"so4_a04"
3066      print*,p_no3_a04,"no3_a04"
3067      print*,p_cl_a04,"cl_a04"
3068      print*,p_nh4_a04,"nh4_a04"
3069      print*,p_na_a04,"na_a04"
3070      print*,p_oin_a04,"oin_a04"
3071      print*,p_oc_a04,"oc_a04"
3072      print*,p_bc_a04,"bc_a04"
3073      print*,p_hysw_a04,"hysw_a04"
3074      print*,p_water_a04,"water_a04"
3075      print*,p_num_a04,"num_a04"
3076      print*,p_so4_cw01,"so4_cw01"
3077      print*,p_no3_cw01,"no3_cw01"
3078      print*,p_cl_cw01,"cl_cw01"
3079      print*,p_nh4_cw01,"nh4_cw01"
3080      print*,p_na_cw01,"na_cw01"
3081      print*,p_oin_cw01,"oin_cw01"
3082      print*,p_oc_cw01,"oc_cw01"
3083      print*,p_bc_cw01,"bc_cw01"
3084      print*,p_num_cw01,"num_cw01"
3085      print*,p_so4_cw02,"so4_cw02"
3086      print*,p_no3_cw02,"no3_cw02"
3087      print*,p_cl_cw02,"cl_cw02"
3088      print*,p_nh4_cw02,"nh4_cw02"
3089      print*,p_na_cw02,"na_cw02"
3090      print*,p_oin_cw02,"oin_cw02"
3091      print*,p_oc_cw02,"oc_cw02"
3092      print*,p_bc_cw02,"bc_cw02"
3093      print*,p_num_cw02,"num_cw02"
3094      print*,p_so4_cw03,"so4_cw03"
3095      print*,p_no3_cw03,"no3_cw03"
3096      print*,p_cl_cw03,"cl_cw03"
3097      print*,p_nh4_cw03,"nh4_cw03"
3098      print*,p_na_cw03,"na_cw03"
3099      print*,p_oin_cw03,"oin_cw03"
3100      print*,p_oc_cw03,"oc_cw03"
3101      print*,p_bc_cw03,"bc_cw03"
3102      print*,p_num_cw03,"num_cw03"
3103      print*,p_so4_cw04,"so4_cw04"
3104      print*,p_no3_cw04,"no3_cw04"
3105      print*,p_cl_cw04,"cl_cw04"
3106      print*,p_nh4_cw04,"nh4_cw04"
3107      print*,p_na_cw04,"na_cw04"
3108      print*,p_oin_cw04,"oin_cw04"
3109      print*,p_oc_cw04,"oc_cw04"
3110      print*,p_bc_cw04,"bc_cw04"
3111      print*,p_num_cw04,"num_cw04"
3113   case (CBMZ_MOSAIC_8BIN_AQ)
3114      print*,p_so4_a01,"so4_a01"
3115      print*,p_no3_a01,"no3_a01"
3116      print*,p_cl_a01,"cl_a01"
3117      print*,p_nh4_a01,"nh4_a01"
3118      print*,p_na_a01,"na_a01"
3119      print*,p_oin_a01,"oin_a01"
3120      print*,p_oc_a01,"oc_a01"
3121      print*,p_bc_a01,"bc_a01"
3122      print*,p_hysw_a01,"hysw_a01"
3123      print*,p_water_a01,"water_a01"
3124      print*,p_num_a01,"num_a01"
3125      print*,p_so4_a02,"so4_a02"
3126      print*,p_no3_a02,"no3_a02"
3127      print*,p_cl_a02,"cl_a02"
3128      print*,p_nh4_a02,"nh4_a02"
3129      print*,p_na_a02,"na_a02"
3130      print*,p_oin_a02,"oin_a02"
3131      print*,p_oc_a02,"oc_a02"
3132      print*,p_bc_a02,"bc_a02"
3133      print*,p_hysw_a02,"hysw_a02"
3134      print*,p_water_a02,"water_a02"
3135      print*,p_num_a02,"num_a02"
3136      print*,p_so4_a03,"so4_a03"
3137      print*,p_no3_a03,"no3_a03"
3138      print*,p_cl_a03,"cl_a03"
3139      print*,p_nh4_a03,"nh4_a03"
3140      print*,p_na_a03,"na_a03"
3141      print*,p_oin_a03,"oin_a03"
3142      print*,p_oc_a03,"oc_a03"
3143      print*,p_bc_a03,"bc_a03"
3144      print*,p_hysw_a03,"hysw_a03"
3145      print*,p_water_a03,"water_a03"
3146      print*,p_num_a03,"num_a03"
3147      print*,p_so4_a04,"so4_a04"
3148      print*,p_no3_a04,"no3_a04"
3149      print*,p_cl_a04,"cl_a04"
3150      print*,p_nh4_a04,"nh4_a04"
3151      print*,p_na_a04,"na_a04"
3152      print*,p_oin_a04,"oin_a04"
3153      print*,p_oc_a04,"oc_a04"
3154      print*,p_bc_a04,"bc_a04"
3155      print*,p_hysw_a04,"hysw_a04"
3156      print*,p_water_a04,"water_a04"
3157      print*,p_num_a04,"num_a04"
3158      print*,p_so4_a05,"so4_a05"
3159      print*,p_no3_a05,"no3_a05"
3160      print*,p_cl_a05,"cl_a05"
3161      print*,p_nh4_a05,"nh4_a05"
3162      print*,p_na_a05,"na_a05"
3163      print*,p_oin_a05,"oin_a05"
3164      print*,p_oc_a05,"oc_a05"
3165      print*,p_bc_a05,"bc_a05"
3166      print*,p_hysw_a05,"hysw_a05"
3167      print*,p_water_a05,"water_a05"
3168      print*,p_num_a05,"num_a05"
3169      print*,p_so4_a06,"so4_a06"
3170      print*,p_no3_a06,"no3_a06"
3171      print*,p_cl_a06,"cl_a06"
3172      print*,p_nh4_a06,"nh4_a06"
3173      print*,p_na_a06,"na_a06"
3174      print*,p_oin_a06,"oin_a06"
3175      print*,p_oc_a06,"oc_a06"
3176      print*,p_bc_a06,"bc_a06"
3177      print*,p_hysw_a06,"hysw_a06"
3178      print*,p_water_a06,"water_a06"
3179      print*,p_num_a06,"num_a06"
3180      print*,p_so4_a07,"so4_a07"
3181      print*,p_no3_a07,"no3_a07"
3182      print*,p_cl_a07,"cl_a07"
3183      print*,p_nh4_a07,"nh4_a07"
3184      print*,p_na_a07,"na_a07"
3185      print*,p_oin_a07,"oin_a07"
3186      print*,p_oc_a07,"oc_a07"
3187      print*,p_bc_a07,"bc_a07"
3188      print*,p_hysw_a07,"hysw_a07"
3189      print*,p_water_a07,"water_a07"
3190      print*,p_num_a07,"num_a07"
3191      print*,p_so4_a08,"so4_a08"
3192      print*,p_no3_a08,"no3_a08"
3193      print*,p_cl_a08,"cl_a08"
3194      print*,p_nh4_a08,"nh4_a08"
3195      print*,p_na_a08,"na_a08"
3196      print*,p_oin_a08,"oin_a08"
3197      print*,p_oc_a08,"oc_a08"
3198      print*,p_bc_a08,"bc_a08"
3199      print*,p_hysw_a08,"hysw_a08"
3200      print*,p_water_a08,"water_a08"
3201      print*,p_num_a08,"num_a08"
3202   
3203      print*,p_so4_cw01,"so4_cw01"
3204      print*,p_no3_cw01,"no3_cw01"
3205      print*,p_cl_cw01,"cl_cw01"
3206      print*,p_nh4_cw01,"nh4_cw01"
3207      print*,p_na_cw01,"na_cw01"
3208      print*,p_oin_cw01,"oin_cw01"
3209      print*,p_oc_cw01,"oc_cw01"
3210      print*,p_bc_cw01,"bc_cw01"
3211      print*,p_num_cw01,"num_cw01"
3212      print*,p_so4_cw02,"so4_cw02"
3213      print*,p_no3_cw02,"no3_cw02"
3214      print*,p_cl_cw02,"cl_cw02"
3215      print*,p_nh4_cw02,"nh4_cw02"
3216      print*,p_na_cw02,"na_cw02"
3217      print*,p_oin_cw02,"oin_cw02"
3218      print*,p_oc_cw02,"oc_cw02"
3219      print*,p_bc_cw02,"bc_cw02"
3220      print*,p_num_cw02,"num_cw02"
3221      print*,p_so4_cw03,"so4_cw03"
3222      print*,p_no3_cw03,"no3_cw03"
3223      print*,p_cl_cw03,"cl_cw03"
3224      print*,p_nh4_cw03,"nh4_cw03"
3225      print*,p_na_cw03,"na_cw03"
3226      print*,p_oin_cw03,"oin_cw03"
3227      print*,p_oc_cw03,"oc_cw03"
3228      print*,p_bc_cw03,"bc_cw03"
3229      print*,p_num_cw03,"num_cw03"
3230      print*,p_so4_cw04,"so4_cw04"
3231      print*,p_no3_cw04,"no3_cw04"
3232      print*,p_cl_cw04,"cl_cw04"
3233      print*,p_nh4_cw04,"nh4_cw04"
3234      print*,p_na_cw04,"na_cw04"
3235      print*,p_oin_cw04,"oin_cw04"
3236      print*,p_oc_cw04,"oc_cw04"
3237      print*,p_bc_cw04,"bc_cw04"
3238      print*,p_num_cw04,"num_cw04"
3239      print*,p_so4_cw05,"so4_cw05"
3240      print*,p_no3_cw05,"no3_cw05"
3241      print*,p_cl_cw05,"cl_cw05"
3242      print*,p_nh4_cw05,"nh4_cw05"
3243      print*,p_na_cw05,"na_cw05"
3244      print*,p_oin_cw05,"oin_cw05"
3245      print*,p_oc_cw05,"oc_cw05"
3246      print*,p_bc_cw05,"bc_cw05"
3247      print*,p_num_cw05,"num_cw05"
3248      print*,p_so4_cw06,"so4_cw06"
3249      print*,p_no3_cw06,"no3_cw06"
3250      print*,p_cl_cw06,"cl_cw06"
3251      print*,p_nh4_cw06,"nh4_cw06"
3252      print*,p_na_cw06,"na_cw06"
3253      print*,p_oin_cw06,"oin_cw06"
3254      print*,p_oc_cw06,"oc_cw06"
3255      print*,p_bc_cw06,"bc_cw06"
3256      print*,p_num_cw06,"num_cw06"
3257      print*,p_so4_cw07,"so4_cw07"
3258      print*,p_no3_cw07,"no3_cw07"
3259      print*,p_cl_cw07,"cl_cw07"
3260      print*,p_nh4_cw07,"nh4_cw07"
3261      print*,p_na_cw07,"na_cw07"
3262      print*,p_oin_cw07,"oin_cw07"
3263      print*,p_oc_cw07,"oc_cw07"
3264      print*,p_bc_cw07,"bc_cw07"
3265      print*,p_num_cw07,"num_cw07"
3266      print*,p_so4_cw08,"so4_cw08"
3267      print*,p_no3_cw08,"no3_cw08"
3268      print*,p_cl_cw08,"cl_cw08"
3269      print*,p_nh4_cw08,"nh4_cw08"
3270      print*,p_na_cw08,"na_cw08"
3271      print*,p_oin_cw08,"oin_cw08"
3272      print*,p_oc_cw08,"oc_cw08"
3273      print*,p_bc_cw08,"bc_cw08"
3274      print*,p_num_cw08,"num_cw08"
3276   case ( CBMZ_CAM_MAM3_NOAQ, CBMZ_CAM_MAM3_AQ )
3277      print*,p_so4_a1,"so4_a1"
3278      print*,p_pom_a1,"pom_a1"
3279      print*,p_soa_a1,"soa_a1"
3280      print*,p_bc_a1, "bc_a1"
3281      print*,p_dst_a1,"dst_a1"
3282      print*,p_ncl_a1,"ncl_a1"
3283      print*,p_wtr_a1,"wtr_a1"
3284      print*,p_num_a1,"num_a1"
3285      print*,p_so4_a2,"so4_a2"
3286      print*,p_soa_a1,"soa_a2"
3287      print*,p_wtr_a1,"wtr_a2"
3288      print*,p_num_a2,"num_a2"
3289      print*,p_dst_a3,"dst_a3"
3290      print*,p_ncl_a3,"ncl_a3"
3291      print*,p_so4_a3,"so4_a3"
3292      print*,p_wtr_a1,"wtr_a3"
3293      print*,p_num_a3,"num_a3"
3295   case ( CBMZ_CAM_MAM3_AQ )
3296      print*,p_so4_c1,"so4_c1"
3297      print*,p_pom_c1,"pom_c1"
3298      print*,p_soa_c1,"soa_c1"
3299      print*,p_bc_c1, "bc_c1"
3300      print*,p_dst_c1,"dst_c1"
3301      print*,p_ncl_c1,"ncl_c1"
3302      print*,p_num_c1,"num_c1"
3303      print*,p_so4_c2,"so4_c2"
3304      print*,p_soa_c1,"soa_c2"
3305      print*,p_num_c2,"num_c2"
3306      print*,p_dst_c3,"dst_c3"
3307      print*,p_ncl_c3,"ncl_c3"
3308      print*,p_so4_c3,"so4_c3"
3309      print*,p_num_c3,"num_c3"
3311   case ( CBMZ_CAM_MAM7_NOAQ, CBMZ_CAM_MAM7_AQ )
3312      print*,p_so4_a1,"so4_a1"
3313      print*,p_nh4_a1,"nh4_a1"
3314      print*,p_pom_a1,"pom_a1"
3315      print*,p_soa_a1,"soa_a1"
3316      print*,p_bc_a1, "bc_a1"
3317      print*,p_ncl_a1,"ncl_a1"
3318      print*,p_wtr_a1,"wtr_a1"
3319      print*,p_num_a1,"num_a1"
3320      print*,p_so4_a2,"so4_a2"
3321      print*,p_nh4_a2,"nh4_a2"
3322      print*,p_soa_a2,"soa_a2"
3323      print*,p_ncl_a2,"ncl_a2"
3324      print*,p_wtr_a2,"wtr_a2"
3325      print*,p_num_a2,"num_a2"
3326      print*,p_pom_a3,"pom_a3"
3327      print*,p_bc_a3, "bc_a3"
3328      print*,p_wtr_a3,"wtr_a3"
3329      print*,p_num_a3,"num_a3"
3330      print*,p_ncl_a4,"ncl_a4"
3331      print*,p_so4_a4,"so4_a4"
3332      print*,p_nh4_a4,"nh4_a4"
3333      print*,p_wtr_a4,"wtr_a4"
3334      print*,p_num_a4,"num_a4"
3335      print*,p_dst_a5,"dst_a5"
3336      print*,p_so4_a5,"so4_a5"
3337      print*,p_nh4_a5,"nh4_a5"
3338      print*,p_wtr_a5,"wtr_a5"
3339      print*,p_num_a5,"num_a5"
3340      print*,p_ncl_a6,"ncl_a6"
3341      print*,p_so4_a6,"so4_a6"
3342      print*,p_nh4_a6,"nh4_a6"
3343      print*,p_wtr_a6,"wtr_a6"
3344      print*,p_num_a6,"num_a6"
3345      print*,p_dst_a7,"dst_a7"
3346      print*,p_so4_a7,"so4_a7"
3347      print*,p_nh4_a7,"nh4_a7"
3348      print*,p_wtr_a7,"wtr_a7"
3349      print*,p_num_a7,"num_a7"
3351   case ( CBMZ_CAM_MAM7_AQ )
3352      print*,p_so4_c1,"so4_c1"
3353      print*,p_nh4_c1,"nh4_c1"
3354      print*,p_pom_c1,"pom_c1"
3355      print*,p_soa_c1,"soa_c1"
3356      print*,p_bc_c1, "bc_c1"
3357      print*,p_ncl_c1,"ncl_c1"
3358      print*,p_num_c1,"num_c1"
3359      print*,p_so4_c2,"so4_c2"
3360      print*,p_nh4_c2,"nh4_c2"
3361      print*,p_soa_c2,"soa_c2"
3362      print*,p_ncl_c2,"ncl_c2"
3363      print*,p_num_c2,"num_c2"
3364      print*,p_pom_c3,"pom_c3"
3365      print*,p_bc_c3, "bc_c3"
3366      print*,p_num_c3,"num_c3"
3367      print*,p_ncl_c4,"ncl_c4"
3368      print*,p_so4_c4,"so4_c4"
3369      print*,p_nh4_c4,"nh4_c4"
3370      print*,p_num_c4,"num_c4"
3371      print*,p_dst_c5,"dst_c5"
3372      print*,p_so4_c5,"so4_c5"
3373      print*,p_nh4_c5,"nh4_c5"
3374      print*,p_num_c5,"num_c5"
3375      print*,p_ncl_c6,"ncl_c6"
3376      print*,p_so4_c6,"so4_c6"
3377      print*,p_nh4_c6,"nh4_c6"
3378      print*,p_num_c6,"num_c6"
3379      print*,p_dst_c7,"dst_c7"
3380      print*,p_so4_c7,"so4_c7"
3381      print*,p_nh4_c7,"nh4_c7"
3382      print*,p_num_c7,"num_c7"
3384   case (RACM_SOA_VBS_KPP,RACM_SOA_VBS_HET_KPP)
3385      print*,p_so4aj,"so4aj"
3386      print*,p_so4ai,"so4ai"
3387      print*,p_nh4aj,"nh4aj"
3388      print*,p_nh4ai,"nh4ai"
3389      print*,p_no3aj,"no3aj"
3390      print*,p_no3ai,"no3ai"
3392      print*,p_asoa1j,"asoa1j"
3393      print*,p_asoa1i,"asoa1i"
3394      print*,p_asoa2j,"asoa2j"
3395      print*,p_asoa2i,"asoa2i"
3396      print*,p_asoa3j,"asoa3j"
3397      print*,p_asoa3i,"asoa3i"
3398      print*,p_asoa4j,"asoa4j"
3399      print*,p_asoa4i,"asoa4i"
3401      print*,p_bsoa1j,"bsoa1j"
3402      print*,p_bsoa1i,"bsoa1i"
3403      print*,p_bsoa2j,"bsoa2j"
3404      print*,p_bsoa2i,"bsoa2i"
3405      print*,p_bsoa3j,"bsoa3j"
3406      print*,p_bsoa3i,"bsoa3i"
3407      print*,p_bsoa4j,"bsoa4j"
3408      print*,p_bsoa4i,"bsoa4i"
3410      print*,p_orgpaj,"orgpaj"
3411      print*,p_orgpai,"orgpai"
3412      print*,p_ecj,"ecj"
3413      print*,p_eci,"eci"
3414      print*,p_p25j,"p25j"
3415      print*,p_p25i,"p25i"
3416      print*,p_antha,"antha"
3417      print*,p_seas,"seas"
3418      print*,p_soila,"soila"
3419      print*,p_nu0,"nu0"
3420      print*,p_ac0,"ac0"
3421      print*,p_corn,"corn"
3422 !!! TUCCELLA
3423  case (RACM_SOA_VBS_AQCHEM_KPP)
3424      print*,p_so4aj,"so4aj"
3425      print*,p_so4ai,"so4ai"
3426      print*,p_nh4aj,"nh4aj"
3427      print*,p_nh4ai,"nh4ai"
3428      print*,p_no3aj,"no3aj"
3429      print*,p_no3ai,"no3ai"
3431      print*,p_asoa1j,"asoa1j"
3432      print*,p_asoa1i,"asoa1i"
3433      print*,p_asoa2j,"asoa2j"
3434      print*,p_asoa2i,"asoa2i"
3435      print*,p_asoa3j,"asoa3j"
3436      print*,p_asoa3i,"asoa3i"
3437      print*,p_asoa4j,"asoa4j"
3438      print*,p_asoa4i,"asoa4i"
3440      print*,p_bsoa1j,"bsoa1j"
3441      print*,p_bsoa1i,"bsoa1i"
3442      print*,p_bsoa2j,"bsoa2j"
3443      print*,p_bsoa2i,"bsoa2i"
3444      print*,p_bsoa3j,"bsoa3j"
3445      print*,p_bsoa3i,"bsoa3i"
3446      print*,p_bsoa4j,"bsoa4j"
3447      print*,p_bsoa4i,"bsoa4i"
3449      print*,p_orgpaj,"orgpaj"
3450      print*,p_orgpai,"orgpai"
3451      print*,p_ecj,"ecj"
3452      print*,p_eci,"eci"
3453      print*,p_p25j,"p25j"
3454      print*,p_p25i,"p25i"
3455      print*,p_antha,"antha"
3456      print*,p_seas,"seas"
3457      print*,p_soila,"soila"
3458      print*,p_nu0,"nu0"
3459      print*,p_ac0,"ac0"
3460      print*,p_corn,"corn"
3462      print*,p_so4acwj,"so4acwj"
3463      print*,p_so4acwi,"so4acwi"
3464      print*,p_nh4acwj,"nh4acwj"
3465      print*,p_nh4acwi,"nh4acwi"
3466      print*,p_no3acwj,"no3acwj"
3467      print*,p_no3acwi,"no3acwi"
3469      print*,p_asoa1cwj,"asoa1cwj"
3470      print*,p_asoa1cwi,"asoa1cwi"
3471      print*,p_asoa2cwj,"asoa2cwj"
3472      print*,p_asoa2cwi,"asoa2cwi"
3473      print*,p_asoa3cwj,"asoa3cwj"
3474      print*,p_asoa3cwi,"asoa3cwi"
3475      print*,p_asoa4cwj,"asoa4cwj"
3476      print*,p_asoa4cwi,"asoa4cwi"
3478      print*,p_bsoa1cwj,"bsoa1cwj"
3479      print*,p_bsoa1cwi,"bsoa1cwi"
3480      print*,p_bsoa2cwj,"bsoa2cwj"
3481      print*,p_bsoa2cwi,"bsoa2cwi"
3482      print*,p_bsoa3cwj,"bsoa3cwj"
3483      print*,p_bsoa3cwi,"bsoa3cwi"
3484      print*,p_bsoa4cwj,"bsoa4cwj"
3485      print*,p_bsoa4cwi,"bsoa4cwi"
3487      print*,p_orgpacwj,"orgpacwj"
3488      print*,p_orgpacwi,"orgpacwi"
3489      print*,p_eccwj,"eccwj"
3490      print*,p_eccwi,"eccwi"
3491      print*,p_p25cwj,"p25cwj"
3492      print*,p_p25cwi,"p25cwi"
3493      print*,p_anthacw,"anthacw"
3494      print*,p_seascw,"seascw"
3495      print*,p_soilacw,"soilacw"
3496      print*,p_nu0cw,"nu0cw"
3497      print*,p_ac0cw,"ac0cw"
3498      print*,p_corncw,"corncw"
3499 end select
3500 end subroutine print_chem_species_index
3501 #endif