Skip to content

Commit

Permalink
Merge pull request #820 from cacraigucar/cam_tuning_f
Browse files Browse the repository at this point in the history
cam6_3_116: CAM tuning F and fix Derecho CSLAM performance
  • Loading branch information
cacraigucar committed Jun 23, 2023
2 parents 0157c31 + fbc3da9 commit 5fecf50
Show file tree
Hide file tree
Showing 13 changed files with 252 additions and 79 deletions.
39 changes: 35 additions & 4 deletions bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -3029,7 +3029,6 @@ if ($cfg->get('microphys') =~ /^mg/) {
add_default($nl, 'nucleate_ice_subgrid_strat');
add_default($nl, 'nucleate_ice_use_troplev');
add_default($nl, 'cld_macmic_num_steps', 'dtime'=>$dtime);
add_default($nl, 'micro_mg_dcs');
add_default($nl, 'micro_mg_precip_frac_method');
add_default($nl, 'micro_mg_berg_eff_factor');
add_default($nl, 'nucleate_ice_incloud');
Expand Down Expand Up @@ -3057,6 +3056,31 @@ if ($cfg->get('microphys') =~ /^mg/) {
add_default($nl, 'micro_mg_accre_sees_auto');
add_default($nl, 'micro_mg_implicit_fall');
}

# tunings for micro_mg_dcs
my $microphys = $cfg->get('microphys');
my $hgrid = $cfg->get('hgrid');
my $silhs = $cfg->get('silhs');

my $micro_mg_dcs = '400.D-6'; # default for cam5/mg1

if ($microphys =~ /mg2|mg3/) {
if ($silhs eq '1') {
$micro_mg_dcs = '390.D-6'; # default for SIHLS
}
elsif ($hgrid =~ /1.9x2.5/ and $phys eq 'cam6') {
$micro_mg_dcs = '200.D-6'; # default for FV 2-deg
}
elsif ($phys eq 'cam6') {
$micro_mg_dcs = '500.D-6'; # default for cam6
}
elsif ($phys eq 'cam_dev') {
$micro_mg_dcs = '250.D-6'; # default for cam_dev
}
}


add_default($nl, 'micro_mg_dcs', 'val'=>$micro_mg_dcs);
}

# Aerosol Namelist options
Expand Down Expand Up @@ -3564,6 +3588,11 @@ if ($waccm_phys or
}
add_default($nl, 'gw_qbo_hdepth_scaling', 'val'=>$hdepth_scaling);
add_default($nl, 'gw_top_taper');
} elsif ($phys =~ /cam_dev/) {
# cam_dev settings for nlev<60 (Other cam_dev set above)
add_default($nl, 'use_gw_front' , 'val'=>'.true.');
add_default($nl, 'use_gw_convect_dp', 'val'=>'.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.');
Expand Down Expand Up @@ -3636,8 +3665,8 @@ if ($do_gw_rdg_beta) {
die "$ProgName - ERROR: beta ridge scheme requires data from a topo file.\n";
}
add_default($nl, 'n_rdg_beta', 'val'=>'10');
add_default($nl, 'effgw_rdg_beta', 'val'=>'1.0D0');
add_default($nl, 'effgw_rdg_beta_max', 'val'=>'1.0D0');
add_default($nl, 'effgw_rdg_beta');
add_default($nl, 'effgw_rdg_beta_max');
add_default($nl, 'trpd_leewv_rdg_beta', 'val'=>'.false.');
add_default($nl, 'rdg_beta_cd_llb', 'val'=>'1.0D0');
}
Expand Down Expand Up @@ -3693,7 +3722,9 @@ if (($do_gw_rdg_beta or $do_gw_rdg_gamma)) {
# use tau_0_ubc = .false. to avoid changing answers.
if ((not $waccm_phys) and
($do_gw_front or $do_gw_front_igw or
$do_gw_convect_dp or $do_gw_convect_sh)) {
$do_gw_convect_dp or $do_gw_convect_sh )) {
add_default($nl, 'tau_0_ubc', 'val'=>'.true.');
} elsif ($phys =~ /cam_dev/) {
add_default($nl, 'tau_0_ubc', 'val'=>'.true.');
} elsif (!$simple_phys) {
add_default($nl, 'tau_0_ubc', 'val'=>'.false.');
Expand Down
5 changes: 5 additions & 0 deletions bld/config_files/definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ Switch to turn on analytic initial conditions for the dynamics state:
0 => no
1 => yes.
</entry>
<entry id="model_top" valid_values="none,lt,mt" value="none">
Model top specifier - set by compset definition
lt: ~ 40 km top
mt: ~ 80 km top
</entry>
<entry id="waccmx" valid_values="0,1" value="0">
Option to turn on waccmx thermosphere/ionosphere extension: 0 => no, 1 => yes
</entry>
Expand Down
13 changes: 13 additions & 0 deletions bld/configure
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ OPTIONS
-max_n_rad_cnst <n> Maximum number of constituents that are either radiatively
active, or in any single diagnostic list for the radiation.
-microphys <name> Specify the microphysics option [mg1 | mg2 | mg3| rk].
-model_top <name> Specify the model_top option [ lt | mt ].
-nadv <n> Set total number of advected species to <n>.
-nadv_tt <n> Set number of advected test tracers <n>.
-nlev <n> Set number of levels to <n>.
Expand Down Expand Up @@ -271,6 +272,7 @@ GetOptions(
"max_n_rad_cnst=s" => \$opts{'max_n_rad_cnst'},
"mct_libdir=s" => \$opts{'mct_libdir'},
"microphys=s" => \$opts{'microphys'},
"model_top=s" => \$opts{'model_top'},
"mpas_libdir=s" => \$opts{'mpas_libdir'},
"mpi_inc=s" => \$opts{'mpi_inc'},
"mpi_lib=s" => \$opts{'mpi_lib'},
Expand Down Expand Up @@ -674,6 +676,17 @@ my $max_n_rad_cnst = $cfg_ref->get('max_n_rad_cnst');

if ($print>=2) { print "Maximum radiatively active tracers: $max_n_rad_cnst$eol"; }

#-----------------------------------------------------------------------------------------------
# model_top - not set by default
my $model_top = 'none';
$cfg_ref->set('model_top', $model_top);

# user override
if (defined $opts{'model_top'}) {
$cfg_ref->set('model_top', $opts{'model_top'});
}
if ($print>=2) { print "model_top: $model_top$eol"; }

#-----------------------------------------------------------------------------------------------
# waccm physics
my $waccm_phys = 0;
Expand Down
Loading

0 comments on commit 5fecf50

Please sign in to comment.