Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BC and POM in coarse mode, plus associated chemistry mechanism #581

Merged
merged 5 commits into from
Dec 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/cam/bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -2268,7 +2268,7 @@ if ($chem eq 'waccm_mozart_mam3') {
}

}
if ($chem eq 'trop_mam4') {
if ($chem eq 'trop_mam4' || $chem eq 'trop_mam4_resus') {

my %species;

Expand Down
4 changes: 2 additions & 2 deletions components/cam/bld/config_files/definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ meteor_smoke (Meteor Smoke), mixed_sulfate (Meteor Smoke and Sulfate), pmc (Pola
sulfate (Sulfate Aerosols), tholin (early earth haze), test_detrain (Detrainment), test_growth (Particle Growth), test_passive (Passive Dust),
test_radiative (Radiatively Active Dust), test_swelling (Sea Salt), test_tracers (Asian Monsoon), test_tracers2 (Guam).
</entry>
<entry id="chem" valid_values="waccm_mozart,waccm_mozart_mam3,waccm_mozart_sulfur,waccm_ghg,trop_mozart,trop_mozart_mam3,trop_mozart_soa,trop_strat_soa,trop_strat_mam3,trop_strat_mam7,super_fast_llnl,super_fast_llnl_mam3,trop_ghg,trop_bam,trop_mam3,trop_mam4,trop_mam7,none"
<entry id="chem" valid_values="waccm_mozart,waccm_mozart_mam3,waccm_mozart_sulfur,waccm_ghg,trop_mozart,trop_mozart_mam3,trop_mozart_soa,trop_strat_soa,trop_strat_mam3,trop_strat_mam7,super_fast_llnl,super_fast_llnl_mam3,trop_ghg,trop_bam,trop_mam3,trop_mam4,trop_mam4_resus,trop_mam7,none"
value="">
Chemistry package: waccm_mozart, waccm_mozart_mam3, waccm_mozart_sulfur, waccm_ghg, trop_mozart, trop_mozart_mam3, trop_mozart_soa, trop_strat_soa, trop_strat_mam3, trop_strat_mam7, super_fast_llnl, trop_ghg, trop_bam, trop_mam3, trop_mam4, trop_mam7, or none.
Chemistry package: waccm_mozart, waccm_mozart_mam3, waccm_mozart_sulfur, waccm_ghg, trop_mozart, trop_mozart_mam3, trop_mozart_soa, trop_strat_soa, trop_strat_mam3, trop_strat_mam7, super_fast_llnl, trop_ghg, trop_bam, trop_mam3, trop_mam4, trop_mam4_resus, trop_mam7, or none.
</entry>
<entry id="prog_species" valid_values="DST,SSLT,SO4,GHG,OC,BC,CARBON16" value="" list="1">
Prognostic mozart species packages: list of any subset of the following: DST,SSLT,SO4,GHG,OC,BC,CARBON16
Expand Down
8 changes: 6 additions & 2 deletions components/cam/bld/configure
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,10 @@ my $chem_nadv = 0;
my $chem_cppdefs = '';
my $chem_src_dir = '';

if (($rain_evap_to_coarse_aero == 1) && ($chem_pkg eq 'trop_mam4')) {
$chem_pkg = 'trop_mam4_resus'
}

if (!$prog_species) {
$chem_src_dir = "$cam_root/components/cam/src/chemistry/pp_$chem_pkg";
$cfg_ref->set('chem_src_dir', $chem_src_dir);
Expand Down Expand Up @@ -1351,13 +1355,13 @@ if (($chem_pkg ne 'none') || ($prog_species)) {
}
if ($chem_pkg =~ '_mam3') {
$chem_cppdefs = ' -DMODAL_AERO -DMODAL_AERO_3MODE ';
} elsif ($chem_pkg =~ '_mam4') {
} elsif ($chem_pkg =~ '_mam4' || $chem_pkg eq 'trop_mam4_resus') {
$chem_cppdefs = ' -DMODAL_AERO -DMODAL_AERO_4MODE ';
} elsif ($chem_pkg =~ '_mam7') {
$chem_cppdefs = ' -DMODAL_AERO -DMODAL_AERO_7MODE ';
}

if ($rain_evap_to_coarse_aero == 1 && ($chem_pkg =~ '_mam3' || $chem_pkg =~ '_mam4')) {
if ($rain_evap_to_coarse_aero == 1 && ($chem_pkg =~ '_mam3' || $chem_pkg =~ '_mam4' || $chem_pkg eq 'trop_mam4_resus')) {
$chem_cppdefs = "$chem_cppdefs -DRAIN_EVAP_TO_COARSE_AERO "
}

Expand Down
6 changes: 5 additions & 1 deletion components/cam/src/chemistry/bulk_aero/aero_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ end subroutine aero_model_surfarea

!=============================================================================
!=============================================================================
subroutine aero_model_gasaerexch( loffset, ncol, lchnk, delt, reaction_rates, &
subroutine aero_model_gasaerexch( loffset, ncol, lchnk, delt, latndx, lonndx, reaction_rates, &
tfld, pmid, pdel, mbar, relhum, &
zm, qh2o, cwat, cldfr, cldnum, &
airdens, invariants, del_h2so4_gasprod, &
Expand Down Expand Up @@ -1010,6 +1010,10 @@ subroutine aero_model_gasaerexch( loffset, ncol, lchnk, delt, reaction_rates, &
real(r8), intent(inout) :: vmr(:,:,:) ! mixing ratios ( vmr )
type(physics_buffer_desc), pointer :: pbuf(:)

! These are declared here so that arguments remain consistent with modal aerosol version.
integer, intent(in) :: latndx(pcols) ! chunk lat indicies
integer, intent(in) :: lonndx(pcols) ! chunk lon indicies

! local vars

real(r8) :: vmrcw(ncol,pver,gas_pcnst) ! cloud-borne aerosol (vmr)
Expand Down
12 changes: 6 additions & 6 deletions components/cam/src/chemistry/modal_aero/modal_aero_amicphys.F90
Original file line number Diff line number Diff line change
Expand Up @@ -5167,12 +5167,12 @@ subroutine modal_aero_amicphys_init( imozart, species_class )

! set ngas, name_gas, and igas_xxx
! set naer, name_aerpfx, and iaer_xxx
name_gas = '???'
name_aerpfx = '???'
name_aer = '???'
name_aercw = '???'
name_num = '???'
name_numcw = '???'
name_gas = "???"
name_aerpfx = "???"
name_aer = "???"
name_aercw = "???"
name_num = "???"
name_numcw = "???"

igas_h2so4 = 0 ; igas_nh3 = 0
iaer_bc = 0 ; iaer_dst = 0
Expand Down
130 changes: 130 additions & 0 deletions components/cam/src/chemistry/pp_trop_mam4_resus/chem_mech.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@


Solution species
( 1) H2O2
( 2) H2SO4
( 3) SO2
( 4) DMS (CH3SCH3)
( 5) SOAG (C)
( 6) so4_a1 (NH4HSO4)
( 7) pom_a1 (C)
( 8) soa_a1 (C)
( 9) bc_a1 (C)
( 10) dst_a1 (AlSiO5)
( 11) ncl_a1 (NaCl)
( 12) num_a1 (H)
( 13) so4_a2 (NH4HSO4)
( 14) soa_a2 (C)
( 15) ncl_a2 (NaCl)
( 16) num_a2 (H)
( 17) dst_a3 (AlSiO5)
( 18) ncl_a3 (NaCl)
( 19) so4_a3 (NH4HSO4)
( 20) bc_a3 (C)
( 21) pom_a3 (C)
( 22) soa_a3 (C)
( 23) num_a3 (H)
( 24) pom_a4 (C)
( 25) bc_a4 (C)
( 26) num_a4 (H)


Invariant species
( 1) M
( 2) N2
( 3) O2
( 4) H2O
( 5) O3
( 6) OH
( 7) NO3
( 8) HO2


Column integrals
( 1) O3 - 0.000E+00
( 2) O2 - 0.000E+00

Class List
==========

Implicit
--------
( 1) H2O2
( 2) H2SO4
( 3) SO2
( 4) DMS
( 5) SOAG
( 6) so4_a1
( 7) pom_a1
( 8) soa_a1
( 9) bc_a1
( 10) dst_a1
( 11) ncl_a1
( 12) num_a1
( 13) so4_a2
( 14) soa_a2
( 15) ncl_a2
( 16) num_a2
( 17) dst_a3
( 18) ncl_a3
( 19) so4_a3
( 20) bc_a3
( 21) pom_a3
( 22) soa_a3
( 23) num_a3
( 24) pom_a4
( 25) bc_a4
( 26) num_a4

Photolysis
jh2o2 ( 1) H2O2 + hv -> (No products) rate = ** User defined ** ( 1)

Reactions
usr_HO2_HO2 ( 1) HO2 + HO2 -> H2O2 rate = ** User defined ** ( 2)
( 2) H2O2 + OH -> H2O + HO2 rate = 2.90E-12*exp( -160./t) ( 3)
usr_SO2_OH ( 3) SO2 + OH -> H2SO4 rate = ** User defined ** ( 4)
( 4) DMS + OH -> SO2 rate = 9.60E-12*exp( -234./t) ( 5)
usr_DMS_OH ( 5) DMS + OH -> .5*SO2 + .5*HO2 rate = ** User defined ** ( 6)
( 6) DMS + NO3 -> SO2 + {HNO3} rate = 1.90E-13*exp( 520./t) ( 7)

Extraneous prod/loss species
( 1) SO2 (dataset)
( 2) so4_a1 (dataset)
( 3) so4_a2 (dataset)
( 4) pom_a4 (dataset)
( 5) bc_a4 (dataset)
( 6) num_a1 (dataset)
( 7) num_a2 (dataset)
( 8) num_a4 (dataset)


Equation Report

d(H2O2)/dt = r1
- j1*H2O2 - r2*OH*H2O2
d(H2SO4)/dt = 3*OH*SO2
d(SO2)/dt = 4*OH*DMS + .5*r5*OH*DMS + 6*NO3*DMS
- r3*OH*SO2
d(DMS)/dt = - r4*OH*DMS - r5*OH*DMS - r6*NO3*DMS
d(SOAG)/dt = 0
d(so4_a1)/dt = 0
d(pom_a1)/dt = 0
d(soa_a1)/dt = 0
d(bc_a1)/dt = 0
d(dst_a1)/dt = 0
d(ncl_a1)/dt = 0
d(num_a1)/dt = 0
d(so4_a2)/dt = 0
d(soa_a2)/dt = 0
d(ncl_a2)/dt = 0
d(num_a2)/dt = 0
d(dst_a3)/dt = 0
d(ncl_a3)/dt = 0
d(so4_a3)/dt = 0
d(bc_a3)/dt = 0
d(pom_a3)/dt = 0
d(soa_a3)/dt = 0
d(num_a3)/dt = 0
d(pom_a4)/dt = 0
d(bc_a4)/dt = 0
d(num_a4)/dt = 0
86 changes: 86 additions & 0 deletions components/cam/src/chemistry/pp_trop_mam4_resus/chem_mech.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
SPECIES

Solution
H2O2, H2SO4, SO2, DMS -> CH3SCH3, SOAG -> C
so4_a1 -> NH4HSO4
pom_a1 -> C, soa_a1 -> C, bc_a1 -> C
dst_a1 -> AlSiO5, ncl_a1 -> NaCl
num_a1 -> H
so4_a2 -> NH4HSO4
soa_a2 -> C, ncl_a2 -> NaCl
num_a2 -> H
dst_a3 -> AlSiO5, ncl_a3 -> NaCl
so4_a3 -> NH4HSO4
bc_a3 -> C, pom_a3 -> C
soa_a3 -> C
num_a3 -> H
pom_a4 -> C, bc_a4 -> C
num_a4 -> H
End Solution

Fixed
M, N2, O2, H2O, O3, OH, NO3, HO2
End Fixed

Col-int
O3 = 0.
O2 = 0.
End Col-int

End SPECIES

Solution Classes
Explicit
End Explicit
Implicit
H2O2, H2SO4, SO2, DMS, SOAG
so4_a1, pom_a1
soa_a1, bc_a1, dst_a1, ncl_a1
num_a1
so4_a2, soa_a2, ncl_a2, num_a2
dst_a3, ncl_a3, so4_a3,
bc_a3, pom_a3, soa_a3, num_a3
pom_a4, bc_a4, num_a4
End Implicit
End Solution Classes

CHEMISTRY
Photolysis
[jh2o2] H2O2 + hv ->
End Photolysis

Reactions
[usr_HO2_HO2] HO2 + HO2 -> H2O2
H2O2 + OH -> H2O + HO2 ; 2.9e-12, -160
[usr_SO2_OH] SO2 + OH -> H2SO4
DMS + OH -> SO2 ; 9.6e-12, -234.
[usr_DMS_OH] DMS + OH -> .5 * SO2 + .5 * HO2
DMS + NO3 -> SO2 + HNO3 ; 1.9e-13, 520.
End Reactions

Ext Forcing
SO2 <- dataset
so4_a1 <- dataset
so4_a2 <- dataset
pom_a4 <- dataset
bc_a4 <- dataset
num_a1 <- dataset
num_a2 <- dataset
num_a4 <- dataset
End Ext Forcing

END CHEMISTRY

SIMULATION PARAMETERS

Version Options
model = cam
machine = intel
architecture = hybrid
vec_ftns = on
multitask = on
namemod = on
modules = on
End Version Options

END SIMULATION PARAMETERS
63 changes: 63 additions & 0 deletions components/cam/src/chemistry/pp_trop_mam4_resus/chem_mods.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@





module chem_mods
!--------------------------------------------------------------
! ... Basic chemistry parameters and arrays
!--------------------------------------------------------------

use shr_kind_mod, only : r8 => shr_kind_r8

implicit none

save

integer, parameter :: phtcnt = 1, & ! number of photolysis reactions
rxntot = 7, & ! number of total reactions
gascnt = 6, & ! number of gas phase reactions
nabscol = 2, & ! number of absorbing column densities
gas_pcnst = 26, & ! number of "gas phase" species
nfs = 8, & ! number of "fixed" species
relcnt = 0, & ! number of relationship species
grpcnt = 0, & ! number of group members
nzcnt = 28, & ! number of non-zero matrix entries
extcnt = 8, & ! number of species with external forcing
clscnt1 = 0, & ! number of species in explicit class
clscnt2 = 0, & ! number of species in hov class
clscnt3 = 0, & ! number of species in ebi class
clscnt4 = 26, & ! number of species in implicit class
clscnt5 = 0, & ! number of species in rodas class
indexm = 1, & ! index of total atm density in invariant array
indexh2o = 4, & ! index of water vapor density
clsze = 1, & ! loop length for implicit chemistry
rxt_tag_cnt = 4, &
nslvd = 0

integer :: clscnt(5) = 0
integer :: cls_rxt_cnt(4,5) = 0
integer :: clsmap(gas_pcnst,5) = 0
integer :: permute(gas_pcnst,5) = 0

integer :: diag_map(clscnt4) = 0



real(r8) :: adv_mass(gas_pcnst) = 0._r8
real(r8) :: crb_mass(gas_pcnst) = 0._r8
real(r8) :: fix_mass(max(1,nfs))




integer, allocatable :: rxt_tag_map(:)
real(r8), allocatable :: pht_alias_mult(:,:)
character(len=16), allocatable :: rxt_tag_lst(:)
character(len=16), allocatable :: pht_alias_lst(:,:)
character(len=16) :: inv_lst(max(1,nfs))
character(len=16) :: extfrc_lst(max(1,extcnt))
logical :: frc_from_dataset(max(1,extcnt))
character(len=16) :: slvd_lst(max(1,nslvd))

end module chem_mods
19 changes: 19 additions & 0 deletions components/cam/src/chemistry/pp_trop_mam4_resus/m_rxt_id.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@





module m_rxt_id

implicit none

integer, parameter :: rid_jh2o2 = 1
integer, parameter :: rid_usr_HO2_HO2 = 2
integer, parameter :: rid_usr_SO2_OH = 4
integer, parameter :: rid_usr_DMS_OH = 6

integer, parameter :: rid_r0003 = 3
integer, parameter :: rid_r0005 = 5
integer, parameter :: rid_r0007 = 7

end module m_rxt_id
Loading