Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into noresm
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdebolskiy committed Jan 25, 2024
2 parents a5b9683 + a73a170 commit e8c5a94
Show file tree
Hide file tree
Showing 17 changed files with 1,170 additions and 665 deletions.
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ e4d38681df23ccca0ae29581a45f8362574e0630
025d5e7c2e80263717fb029101d65cbbf261c3c4
a9d96219902cf609636886c7073a84407f450d9a
d866510188d26d51bcd6d37239283db690af7e82
0dcd0a3c1abcaffe5529f8d79a6bc34734b195c7
# Ran SystemTests and python/ctsm through black python formatter
5364ad66eaceb55dde2d3d598fe4ce37ac83a93c
8056ae649c1b37f5e10aaaac79005d6e3a8b2380
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/assign-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Auto Assign to Project(s)

on:
issues:
types: [opened, labeled]
pull_request:
types: [opened, labeled]
issue_comment:
types: [created]

jobs:
assign_high_priority:
runs-on: ubuntu-latest
name: Assign to High Priority project
steps:
- name: Assign issues and pull requests with `priority: high` label to project 25
uses: srggrs/assign-one-project-github-action@1.3.1
if: |
contains(github.event.issue.labels.*.name, 'priority: high') ||
contains(github.event.pull_request.labels.*.name, 'priority: high')
with:
project: 'https://github.com/ESCOMP/CTSM/projects/25'
column_name: 'Needs triage'
30 changes: 27 additions & 3 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,7 @@ sub process_namelist_inline_logic {
setup_logic_irrigate($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_start_type($opts, $nl_flags, $nl);
setup_logic_decomp_performance($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_roughness_methods($opts, $nl_flags, $definition, $defaults, $nl, $physv);
setup_logic_snicar_methods($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_snow($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_glacier($opts, $nl_flags, $definition, $defaults, $nl, $envxml_ref);
Expand Down Expand Up @@ -1636,7 +1637,7 @@ sub process_namelist_inline_logic {
###############################
# namelist group: tillage #
###############################
setup_logic_tillage($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_tillage($opts, $nl_flags, $definition, $defaults, $nl, $physv);

###############################
# namelist group: ch4par_in #
Expand Down Expand Up @@ -2002,6 +2003,25 @@ sub setup_logic_decomp_performance {

#-------------------------------------------------------------------------------

sub setup_logic_roughness_methods {
my ($opts, $nl_flags, $definition, $defaults, $nl, $physv) = @_;

add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'z0param_method',
'phys'=>$nl_flags->{'phys'} );

my $var = remove_leading_and_trailing_quotes( $nl->get_value("z0param_method") );
if ( $var ne "Meier2022" && $var ne "ZengWang2007" ) {
$log->fatal_error("$var is incorrect entry for the namelist variable z0param_method; expected Meier2022 or ZengWang2007");
}
my $phys = $physv->as_string();
if ( $phys eq "clm4_5" || $phys eq "clm5_0" ) {
if ( $var eq "Meier2022" ) {
$log->fatal_error("z0param_method = $var and phys = $phys, but this method has been tested only with clm5_1 and later versions; to use with earlier versions, disable this error, and add Meier2022 parameters to the corresponding params file");
}
}
}
#-------------------------------------------------------------------------------

sub setup_logic_snicar_methods {
my ($opts, $nl_flags, $definition, $defaults, $nl) = @_;

Expand Down Expand Up @@ -2242,6 +2262,7 @@ sub setup_logic_crop_inparm {
'use_crop'=>$nl->get_value('use_crop') );

my $crop_residue_removal_frac = $nl->get_value('crop_residue_removal_frac');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'crop_residue_removal_frac' );
if ( $crop_residue_removal_frac < 0.0 or $crop_residue_removal_frac > 1.0 ) {
$log->fatal_error("crop_residue_removal_frac must be in range [0, 1]");
}
Expand All @@ -2254,10 +2275,13 @@ sub setup_logic_crop_inparm {
#-------------------------------------------------------------------------------

sub setup_logic_tillage {
my ($opts, $nl_flags, $definition, $defaults, $nl) = @_;
my ($opts, $nl_flags, $definition, $defaults, $nl, $physv) = @_;

add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'tillage_mode',
'use_crop'=>$nl_flags->{'use_crop'}, 'phys'=>$physv->as_string() );

my $tillage_mode = remove_leading_and_trailing_quotes( $nl->get_value( "tillage_mode" ) );
if ( $tillage_mode ne "off" && $tillage_mode ne "" && not &value_is_true($nl->get_value('use_crop')) ) {
if ( $tillage_mode ne "off" && $tillage_mode ne "" && not &value_is_true($nl_flags->{'use_crop'}) ) {
$log->fatal_error( "Tillage only works on crop columns, so use_crop must be true if tillage is enabled." );
}
}
Expand Down
4 changes: 4 additions & 0 deletions bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<!-- ================================================================== -->

<z0param_method>ZengWang2007</z0param_method>
<z0param_method phys="clm5_1">Meier2022</z0param_method>

<use_z0m_snowmelt z0param_method="Meier2022" >.true.</use_z0m_snowmelt>
<use_z0m_snowmelt >.false.</use_z0m_snowmelt>
Expand Down Expand Up @@ -554,6 +555,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<use_grainproduct use_crop=".true." phys="clm5_1" >.true.</use_grainproduct> <!-- 1-year grain product pool default to on for clm50 if crop is turned on -->

<crop_residue_removal_frac>0.d+0</crop_residue_removal_frac>
<crop_residue_removal_frac phys="clm5_1">0.5d00</crop_residue_removal_frac>

<!-- Crop model options -->
<baset_mapping use_crop=".true." phys="clm4_5" >constant</baset_mapping>
Expand Down Expand Up @@ -2813,6 +2815,8 @@ use_crop=".true.">lnd/clm2/surfdata_map/ctsm5.1.dev052/landuse.timeseries_mpasa1
<!-- ========================================= -->

<tillage_mode>off</tillage_mode>
<tillage_mode use_crop=".true." phys="clm5_1">low</tillage_mode>

<use_original_tillage_phases>.false.</use_original_tillage_phases>
<max_tillage_depth>0.26d00</max_tillage_depth>

Expand Down
21 changes: 21 additions & 0 deletions cime_config/testdefs/ExpectedTestFails.xml
Original file line number Diff line number Diff line change
Expand Up @@ -228,4 +228,25 @@
</phase>
</test>

<test name="ERS_D_Ld15.f45_f45_mg37.I2000Clm50FatesRs.derecho_intel.clm-FatesColdTwoStream">
<phase name="COMPARE_base_rest">
<status>FAIL</status>
<issue>#2325</issue>
</phase>
</test>

<test name="ERS_D_Ld15.f45_f45_mg37.I2000Clm50FatesRs.izumi_nag.clm-FatesColdTwoStream">
<phase name="COMPARE_base_rest">
<status>FAIL</status>
<issue>#2325</issue>
</phase>
</test>

<test name="ERS_D_Ld15.f45_f45_mg37.I2000Clm50FatesRs.derecho_gnu.clm-FatesColdTwoStreamNoCompFixedBioGeo">
<phase name="COMPARE_base_rest">
<status>FAIL</status>
<issue>#2325</issue>
</phase>
</test>

</expectedFails>
1 change: 1 addition & 0 deletions cime_config/testdefs/testlist_clm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3437,6 +3437,7 @@
<machines>
<machine name="cheyenne" compiler="intel" category="aux_clm"/>
<machine name="derecho" compiler="intel" category="aux_clm"/>
<machine name="izumi" compiler="intel" category="aux_clm"/>
</machines>
<options>
<option name="wallclock">00:30:00</option>
Expand Down
158 changes: 158 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,162 @@
===============================================================
Tag name: ctsm5.1.dev166
Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310), tking (Teagan King), samrabin (Sam Rabin)
Date: Wed 24 Jan 2024 05:39:41 PM MST
One-line Summary: BFB merge tag

Purpose and description of changes
----------------------------------

#2315 @TeaganKing Refactoring run_neon for PLUMBER2 part1
#2213 @samsrabin Automatically assign high priority items to project 25
#2330 @samsrabin Add Izumi version of the aux_clm unit testing
#2326 @samsrabin run_sys_tests: Check Python environment for FatesColdTwoStream tests

Significant changes to scientifically-supported configurations
--------------------------------------------------------------

Does this tag change answers significantly for any of the following physics configurations?
(Details of any changes will be given in the "Answer changes" section below.)

[Put an [X] in the box for any configuration with significant answer changes.]

[ ] clm5_1

[ ] clm5_0

[ ] ctsm5_0-nwp

[ ] clm4_5


Bugs fixed
----------

CTSM issues fixed (include CTSM Issue #):
Fixes #2315
Fixes #2213
Fixes #2330
Fixes #2326

Known bugs introduced in this tag (include issue #):
- New feature coming in with #2213 where user will receive email from
github when pushing to their remote:
"Run failed: .github/workflows/assign-to-project.yml"
- New feature that also affects older tags: The izumi FatesColdTwoStream
test submitted from ./run_sys_tests will fail at CREATE_NEWCASE unless users
introduce "module load lang/python/3.7.0" in their .bash_profile.
Longterm solution discussed in #2335. The test also works when submitted
manually with ./create_test.

Notes of particular relevance for developers:
---------------------------------------------
Changes to tests or testing:
#2315 New unit tests for arg_parse and NeonSite
#2330 New test in aux_clm that does unit testing on izumi because unit
testing does not work on derecho, yet

Testing summary:
----------------

[PASS means all tests PASS; OK means tests PASS other than expected fails.]

python testing (if python code has changed; see instructions in python/README.md; document testing done):

derecho - OK, pylint gives long list of warnings (expected)

regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):

derecho ----- OK
izumi ------- OK


Answer changes
--------------
Changes answers relative to baseline: No

Other details
-------------
Pull Requests that document the changes (include PR ids):
https://github.com/ESCOMP/ctsm/pull/2334

===============================================================
===============================================================
Tag name: ctsm5.1.dev165
Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310), oleson (Keith Oleson), samrabin (Sam Rabin)
Date: Fri 19 Jan 2024 06:40:36 PM MST
One-line Summary: Turn Meier2022, tillage, and residue removal on for ctsm5.1, fix #2212

Purpose and description of changes
----------------------------------

Answer-changing merge-tag:
- Turn Meier2022 on for ctsm5.1. Had turned off temporarily while fixing a bug.
- Bring in Urban answer fix #2212.
- Turn tillage and residue removal on for ctsm5.1.

Significant changes to scientifically-supported configurations
--------------------------------------------------------------

Does this tag change answers significantly for any of the following physics configurations?
(Details of any changes will be given in the "Answer changes" section below.)

[Put an [X] in the box for any configuration with significant answer changes.]

[x] clm5_1

[ ] clm5_0

[ ] ctsm5_0-nwp

[ ] clm4_5


Bugs fixed
----------
CTSM issues fixed (include CTSM Issue #):
Fixes #2212

Notes of particular relevance for users
---------------------------------------
Changes made to namelist defaults (e.g., changed parameter values):
- Making Meier2022 the default for ctsm5.1 again.
- Making tillage low by default for ctsm5.1.
- Making residue removal 0.5 by default for ctsm5.1.

Testing summary:
----------------
[PASS means all tests PASS; OK means tests PASS other than expected fails.]

regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):

derecho ----- OK
izumi ------- OK

Answer changes
--------------

Changes answers relative to baseline: YES

[ If a tag changes answers relative to baseline comparison the
following should be filled in (otherwise remove this section).
And always remove these three lines and parts that don't apply. ]

Summarize any changes to answers, i.e.,
- what code configurations: ALL
- what platforms/compilers: ALL
- nature of change:i
clm45 and clm50: larger than roundoff
clm51: possibly climate changing
Effect of Meier2022 was documented here: https://github.com/NCAR/LMWG_dev/issues/38
Effect of tillage and residue removal may require an Answer Changing Tag simulation

Other details
-------------
Pull Requests that document the changes (include PR ids):
https://github.com/ESCOMP/ctsm/pull/2323

===============================================================
===============================================================
Tag name: ctsm5.1.dev164
Originator(s): rgknox (Ryan Knox)
Date: Wed 17 Jan 2024 12:38:18 PM MST
Expand Down
4 changes: 3 additions & 1 deletion doc/ChangeSum
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Tag Who Date Summary
============================================================================================================================
ctsm5.1.dev166 multiple 01/24/2024 BFB merge tag
ctsm5.1.dev165 slevis 01/19/2024 Turn Meier2022, tillage, residue removal on for ctsm5.1, fix #2212
ctsm5.1.dev164 rgknox 01/17/2024 Compatibility and tests for FATES 2-Stream
ctsm5.1.dev163 sam 01/10/2024 Add tillage and residue removal
ctsm5.1.dev163 samrabin 01/10/2024 Add tillage and residue removal
ctsm5.1.dev162 samrabin 01/05/2024 Improvements to processing of crop calendar files
ctsm5.1.dev161 samrabin 01/04/2024 Refactor 20-year running means of crop GDD accumulation
ctsm5.1.dev160 glemieux 12/30/2023 FATES landuse version 1
Expand Down
Loading

0 comments on commit e8c5a94

Please sign in to comment.