Skip to content

Commit

Permalink
Merge pull request #2199 from rgknox/fates-nocomp-fix
Browse files Browse the repository at this point in the history
FATES restart fix for long runs
  • Loading branch information
ekluzek authored Nov 12, 2023
2 parents dc164d5 + 2b186d2 commit 2ff9c12
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Externals_CLM.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
local_path = src/fates
protocol = git
repo_url = https://github.com/NGEET/fates
tag = sci.1.68.1_api.29.0.0
tag = sci.1.68.2_api.30.0.0
required = True

[externals_description]
Expand Down
7 changes: 7 additions & 0 deletions cime_config/testdefs/ExpectedTestFails.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@
</phase>
</test>

<test name="ERS_Lm20_Mmpi-serial.1x1_smallvilleIA.I2000Clm50BgcCropQianRs.izumi_gnu.clm-cropMonthlyNoinitial">
<phase name="COMPARE_base_rest">
<status>FAIL</status>
<issue>#2236</issue>
</phase>
</test>

<!-- fates test suite failures -->

<test name="ERS_Lm12.1x1_brazil.I2000Clm50FatesCruRsGs.cheyenne_intel.clm-FatesFireLightningPopDens">
Expand Down
13 changes: 13 additions & 0 deletions cime_config/testdefs/testlist_clm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1562,6 +1562,19 @@
<option name="comment" >Add at least one test of a NEON site with PRISM precipitation</option>
</options>
</test>

<test name="ERS_P144x1_Lm25" grid="f10_f10_mg37" compset="I2000Clm51Fates" testmods="clm/FatesColdNoComp">
<machines>
<!-- no izumi tests since this has a pe layout specific for cheyenne -->
<machine name="cheyenne" compiler="intel" category="aux_clm"/>
<machine name="cheyenne" compiler="intel" category="fates"/>
</machines>
<options>
<option name="wallclock">00:60:00</option>
<option name="comment" >This is a long fates test on full dynamics. The 144 count is designed to minimize wall time.</option>
</options>
</test>

<test name="SMS_Ld10_D_Mmpi-serial" grid="CLM_USRDAT" compset="I1PtClm51Fates" testmods="clm/FatesFireLightningPopDens--clm/NEON/FATES/NIWO">
<machines>
<machine name="izumi" compiler="nag" category="aux_clm"/>
Expand Down
74 changes: 74 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,78 @@
===============================================================
Tag name: ctsm5.1.dev151
Originator(s): rgknox (Ryan Knox,LAWRENCE BERKELEY NATIONAL LABORATORY,510-495-2153)
Date: Sat Nov 11 16:53:01 MST 2023
One-line Summary: Fixes to FATES long run restarts

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

This is a set of changes that enables exact restart tests to pass with FATES, for
longer periods, particularly those that have elapsed over a year.
We removed calls that were incrementing, uncecessary calls, and added key new
variables to the restart file (such as the leaf layer carbon balance vector).

Collaborators: @mvdebolskiy, @mvertens, @glemieux, @ekluzek, @ckoven, @rosiealice

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

No changes to scientifically-supported configurations.

Bugs fixed or introduced
------------------------

Fixes: FATES#1051 https://github.com/NGEET/fates/issues/1051

Notes of particular relevance for users
---------------------------------------

This set of changes is introduced, while there is a known test failure in:
ERS_Lm20_Mmpi-serial.1x1_smallvilleIA.I2000Clm50BgcCropQianRs.izumi_gnu.clm-cropMonthlyNoinitial

This is documented in issue: 2236 and a fix is slated for integration. The nature of the changes
in this PR where obviously orthogonal to the issue.

Substantial timing or memory changes: None


Notes of particular relevance for developers:
---------------------------------------------

A new test was added to aux_clm and fates test suites. The walltime for this test
was 29 minutes. This is an important new test for FATES because it is the
first gridded test that spans significantly over a year (and passes). Various test
configurations were explored to find a gridded test that completed 25 months
with some attempt at expedience in walltime. A walltime
allowance of 60 minutes is set in the test. Here is the test:
ERS_P144x1_Lm25.f10_f10_mg37.I2000Clm51Fates clm-FatesColdNoComp


Testing summary:
----------------
regular tests:

cheyenne ---- ok
izumi ------- ok

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

No answer changes

Other details
-------------

List any externals directories updated (cime, rtm, mosart, cism, fates, etc.): fates API30

Pull Requests that document the changes (include PR ids):

https://github.com/ESCOMP/CTSM/pull/2199
https://github.com/NGEET/fates/pull/1098


===============================================================
===============================================================
Tag name: ctsm5.1.dev150
Originator(s): rgknox (Ryan Knox,LAWRENCE BERKELEY NATIONAL LABORATORY,510-495-2153)
Date: Mon Nov 6 14:12:37 MST 2023
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeSum
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Tag Who Date Summary
============================================================================================================================
ctsm5.1.dev151 rgknox 11/11/2023 Fixes to FATES long run restarts
ctsm5.1.dev150 rgknox 11/06/2023 FATES API fix to support future fates npp-fixation coupling, and urgent coupling fixes with E3SM.
ctsm5.1.dev149 samrabin 11/03/2023 Rearrange leaf/stem "harvest" and fix soil gas diffusivity
ctsm5.1.dev148 samrabin 11/03/2023 Add GRAINN outputs
Expand Down
16 changes: 13 additions & 3 deletions src/utils/clmfates_interfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,8 @@ subroutine dynamics_driv(this, nc, bounds_clump, &

call ed_update_site(this%fates(nc)%sites(s), &
this%fates(nc)%bc_in(s), &
this%fates(nc)%bc_out(s))
this%fates(nc)%bc_out(s), &
is_restarting = .false.)
enddo


Expand Down Expand Up @@ -1764,9 +1765,17 @@ subroutine restart( this, bounds_proc, ncid, flag, waterdiagnosticbulk_inst, &
this%fates(nc)%bc_in(s)%max_rooting_depth_index_col = &
min(this%fates(nc)%bc_in(s)%nlevsoil, active_layer_inst%altmax_lastyear_indx_col(c))

! When restarting the model, this subroutine has several
! procedures that are incremental or don't need to be performed for
! during the restart sequence. For the prior, we don't want the restarted
! run to call these routines more than would had been called during
! a continuous simulation period, as it would change results. So
! we pass in the "is_restarting=.true." flag so we can bypass those procedures

call ed_update_site( this%fates(nc)%sites(s), &
this%fates(nc)%bc_in(s), &
this%fates(nc)%bc_out(s) )
this%fates(nc)%bc_out(s), &
is_restarting = .true. )

end do

Expand Down Expand Up @@ -1995,7 +2004,8 @@ subroutine init_coldstart(this, waterstatebulk_inst, waterdiagnosticbulk_inst, &

call ed_update_site(this%fates(nc)%sites(s), &
this%fates(nc)%bc_in(s), &
this%fates(nc)%bc_out(s))
this%fates(nc)%bc_out(s), &
is_restarting = .false.)

end do

Expand Down

0 comments on commit 2ff9c12

Please sign in to comment.