1 MODULE module_chem_share
2 USE module_state_description
5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7 integer FUNCTION get_last_gas(chem_opt)
9 integer, intent(in) :: chem_opt
11 ! Determine the index of the last gas species, which depends
12 ! upon the gas mechanism.
14 select case (chem_opt)
19 case (RADM2, RADM2_KPP, RADM2SORG, RADM2SORG_AQ, RADM2SORG_AQCHEM, RADM2SORG_KPP, &
20 RACM_KPP, RACMPM_KPP, RACM_MIM_KPP, RACMSORG_AQ, RACMSORG_AQCHEM_KPP, &
21 RACM_ESRLSORG_AQCHEM_KPP, RACM_ESRLSORG_KPP, RACMSORG_KPP, RACM_SOA_VBS_KPP,&
22 RACM_SOA_VBS_AQCHEM_KPP,GOCARTRACM_KPP,GOCARTRADM2, &
26 case (SAPRC99_KPP,SAPRC99_MOSAIC_4BIN_VBS2_KPP, &
27 SAPRC99_MOSAIC_8BIN_VBS2_AQ_KPP,SAPRC99_MOSAIC_8BIN_VBS2_KPP)!BSINGH(12/13/2013): Added SAPRC 8 bin AQ case and non-aq on 04/03/2014
30 case (CBMZ,CBMZ_MOSAIC_DMS_4BIN,CBMZ_MOSAIC_DMS_8BIN,CBMZ_MOSAIC_DMS_4BIN_AQ,CBMZ_MOSAIC_DMS_8BIN_AQ)
33 case (CBMZ_BB,CBMZ_BB_KPP, CBMZ_MOSAIC_KPP, CBMZ_MOSAIC_4BIN, &
34 CBMZ_MOSAIC_8BIN,CBMZ_MOSAIC_4BIN_AQ,CBMZ_MOSAIC_8BIN_AQ,CBMZSORG,CBMZSORG_AQ)
35 get_last_gas = p_isopo2
40 get_last_gas = p_tracer_1
48 case (CB05_SORG_AQ_KPP, CB05_SORG_VBS_AQ_KPP)
60 get_last_gas = p_meko2
62 case (CRIMECH_KPP, CRI_MOSAIC_8BIN_AQ_KPP, CRI_MOSAIC_4BIN_AQ_KPP)
63 GET_LAST_GAS = p_ic3h7no3
66 get_last_gas = p_meko2
69 get_last_gas = p_xylolo2
71 case (MOZART_MOSAIC_4BIN_KPP)
72 get_last_gas = p_meko2
74 case (MOZART_MOSAIC_4BIN_AQ_KPP)
75 get_last_gas = p_meko2
77 case (CO2_TRACER,GHG_TRACER) ! No gas chemistry or deposition for GHGs
79 case ( CBMZ_CAM_MAM3_NOAQ, CBMZ_CAM_MAM3_AQ, CBMZ_CAM_MAM7_NOAQ, CBMZ_CAM_MAM7_AQ )
82 call wrf_error_fatal("get_last_gas: could not decipher chem_opt value")
85 END FUNCTION get_last_gas
86 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
88 END MODULE module_chem_share