diff --git a/Externals.cfg b/Externals.cfg index 3b2e66164b..cd6855c9dc 100644 --- a/Externals.cfg +++ b/Externals.cfg @@ -55,7 +55,7 @@ local_path = components/cmeps required = True [cdeps] -tag = cdeps1.0.12 +tag = cdeps1.0.13 protocol = git repo_url = https://github.com/ESCOMP/CDEPS.git local_path = components/cdeps diff --git a/Externals_CLM.cfg b/Externals_CLM.cfg index aec92c2173..24faec60e3 100644 --- a/Externals_CLM.cfg +++ b/Externals_CLM.cfg @@ -1,8 +1,8 @@ [fates] local_path = src/fates protocol = git -repo_url = https://github.com/NGEET/fates -tag = sci.1.66.0_api.25.5.0 +repo_url = https://github.com/rgknox/fates +branch = mpaiao-pr-drgt-decid required = True [externals_description] diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 6a936fcf17..28354012db 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -493,7 +493,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). -lnd/clm2/paramdata/fates_params_api.25.5.0_12pft_c230519.nc +/glade/u/home/rgknox/ctsm/src/fates/parameter_files/fates_params_api.25.5.0_12pft_c230626.nc diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index d9a1c1b6fd..24f7062798 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -44,13 +44,6 @@ - - - FAIL - #1844 - - - diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 59e7be0d92..ec04e651d7 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -1315,7 +1315,7 @@ - + @@ -1324,15 +1324,6 @@ - - - - - - - - - diff --git a/cime_config/testdefs/testmods_dirs/clm/Fates/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/Fates/user_nl_clm index f2f02d9180..03ed340cbb 100644 --- a/cime_config/testdefs/testmods_dirs/clm/Fates/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/Fates/user_nl_clm @@ -2,6 +2,7 @@ hist_mfilt = 365 hist_nhtfrq = -24 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_GDD', diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdAllVars/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/FatesColdAllVars/user_nl_clm index f6aef17c97..e3d311efd4 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdAllVars/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdAllVars/user_nl_clm @@ -3,6 +3,7 @@ hist_mfilt = 365 hist_nhtfrq = -24 hist_empty_htapes = .false. fates_spitfire_mode = 1 +hist_ndens = 1 hist_fincl1 = 'FATES_CROWNAREA_PF', 'FATES_CANOPYCROWNAREA_PF', 'FATES_NCL_AP', 'FATES_NPATCH_AP', 'FATES_VEGC_AP', 'FATES_SECONDARY_FOREST_FRACTION', 'FATES_WOOD_PRODUCT', diff --git a/cime_config/testdefs/testmods_dirs/clm/cplhist/shell_commands b/cime_config/testdefs/testmods_dirs/clm/cplhist/shell_commands index ac079d5334..a284aefcb9 100755 --- a/cime_config/testdefs/testmods_dirs/clm/cplhist/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/cplhist/shell_commands @@ -1,12 +1,8 @@ -driver=`./xmlquery --value COMP_INTERFACE` -if [ "$driver" = "nuopc" ]; then - ./xmlchange DATM_YR_ALIGN=1 - ./xmlchange DATM_YR_END=84 - ./xmlchange DATM_YR_START=82 -else - ./xmlchange DATM_CPLHIST_YR_ALIGN=1 - ./xmlchange DATM_CPLHIST_YR_END=84 - ./xmlchange DATM_CPLHIST_YR_START=82 -fi -./xmlchange DATM_CPLHIST_CASE=b.e20.B1850.f09_g17.pi_control.all.221.cplhist -./xmlchange DATM_CPLHIST_DIR=/glade/p/cesm/bgcwg_dev/forcing/b.e20.B1850.f09_g17.pi_control.all.221.cplhist/cpl/hist.mon +./xmlchange DATM_CPLHIST_CASE=cam6ctsm51_cesm23a12c_ne30pg3g17_CPLHIST_1850 +./xmlchange DATM_CPLHIST_DIR=/glade/p/cgd/tss/CTSM_datm_forcing_data/atm_forcing.cdeps_datm.CPLHIST_cam6ctsm51_cesm23a12c_ne30pg3g17_1850 +./xmlchange DATM_YR_START=1 +./xmlchange DATM_YR_END=1 +./xmlchange DATM_YR_ALIGN=1 + +# Needed until we have cplhist forcing with ndep - see https://github.com/escomp/ctsm/issues/1844 +./xmlchange DATM_PRESNDEP=none diff --git a/cime_config/usermods_dirs/fates_sp/user_nl_clm b/cime_config/usermods_dirs/fates_sp/user_nl_clm index 393d63e86a..0df139403d 100644 --- a/cime_config/usermods_dirs/fates_sp/user_nl_clm +++ b/cime_config/usermods_dirs/fates_sp/user_nl_clm @@ -6,6 +6,7 @@ use_lch4 = .false. fates_spitfire_mode = 0 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_GDD', 'FATES_NCHILLDAYS', 'FATES_NCOLDDAYS', 'FATES_DAYSINCE_COLDLEAFOFF', 'FATES_DAYSINCE_COLDLEAFON', diff --git a/doc/ChangeLog b/doc/ChangeLog index c9bc6eedbd..ced4fc388e 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,198 @@ =============================================================== +Tag name: ctsm5.1.dev128 +Originator(s): glemieux (Gregory Lemieux,LBL/NGEET,510-486-5049) +Date: Thu Jun 1 15:31:52 MDT 2023 +One-line Summary: Update FATES tests to double precision + +Purpose and description of changes +---------------------------------- + +This pull request updates the fates tests to set the output +precision to double precision. The usermod fates_sp is similarly +updated. + + +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.) + +[ ] clm5_1 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed or introduced +------------------------ + +CTSM issues fixed (include CTSM Issue #): +- Resolves https://github.com/ESCOMP/CTSM/issues/1986 + +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--) + cheyenne ---- OK + izumi ------- OK + +If the tag used for baseline comparisons was NOT the previous tag, note that here: + + FATES tests run against fates-sci.1.65.6_api.25.4.0-ctsm5.1.dev127 baseline + +Answer changes +-------------- + +Changes answers relative to baseline: Yes, but only for fates tests and compsets + + Summarize any changes to answers, i.e., + - Differences are due to changing hist_ndens to 1 (double precision) + +Other details +------------- + +Pull Requests that document the changes (include PR ids): +https://github.com/ESCOMP/CTSM/pull/2010 + +=============================================================== +=============================================================== +Tag name: ctsm5.1.dev127 +Originator(s): sacks (Bill Sacks) +Date: Fri May 19 04:48:30 MDT 2023 +One-line Summary: Fix nuopc cplhist test + +Purpose and description of changes +---------------------------------- + +Make some changes to the cplhist testmod that fix the cplhist test, +based on testing done by Keith Oleson: +- Point to new cplhist forcing data generated and used by Adam + Herrington and Keith Oleson +- Use DATM_PRESNDEP=none until + https://github.com/escomp/ctsm/issues/1844 is resolved + +Also, remove mct cplhist test. + +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 #): +- Takes steps towards addressing ESCOMP/CTSM#1844 (Create new auxiliary + history file for cplhist test with ndep data) + +Notes of particular relevance for developers: +--------------------------------------------- +Changes to tests or testing: +- Changes cplhist test; new test is + SMS_D_Ld1.ne30pg3_t061.I1850Clm50BgcSpinup.cheyenne_intel.clm-cplhist +- Removes mct cplhist test + +Testing summary: +---------------- + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + cheyenne ---- PASS + izumi ------- PASS + + Note that there were no baselines for the new test + (SMS_D_Ld1.ne30pg3_t061.I1850Clm50BgcSpinup.cheyenne_intel.clm-cplhist) + +Answer changes +-------------- + +Changes answers relative to baseline: NO + +Other details +------------- +List any externals directories updated (cime, rtm, mosart, cism, fates, etc.): +- cdeps: cdeps1.0.12 -> cdeps1.0.13 + +Pull Requests that document the changes (include PR ids): +https://github.com/ESCOMP/CTSM/pull/1999 + +=============================================================== +=============================================================== +Tag name: ctsm5.1.dev126 +Originator(s): jpalex (John Alex) +Date: Thu May 18 17:21:59 MDT 2023 +One-line Summary: Clean up some loops in UrbanTimeVarType + +Purpose and description of changes +---------------------------------- + +Refactor some inefficient and confusing looping structures in +UrbanTimeVarType.F90 + + +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 #): +- Resolves ESCOMP/CTSM#1514 (Inefficient and confusing looping structures in UrbanTimeVarType.F90) + +Testing summary: +---------------- + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + cheyenne ---- PASS + izumi ------- PASS + +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/2005 + +=============================================================== +=============================================================== Tag name: ctsm5.1.dev125 Originator(s): jpalex (John Alex) Date: Wed May 17 08:56:41 MDT 2023 diff --git a/doc/ChangeSum b/doc/ChangeSum index a3e68c6581..aca77a5238 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,8 @@ Tag Who Date Summary ============================================================================================================================ + ctsm5.1.dev128 glemieux 06/01/2023 Update FATES tests to double precision + ctsm5.1.dev127 sacks 05/19/2023 Fix nuopc cplhist test + ctsm5.1.dev126 jpalex 05/18/2023 Clean up some loops in UrbanTimeVarType ctsm5.1.dev125 jpalex 05/17/2023 Added cache for clock step_size in clm_time_manager.F90 ctsm5.1.dev124 erik 05/09/2023 Initialization memory update, new surface datasets for new grids, add option for running NEON with PRISM data ctsm5.1.dev123 sacks 05/01/2023 Updates needed for pFUnit 4 and other externals updates diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index 6a6f982438..088ec9eeae 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -252,16 +252,13 @@ subroutine urbantv_interp(this, bounds) ! Determine this%tbuilding_max for all landunits do l = bounds%begl,bounds%endl if (lun%urbpoi(l)) then - ig = 0 - do g = bounds%begg,bounds%endg - ig = ig+1 - if (g == lun%gridcell(l)) exit - end do - do n = isturb_MIN,isturb_MAX - if (stream_varnames(lun%itype(l)) == stream_varnames(n)) then - this%t_building_max(l) = dataptr2d(ig,n) - end if - end do + ! Note that since l is within [begl, endl] bounds, we can assume + ! lun%gricell(l) is within [begg, endg] + ig = lun%gridcell(l) - bounds%begg + 1 + + ! Since we are within an urban land unit, we know that + ! lun%itype is within [pisturb_MIN, isturb_MAX] + this%t_building_max(l) = dataptr2d(ig, lun%itype(l)) else this%t_building_max(l) = spval end if @@ -272,9 +269,7 @@ subroutine urbantv_interp(this, bounds) found = .false. do l = bounds%begl,bounds%endl if (lun%urbpoi(l)) then - ig = 0 do g = bounds%begg,bounds%endg - ig = ig+1 if (g == lun%gridcell(l)) exit end do if ( .not. urban_valid(g) .or. (this%t_building_max(l) <= 0._r8)) then diff --git a/src/main/clm_driver.F90 b/src/main/clm_driver.F90 index ae178b226c..f173d7d83d 100644 --- a/src/main/clm_driver.F90 +++ b/src/main/clm_driver.F90 @@ -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. diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index c169d710ef..8a3be405ff 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -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 @@ -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 @@ -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 @@ -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 !----------------------------------------------------------------------- @@ -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) @@ -1998,8 +2021,6 @@ subroutine wrap_btran(this,nc,fn,filterc,soilstate_inst, & ! ! --------------------------------------------------------------------------------- - use SoilWaterRetentionCurveMod, only : soil_water_retention_curve_type - implicit none ! Arguments