Skip to content

Commit

Permalink
Merge pull request ESCOMP#2009 from glemieux/fates-drdt-decid-updates
Browse files Browse the repository at this point in the history
FATES parameter file and test definition updates
  • Loading branch information
ekluzek authored Jul 10, 2023
2 parents bb2a8d2 + 601f8b3 commit 4a868c1
Show file tree
Hide file tree
Showing 10 changed files with 136 additions and 20 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.65.3_api.25.4.0
tag = sci.1.66.1_api.25.5.0
required = True

[externals_description]
Expand Down
2 changes: 1 addition & 1 deletion bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<!-- FATES default parameter file -->
<!-- ================================================================== -->

<fates_paramfile>lnd/clm2/paramdata/fates_params_api.25.4.0_12pft_c230327.nc</fates_paramfile>
<fates_paramfile>lnd/clm2/paramdata/fates_params_api.25.5.0_12pft_c230628.nc</fates_paramfile>

<!-- ======================================================================================== -->
<!-- clm 5.0 BGC nitrogen model -->
Expand Down
10 changes: 5 additions & 5 deletions cime_config/testdefs/testlist_clm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1569,7 +1569,7 @@
<option name="comment">Want to keep a little single-point testing on cheyenne</option>
</options>
</test>
<test name="SMS_L10d_D_Mmpi-serial" grid="CLM_USRDAT" compset="I1PtClm51Bgc" testmods="clm/default--clm/NEON/NIWO">
<test name="SMS_Ld10_D_Mmpi-serial" grid="CLM_USRDAT" compset="I1PtClm51Bgc" testmods="clm/default--clm/NEON/NIWO">
<machines>
<machine name="izumi" compiler="nag" category="aux_clm"/>
</machines>
Expand All @@ -1579,7 +1579,7 @@
<option name="comment" >Add at least one test of a NEON site</option>
</options>
</test>
<test name="SMS_L10d_D_Mmpi-serial" grid="CLM_USRDAT" compset="I1PtClm51SpRs" testmods="clm/default--clm/NEON/TOOL">
<test name="SMS_Ld10_D_Mmpi-serial" grid="CLM_USRDAT" compset="I1PtClm51SpRs" testmods="clm/default--clm/NEON/TOOL">
<machines>
<machine name="izumi" compiler="nag" category="aux_clm"/>
</machines>
Expand All @@ -1589,7 +1589,7 @@
<option name="comment" >Add at least one test of a NEON site with SP</option>
</options>
</test>
<test name="SMS_L10d_D_Mmpi-serial" grid="CLM_USRDAT" compset="I1PtClm51Bgc" testmods="clm/NEON/MOAB--clm/PRISM">
<test name="SMS_Ld10_D_Mmpi-serial" grid="CLM_USRDAT" compset="I1PtClm51Bgc" testmods="clm/NEON/MOAB--clm/PRISM">
<machines>
<machine name="izumi" compiler="nag" category="aux_clm"/>
</machines>
Expand All @@ -1599,7 +1599,7 @@
<option name="comment" >Add at least one test of a NEON site with PRISM precipitation</option>
</options>
</test>
<test name="SMS_L10d_D_Mmpi-serial" grid="CLM_USRDAT" compset="I1PtClm51Fates" testmods="clm/FatesFireLightningPopDens--clm/NEON/FATES/NIWO">
<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"/>
<machine name="izumi" compiler="nag" category="fates"/>
Expand All @@ -1610,7 +1610,7 @@
<option name="comment" >Add at least one test of a FATES NEON site that needs lightning data</option>
</options>
</test>
<test name="SMS_L10d_D_Mmpi-serial" grid="CLM_USRDAT" compset="I1PtClm51Fates" testmods="clm/FatesPRISM--clm/NEON/FATES/YELL">
<test name="SMS_Ld10_D_Mmpi-serial" grid="CLM_USRDAT" compset="I1PtClm51Fates" testmods="clm/FatesPRISM--clm/NEON/FATES/YELL">
<machines>
<machine name="izumi" compiler="nag" category="aux_clm"/>
<machine name="izumi" compiler="nag" category="fates"/>
Expand Down
6 changes: 2 additions & 4 deletions cime_config/testdefs/testmods_dirs/clm/Fates/user_nl_clm
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ hist_empty_htapes = .true.
hist_ndens = 1
fates_spitfire_mode = 1
hist_fincl1 = 'FATES_NCOHORTS', 'FATES_TRIMMING', 'FATES_AREA_PLANTS',
'FATES_AREA_TREES', 'FATES_COLD_STATUS', 'FATES_DROUGHT_STATUS', 'FATES_GDD',
'FATES_NCHILLDAYS', 'FATES_NCOLDDAYS', 'FATES_DAYSINCE_COLDLEAFOFF',
'FATES_DAYSINCE_COLDLEAFON', 'FATES_DAYSINCE_DROUGHTLEAFOFF',
'FATES_DAYSINCE_DROUGHTLEAFON', 'FATES_MEANLIQVOL_DROUGHTPHEN',
'FATES_AREA_TREES', 'FATES_COLD_STATUS', 'FATES_GDD',
'FATES_NCHILLDAYS', 'FATES_NCOLDDAYS', 'FATES_DAYSINCE_COLDLEAFOFF','FATES_DAYSINCE_COLDLEAFON',
'FATES_CANOPY_SPREAD', 'FATES_NESTEROV_INDEX', 'FATES_IGNITIONS', 'FATES_FDI',
'FATES_ROS','FATES_EFFECT_WSPEED', 'FATES_FUELCONSUMED', 'FATES_FIRE_INTENSITY',
'FATES_FIRE_INTENSITY_BURNFRAC', 'FATES_BURNFRAC', 'FATES_FUEL_MEF',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,7 @@ hist_fincl1 = 'FATES_CROWNAREA_PF', 'FATES_CANOPYCROWNAREA_PF',
'FATES_CROOTMAINTAR_USTORY_SZ', 'FATES_FROOTMAINTAR_USTORY_SZ',
'FATES_GROWAR_USTORY_SZ', 'FATES_MAINTAR_USTORY_SZ', 'FATES_VEGC_SZPF',
'FATES_LEAFC_SZPF', 'FATES_FROOTC_SZPF', 'FATES_SAPWOODC_SZPF',
'FATES_STOREC_SZPF', 'FATES_REPROC_SZPF'
'FATES_STOREC_SZPF', 'FATES_REPROC_SZPF', 'FATES_DROUGHT_STATUS_PF',
'FATES_DAYSINCE_DROUGHTLEAFOFF_PF', 'FATES_DAYSINCE_DROUGHTLEAFON_PF',
'FATES_MEANLIQVOL_DROUGHTPHEN_PF', 'FATES_MEANSMP_DROUGHTPHEN_PF',
'FATES_ELONG_FACTOR_PF'
6 changes: 3 additions & 3 deletions cime_config/usermods_dirs/fates_sp/user_nl_clm
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ use_fates_fixed_biogeog = .true.
use_fates_nocomp = .true.
hist_ndens = 1
! Turn off a list of fields that are not needed for FATES-SP mode
hist_fexcl1 = 'FATES_TRIMMING', 'FATES_COLD_STATUS', 'FATES_DROUGHT_STATUS', 'FATES_GDD', 'FATES_NCHILLDAYS',
'FATES_NCOLDDAYS', 'FATES_DAYSINCE_COLDLEAFOFF', 'FATES_DAYSINCE_COLDLEAFON', 'FATES_DAYSINCE_DROUGHTLEAFOFF',
'FATES_DAYSINCE_DROUGHTLEAFON', 'FATES_MEANLIQVOL_DROUGHTPHEN', 'FATES_CANOPY_SPREAD', 'FATES_VEGC_PF',
hist_fexcl1 = 'FATES_TRIMMING', 'FATES_COLD_STATUS', 'FATES_GDD', 'FATES_NCHILLDAYS',
'FATES_NCOLDDAYS', 'FATES_DAYSINCE_COLDLEAFOFF', 'FATES_DAYSINCE_COLDLEAFON',
'FATES_CANOPY_SPREAD', 'FATES_VEGC_PF',
'FATES_STOREC_PF', 'FATES_RECRUITMENT_PF', 'FATES_MORTALITY_PF', 'FATES_PATCHAREA_AP', 'FATES_LAI_AP',
'FATES_CANOPYAREA_AP', 'FATES_NESTEROV_INDEX', 'FATES_IGNITIONS', 'FATES_FDI', 'FATES_ROS', 'FATES_EFFECT_WSPEED',
'FATES_FUELCONSUMED', 'FATES_FIRE_INTENSITY', 'FATES_FIRE_INTENSITY_BURNFRAC', 'FATES_BURNFRAC', 'FATES_FUEL_MEF',
Expand Down
95 changes: 94 additions & 1 deletion doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,97 @@
===============================================================
Tag name: ctsm5.1.dev130
Originator(s): glemieux (Greg Lemieux,LBL/NGEET,510-486-5049)
Date: Sun Jul 9 23:24:29 MDT 2023
One-line Summary: FATES parameter file and test definition update

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

