Skip to content
Draft
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
65 changes: 25 additions & 40 deletions bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -583,16 +583,13 @@ if ( ($chem ne 'none') or ( $prog_species ) ){
my $chem_proc_src = $cfg->get('chem_proc_src');
my $chem_src_dir = $cfg->get('chem_src_dir');

my ( $gas_wetdep_list, $gas_wetdep_ice_uptake_list, $aer_wetdep_list,
$aer_sol_facti, $aer_sol_factb, $aer_scav_coef, $gas_drydep_list, $aer_drydep_list ) =
my ( $gas_wetdep_list, $aer_wetdep_list, $aer_sol_facti, $aer_sol_factb, $aer_scav_coef,
$aer_drydep_list, $gas_drydep_list ) =
set_dep_lists( $chem, $cfgdir, $chem_proc_src, $chem_src_dir, $nl, $print );

if (length($gas_wetdep_list)>2){
add_default($nl, 'gas_wetdep_method' );
add_default($nl, 'gas_wetdep_list', 'val'=>$gas_wetdep_list );
if (($chem =~ /_slh/) and (length($gas_wetdep_ice_uptake_list)>2)) {
add_default($nl, 'gas_wetdep_ice_uptake_list', 'val'=>$gas_wetdep_ice_uptake_list );
}
}

if (length($aer_wetdep_list)>2){
Expand Down Expand Up @@ -1940,11 +1937,11 @@ if (($chem =~ /trop_mozart/ or $chem =~ /trop_strat/ or $chem =~ /waccm_tsmlt/)
'ISOP -> ' => 'isop_emis_file',
'TOLUENE -> ' => 'toluene_emis_file',
);
if (!($chem =~ /_vbs/) and !($chem =~ /_tsmlt/) and !($chem =~ /_t1s/)) {
if (!($chem =~ /_vbs/) and !($chem =~ /_tsmlt/)) {
%species = (%species,
'NH3 -> ' => 'nh3_emis_file');
}
if (!($chem =~ /_vbs/) and !($chem =~ /_tsmlt/) and !($chem =~ /_t1s/)) {
if (!($chem =~ /_vbs/) and !($chem =~ /_tsmlt/)) {
%species = (%species,
'C10H16 -> ' => 'c10h16_emis_file', );
}
Expand Down Expand Up @@ -2360,25 +2357,6 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
'soag_bb_srf_file' => 'SOAG' );
}

# for short-lived halogen (SLH) chemistry
if ($chem =~ /_slh/) {
%species = (%species,
'c2cl4_slh_emis_file' => 'C2CL4',
'ch2br2_slh_emis_file' => 'CH2BR2',
'ch2brcl_slh_emis_file' => 'CH2BRCL',
'ch2cl2_slh_emis_file' => 'CH2CL2',
'ch2i2_slh_emis_file' => 'CH2I2',
'ch2ibr_slh_emis_file' => 'CH2IBR',
'ch2icl_slh_emis_file' => 'CH2ICL',
'ch3i_slh_emis_file' => 'CH3I',
'chbr2cl_slh_emis_file' => 'CHBR2CL',
'chbr3_slh_emis_file' => 'CHBR3',
'chbrcl2_slh_emis_file' => 'CHBRCL2',
'hoi_slh_emis_file' => 'HOI',
'i2_slh_emis_file' => 'I2' );
}


# for mid-atmos gas-phase chemistry
if ($chem =~ /trop_strat/ or $chem =~ /_tsmlt/ or $chem =~ /waccm_ma/ or $chem =~ /waccm_t4ma/) {
%species = (%species,
Expand All @@ -2392,7 +2370,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
'CH2O_bb_srf_file' => 'CH2O' );
}

# for troposphere gas-phase chemistry
# for troposphere gas-phase chemistry
if ($chem =~ /trop_strat/ or $chem =~ /_tsmlt/ or $chem =~ /_t4ma/) {
%species = (%species,
'BIGALK_an_srf_file' => 'BIGALK',
Expand Down Expand Up @@ -2429,7 +2407,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
%species = (%species,
'E90_srf_file' => 'E90' );
}
if ($chem !~ /_t4s/ and $chem !~ /_t4ma/) {
if ($chem !~ /_ts4/ and $chem !~ /_t4ma/) {
%species = (%species,
'BENZENE_an_srf_file' => 'BENZENE',
'BENZENE_bb_srf_file' => 'BENZENE',
Expand All @@ -2450,10 +2428,10 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
'XYLENES_an_srf_file' => 'XYLENES',
'XYLENES_bb_srf_file' => 'XYLENES' ) ;
}
if ($chem =~ /trop_strat_mam4_ts2/ or $chem =~ /trop_strat_mam5_t2s1/) {
if ($chem =~ /trop_strat_mam4_ts2/ or $chem =~ /trop_strat_mam5_ts2/) {
%species = (%species,
'MTERP_bb_srf_file' => 'APIN') ;
} elsif ($chem =~ /_t4s/ or $chem =~ /_t4ma/) {
} elsif ($chem =~ /_ts4/ or $chem =~ /_t4ma/) {
%species = (%species,
'MTERP_bb_srf_file' => 'TERP') ;
} else {
Expand All @@ -2478,7 +2456,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
'IVOC_bb_srf_file' => 'IVOCbb',
'SVOC_an_srf_file' => 'SVOCff',
'SVOC_bb_srf_file' => 'SVOCbb' );
} elsif ($chem !~ /_t4s/ and $chem !~ /_t4ma/) {
} elsif ($chem !~ /_ts4/ and $chem !~ /_t4ma/) {
%species = (%species,
'IVOC_an_srf_file' => 'IVOC',
'IVOC_bb_srf_file' => 'IVOC',
Expand All @@ -2503,7 +2481,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
$first = 0;
}
}
if ($chem eq 'trop_mam4' or $chem eq 'waccm_sc_mam4' or $chem eq 'ghg_mam4' or $chem =~ /_t4s/ or $chem =~ /_t4ma/) {
if ($chem eq 'trop_mam4' or $chem eq 'waccm_sc_mam4' or $chem eq 'ghg_mam4' or $chem =~ /_ts4/ or $chem =~ /_t4ma/) {
# SOA yields (used for the interactive emissions) have been calculated based on the VBS yields in CAM-chem.
# Duseong S. Jo, et al. to be submitted to GMD, 2023 -- see https://github.com/ESCOMP/CAM/pull/727 discussion for additional detail.
my %soae_fctrs = ('BENZENE_an_srf_file' => '2.5592D0',
Expand Down Expand Up @@ -2679,7 +2657,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
add_default($nl, 'megan_factors_file');
add_default($nl, 'megan_mapped_emisfctrs', 'val'=>'.false.');
}
if ($chem =~ /trop_strat_mam4_vbs/ or $chem =~ /trop_strat_mam5_vbsext/ or $chem =~ /trop_strat_mam5_t1s/ or $chem =~ /trop_strat_mam5_slh/) {
if ($chem =~ /trop_strat_mam4_vbs/ or $chem =~ /trop_strat_mam5_vbs/) {
my $val = "'ISOP = isoprene',"
. "'MTERP = carene_3 + pinene_a + thujene_a + bornene + terpineol_4 + terpineol_a + terpinyl_ACT_a "
. "+ myrtenal + sabinene + pinene_b + camphene + fenchene_a + limonene + phellandrene_a + terpinene_a "
Expand Down Expand Up @@ -2718,7 +2696,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
add_default($nl, 'megan_factors_file');
add_default($nl, 'megan_mapped_emisfctrs', 'val'=>'.false.');
}
if ($chem =~ /trop_strat_mam5_t4s2/ or $chem =~ /_t4ma/) {
if ($chem =~ /trop_strat_mam5_ts4/ or $chem =~ /_t4ma/) {
my $val = "'ISOP = isoprene',"
. "'TERP = carene_3 + pinene_a + thujene_a + bornene + terpineol_4 + terpineol_a + terpinyl_ACT_a +',"
. "' myrtenal + sabinene + pinene_b + camphene + fenchene_a + limonene + phellandrene_a + terpinene_a +',"
Expand Down Expand Up @@ -2750,7 +2728,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
add_default($nl, 'megan_factors_file');
add_default($nl, 'megan_mapped_emisfctrs', 'val'=>'.false.');
}
if ($chem =~ /trop_strat_mam4_ts2/ or $chem =~ /trop_strat_mam5_t2s1/) {
if ($chem =~ /trop_strat_mam4_ts2/ or $chem =~ /trop_strat_mam5_ts2/) {
my $val = "'ISOP = isoprene',"
. "'APIN = pinene_a + myrtenal',"
. "'BPIN = carene_3 + thujene_a + bornene + fenchene_a + pinene_b + sabinene + camphene + terpineol_4 + terpineol_a + terpinyl_ACT_a',"
Expand Down Expand Up @@ -3725,11 +3703,6 @@ if (!$simple_phys) {
add_default($nl, 'do_iss');
}

# Sponge layer vertical diffusion
if (!$simple_phys) {
add_default($nl, 'diff_sponge_fac');
}

# Convective water in radiation
if (!$simple_phys) {
add_default($nl, 'conv_water_in_rad');
Expand Down Expand Up @@ -3782,6 +3755,18 @@ if (!$simple_phys) {
add_default($nl, 'zmconv_parcel_hscale');
}

# MCSP
if (!$simple_phys) {
add_default($nl, 'MCSP_heat_coeff');
add_default($nl, 'MCSP_moisture_coeff');
add_default($nl, 'MCSP_uwind_coeff');
add_default($nl, 'MCSP_vwind_coeff');
add_default($nl, 'MCSP_storm_speed_pref');
add_default($nl, 'MCSP_conv_depth_min');
add_default($nl, 'mcsp_shear_min');
}


# moist convection rainwater coefficients
my $shallow_scheme = $nl->get_value('shallow_scheme');
$shallow_scheme =~ s/['"]//g; # strip quotes "'
Expand Down
9 changes: 9 additions & 0 deletions bld/namelist_files/namelist_defaults_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2891,6 +2891,15 @@
<zmconv_parcel_pbl > .false. </zmconv_parcel_pbl>
<zmconv_parcel_hscale > 0.5 </zmconv_parcel_hscale>

<!-- MCSP scheme -->
<MCSP_heat_coeff > 0.0D0 </MCSP_heat_coeff >
<MCSP_moisture_coeff > 0.0D0 </MCSP_moisture_coeff >
<MCSP_uwind_coeff > 0.0D0 </MCSP_uwind_coeff >
<MCSP_vwind_coeff > 0.0D0 </MCSP_vwind_coeff >
<MCSP_storm_speed_pref >60000.0 </MCSP_storm_speed_pref>
<MCSP_conv_depth_min >50000.0 </MCSP_conv_depth_min>
<mcsp_shear_min > 3.0 </mcsp_shear_min>

<!-- Cloud sedimentation -->

<cldsed_ice_stokes_fac > 1.0D0 </cldsed_ice_stokes_fac>
Expand Down
49 changes: 47 additions & 2 deletions bld/namelist_files/namelist_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3508,8 +3508,6 @@ Number of subcolumns in VAMP Generator
Default: 10
</entry>



<!-- Moist Convection and Microphysics -->

<entry id="deep_scheme" type="char*16" category="conv"
Expand Down Expand Up @@ -3678,6 +3676,53 @@ the zonally averaged zonal wind in the sponge layer.
Default: 0.0
</entry>

<!-- MCSP nl -->

<entry id="MCSP_heat_coeff" type="real" category="conv"
group="mcsp_nl" valid_values="" >
MCSP heating coefficient controlling the tendency intensity added.
Default: 0.0
</entry>

<entry id="MCSP_moisture_coeff" type="real" category="conv"
group="mcsp_nl" valid_values="" >
MCSP moistening coefficient controlling the tendency intensity added.
Default: 0.0
</entry>

<entry id="MCSP_uwind_coeff" type="real" category="conv"
group="mcsp_nl" valid_values="" >
MCSP uwnd tendency coefficient controlling the tendency intensity added.
Default: 0.0
</entry>

<entry id="MCSP_vwind_coeff" type="real" category="conv"
group="mcsp_nl" valid_values="" >
MCSP vwnd tendency coefficient controlling the tendency intensity added.
Default: 0.0
</entry>

<entry id="MCSP_storm_speed_pref" type="real" category="conv"
group="mcsp_nl" valid_values="" >
Reference pressure level in Pa for low-level zonal wind shear calculation for MCSP.
Default: 60000.0
</entry>

<entry id="MCSP_conv_depth_min" type="real" category="conv"
group="mcsp_nl" valid_values="" >
Minimum convection depth for MCSP to be activated in Pa.
Default: 50000.0
</entry>

<entry id="mcsp_shear_min" type="real" category="conv"
group="mcsp_nl" valid_values="" >
Minimum uwind difference/shear between reference pressure level and surface for MCSP to be activated.
Default: 3.0
</entry>




<!-- CLUBB PBL Diff nl -->

<entry id="clubb_cloudtop_cooling" type="logical" category="pblrad"
Expand Down
8 changes: 7 additions & 1 deletion src/control/runtime_opts.F90
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ subroutine read_namelist(nlfilename, single_column, scmlat, scmlon)
use cloud_fraction, only: cldfrc_readnl
use cldfrc2m, only: cldfrc2m_readnl
use rk_stratiform_cam, only: rk_stratiform_cam_readnl
use zm_conv_intr, only: zm_conv_readnl
use zm_conv_intr, only: zm_conv_readnl
!++ MCSP
use mcsp_intr, only: mcsp_readnl
!-- MCSP
use hk_conv, only: hkconv_readnl
use uwshcu, only: uwshcu_readnl
use pkg_cld_sediment, only: cld_sediment_readnl
Expand Down Expand Up @@ -153,6 +156,9 @@ subroutine read_namelist(nlfilename, single_column, scmlat, scmlon)
call cldfrc_readnl(nlfilename)
call cldfrc2m_readnl(nlfilename)
call zm_conv_readnl(nlfilename)
!++ MCSP
call mcsp_readnl(nlfilename)
!-- MCSP
call rk_stratiform_cam_readnl(nlfilename)
call hkconv_readnl(nlfilename)
call uwshcu_readnl(nlfilename)
Expand Down
14 changes: 12 additions & 2 deletions src/physics/cam/convect_deep.F90
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ module convect_deep
convect_deep_tend_2, &! return tendencies
deep_scheme_does_scav_trans ! = .t. if scheme does scavenging and conv. transport

!++ MCSP
public :: jctop1

integer :: jctop1(pcols)
!-- MCSP

! Private module data
character(len=16) :: deep_scheme ! default set in phys_control.F90, use namelist to change
! Physics buffer indices
Expand Down Expand Up @@ -163,7 +169,7 @@ end subroutine convect_deep_init
!subroutine convect_deep_tend(state, ptend, tdt, pbuf)

subroutine convect_deep_tend( &
mcon ,cme , &
mcon ,cme , &
zdu , &
rliq ,rice , &
ztodt , &
Expand Down Expand Up @@ -259,13 +265,17 @@ subroutine convect_deep_tend( &
call pbuf_get_field(pbuf, pblh_idx, pblh)
call pbuf_get_field(pbuf, tpert_idx, tpert)

call zm_conv_tend( pblh ,mcon ,cme , &
call zm_conv_tend( pblh ,mcon ,cme , &
tpert ,zdu , &
rliq ,rice , &
ztodt , &
jctop, jcbot , &
state ,ptend ,landfrac, pbuf)

!++ MCSP
jctop1 = int(jctop(:pcols))
!-- MCSP

end select

! If we added temperature tendency to pbuf, set it now.
Expand Down
Loading