Skip to content

Commit

Permalink
Merge tag 'cam6_4_036' into cam.clubbmf.ne120
Browse files Browse the repository at this point in the history
Merge pull request ESCOMP#1145 from gdicker1/update_mpasv821
  • Loading branch information
adamrher committed Oct 21, 2024
2 parents b9443e9 + e2da4bf commit c44c8db
Show file tree
Hide file tree
Showing 94 changed files with 5,900 additions and 5,897 deletions.
5 changes: 2 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
url = https://github.com/MPAS-Dev/MPAS-Model.git
fxrequired = AlwaysRequired
fxsparse = ../.mpas_sparse_checkout
fxtag = b8c33daa
fxtag = v8.2.1
fxDONOTUSEurl = https://github.com/MPAS-Dev/MPAS-Model.git

[submodule "cosp2"]
Expand Down Expand Up @@ -182,7 +182,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/CESM_CICE
[submodule "clm"]
path = components/clm
url = https://github.com/ESCOMP/CTSM
fxtag = ctsm5.2.009
fxtag = ctsm5.2.027
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/CTSM

Expand All @@ -192,4 +192,3 @@ url = https://github.com/ESCOMP/FMS_interface
fxtag = fi_240516
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/FMS_interface

140 changes: 58 additions & 82 deletions bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,14 @@ if ($cfg->get('debug')) {
my $prescribe_aerosols = $TRUE;
if ($simple_phys) {$prescribe_aerosols = $FALSE;}

# CTSM Dust emissions scheme
my $soil_erod_atm = $FALSE;
add_default($nl, 'dust_emis_method');
if ( $nl->get_value('dust_emis_method') =~ /Zender/ ) {
add_default($nl, 'zender_soil_erod_source');
if ($nl->get_value('zender_soil_erod_source') =~ /atm/) {$soil_erod_atm = $TRUE;}
}

# Chemistry deposition lists
if ( ($chem ne 'none') or ( $prog_species ) ){
my $chem_proc_src = $cfg->get('chem_proc_src');
Expand All @@ -600,8 +608,9 @@ if ( ($chem ne 'none') or ( $prog_species ) ){
($aer_wetdep_list =~ /ncl/i || $aer_wetdep_list =~ /sslt/i)) {
$prescribe_aerosols = $FALSE;
}

add_default($nl, 'aer_wetdep_list', 'val'=>$aer_wetdep_list );
if ($chem !~ /_mam/) {
add_default($nl, 'aer_wetdep_list', 'val'=>$aer_wetdep_list );
}

if (!($chem =~ /_mam/)) {
if (!defined $nl->get_value('aer_sol_facti')) {
Expand Down Expand Up @@ -756,7 +765,7 @@ if ($rad_pkg =~ /rrtmg/ or $chem =~ /waccm/) {
elsif (!$simple_phys) {

if ($chem eq 'none' and !($prog_species =~ /SO4/) ) { # Spectral solar data is needed for photolysis
# this preserves the default cam3 and cam4 configurations which do not have chemistry
# this preserves the default cam4 configuration which does not have chemistry
unless (defined $nl->get_value('solar_irrad_data_file')) {
add_default($nl, 'solar_const');
}
Expand Down Expand Up @@ -835,17 +844,8 @@ if ($test_tracer_num > 0) {

if ($cfg->get('age_of_air_trcs')) { add_default($nl, 'aoa_tracers_flag', 'val'=>'.true.'); }

# If phys option is "cam3" then turn on the CAM3 prescribed ozone and aerosols
if ($phys eq 'cam3' and !$aqua_mode) {
add_default($nl, 'cam3_ozone_data_on', 'val'=>'.true.');
add_default($nl, 'cam3_aero_data_on', 'val'=>'.true.');
}

# Defaults for radiatively active constituents

my $cam3_ozone_data = $FALSE;
my $cam3_aero_data = $FALSE;

my $moz_ozone_data = $FALSE;
if (!$rad_prog_ozone) {
$moz_ozone_data = $TRUE;
Expand All @@ -856,24 +856,6 @@ if (!($rad_prog_ocarb) or !($rad_prog_bcarb) or !($rad_prog_sulf) or !($rad_prog
$moz_aero_data = $TRUE;
}

# CAM3 prescribed ozone only by request
if (defined $nl->get_value('cam3_ozone_data_on') and
$nl->get_value('cam3_ozone_data_on') =~ /$TRUE/io) {
add_default($nl, 'bndtvo');
$cam3_ozone_data = $TRUE;
$moz_ozone_data = $FALSE;
}

# CAM3 prescribed aerosols only by request
if (defined $nl->get_value('cam3_aero_data_on') and
$nl->get_value('cam3_aero_data_on') =~ /$TRUE/io) {

# CAM3 aerosol mass climatology dataset (horizontal resolution dependent)
add_default($nl, 'bndtvaer');
$cam3_aero_data = $TRUE;
$moz_aero_data = $FALSE;
}

if ($chem_rad_passive or $aqua_mode) {
add_default($nl, 'atm_dep_flux', 'val'=>'.false.');
}
Expand Down Expand Up @@ -922,8 +904,6 @@ if ($rad_prog_ozone) {
add_default($nl, 'prescribed_ozone_type');
add_default($nl, 'prescribed_ozone_cycle_yr');
}
} elsif ($cam3_ozone_data =~ /$TRUE/io) {
$radval .= ",'N:O3:O3'";
} else {
die "ERROR: can not set ozone rad_climate specification\n";
}
Expand Down Expand Up @@ -1110,9 +1090,6 @@ if ($aer_model eq 'mam' ) {
} elsif ($moz_aero_data =~ /$TRUE/io) {
push(@aero_names, "sulf");
push(@aerosources, "N:" );
} elsif ($cam3_aero_data =~ /$TRUE/io) {
push(@aero_names, "cam3_sul" );
push(@aerosources, "N:" );
} else {
die "ERROR: can not set sulf rad_climate specification\n";
}
Expand All @@ -1123,9 +1100,6 @@ if ($aer_model eq 'mam' ) {
} elsif ($moz_aero_data =~ /$TRUE/io) {
push(@aero_names, "dust1", "dust2", "dust3", "dust4");
push(@aerosources, "N:", "N:", "N:", "N:" );
} elsif ($cam3_aero_data =~ /$TRUE/io) {
push(@aero_names, "cam3_dust1", "cam3_dust2", "cam3_dust3", "cam3_dust4" );
push(@aerosources, "N:", "N:", "N:", "N:" );
} else {
die "ERROR: can not set dust rad_climate specification\n";
}
Expand All @@ -1136,9 +1110,6 @@ if ($aer_model eq 'mam' ) {
} elsif ($moz_aero_data =~ /$TRUE/io) {
push(@aero_names, "bcar1", "bcar2");
push(@aerosources, "N:", "N:" );
} elsif ($cam3_aero_data =~ /$TRUE/io) {
push(@aero_names, "cam3_bcpho", "cam3_bcphi");
push(@aerosources, "N:", "N:" );
} else {
die "ERROR: can not set black carbon rad_climate specification\n";
}
Expand All @@ -1149,9 +1120,6 @@ if ($aer_model eq 'mam' ) {
} elsif ($moz_aero_data =~ /$TRUE/io) {
push(@aero_names, "ocar1", "ocar2");
push(@aerosources, "N:", "N:" );
} elsif ($cam3_aero_data =~ /$TRUE/io) {
push(@aero_names, "cam3_ocpho", "cam3_ocphi");
push(@aerosources, "N:", "N:" );
} else {
die "ERROR: can not set organic carbon rad_climate specification\n";
}
Expand All @@ -1172,9 +1140,6 @@ if ($aer_model eq 'mam' ) {
push(@aero_names, "SSLTA", "SSLTC");
push(@aerosources, "N:", "N:");
}
} elsif ($cam3_aero_data =~ /$TRUE/io ) {
push(@aero_names, "cam3_ssam", "cam3_sscm");
push(@aerosources, "N:", "N:" );
} else {
die "ERROR: can not set sslt rad_climate specification\n";
}
Expand All @@ -1195,7 +1160,7 @@ if ( $prescribed_aero_model ne 'none' ) {

# Prescribed aerosol deposition fluxes.
# Not needed if in aquaplanet mode.
if ( (($moz_aero_data =~ /$TRUE/io) or ($cam3_aero_data =~ /$TRUE/io)) and !$aqua_mode ) {
if ( $moz_aero_data =~ /$TRUE/io and !$aqua_mode ) {
# If user has not set aerodep_flx_file, then use defaults
unless (defined $nl->get_value('aerodep_flx_file')) {
my @settings = ('aerodep_flx_datapath', 'aerodep_flx_file', 'aerodep_flx_type',
Expand Down Expand Up @@ -1801,7 +1766,7 @@ if ( $prog_species ) {
add_default($nl, 'ghg_chem', 'val'=>".true.");
add_default($nl, 'bndtvg');
}
if ( $prog_species =~ /DST/ ) {
if ( $prog_species =~ /DST/ and $soil_erod_atm =~ /$TRUE/) {
add_default($nl, 'soil_erod_file' );
}

Expand Down Expand Up @@ -2091,9 +2056,11 @@ if ($chem =~ /geoschem/) {
add_default($nl, 'flbc_cycle_yr', 'val'=>'2000');
}

my @files;
# Datasets
@files = ( 'soil_erod_file', 'flbc_file' );
my @files = ( 'flbc_file' );
if ($soil_erod_atm =~ /$TRUE/) {
@files = ( @files, 'soil_erod_file' );
}
foreach my $file (@files) {
add_default($nl, $file);
}
Expand Down Expand Up @@ -2132,12 +2099,15 @@ if ($chem =~ /trop_mozart/ or $chem =~ /trop_strat/ or $chem =~ /waccm_tsmlt/) {
my @files;
# Datasets
if ($chem =~ /trop_strat/ or $chem =~ /waccm_tsmlt/) {
@files = ( 'soil_erod_file', 'flbc_file',
@files = ( 'flbc_file',
'xs_coef_file','xs_short_file','xs_long_file', 'rsf_file' );
} else {
@files = ( 'soil_erod_file', 'flbc_file',
@files = ( 'flbc_file',
'xs_coef_file','xs_short_file','xs_long_file', 'rsf_file', 'exo_coldens_file', 'sulf_file' );
}
if ($soil_erod_atm =~ /$TRUE/) {
@files = ( @files, 'soil_erod_file' );
}
foreach my $file (@files) {
add_default($nl, $file);
}
Expand Down Expand Up @@ -2235,8 +2205,10 @@ if ($chem eq 'trop_mam3') {
add_default($nl, 'flbc_list', 'val'=>"' '");

# Datasets
my @files = ('soil_erod_file',
'xs_long_file', 'rsf_file', 'exo_coldens_file' );
my @files = ( 'xs_long_file', 'rsf_file', 'exo_coldens_file' );
if ($soil_erod_atm =~ /$TRUE/) {
@files = ( @files, 'soil_erod_file' );
}
foreach my $file (@files) {
add_default($nl, $file);
}
Expand Down Expand Up @@ -2740,8 +2712,10 @@ if (($chem eq 'trop_mam4') or ($chem eq 'waccm_sc_mam4') or ($chem eq 'ghg_mam4'
add_default($nl, 'flbc_list', 'val'=>"' '");

# Datasets
my @files = ('soil_erod_file',
'xs_long_file', 'rsf_file', 'exo_coldens_file' );
my @files = ('xs_long_file', 'rsf_file', 'exo_coldens_file' );
if ($soil_erod_atm =~ /$TRUE/) {
@files = ( @files, 'soil_erod_file' );
}
foreach my $file (@files) {
add_default($nl, $file);
}
Expand Down Expand Up @@ -2829,8 +2803,10 @@ if ($chem eq 'trop_mam7') {
add_default($nl, 'flbc_list', 'val'=>"' '");

# Datasets
my @files = ('soil_erod_file',
'xs_long_file', 'rsf_file', 'exo_coldens_file' );
my @files = ('xs_long_file', 'rsf_file', 'exo_coldens_file' );
if ($soil_erod_atm =~ /$TRUE/) {
@files = ( @files, 'soil_erod_file' );
}
foreach my $file (@files) {
add_default($nl, $file);
}
Expand Down Expand Up @@ -2889,8 +2865,10 @@ if ($chem =~ /waccm_ma/ or $chem =~ /waccm_tsmlt/) {
'photon_file', 'electron_file', 'igrf_geomag_coefs_file',
'euvac_file', 'solar_parms_data_file',
'depvel_lnd_file',
'xs_coef_file', 'xs_short_file','xs_long_file', 'rsf_file',
'soil_erod_file' );
'xs_coef_file', 'xs_short_file','xs_long_file', 'rsf_file' );
if ($soil_erod_atm =~ /$TRUE/) {
@files = ( @files, 'soil_erod_file' );
}

if (!$waccmx) { @files = (@files, 'tgcm_ubc_file', 'snoe_ubc_file' ); }

Expand Down Expand Up @@ -3203,17 +3181,18 @@ if (($chem ne 'none') and ($chem ne 'terminator') and !($chem =~ /geoschem/)) {

# Deep convection scheme
add_default($nl, 'deep_scheme');
my $deep_scheme = $nl->get_value('deep_scheme');

# Aerosol convective processes
if (($phys =~ /cam6/ or $phys =~ /cam7/) and $nl->get_value('deep_scheme') =~ /ZM/) {
if (($phys =~ /cam6/ or $phys =~ /cam7/) and $deep_scheme =~ /ZM/) {
add_default($nl, 'convproc_do_aer', 'val'=>'.true.');
add_default($nl, 'convproc_do_evaprain_atonce', 'val'=>'.true.');
add_default($nl, 'convproc_pom_spechygro', 'val'=>'0.2D0');
add_default($nl, 'convproc_wup_max', 'val'=>'4.0D0');
}

# cam7 specific namelists
if ($phys =~ /cam7/ and $nl->get_value('deep_scheme') =~ /ZM/) {
if ($phys =~ /cam7/ and $deep_scheme =~ /ZM/) {
add_default($nl, 'zmconv_parcel_pbl', 'val'=>'.true.');
} else {
add_default($nl, 'zmconv_parcel_pbl', 'val'=>'.false.');
Expand Down Expand Up @@ -3753,19 +3732,15 @@ if ($cfg->get('microphys') eq 'rk') {
}

# Dust emissions tuning factor
# If dust is prognostic ==> supply the tuning factor
if ( length($nl->get_value('soil_erod_file'))>0 ) {
# check whether turbulent mountain stress parameterization is on
if ($nl->get_value('do_tms') =~ /$TRUE/io) {
add_default($nl, 'dust_emis_fact', 'tms'=>'1');
# check whether turbulent mountain stress parameterization is on
if ($nl->get_value('do_tms') =~ /$TRUE/io) {
add_default($nl, 'dust_emis_fact', 'tms'=>'1');
} else {
if ($chem =~ /trop_strat/ or $chem =~ /geoschem/ or $chem =~ /waccm_ma/ or $chem =~ /waccm_tsmlt/ or $chem =~ /trop_mozart/) {
add_default($nl, 'dust_emis_fact', 'ver'=>'chem');
}
else {
if ($chem =~ /trop_strat/ or $chem =~ /geoschem/ or $chem =~ /waccm_ma/ or $chem =~ /waccm_tsmlt/ or $chem =~ /trop_mozart/) {
add_default($nl, 'dust_emis_fact', 'ver'=>'chem');
}
else {
add_default($nl, 'dust_emis_fact');
}
add_default($nl, 'dust_emis_fact');
}
}
if (chem_has_species($cfg, 'NO')) {
Expand Down Expand Up @@ -3831,12 +3806,13 @@ if (!$simple_phys) {
add_default($nl, 'gw_rdg_do_divstream' , 'val'=>'.true.');
}

my $use_gw_convect_dp = '.false.';
if ($waccm_phys or
(!$simple_phys and $cfg->get('model_top') eq 'mt')) {
# Spectral gravity waves are part of WACCM physics, and also drive the
# QBO in the high vertical resolution configuration.
add_default($nl, 'use_gw_front' , 'val'=>'.true.');
add_default($nl, 'use_gw_convect_dp', 'val'=>'.true.');
$use_gw_convect_dp = '.true.';
my $hdepth_scaling = '0.25D0' ;
my $qbo_forcing = '.false.';
if ($dyn eq 'fv') {
Expand All @@ -3858,12 +3834,16 @@ if ($waccm_phys or
} elsif ($phys =~ /cam7/) {
# cam7 settings for model_top = 'lt'
add_default($nl, 'use_gw_front' , 'val'=>'.true.');
add_default($nl, 'use_gw_convect_dp', 'val'=>'.true.');
$use_gw_convect_dp = '.true.';
add_default($nl, 'gw_qbo_hdepth_scaling', 'val'=>'1.0D0');
} else {
add_default($nl, 'use_gw_front' , 'val'=>'.false.');
add_default($nl, 'use_gw_convect_dp', 'val'=>'.false.');
}
# Check if deep convection scheme used. If not set use_gw_convect_dp=.false.
if ($deep_scheme =~ /off/) {
$use_gw_convect_dp = '.false.';
}
add_default($nl, 'use_gw_convect_dp', 'val'=>$use_gw_convect_dp);

# We need a lot of logic to use these below, so make flags for them.
my $do_gw_oro = ($nl->get_value('use_gw_oro') =~ /$TRUE/io);
Expand All @@ -3877,10 +3857,6 @@ my $do_gw_rdg_gamma = ($nl->get_value('use_gw_rdg_gamma') =~ /$TRUE/io);

my $do_divstream = ($nl->get_value('gw_rdg_do_divstream') =~ /$TRUE/io);

if (!$simple_phys) {
# GW option used only for backwards compatibility with CAM3.
add_default($nl, 'fcrit2', 'val'=>'1.0');
}
# Mid-scale wavelength settings.
if ($do_gw_front or $do_gw_convect_dp or $do_gw_convect_sh) {
add_default($nl, 'pgwv');
Expand Down Expand Up @@ -4474,7 +4450,7 @@ my %nl_group = ();
foreach my $name (@nl_groups) { $nl_group{$name} = ''; }

# Dry deposition, MEGAN VOC emis and ozone namelists
@comp_groups = qw(drydep_inparm megan_emis_nl fire_emis_nl carma_inparm ndep_inparm ozone_coupling_nl lightning_coupling_nl);
@comp_groups = qw(drydep_inparm megan_emis_nl fire_emis_nl carma_inparm ndep_inparm ozone_coupling_nl lightning_coupling_nl dust_emis_inparm);

$outfile = "$opts{'dir'}/drv_flds_in";
$nl->write($outfile, 'groups'=>\@comp_groups);
Expand Down
6 changes: 3 additions & 3 deletions bld/config_files/definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ Option to turn on waccmx thermosphere/ionosphere extension: 0 => no, 1 => yes
<entry id="ionosphere" valid_values="none,wxie" value="none">
Ionosphere model used in WACCMX.
</entry>
<entry id="phys" valid_values="cam3,cam4,cam5,cam6,cam7,held_suarez,adiabatic,kessler,tj2016,grayrad,spcam_sam1mom,spcam_m2005" value="">
Physics package: cam3, cam4, cam5, cam6, cam7, held_suarez, adiabatic, kessler, tj2016, grayrad, spcam_sam1mom, spcam_m2005.
<entry id="phys" valid_values="cam4,cam5,cam6,cam7,held_suarez,adiabatic,kessler,tj2016,grayrad,spcam_sam1mom,spcam_m2005" value="">
Physics package: cam4, cam5, cam6, cam7, held_suarez, adiabatic, kessler, tj2016, grayrad, spcam_sam1mom, spcam_m2005.
</entry>
<entry id="hemco" valid_values="0,1" value="0">
Switch to turn on Harmonized Emissions Component (HEMCO) for chemistry: 0 => no, 1 => yes.
Expand Down Expand Up @@ -93,7 +93,7 @@ PBL package: uw (University of Washington), hb (Holtslag and Boville), hbr
</entry>
<entry id="rad" valid_values="rrtmgp,rrtmg,camrt,none" value="">
Radiative transfer calculation:
camrt (CAM3 and CAM4 RT package), rrtmg (RRTMG package from AER), rrtmgp (updated version).
camrt (CAM4 RT package), rrtmg (RRTMG package from AER), rrtmgp (updated version).
</entry>
<entry id="carma" valid_values="none,bc_strat,cirrus,cirrus_dust,dust,meteor_impact,meteor_smoke,mixed_sulfate,pmc,pmc_sulfate,sea_salt,sulfate,tholin,test_detrain,test_growth,test_passive,test_radiative,test_swelling,test_tracers,test_tracers2" value="none">
CARMA sectional microphysics:
Expand Down
Loading

0 comments on commit c44c8db

Please sign in to comment.