This tag incorporates updates to the FATES parameter file and test
definitions to be consistent with updates to the drought deciduous
phenology model in FATES. This also updates the external FATES
pointer to the tag associated with the drought deciduous phenology
update.

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

CTSM issues fixed (include CTSM Issue #):
Fixes #2043 -- Five izumi NEON tests fail (for me) because the testnames include L10d instead of Ld10

Known bugs found since the previous tag (include issue #):
#2049 -- Use of 0.01_r8 as a magic number
#2042 -- Issue running SystemTests due to "conda activate" error
#2039 -- Conditional for NEON usermods is too broad

Notes of particular relevance for users
---------------------------------------
Changes made to namelist defaults (e.g., changed parameter values):

FATES parameter file default updated to fates_params_api.25.5.0_12pft_c230628.nc

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):

cheyenne ---- OK
izumi ------- OK

fates tests: (give name of baseline if different from CTSM tagname, normally fates baselines are fates-<FATES TAG>-<CTSM TAG>)
cheyenne ---- OK
izumi ------- OK

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

Changes answers relative to baseline: YES for FATES tests only

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

If this tag changes climate describe the run(s) done to evaluate the new
climate (put details of the simulations in the experiment database)

See FATES #958 for discussion. The update increased the dimensions of
some FATES history output from site-level to pft-level. As such, these
have been removed from some test cases to keep the test light weight and
added to the AllVars test to maintain coverage.

Note that this FATES update also incorporates a number of additional science updates
since the previous tag.

Other details
-------------
List any externals directories updated (cime, rtm, mosart, cism, fates, etc.): fates
fates: sci.1.65.3_api.25.4.0 -> fates-sci.1.66.0_api.25.5.0

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

===============================================================
===============================================================
Tag name: ctsm5.1.dev129
Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326)
Date: Thu Jun 22 01:21:56 MDT 2023
Expand Down Expand Up @@ -329,7 +422,7 @@ https://github.com/ESCOMP/CTSM/pull/2005
===============================================================
Tag name: ctsm5.1.dev125
Originator(s): jpalex (John Alex)
Date: Wed May 17 08:56:41 MDT 2023
Date: Sun Jul 9 21:04:13 MDT 2023
One-line Summary: Added cache for clock step_size in clm_time_manager.F90

