Skip to content

Commit

Permalink
merge to head of cam development
Browse files Browse the repository at this point in the history
  • Loading branch information
peverwhee committed Feb 10, 2025
2 parents 068ebc6 + b90429e commit a56fc0b
Show file tree
Hide file tree
Showing 119 changed files with 7,819 additions and 2,646 deletions.
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
path = src/physics/carma/base
url = https://github.com/ESCOMP/CARMA_base.git
fxrequired = AlwaysRequired
fxtag = carma4_01
fxtag = carma4_09
fxDONOTUSEurl = https://github.com/ESCOMP/CARMA_base.git

[submodule "pumas"]
Expand Down Expand Up @@ -186,7 +186,7 @@ fxDONOTUSEurl = https://github.com/NCAR/ParallelIO
[submodule "cice"]
path = components/cice
url = https://github.com/ESCOMP/CESM_CICE
fxtag = cesm_cice6_6_0_6
fxtag = cesm3_cice6_6_0_6
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/CESM_CICE

Expand Down
84 changes: 0 additions & 84 deletions CODE_OF_CONDUCT.md

This file was deleted.

49 changes: 35 additions & 14 deletions bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -509,14 +509,6 @@ if ($phys_mode_flags > 1) {
my $simple_phys = 0;
if ($adia_mode or $ideal_mode) { $simple_phys = 1; }

# If running either a simple physics or an aquaplanet configuration, the nitrogen
# deposition data is not used. These files are set in buildnml and can't be overridden
# via user_nl_cam. So provide an override here.
if ($simple_phys or $aqua_mode) {
$nl->set_variable_value('ndep_stream_nl', 'stream_ndep_data_filename', '" "');
$nl->set_variable_value('ndep_stream_nl', 'stream_ndep_mesh_filename', '" "');
}

# Single column mode
my $scam = $cfg->get('scam');
my $scam_iop = $cfg->get('scam_iop');
Expand Down Expand Up @@ -705,6 +697,19 @@ if ($sim_year =~ /(\d+)-(\d+)/) {
$sim_year_start = $1;
}

# Setup default ndep streams only if not simple_phys or aqua_mode and
# the chemistry cannot produce the nitrogen depostion fluxes
if (!($simple_phys or $aqua_mode)) {
my $chem_nitrodep = chem_has_species($cfg, 'NO') and chem_has_species($cfg, 'NH3');
if ((!$chem_nitrodep) or ($chem =~ /geoschem/)) {
add_default($nl, 'stream_ndep_mesh_filename');
add_default($nl, 'stream_ndep_data_filename', 'sim_year'=>$sim_year);
add_default($nl, 'stream_ndep_year_first', 'sim_year'=>$sim_year);
add_default($nl, 'stream_ndep_year_last', 'sim_year'=>$sim_year);
add_default($nl, 'stream_ndep_year_align', 'sim_year'=>$sim_year);
}
}

# Topography
add_default($nl, 'use_topo_file');
my $use_topo_file = $nl->get_value('use_topo_file');
Expand Down Expand Up @@ -755,11 +760,9 @@ if ($rad_pkg =~ /rrtmg/ or $chem =~ /waccm/) {
# use solar data file as the default for rrtmg and waccm_ma
add_default($nl, 'solar_irrad_data_file');

# This option only used by camrt and rrtmg radiation schemes.
# The solar spectral scaling is done internal to RRTMGP code.
if ($rad_pkg ne 'rrtmgp') {
add_default($nl, 'solar_htng_spctrl_scl', 'val'=>'.true.');
}
# The solar spectral scaling is done based on the distribution from
# the solar_irrad_data_file.
add_default($nl, 'solar_htng_spctrl_scl', 'val'=>'.true.');

}
elsif (!$simple_phys) {
Expand Down Expand Up @@ -1268,6 +1271,7 @@ if ($carma ne 'none') {
add_default($nl, 'carma_model', 'val'=>$carma);
add_default($nl, 'carma_flag', 'val'=>'.true.');
add_default($nl, 'history_carma', 'val'=>'.true.');
add_default($nl, 'carma_sulfnuc_method','val'=>'ZhaoTurco');
}
if ($carma eq 'bc_strat') {
add_default($nl, 'carma_do_drydep', 'val'=>'.true.');
Expand Down Expand Up @@ -1587,7 +1591,7 @@ if (defined $nl->get_value('prescribed_strataero_3modes')) {

# determine if prescribed stratospheric aerosol data is needed
if ( ($het_chem) || ($nl->get_value('prescribed_strataero_feedback') =~ /$TRUE/io ) ){
if ( ($carma ne 'sulfate') && !($nl->get_value('modal_strat_sulfate') =~ /$TRUE/io) ) { # if no prognostic stratospheric aerosols
if ( !($nl->get_value('modal_strat_sulfate') =~ /$TRUE/io) ) { # if no prognostic stratospheric aerosols

unless (defined $nl->get_value('prescribed_strataero_type')) {
add_default($nl, 'prescribed_strataero_type','val'=>'CYCLICAL');
Expand Down Expand Up @@ -3771,6 +3775,14 @@ if (!$simple_phys) {
add_default($nl, 'use_gw_movmtn_pbl', 'val'=>'.true.');
}

my $use_gw_movmtn_pbl = $nl->get_value('use_gw_movmtn_pbl');
if ($use_gw_movmtn_pbl =~ /$TRUE/io) {
if ( ! ($dyn =~ /se/) ) {
die "$ProgName - ERROR: use_gw_movmtn_pbl is only available with the SE dycore \n";

}
}

add_default($nl, 'use_gw_rdg_gamma' , 'val'=>'.false.');
add_default($nl, 'use_gw_front_igw' , 'val'=>'.false.');
add_default($nl, 'use_gw_convect_sh', 'val'=>'.false.');
Expand Down Expand Up @@ -3832,6 +3844,7 @@ my $do_gw_convect_sh = ($nl->get_value('use_gw_convect_sh') =~ /$TRUE/io);
my $do_gw_movmtn_pbl = ($nl->get_value('use_gw_movmtn_pbl') =~ /$TRUE/io);
my $do_gw_rdg_beta = ($nl->get_value('use_gw_rdg_beta') =~ /$TRUE/io);
my $do_gw_rdg_gamma = ($nl->get_value('use_gw_rdg_gamma') =~ /$TRUE/io);
my $do_gw_rdg_resid = ($nl->get_value('use_gw_rdg_resid') =~ /$TRUE/io);

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

Expand Down Expand Up @@ -3886,6 +3899,10 @@ if ($do_gw_convect_sh) {
if ($do_gw_movmtn_pbl) {
add_default($nl, 'gw_drag_file_mm');
add_default($nl, 'alpha_gw_movmtn');
add_default($nl, 'effgw_movmtn_pbl');
add_default($nl, 'movmtn_source');
add_default($nl, 'movmtn_psteer');
add_default($nl, 'movmtn_plaunch');
}

if ($do_gw_rdg_beta) {
Expand All @@ -3905,6 +3922,10 @@ if ($do_gw_rdg_beta) {
add_default($nl, 'gw_prndl');
}

if ($do_gw_rdg_resid) {
add_default($nl, 'effgw_rdg_resid' );
}

if ($do_gw_rdg_gamma) {
add_default($nl, 'n_rdg_gamma', 'val'=>'-1');
add_default($nl, 'effgw_rdg_gamma', 'val'=>'1.0D0');
Expand Down
Loading

0 comments on commit a56fc0b

Please sign in to comment.