Skip to content

Commit

Permalink
Merge remote-tracking branch 'ESCOMP/cam_development' into negwetdep
Browse files Browse the repository at this point in the history
  • Loading branch information
fvitt committed Feb 13, 2025
2 parents 0972a9e + 3eb2112 commit a2bd754
Show file tree
Hide file tree
Showing 77 changed files with 2,844 additions and 3,312 deletions.
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
[submodule "atmos_phys"]
path = src/atmos_phys
url = https://github.com/ESCOMP/atmospheric_physics
fxtag = atmos_phys0_07_001
fxtag = atmos_phys0_08_000
fxrequired = AlwaysRequired
fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics

Expand Down Expand Up @@ -144,7 +144,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute
[submodule "ccs_config"]
path = ccs_config
url = https://github.com/ESMCI/ccs_config_cesm.git
fxtag = ccs_config_cesm1.0.8
fxtag = ccs_config_cesm1.0.21
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git

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

This file was deleted.

47 changes: 33 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 @@ -3655,7 +3658,6 @@ if (!$simple_phys) {
add_default($nl, 'zmconv_c0_ocn');
add_default($nl, 'zmconv_ke');
add_default($nl, 'zmconv_ke_lnd');
add_default($nl, 'zmconv_org');
add_default($nl, 'zmconv_num_cin');
add_default($nl, 'zmconv_dmpdz');
add_default($nl, 'zmconv_tiedke_add');
Expand Down Expand Up @@ -3772,6 +3774,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 @@ -3833,6 +3843,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 @@ -3887,6 +3898,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 @@ -3906,6 +3921,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
4 changes: 0 additions & 4 deletions bld/config_files/definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@ Switch to turn on UNICON package: 0 => off, 1 => on
<entry id="clubb_do_adv" valid_values="0,1" value="0">
Switch to turn on/off advecting CLUBB moments: 0 => no, 1 => yes
</entry>
<entry id="zmconv_org" valid_values="0,1" value="0">
Switch to turn on/off parameterization for sub-grid scale convective organization for the ZM deep convective scheme based
on Mapes and Neale (2011): 0 => no, 1 => yes
</entry>
<entry id="pbl" valid_values="uw,hb,hbr,clubb_sgs,spcam_sam1mom,spcam_m2005,none" value="">
PBL package: uw (University of Washington), hb (Holtslag and Boville), hbr
(Holtslag, Boville, and Rasch), clubb_sgs, spcam_sam1om, spcam_m2005, none.
Expand Down
20 changes: 2 additions & 18 deletions bld/configure
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ OPTIONS
The user does not need to set this if one of the waccm chemistry options
is chosen.
-waccmx Build CAM/WACCM with WACCM upper Thermosphere/Ionosphere extended package
-zmconv_org Include parameterization for sub-grid scale convective organization for the ZM deep convective scheme based
on Mapes and Neale (2011)
Options relevent to SCAM mode:
Expand Down Expand Up @@ -317,7 +315,6 @@ GetOptions(
"version" => \$opts{'version'},
"waccm_phys" => \$opts{'waccm_phys'},
"waccmx" => \$opts{'waccmx'},
"zmconv_org" => \$opts{'zmconv_org'},
) or usage();

# Give usage message.
Expand Down Expand Up @@ -939,16 +936,6 @@ if (defined $opts{'clubb_opts'}) {
my $clubb_do_adv = $cfg_ref->get('clubb_do_adv');
if ($print>=2) { print "clubb_do_adv: $clubb_do_adv$eol"; }

#-----------------------------------------------------------------------------------------------
# ZM convective organization

if (defined $opts{'zmconv_org'}) {
$cfg_ref->set('zmconv_org', $opts{'zmconv_org'});
}

my $zmconv_org = $cfg_ref->get('zmconv_org');
if ($print>=2) { print "zmconv_org: $zmconv_org$eol"; }

#-----------------------------------------------------------------------------------------------
# Macro-physics package

Expand Down Expand Up @@ -1569,11 +1556,6 @@ else {
if ($print>=2) { print "Advected constituents added by $microphys_pkg microphysics: 10$eol"; }
}

if ($zmconv_org == 1 ) {
$nadv += 1;
if ($print>=2) { print "Advected constituents added by $microphys_pkg microphysics: 8$eol"; }
}

if ($clubb_do_adv) {
$nadv += 9;
if ($print>=2) { print "Advected constituents added by $microphys_pkg microphysics: 8$eol"; }
Expand Down Expand Up @@ -2344,6 +2326,8 @@ sub write_filepath
print $fh "$camsrcdir/src/atmos_phys/schemes/check_energy\n";
print $fh "$camsrcdir/src/atmos_phys/schemes/utilities\n";

print $fh "$camsrcdir/src/atmos_phys/schemes/cloud_fraction\n";

# Dynamics package and test utilities
print $fh "$camsrcdir/src/dynamics/$dyn\n";
if($dyn eq 'se') {
Expand Down
Loading

0 comments on commit a2bd754

Please sign in to comment.