Purpose and description of changes
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.dev130 glemieux 07/09/2023 FATES parameter file and test definition update
ctsm5.1.dev129 erik 06/22/2023 NEON fixes for TOOL and user-mods, add SP for NEON, some history file updates, black refactor for buildlib/buildnml
ctsm5.1.dev128 glemieux 06/01/2023 Update FATES tests to double precision
ctsm5.1.dev127 sacks 05/19/2023 Fix nuopc cplhist test
Expand Down
2 changes: 1 addition & 1 deletion src/main/clm_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ subroutine clm_drv(doalb, nextsw_cday, declinp1, declin, rstwr, nlend, rdate, ro
atm2lnd_inst, soilstate_inst, temperature_inst, active_layer_inst, &
water_inst%waterstatebulk_inst, water_inst%waterdiagnosticbulk_inst, &
water_inst%wateratm2lndbulk_inst, canopystate_inst, soilbiogeochem_carbonflux_inst, &
frictionvel_inst)
frictionvel_inst, soil_water_retention_curve)

! TODO(wjs, 2016-04-01) I think this setFilters call should be replaced by a
! call to reweight_wrapup, if it's needed at all.
Expand Down
27 changes: 24 additions & 3 deletions src/utils/clmfates_interfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ module CLMFatesInterfaceMod
get_clump_bounds
use SoilBiogeochemDecompCascadeConType , only : mimics_decomp, decomp_method
use SoilBiogeochemDecompCascadeConType , only : no_soil_decomp, century_decomp
use SoilWaterRetentionCurveMod, only : soil_water_retention_curve_type
use GridCellType , only : grc
use ColumnType , only : col
use LandunitType , only : lun
Expand Down Expand Up @@ -808,7 +809,8 @@ end subroutine check_hlm_active
subroutine dynamics_driv(this, nc, bounds_clump, &
atm2lnd_inst, soilstate_inst, temperature_inst, active_layer_inst, &
waterstatebulk_inst, waterdiagnosticbulk_inst, wateratm2lndbulk_inst, &
canopystate_inst, soilbiogeochem_carbonflux_inst, frictionvel_inst)
canopystate_inst, soilbiogeochem_carbonflux_inst, frictionvel_inst, &
soil_water_retention_curve)

