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