Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLM-side changes to allow FATES snow occlusion of LAI #1324

Merged
merged 7 commits into from
Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.43.2_api.14.2.0
tag = sci.1.45.0_api.15.0.0
required = True

[PTCLM]
Expand Down
106 changes: 105 additions & 1 deletion doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,108 @@
===============================================================
Tag name: ctsm5.1.dev036
Originator(s): glemieux (Gregory Lemieux,LBL/NGEET,510-486-5049)
Date: Wed Apr 21 14:50:19 MDT 2021
One-line Summary: FATES tag update and snow occlusion of LAI fix

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

This tag updates the way in which fates is called during restarts to appropriately
handle the fates-side snow occlusion code. Additionally, this update points to the
most recent fates tag, which includes a number of fates science updates (including
the snow occlusion fix) and fates-side bug fixes (see below for list of issues
addressed).

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 or introduced
------------------------

Issues fixed (include CTSM Issue #):
#1293 -- Update FATES on CTSM main-dev
NGEET/fates#359 -- ground snow is not occluding lai profile
NGEET/fates#709 -- Error Check issue in EDPatchDynamicsMod.F90: spawn_patches() causes problem with logging module
NGEET/fates#725 -- declaration of the prt pointer
NGEET/fates#713 -- Changes associated with patch fraction burnt
NGEET/fates#473 -- Update FIRE_AREA long name units
NGEET/fates#575 -- Clean up NaN and zeroing of fire variables in Patch and Cohort Dynamics

Known bugs found since the previous tag (include issue #):
#1338 -- Floating point exception in fates gnu compiler regression test with ctsm5.1.dev027

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

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

build-namelist tests (if CLMBuildNamelist.pm has changed):

cheyenne - PASS

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

cheyenne - PASS

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

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

ok: All non-fates testmods PASS b4b. Fates testmods have DIFF as expected due to update of fates science tag.

fates tests:
cheyenne ---- ok

ok: NLCOMP failures due to clm50_param file update relative to ctsm tag used on the last fates baseline.

fates baseline: fates-sci.1.44.1_api.14.2.0-ctsm5.1.dev033-C30ca1849-F6065b9a2

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

Changes answers relative to baseline: Yes, only for fates

Summarize any changes to answers, i.e.,
- what code configurations: all fates
- what platforms/compilers: all
- nature of change (roundoff; larger than roundoff/same climate; new climate): larger than roundoff

If bitwise differences were observed, how did you show they were no worse
than roundoff?
- fates-side review of expected differences for all PRs that changed answers (2 science updates
and 2 bug fixes)


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

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

fates: sci.1.43.2_api.14.2.0 -> sci.1.45.0_api.15.0.0

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

- https://github.com/ESCOMP/CTSM/pull/1324
- https://github.com/NGEET/fates/pull/734

===============================================================
===============================================================
Tag name: ctsm5.1.dev035
Originator(s): sacks (Bill Sacks)
Date: Tue Apr 20 10:45:25 MDT 2021
Expand Down Expand Up @@ -1220,7 +1324,7 @@ Pull Requests that document the changes (include PR ids):
===============================================================
===============================================================
Tag name: ctsm5.1.dev022
Originator(s): gregorylemieux (Gregory Lemieux,LBL/NGEET,510-486-5049)
Originator(s): glemieux (Gregory Lemieux,LBL/NGEET,510-486-5049)
Date: Fri Feb 5 00:03:28 MST 2021
One-line Summary: Merge fates_main_api into ctsm master

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.dev036 glemieux 04/21/2021 FATES tag update and snow occlusion of LAI fix
ctsm5.1.dev035 sacks 04/20/2021 Misc bfb enhancements and fixes
ctsm5.1.dev034 erik 04/19/2021 Bring in Arctic changes to LUNA from Leah Birch
ctsm5.1.dev033 mvertens 04/10/2021 Remove unnecessary settings of nextsw_cday
Expand Down
21 changes: 16 additions & 5 deletions src/utils/clmfates_interfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ module CLMFatesInterfaceMod
use EDBtranMod , only : btran_ed, &
get_active_suction_layers
use EDCanopyStructureMod , only : canopy_summarization, update_hlm_dynamics
use EDCanopyStructureMod , only : UpdateFatesAvgSnowDepth
use FatesPlantRespPhotosynthMod, only : FatesPlantRespPhotosynthDrive
use EDAccumulateFluxesMod , only : AccumulateFluxes_ED
use FatesSoilBGCFluxMod , only : FluxIntoLitterPools
Expand Down Expand Up @@ -919,7 +920,7 @@ subroutine dynamics_driv(this, nc, bounds_clump, &
call this%wrap_update_hlmfates_dyn(nc, &
bounds_clump, &
waterdiagnosticbulk_inst, &
canopystate_inst)
canopystate_inst, .false.)

! ---------------------------------------------------------------------------------
! Part IV:
Expand All @@ -942,7 +943,7 @@ end subroutine dynamics_driv
! ------------------------------------------------------------------------------------

subroutine wrap_update_hlmfates_dyn(this, nc, bounds_clump, &
waterdiagnosticbulk_inst, canopystate_inst)
waterdiagnosticbulk_inst, canopystate_inst, is_initing_from_restart)

! ---------------------------------------------------------------------------------
! This routine handles the updating of vegetation canopy diagnostics, (such as lai)
Expand All @@ -956,7 +957,11 @@ subroutine wrap_update_hlmfates_dyn(this, nc, bounds_clump, &
integer , intent(in) :: nc
type(waterdiagnosticbulk_type) , intent(inout) :: waterdiagnosticbulk_inst
type(canopystate_type) , intent(inout) :: canopystate_inst


! is this being called during a read from restart sequence (if so then use the restarted fates
! snow depth variable rather than the CLM variable).
logical , intent(in) :: is_initing_from_restart

integer :: npatch ! number of patches in each site
integer :: ifp ! index FATES patch
integer :: p ! HLM patch index
Expand Down Expand Up @@ -988,6 +993,11 @@ subroutine wrap_update_hlmfates_dyn(this, nc, bounds_clump, &
this%fates(nc)%bc_in(s)%frac_sno_eff_si = frac_sno_eff(c)
end do

! Only update the fates internal snow burial if this is not a restart
if (.not. is_initing_from_restart) then
call UpdateFatesAvgSnowDepth(this%fates(nc)%sites,this%fates(nc)%bc_in)
end if

! Canopy diagnostics for FATES
call canopy_summarization(this%fates(nc)%nsites, &
this%fates(nc)%sites, &
Expand Down Expand Up @@ -1390,7 +1400,7 @@ subroutine restart( this, bounds_proc, ncid, flag, waterdiagnosticbulk_inst, &
! Update diagnostics of FATES ecosystem structure used in HLM.
! ------------------------------------------------------------------------
call this%wrap_update_hlmfates_dyn(nc,bounds_clump, &
waterdiagnosticbulk_inst,canopystate_inst)
waterdiagnosticbulk_inst,canopystate_inst, .true.)

! ------------------------------------------------------------------------
! Update the 3D patch level radiation absorption fractions
Expand Down Expand Up @@ -1527,7 +1537,7 @@ subroutine init_coldstart(this, waterstatebulk_inst, waterdiagnosticbulk_inst, &
! Update diagnostics of FATES ecosystem structure used in HLM.
! ------------------------------------------------------------------------
call this%wrap_update_hlmfates_dyn(nc,bounds_clump, &
waterdiagnosticbulk_inst,canopystate_inst)
waterdiagnosticbulk_inst,canopystate_inst, .false.)

! ------------------------------------------------------------------------
! Update history IO fields that depend on ecosystem dynamics
Expand Down Expand Up @@ -1610,6 +1620,7 @@ subroutine wrap_sunfrac(this,nc,atm2lnd_inst,canopystate_inst)
end do
end do


! -------------------------------------------------------------------------------
! Call FATES public function to calculate internal sun/shade structures
! as well as total patch sun/shade fraction output boundary condition
Expand Down