! This wrapper is called daily from clm_driver
! This wrapper calls ed_driver, which is the daily dynamics component of FATES
Expand All @@ -834,11 +836,13 @@ subroutine dynamics_driv(this, nc, bounds_clump, &
type(canopystate_type) , intent(inout) :: canopystate_inst
type(soilbiogeochem_carbonflux_type), intent(inout) :: soilbiogeochem_carbonflux_inst
type(frictionvel_type) , intent(inout) :: frictionvel_inst
class(soil_water_retention_curve_type), intent(in) :: soil_water_retention_curve

! !LOCAL VARIABLES:
integer :: s ! site index
integer :: g ! grid-cell index (HLM)
integer :: c ! column index (HLM)
integer :: j ! Soil layer index
integer :: ifp ! patch index ft
integer :: p ! HLM patch index
integer :: nlevsoil ! number of soil layers at the site
Expand All @@ -849,6 +853,7 @@ subroutine dynamics_driv(this, nc, bounds_clump, &
integer :: ier
integer :: begg,endg
real(r8) :: harvest_rates(bounds_clump%begg:bounds_clump%endg,num_harvest_inst)
real(r8) :: s_node, smp_node ! local for relative water content and potential
logical :: after_start_of_harvest_ts
integer :: iharv
!-----------------------------------------------------------------------
Expand Down Expand Up @@ -933,6 +938,24 @@ subroutine dynamics_driv(this, nc, bounds_clump, &
this%fates(nc)%bc_in(s)%max_rooting_depth_index_col = &
min(nlevsoil, active_layer_inst%altmax_lastyear_indx_col(c))

nlevsoil = this%fates(nc)%bc_in(s)%nlevsoil
do j = 1,nlevsoil
this%fates(nc)%bc_in(s)%tempk_sl(j) = temperature_inst%t_soisno_col(c,j)
end do

call get_active_suction_layers(this%fates(nc)%nsites, &
this%fates(nc)%sites, &
this%fates(nc)%bc_in, &
this%fates(nc)%bc_out)

do j = 1,nlevsoil
if(this%fates(nc)%bc_out(s)%active_suction_sl(j)) then
s_node = max(waterstatebulk_inst%h2osoi_vol_col(c,j)/soilstate_inst%eff_porosity_col(c,j) ,0.01_r8)
call soil_water_retention_curve%soil_suction(c,j,s_node, soilstate_inst, smp_node)
this%fates(nc)%bc_in(s)%smp_sl(j) = smp_node
end if
end do


do ifp = 1, this%fates(nc)%sites(s)%youngest_patch%patchno !for vegetated patches
! Mapping between IFP space (1,2,3) and HLM P space (looping by IFP)
Expand Down Expand Up @@ -1998,8 +2021,6 @@ subroutine wrap_btran(this,nc,fn,filterc,soilstate_inst, &
!
! ---------------------------------------------------------------------------------

use SoilWaterRetentionCurveMod, only : soil_water_retention_curve_type

implicit none

! Arguments
Expand Down

0 comments on commit 4a868c1

Please sign in to comment.