From 9a4ec5702f84db07d18b9dbbba7366ca684fa95c Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Mon, 3 Oct 2022 17:51:53 -0500 Subject: [PATCH 01/68] Modify Urban Time Varying data 1. `src\cpl\share_esmf\UrbanTimeVarType.F90`: Modify `stream_varnames` dimensions so that it becomes independent of urban density type indices (7-9), to prepare for future time varying data input for `p_ac` (and `p_h`, possibly); 2. `src\biogeophys\UrbBuildTempOleson2015Mod.F90`: Add `p_ac` to the equation of `eflx_urban_ac`; not being implemented yet. --- src/biogeophys/UrbBuildTempOleson2015Mod.F90 | 4 + src/cpl/share_esmf/UrbanTimeVarType.F90 | 82 +++++++++++++++----- 2 files changed, 66 insertions(+), 20 deletions(-) diff --git a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 index bf8b68c7eb..e13f7e1b47 100644 --- a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 +++ b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 @@ -924,8 +924,12 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, if (t_building_bef_hac(l) > t_building_max(l)) then t_building(l) = t_building_max(l) + ! [Cathy] orig: eflx_urban_ac(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building(l) & - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) + ! [Cathy] dev: + ! eflx_urban_ac(l) = wtlunit_roof(l) * p_ac(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building(l) & + ! - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) else if (t_building_bef_hac(l) < t_building_min(l)) then t_building(l) = t_building_min(l) eflx_urban_heat(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building(l) & diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index cc48bf4833..a76c176f1c 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -12,7 +12,7 @@ module UrbanTimeVarType use abortutils , only : endrun use decompMod , only : bounds_type, subgrid_level_landunit use clm_varctl , only : iulog - use landunit_varcon , only : isturb_MIN, isturb_MAX + use landunit_varcon , only : isturb_MIN, isturb_MAX ! Cathy: min and max types urban; equals 7 and 9, resp. use clm_varcon , only : spval use LandunitType , only : lun use GridcellType , only : grc @@ -24,6 +24,8 @@ module UrbanTimeVarType type, public :: urbantv_type ! real(r8), public, pointer :: t_building_max(:) ! lun maximum internal building air temperature (K) + ! ! Cathy [dev] + ! real(r8), public, pointer :: p_ac(:) ! lun air-conditioning ownership rate (unitless, between 0 and 1) type(shr_strdata_type) :: sdat_urbantv ! urban time varying input data stream contains ! !PUBLIC MEMBER FUNCTIONS: @@ -31,8 +33,11 @@ module UrbanTimeVarType procedure, public :: urbantv_init ! Initialize urban time varying stream procedure, public :: urbantv_interp ! Interpolate urban time varying stream end type urbantv_type - - character(15), private :: stream_varnames(isturb_MIN:isturb_MAX) + + ! Cathy [orig] + ! character(15), private :: stream_varnames(isturb_MIN:isturb_MAX) + ! Cathy [dev] + character(15), private :: stream_varnames(1:3) character(len=*), parameter, private :: sourcefile = & __FILE__ @@ -63,6 +68,8 @@ subroutine Init(this, bounds, NLFilename) ! Allocate urbantv data structure allocate(this%t_building_max(begl:endl)); this%t_building_max(:) = nan + ! ! Cathy [dev] + ! allocate(this%p_ac(begl:endl)); this%p_ac(:) = nan call this%urbantv_init(bounds, NLFilename) call this%urbantv_interp(bounds) @@ -72,6 +79,11 @@ subroutine Init(this, bounds, NLFilename) avgflag='A', long_name='prescribed maximum interior building temperature', & ptr_lunit=this%t_building_max, default='inactive', set_nourb=spval, & l2g_scale_type='unity') + ! ! Cathy [dev] + ! call hist_addfld1d (fname='P_AC', units='unitless', & + avgflag='A', long_name='prescribed air-conditioning ownership rate (decimal)', & + ptr_lunit=this%p_ac, default='inactive', set_nourb=spval, & + l2g_scale_type='unity') end subroutine Init @@ -85,7 +97,7 @@ subroutine urbantv_init(this, bounds, NLFilename) use clm_nlUtilsMod , only : find_nlgroup_name use spmdMod , only : masterproc, mpicom, iam use shr_mpi_mod , only : shr_mpi_bcast - use landunit_varcon , only : isturb_tbd, isturb_hd, isturb_md + use landunit_varcon , only : isturb_tbd, isturb_hd, isturb_md ! Cathy: equals 7, 8 and 9 use dshr_strdata_mod , only : shr_strdata_init_from_inline use lnd_comp_shr , only : mesh, model_clock ! @@ -93,22 +105,23 @@ subroutine urbantv_init(this, bounds, NLFilename) implicit none class(urbantv_type) :: this type(bounds_type), intent(in) :: bounds - character(len=*), intent(in) :: NLFilename ! Namelist filename + character(len=*), intent(in) :: NLFilename ! Namelist filename ???is this the netCDF file name? ! ! !LOCAL VARIABLES: integer :: n integer :: stream_year_first_urbantv ! first year in urban tv stream to use integer :: stream_year_last_urbantv ! last year in urban tv stream to use integer :: model_year_align_urbantv ! align stream_year_first_urbantv with this model year - integer :: nu_nml ! unit for namelist file + integer :: nu_nml ! unit for namelist file ??? integer :: nml_error ! namelist i/o error flag - character(len=CL) :: stream_fldFileName_urbantv ! urban tv streams filename - character(len=CL) :: stream_meshfile_urbantv ! urban tv streams filename - character(len=CL) :: urbantvmapalgo = 'nn' ! mapping alogrithm for urban ac + character(len=CL) :: stream_fldFileName_urbantv ! urban tv streams filename ??? + character(len=CL) :: stream_meshfile_urbantv ! urban tv streams filename ??? + character(len=CL) :: urbantvmapalgo = 'nn' ! mapping alogrithm for urban ac ??? character(len=CL) :: urbantv_tintalgo = 'linear' ! time interpolation alogrithm integer :: rc ! error code - character(*), parameter :: urbantvString = "tbuildmax_" ! base string for field string - character(*), parameter :: subName = "('urbantv_init')" + ! Cathy [orig] + ! character(*), parameter :: urbantvString = "tbuildmax_" ! base string for field string ??? + character(*), parameter :: subName = "('urbantv_init')" ! ??? !----------------------------------------------------------------------- namelist /urbantv_streams/ & @@ -126,9 +139,14 @@ subroutine urbantv_init(this, bounds, NLFilename) model_year_align_urbantv = 1 ! align stream_year_first_urbantv with this model year stream_fldFileName_urbantv = ' ' stream_meshfile_urbantv = ' ' - stream_varnames(isturb_tbd) = urbantvString//"TBD" - stream_varnames(isturb_hd) = urbantvString//"HD" - stream_varnames(isturb_md) = urbantvString//"MD" + ! Cathy [orig] + ! stream_varnames(isturb_tbd) = urbantvString//"TBD" + ! stream_varnames(isturb_hd) = urbantvString//"HD" + ! stream_varnames(isturb_md) = urbantvString//"MD" + ! Cathy [dev] + stream_varnames(1) = "tbuildmax_TBD" + stream_varnames(2) = "tbuildmax_HD" + stream_varnames(3) = "tbuildmax_MD" ! Read urbantv_streams namelist if (masterproc) then @@ -159,7 +177,10 @@ subroutine urbantv_init(this, bounds, NLFilename) write(iulog,'(a,a)' ) ' stream_fldFileName_urbantv = ',stream_fldFileName_urbantv write(iulog,'(a,a)' ) ' stream_meshfile_urbantv = ',stream_meshfile_urbantv write(iulog,'(a,a)' ) ' urbantv_tintalgo = ',urbantv_tintalgo - do n = isturb_tbd,isturb_md + ! Cathy [orig] + ! do n = isturb_tbd,isturb_md + ! Cathy [dev] + do n = 1,3 write(iulog,'(a,a)' ) ' stream_varname = ',trim(stream_varnames(n)) end do write(iulog,*) ' ' @@ -176,8 +197,12 @@ subroutine urbantv_init(this, bounds, NLFilename) stream_lev_dimname = 'null', & stream_mapalgo = trim(urbantvmapalgo), & stream_filenames = (/trim(stream_fldfilename_urbantv)/), & - stream_fldlistFile = stream_varnames(isturb_tbd:isturb_md),& - stream_fldListModel = stream_varnames(isturb_tbd:isturb_md),& + ! Cathy [orig] + ! stream_fldlistFile = stream_varnames(isturb_tbd:isturb_md),& + ! stream_fldListModel = stream_varnames(isturb_tbd:isturb_md),& + ! Cathy [dev] + stream_fldlistFile = stream_varnames(1:3), & + stream_fldListModel = stream_varnames(1:3), & stream_yearFirst = stream_year_first_urbantv, & stream_yearLast = stream_year_last_urbantv, & stream_yearAlign = model_year_align_urbantv, & @@ -235,8 +260,12 @@ subroutine urbantv_interp(this, bounds) ! Create 2d array for all stream variable data lsize = bounds%endg - bounds%begg + 1 - allocate(dataptr2d(lsize, isturb_MIN:isturb_MAX)) - do n = isturb_MIN,isturb_MAX + ! Cathy [orig] + ! allocate(dataptr2d(lsize, isturb_MIN:isturb_MAX)) + ! do n = isturb_MIN,isturb_MAX + ! Cathy [dev] + allocate(dataptr2d(lsize, 1:3)) + do n = 1,3 call dshr_fldbun_getFldPtr(this%sdat_urbantv%pstrm(1)%fldbun_model, trim(stream_varnames(n)), & fldptr1=dataptr1d, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) then @@ -257,13 +286,20 @@ subroutine urbantv_interp(this, bounds) ig = ig+1 if (g == lun%gridcell(l)) exit end do - do n = isturb_MIN,isturb_MAX + ! Cathy [orig] + ! do n = isturb_MIN,isturb_MAX + ! Cathy [dev] + do n = 1,3 if (stream_varnames(lun%itype(l)) == stream_varnames(n)) then this%t_building_max(l) = dataptr2d(ig,n) + ! ! Cathy [dev] + ! this%p_ac(l) = dataptr2d(ig,n) ! ??? end if end do else this%t_building_max(l) = spval + ! ! Cathy [dev] + ! this%p_ac(l) = spval end if end do deallocate(dataptr2d) @@ -277,7 +313,11 @@ subroutine urbantv_interp(this, bounds) ig = ig+1 if (g == lun%gridcell(l)) exit end do + ! Cathy [orig] if ( .not. urban_valid(g) .or. (this%t_building_max(l) <= 0._r8)) then + ! Cathy [dev] + ! if ( .not. urban_valid(g) .or. (this%t_building_max(l) <= 0._r8) + ! & .or. (this%p_ac(l) <= 0._r8) .or. (this%p_ac(l) >= 1._r8)) then found = .true. gindx = g lindx = l @@ -290,6 +330,8 @@ subroutine urbantv_interp(this, bounds) write(iulog,*)'landunit type: ',lun%itype(lindx) write(iulog,*)'urban_valid: ',urban_valid(gindx) write(iulog,*)'t_building_max: ',this%t_building_max(lindx) + ! ! Cathy [dev] + ! write(iulog,*)'p_ac: ',this%p_ac(lindx) call endrun(subgrid_index=lindx, subgrid_level=subgrid_level_landunit, & msg=errmsg(sourcefile, __LINE__)) end if From eb160f2827f14666e06e38ac390802138620cb04 Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Wed, 5 Oct 2022 17:07:24 -0500 Subject: [PATCH 02/68] Update UrbanTimeVarType.F90 Add missing comment signs --- src/cpl/share_esmf/UrbanTimeVarType.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index a76c176f1c..cf379801ce 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -81,9 +81,9 @@ subroutine Init(this, bounds, NLFilename) l2g_scale_type='unity') ! ! Cathy [dev] ! call hist_addfld1d (fname='P_AC', units='unitless', & - avgflag='A', long_name='prescribed air-conditioning ownership rate (decimal)', & - ptr_lunit=this%p_ac, default='inactive', set_nourb=spval, & - l2g_scale_type='unity') + ! avgflag='A', long_name='prescribed air-conditioning ownership rate (decimal)', & + ! ptr_lunit=this%p_ac, default='inactive', set_nourb=spval, & + ! l2g_scale_type='unity') end subroutine Init From 8cec89cefeec0f5ac5a523ec260430be7258b489 Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Thu, 6 Oct 2022 16:44:51 -0500 Subject: [PATCH 03/68] Update UrbanTimeVarType.F90 [dev.01] Debugging after first test run. Problem: First test run (job 6762983) returned all URBAN_AC results as 0. Suspect a mismatch between the indices of `stream_varnames` and `t_building_max`, which may have resulted in all `t_building_max` being set to nan/very large number. Solution: Modify subroutine `urbantv_interp` by hard-coding *land unit type - 6* to ensure the if statement criterion returns true. --- src/cpl/share_esmf/UrbanTimeVarType.F90 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index cf379801ce..1bed4e2967 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -60,7 +60,7 @@ subroutine Init(this, bounds, NLFilename) character(len=*) , intent(in) :: NLFilename ! Namelist filename ! ! !LOCAL VARIABLES: - integer :: begl, endl + integer :: begl, endl ! Cathy: beginning and ending landunit index, from src/main/decompMod !--------------------------------------------------------------------- begl = bounds%begl; endl = bounds%endl @@ -75,6 +75,7 @@ subroutine Init(this, bounds, NLFilename) call this%urbantv_interp(bounds) ! Add history fields + ! Cathy: the subroutine is in scr/main/histFileMod.F90 call hist_addfld1d (fname='TBUILD_MAX', units='K', & avgflag='A', long_name='prescribed maximum interior building temperature', & ptr_lunit=this%t_building_max, default='inactive', set_nourb=spval, & @@ -290,14 +291,17 @@ subroutine urbantv_interp(this, bounds) ! do n = isturb_MIN,isturb_MAX ! Cathy [dev] do n = 1,3 - if (stream_varnames(lun%itype(l)) == stream_varnames(n)) then + ! Cathy [orig] + ! if (stream_varnames(lun%itype(l)) == stream_varnames(n)) then + ! Cathy [dev.01] + if (stream_varnames((lun%itype(l)-6)) == stream_varnames(n)) then this%t_building_max(l) = dataptr2d(ig,n) ! ! Cathy [dev] ! this%p_ac(l) = dataptr2d(ig,n) ! ??? end if end do else - this%t_building_max(l) = spval + this%t_building_max(l) = spval ! Cathy: special value for real data, set to 1.e36 in src/main/clm_varcon ! ! Cathy [dev] ! this%p_ac(l) = spval end if From 07b787382cf4fcce7a445a1c196373aa816eb081 Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Tue, 24 Jan 2023 18:22:03 -0600 Subject: [PATCH 04/68] Add p_ac to urban time varying data 1. `src\cpl\share_esmf\UrbanTimeVarType.F90`: Add 3 more dimensions to `stream_varnames` (4,5,6) for `p_ac`; 2. `src\biogeophys\UrbBuildTempOleson2015Mod.F90`: Use `p_ac` in the equation of `eflx_urban_ac`. --- src/biogeophys/UrbBuildTempOleson2015Mod.F90 | 6 +- src/cpl/share_esmf/UrbanTimeVarType.F90 | 64 ++++++++++---------- 2 files changed, 36 insertions(+), 34 deletions(-) diff --git a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 index e13f7e1b47..260c6658af 100644 --- a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 +++ b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 @@ -925,11 +925,11 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, if (t_building_bef_hac(l) > t_building_max(l)) then t_building(l) = t_building_max(l) ! [Cathy] orig: - eflx_urban_ac(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building(l) & + ! eflx_urban_ac(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building(l) & - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) ! [Cathy] dev: - ! eflx_urban_ac(l) = wtlunit_roof(l) * p_ac(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building(l) & - ! - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) + eflx_urban_ac(l) = wtlunit_roof(l) * p_ac(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building(l) & + - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) else if (t_building_bef_hac(l) < t_building_min(l)) then t_building(l) = t_building_min(l) eflx_urban_heat(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building(l) & diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index 01f924935e..d96cc11157 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -24,8 +24,8 @@ module UrbanTimeVarType type, public :: urbantv_type ! real(r8), public, pointer :: t_building_max(:) ! lun maximum internal building air temperature (K) - ! ! Cathy [dev] - ! real(r8), public, pointer :: p_ac(:) ! lun air-conditioning ownership rate (unitless, between 0 and 1) + ! Cathy [dev] + real(r8), public, pointer :: p_ac(:) ! lun air-conditioning ownership rate (unitless, between 0 and 1) type(shr_strdata_type) :: sdat_urbantv ! urban time varying input data stream contains ! !PUBLIC MEMBER FUNCTIONS: @@ -36,8 +36,8 @@ module UrbanTimeVarType ! Cathy [orig] ! character(15), private :: stream_varnames(isturb_MIN:isturb_MAX) - ! Cathy [dev] - character(15), private :: stream_varnames(1:3) + ! Cathy [dev]: + character(15), private :: stream_varnames(1:6) ! 1-3 for t_building_max, 4-6 for p_ac character(len=*), parameter, private :: sourcefile = & __FILE__ @@ -68,23 +68,22 @@ subroutine Init(this, bounds, NLFilename) ! Allocate urbantv data structure allocate(this%t_building_max(begl:endl)); this%t_building_max(:) = nan - ! ! Cathy [dev] - ! allocate(this%p_ac(begl:endl)); this%p_ac(:) = nan + ! Cathy [dev] + allocate(this%p_ac(begl:endl)); this%p_ac(:) = nan call this%urbantv_init(bounds, NLFilename) call this%urbantv_interp(bounds) - ! Add history fields - ! Cathy: the subroutine is in scr/main/histFileMod.F90 + ! Add history fields ! Cathy: this adds an output field. the subroutine is in scr/main/histFileMod.F90 call hist_addfld1d (fname='TBUILD_MAX', units='K', & avgflag='A', long_name='prescribed maximum interior building temperature', & ptr_lunit=this%t_building_max, default='inactive', set_nourb=spval, & l2g_scale_type='unity') - ! ! Cathy [dev] - ! call hist_addfld1d (fname='P_AC', units='unitless', & - ! avgflag='A', long_name='prescribed air-conditioning ownership rate (decimal)', & - ! ptr_lunit=this%p_ac, default='inactive', set_nourb=spval, & - ! l2g_scale_type='unity') + ! Cathy [dev] + call hist_addfld1d (fname='P_AC', units='unitless', & + avgflag='A', long_name='prescribed air-conditioning ownership rate (decimal)', & + ptr_lunit=this%p_ac, default='inactive', set_nourb=spval, & + l2g_scale_type='unity') end subroutine Init @@ -120,8 +119,8 @@ subroutine urbantv_init(this, bounds, NLFilename) character(len=CL) :: urbantvmapalgo = 'nn' ! mapping alogrithm for urban ac ??? character(len=CL) :: urbantv_tintalgo = 'linear' ! time interpolation alogrithm integer :: rc ! error code - ! Cathy [orig] - ! character(*), parameter :: urbantvString = "tbuildmax_" ! base string for field string ??? + ! Cathy [orig]: this is taken out because field strings are now hard coded in + ! character(*), parameter :: urbantvString = "tbuildmax_" ! base string for field string character(*), parameter :: subName = "('urbantv_init')" ! ??? !----------------------------------------------------------------------- @@ -148,6 +147,9 @@ subroutine urbantv_init(this, bounds, NLFilename) stream_varnames(1) = "tbuildmax_TBD" stream_varnames(2) = "tbuildmax_HD" stream_varnames(3) = "tbuildmax_MD" + stream_varnames(4) = "p_ac_TBD" + stream_varnames(5) = "p_ac_HD" + stream_varnames(6) = "p_ac_MD" ! Read urbantv_streams namelist if (masterproc) then @@ -181,7 +183,7 @@ subroutine urbantv_init(this, bounds, NLFilename) ! Cathy [orig] ! do n = isturb_tbd,isturb_md ! Cathy [dev] - do n = 1,3 + do n = 1,6 write(iulog,'(a,a)' ) ' stream_varname = ',trim(stream_varnames(n)) end do write(iulog,*) ' ' @@ -202,8 +204,8 @@ subroutine urbantv_init(this, bounds, NLFilename) ! stream_fldlistFile = stream_varnames(isturb_tbd:isturb_md),& ! stream_fldListModel = stream_varnames(isturb_tbd:isturb_md),& ! Cathy [dev] - stream_fldlistFile = stream_varnames(1:3), & - stream_fldListModel = stream_varnames(1:3), & + stream_fldlistFile = stream_varnames(1:6), & + stream_fldListModel = stream_varnames(1:6), & stream_yearFirst = stream_year_first_urbantv, & stream_yearLast = stream_year_last_urbantv, & stream_yearAlign = model_year_align_urbantv, & @@ -265,8 +267,8 @@ subroutine urbantv_interp(this, bounds) ! allocate(dataptr2d(lsize, isturb_MIN:isturb_MAX)) ! do n = isturb_MIN,isturb_MAX ! Cathy [dev] - allocate(dataptr2d(lsize, 1:3)) - do n = 1,3 + allocate(dataptr2d(lsize, 1:6)) + do n = 1,6 call dshr_fldbun_getFldPtr(this%sdat_urbantv%pstrm(1)%fldbun_model, trim(stream_varnames(n)), & fldptr1=dataptr1d, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) then @@ -290,20 +292,20 @@ subroutine urbantv_interp(this, bounds) ! Cathy [orig] ! do n = isturb_MIN,isturb_MAX ! Cathy [dev] - do n = 1,3 + do n = 1,6 ! Cathy [orig] ! if (stream_varnames(lun%itype(l)) == stream_varnames(n)) then - ! Cathy [dev.01] + ! Cathy [dev.02] if (stream_varnames((lun%itype(l)-6)) == stream_varnames(n)) then this%t_building_max(l) = dataptr2d(ig,n) - ! ! Cathy [dev] - ! this%p_ac(l) = dataptr2d(ig,n) ! ??? + if (stream_varnames((lun%itype(l)-3)) == stream_varnames(n)) then + this%p_ac(l) = dataptr2d(ig,n) end if end do else this%t_building_max(l) = spval ! Cathy: special value for real data, set to 1.e36 in src/main/clm_varcon - ! ! Cathy [dev] - ! this%p_ac(l) = spval + ! Cathy [dev] + this%p_ac(l) = 0._r8 ! Cathy: set to 0 for non-urban landunit end if end do deallocate(dataptr2d) @@ -318,10 +320,10 @@ subroutine urbantv_interp(this, bounds) if (g == lun%gridcell(l)) exit end do ! Cathy [orig] - if ( .not. urban_valid(g) .or. (this%t_building_max(l) <= 0._r8)) then + ! if ( .not. urban_valid(g) .or. (this%t_building_max(l) <= 0._r8)) then ! Cathy [dev] - ! if ( .not. urban_valid(g) .or. (this%t_building_max(l) <= 0._r8) - ! & .or. (this%p_ac(l) <= 0._r8) .or. (this%p_ac(l) >= 1._r8)) then + if ( .not. urban_valid(g) .or. (this%t_building_max(l) <= 0._r8) & + .or. (this%p_ac(l) < 0._r8) .or. (this%p_ac(l) > 1._r8)) then found = .true. gindx = g lindx = l @@ -334,8 +336,8 @@ subroutine urbantv_interp(this, bounds) write(iulog,*)'landunit type: ',lun%itype(lindx) write(iulog,*)'urban_valid: ',urban_valid(gindx) write(iulog,*)'t_building_max: ',this%t_building_max(lindx) - ! ! Cathy [dev] - ! write(iulog,*)'p_ac: ',this%p_ac(lindx) + ! Cathy [dev] + write(iulog,*)'p_ac: ',this%p_ac(lindx) call endrun(subgrid_index=lindx, subgrid_level=subgrid_level_landunit, & msg=errmsg(sourcefile, __LINE__)) end if From e621628352f457bfadb118ca67b7b4c4634d668a Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Wed, 25 Jan 2023 00:13:28 -0600 Subject: [PATCH 05/68] Update UrbanTimeVarType.F90 Bug fix: added missing "end if" --- src/cpl/share_esmf/UrbanTimeVarType.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index d96cc11157..bc0c82af6a 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -298,6 +298,7 @@ subroutine urbantv_interp(this, bounds) ! Cathy [dev.02] if (stream_varnames((lun%itype(l)-6)) == stream_varnames(n)) then this%t_building_max(l) = dataptr2d(ig,n) + end if if (stream_varnames((lun%itype(l)-3)) == stream_varnames(n)) then this%p_ac(l) = dataptr2d(ig,n) end if From eabe116800f8cf40c1a17755205e2d72b80df033 Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Wed, 25 Jan 2023 10:58:24 -0600 Subject: [PATCH 06/68] Update UrbBuildTempOleson2015Mod.F90 Bug fix: declare p_ac type; comment out original code --- src/biogeophys/UrbBuildTempOleson2015Mod.F90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 index 260c6658af..d54d3ff86d 100644 --- a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 +++ b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 @@ -324,6 +324,8 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, t_floor => temperature_inst%t_floor_lun , & ! InOut: [real(r8) (:)] floor temperature (K) t_building => temperature_inst%t_building_lun , & ! InOut: [real(r8) (:)] internal building air temperature (K) + ! Cathy [dev] + p_ac => urbantv_inst%p_ac , & ! Input: [real(r8) (:)] air-conditioning penetration rate (-) t_building_max => urbantv_inst%t_building_max , & ! Input: [real(r8) (:)] maximum internal building air temperature (K) t_building_min => urbanparams_inst%t_building_min , & ! Input: [real(r8) (:)] minimum internal building air temperature (K) @@ -926,7 +928,7 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, t_building(l) = t_building_max(l) ! [Cathy] orig: ! eflx_urban_ac(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building(l) & - - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) + ! - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) ! [Cathy] dev: eflx_urban_ac(l) = wtlunit_roof(l) * p_ac(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building(l) & - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) From ed26fd3a2b66429204b47a043a43ca5051786659 Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Thu, 26 Jan 2023 12:22:47 -0600 Subject: [PATCH 07/68] Debug dev.02 --- src/cpl/share_esmf/UrbanTimeVarType.F90 | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index bc0c82af6a..d542d2440e 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -72,6 +72,10 @@ subroutine Init(this, bounds, NLFilename) allocate(this%p_ac(begl:endl)); this%p_ac(:) = nan call this%urbantv_init(bounds, NLFilename) + + ! Cathy [dev.02] + write(*,*) 'Cathy: urbantv_init done.' + call this%urbantv_interp(bounds) ! Add history fields ! Cathy: this adds an output field. the subroutine is in scr/main/histFileMod.F90 @@ -188,6 +192,9 @@ subroutine urbantv_init(this, bounds, NLFilename) end do write(iulog,*) ' ' endif + + ! Cathy [dev.02] + write(*,*) 'Cathy: before shr_strdata_init_from_inline' ! Initialize the cdeps data type this%sdat_urbantv call shr_strdata_init_from_inline(this%sdat_urbantv, & @@ -215,6 +222,10 @@ subroutine urbantv_init(this, bounds, NLFilename) stream_tintalgo = urbantv_tintalgo, & stream_name = 'Urban time varying data', & rc = rc) + + ! Cathy [dev.02] + write(*,*) 'Cathy: before shr_strdata_init_from_inline' + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) then call ESMF_Finalize(endflag=ESMF_END_ABORT) end if @@ -253,14 +264,24 @@ subroutine urbantv_interp(this, bounds) real(r8), pointer :: dataptr2d(:,:) !----------------------------------------------------------------------- + ! Cathy [dev.02] + write(*,*) 'Cathy: before get_curr_date' + ! Advance sdat stream call get_curr_date(year, mon, day, sec) mcdate = year*10000 + mon*100 + day + + ! Cathy [dev.02] + write(*,*) 'Cathy: after get_curr_date, before shr_strdata_advance' + call shr_strdata_advance(this%sdat_urbantv, ymd=mcdate, tod=sec, logunit=iulog, istr='hdmdyn', rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) then call ESMF_Finalize(endflag=ESMF_END_ABORT) end if + ! Cathy [dev.02] + write(*,*) 'Cathy: before creating 2d array' + ! Create 2d array for all stream variable data lsize = bounds%endg - bounds%begg + 1 ! Cathy [orig] @@ -281,6 +302,9 @@ subroutine urbantv_interp(this, bounds) end do end do + ! Cathy [dev.02] + write(*,*) 'Cathy: after creating 2d array, before determining t_building_max and p_ac for all landunits' + ! Determine this%tbuilding_max for all landunits do l = bounds%begl,bounds%endl if (lun%urbpoi(l)) then @@ -311,6 +335,9 @@ subroutine urbantv_interp(this, bounds) end do deallocate(dataptr2d) + ! Cathy [dev.02] + write(*,*) 'Cathy: after determining t_building_max and p_ac for all landunits' + ! Error check found = .false. do l = bounds%begl,bounds%endl From e10e338f2b165a2c8dbe122598e5caf5efd620c4 Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Thu, 26 Jan 2023 13:41:40 -0600 Subject: [PATCH 08/68] Update UrbanTimeVarType.F90 --- src/cpl/share_esmf/UrbanTimeVarType.F90 | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index d542d2440e..1f679b88a3 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -74,7 +74,7 @@ subroutine Init(this, bounds, NLFilename) call this%urbantv_init(bounds, NLFilename) ! Cathy [dev.02] - write(*,*) 'Cathy: urbantv_init done.' + write(iulog,*) 'Cathy: urbantv_init done.' call this%urbantv_interp(bounds) @@ -190,11 +190,14 @@ subroutine urbantv_init(this, bounds, NLFilename) do n = 1,6 write(iulog,'(a,a)' ) ' stream_varname = ',trim(stream_varnames(n)) end do - write(iulog,*) ' ' + ! Cathy [orig] + ! write(iulog,*) ' ' + ! Cathy [dev.02] + write(iulog,*) 'Cathy: does write statements have to be inside if?' endif ! Cathy [dev.02] - write(*,*) 'Cathy: before shr_strdata_init_from_inline' + write(iulog,*) 'Cathy: before shr_strdata_init_from_inline' ! Initialize the cdeps data type this%sdat_urbantv call shr_strdata_init_from_inline(this%sdat_urbantv, & @@ -224,7 +227,7 @@ subroutine urbantv_init(this, bounds, NLFilename) rc = rc) ! Cathy [dev.02] - write(*,*) 'Cathy: before shr_strdata_init_from_inline' + write(iulog,*) 'Cathy: before shr_strdata_init_from_inline' if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) then call ESMF_Finalize(endflag=ESMF_END_ABORT) @@ -265,14 +268,14 @@ subroutine urbantv_interp(this, bounds) !----------------------------------------------------------------------- ! Cathy [dev.02] - write(*,*) 'Cathy: before get_curr_date' + write(iulog,*) 'Cathy: before get_curr_date' ! Advance sdat stream call get_curr_date(year, mon, day, sec) mcdate = year*10000 + mon*100 + day ! Cathy [dev.02] - write(*,*) 'Cathy: after get_curr_date, before shr_strdata_advance' + write(iulog,*) 'Cathy: after get_curr_date, before shr_strdata_advance' call shr_strdata_advance(this%sdat_urbantv, ymd=mcdate, tod=sec, logunit=iulog, istr='hdmdyn', rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) then @@ -280,7 +283,7 @@ subroutine urbantv_interp(this, bounds) end if ! Cathy [dev.02] - write(*,*) 'Cathy: before creating 2d array' + write(iulog,*) 'Cathy: before creating 2d array' ! Create 2d array for all stream variable data lsize = bounds%endg - bounds%begg + 1 @@ -303,7 +306,7 @@ subroutine urbantv_interp(this, bounds) end do ! Cathy [dev.02] - write(*,*) 'Cathy: after creating 2d array, before determining t_building_max and p_ac for all landunits' + write(iulog,*) 'Cathy: after creating 2d array, before determining t_building_max and p_ac for all landunits' ! Determine this%tbuilding_max for all landunits do l = bounds%begl,bounds%endl @@ -336,7 +339,7 @@ subroutine urbantv_interp(this, bounds) deallocate(dataptr2d) ! Cathy [dev.02] - write(*,*) 'Cathy: after determining t_building_max and p_ac for all landunits' + write(iulog,*) 'Cathy: after determining t_building_max and p_ac for all landunits' ! Error check found = .false. From 436329500392af185d640b1200e4a72c46200141 Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Wed, 8 Feb 2023 12:43:44 -0600 Subject: [PATCH 09/68] [dev.03] Fix interior building temperature update 1. changed how interior building temperature is updated based on proposed scheme, by adding back the heat not removed by AC; 2. added an intermediate local variable `efllx_urban_ac_sat`; 3. `t_building_max` now indicates the saturation setpoints. --- src/biogeophys/UrbBuildTempOleson2015Mod.F90 | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 index d54d3ff86d..024922348a 100644 --- a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 +++ b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 @@ -236,6 +236,8 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, real(r8) :: t_floor_bef(bounds%begl:bounds%endl) ! floor temperature at previous time step (K) real(r8) :: t_building_bef(bounds%begl:bounds%endl) ! internal building air temperature at previous time step [K] real(r8) :: t_building_bef_hac(bounds%begl:bounds%endl)! internal building air temperature before applying HAC [K] + ! Cathy [dev.03] + real(r8) :: eflx_urban_ac_sat(bounds%begl:bounds%endl) ! urban air conditioning flux under AC adoption saturation (W/m**2) real(r8) :: hcv_roofi(bounds%begl:bounds%endl) ! roof convective heat transfer coefficient (W m-2 K-1) real(r8) :: hcv_sunwi(bounds%begl:bounds%endl) ! sunwall convective heat transfer coefficient (W m-2 K-1) real(r8) :: hcv_shdwi(bounds%begl:bounds%endl) ! shadewall convective heat transfer coefficient (W m-2 K-1) @@ -925,13 +927,17 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, ! rho_dair(l) = pstd / (rair*t_building(l)) if (t_building_bef_hac(l) > t_building_max(l)) then - t_building(l) = t_building_max(l) - ! [Cathy] orig: + ! Cathy [orig] + ! t_building(l) = t_building_max(l) ! eflx_urban_ac(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building(l) & ! - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) - ! [Cathy] dev: - eflx_urban_ac(l) = wtlunit_roof(l) * p_ac(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building(l) & - - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) + ! Cathy [dev.03] ! after the change, t_building_max is saturation setpoint + eflx_urban_ac_sat(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_max(l) & + - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) + t_building(l) = t_building_max(l) + ( 1._r8 - p_ac(l) ) * eflx_urbann_ac_sat(l) & + * dtime / (ht_roof(l) * rho_dair(l) * cpair) + eflx_urban_ac(l) = p_ac(l) * eflx_urban_ac_sat(l) + else if (t_building_bef_hac(l) < t_building_min(l)) then t_building(l) = t_building_min(l) eflx_urban_heat(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building(l) & From ab0f8e15a64b8391a49b02d9a1f789a3cbbeaa4b Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Wed, 8 Feb 2023 16:47:07 -0600 Subject: [PATCH 10/68] [dev03] Fix typo --- src/biogeophys/UrbBuildTempOleson2015Mod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 index 024922348a..e5626cb65c 100644 --- a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 +++ b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 @@ -934,7 +934,7 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, ! Cathy [dev.03] ! after the change, t_building_max is saturation setpoint eflx_urban_ac_sat(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_max(l) & - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) - t_building(l) = t_building_max(l) + ( 1._r8 - p_ac(l) ) * eflx_urbann_ac_sat(l) & + t_building(l) = t_building_max(l) + ( 1._r8 - p_ac(l) ) * eflx_urban_ac_sat(l) & * dtime / (ht_roof(l) * rho_dair(l) * cpair) eflx_urban_ac(l) = p_ac(l) * eflx_urban_ac_sat(l) From aa68753b6a7339808350ba8c23b83e6d494131ac Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Wed, 22 Feb 2023 23:56:54 -0600 Subject: [PATCH 11/68] [dev.03] Remove write statements Remove 8 write to log statements (added in as part of dev.02 for debugging) to fix the timing issues --- src/cpl/share_esmf/UrbanTimeVarType.F90 | 32 ++----------------------- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index 1f679b88a3..ae34449c1e 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -72,10 +72,6 @@ subroutine Init(this, bounds, NLFilename) allocate(this%p_ac(begl:endl)); this%p_ac(:) = nan call this%urbantv_init(bounds, NLFilename) - - ! Cathy [dev.02] - write(iulog,*) 'Cathy: urbantv_init done.' - call this%urbantv_interp(bounds) ! Add history fields ! Cathy: this adds an output field. the subroutine is in scr/main/histFileMod.F90 @@ -190,14 +186,8 @@ subroutine urbantv_init(this, bounds, NLFilename) do n = 1,6 write(iulog,'(a,a)' ) ' stream_varname = ',trim(stream_varnames(n)) end do - ! Cathy [orig] - ! write(iulog,*) ' ' - ! Cathy [dev.02] - write(iulog,*) 'Cathy: does write statements have to be inside if?' + write(iulog,*) ' ' endif - - ! Cathy [dev.02] - write(iulog,*) 'Cathy: before shr_strdata_init_from_inline' ! Initialize the cdeps data type this%sdat_urbantv call shr_strdata_init_from_inline(this%sdat_urbantv, & @@ -226,9 +216,6 @@ subroutine urbantv_init(this, bounds, NLFilename) stream_name = 'Urban time varying data', & rc = rc) - ! Cathy [dev.02] - write(iulog,*) 'Cathy: before shr_strdata_init_from_inline' - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) then call ESMF_Finalize(endflag=ESMF_END_ABORT) end if @@ -267,23 +254,14 @@ subroutine urbantv_interp(this, bounds) real(r8), pointer :: dataptr2d(:,:) !----------------------------------------------------------------------- - ! Cathy [dev.02] - write(iulog,*) 'Cathy: before get_curr_date' - ! Advance sdat stream call get_curr_date(year, mon, day, sec) mcdate = year*10000 + mon*100 + day - ! Cathy [dev.02] - write(iulog,*) 'Cathy: after get_curr_date, before shr_strdata_advance' - call shr_strdata_advance(this%sdat_urbantv, ymd=mcdate, tod=sec, logunit=iulog, istr='hdmdyn', rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) then call ESMF_Finalize(endflag=ESMF_END_ABORT) - end if - - ! Cathy [dev.02] - write(iulog,*) 'Cathy: before creating 2d array' + end if ! Create 2d array for all stream variable data lsize = bounds%endg - bounds%begg + 1 @@ -305,9 +283,6 @@ subroutine urbantv_interp(this, bounds) end do end do - ! Cathy [dev.02] - write(iulog,*) 'Cathy: after creating 2d array, before determining t_building_max and p_ac for all landunits' - ! Determine this%tbuilding_max for all landunits do l = bounds%begl,bounds%endl if (lun%urbpoi(l)) then @@ -338,9 +313,6 @@ subroutine urbantv_interp(this, bounds) end do deallocate(dataptr2d) - ! Cathy [dev.02] - write(iulog,*) 'Cathy: after determining t_building_max and p_ac for all landunits' - ! Error check found = .false. do l = bounds%begl,bounds%endl From e6b80df3c8d37f7d262123e2ac5f82227bd04a45 Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Wed, 1 Mar 2023 17:41:22 -0600 Subject: [PATCH 12/68] [dev.04] Add toggle `urban_explicit_ac` 1. Add a new logical variable `urban_explicit_ac` (default true) in __UrbanParamsType.F90__; 2. Add if-else block to building interior building temperature and AC flux calculation in __UrbBuildTempOleson2015Mod.F90__: use p_ac if `urban_explicit_ac` is set to true, otherwise use the original way of calculation; 3. Add `urban_explicit_ac` to __namelist_definition_ctsm.xml__; and 4. Add `urban_explicit_ac` default value (.true.) to __namelist_defaults_ctsm.xml__. --- bld/namelist_files/namelist_defaults_ctsm.xml | 6 +++++ .../namelist_definition_ctsm.xml | 8 +++++++ src/biogeophys/UrbBuildTempOleson2015Mod.F90 | 24 ++++++++++++------- src/biogeophys/UrbanParamsType.F90 | 11 ++++++++- 4 files changed, 39 insertions(+), 10 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 69643041a4..5be2604c36 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -166,6 +166,12 @@ attributes from the config_cache.xml file (with keys converted to upper-case). FAST NONE + + + +.true. +.true. + .false. diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index bc1dd034aa..aae38a5cec 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -947,6 +947,14 @@ Turn urban air conditioning/heating ON or OFF and add wasteheat: ON_WASTEHEAT = Air conditioning/heating is ON and waste-heat sent to urban canyon + + + + +If TRUE, use explicit, time-varying AC adoption rate for air-conditioning flux and interior building temperature calculations. + + If TRUE, urban traffic flux will be activated (Currently NOT implemented). diff --git a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 index e5626cb65c..0ab72ac0a6 100644 --- a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 +++ b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 @@ -210,7 +210,10 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, use clm_varctl , only : iulog use abortutils , only : endrun use clm_varpar , only : nlevurb, nlevsno, nlevmaxurbgrnd - use UrbanParamsType , only : urban_hac, urban_hac_off, urban_hac_on, urban_wasteheat_on + ! Cathy [orig]: + ! use UrbanParamsType , only : urban_hac, urban_hac_off, urban_hac_on, urban_wasteheat_on + ! Cathy [dev.04]: + use UrbanParamsType , only : urban_hac, urban_hac_off, urban_hac_on, urban_wasteheat_on, urban_explicit_ac ! ! !ARGUMENTS: implicit none @@ -927,16 +930,19 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, ! rho_dair(l) = pstd / (rair*t_building(l)) if (t_building_bef_hac(l) > t_building_max(l)) then - ! Cathy [orig] - ! t_building(l) = t_building_max(l) - ! eflx_urban_ac(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building(l) & - ! - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) - ! Cathy [dev.03] ! after the change, t_building_max is saturation setpoint - eflx_urban_ac_sat(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_max(l) & + ! Cathy [dev.04] + if (urban_explicit_ac) then ! use explicit ac adoption rate: + ! Cathy [dev.03] ! after the change, t_building_max is saturation setpoint + eflx_urban_ac_sat(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_max(l) & - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) - t_building(l) = t_building_max(l) + ( 1._r8 - p_ac(l) ) * eflx_urban_ac_sat(l) & + t_building(l) = t_building_max(l) + ( 1._r8 - p_ac(l) ) * eflx_urban_ac_sat(l) & * dtime / (ht_roof(l) * rho_dair(l) * cpair) - eflx_urban_ac(l) = p_ac(l) * eflx_urban_ac_sat(l) + eflx_urban_ac(l) = p_ac(l) * eflx_urban_ac_sat(l) + else + ! Cathy [orig] + t_building(l) = t_building_max(l) + eflx_urban_ac(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building(l) & + - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) else if (t_building_bef_hac(l) < t_building_min(l)) then t_building(l) = t_building_min(l) diff --git a/src/biogeophys/UrbanParamsType.F90 b/src/biogeophys/UrbanParamsType.F90 index c490ad27cc..c674aac2db 100644 --- a/src/biogeophys/UrbanParamsType.F90 +++ b/src/biogeophys/UrbanParamsType.F90 @@ -101,6 +101,8 @@ module UrbanParamsType character(len= *), parameter, public :: urban_hac_on = 'ON' character(len= *), parameter, public :: urban_wasteheat_on = 'ON_WASTEHEAT' character(len= 16), public :: urban_hac = urban_hac_off + ! Cathy [dev.04] + logical, public :: urban_explicit_ac = .true. ! whether to use explicit, time-varying AC adoption rate logical, public :: urban_traffic = .false. ! urban traffic fluxes ! !PRIVATE MEMBER DATA: @@ -847,7 +849,10 @@ subroutine UrbanReadNML ( NLFilename ) integer :: unitn ! unit for namelist file character(len=32) :: subname = 'UrbanReadNML' ! subroutine name - namelist / clmu_inparm / urban_hac, urban_traffic, building_temp_method + ! Cathy [orig]: + ! namelist / clmu_inparm / urban_hac, urban_traffic, building_temp_method + ! Cathy [dev.04]: + namelist / clmu_inparm / urban_hac, urban_explicit_ac, urban_traffic, building_temp_method !EOP !----------------------------------------------------------------------- @@ -875,6 +880,8 @@ subroutine UrbanReadNML ( NLFilename ) ! Broadcast namelist variables read in call shr_mpi_bcast(urban_hac, mpicom) + ! Cathy [dev.04]: + call shr_mpi_bcast(urban_explicit_ac, mpicom) call shr_mpi_bcast(urban_traffic, mpicom) call shr_mpi_bcast(building_temp_method, mpicom) @@ -886,6 +893,8 @@ subroutine UrbanReadNML ( NLFilename ) ! if ( masterproc )then write(iulog,*) ' urban air conditioning/heating and wasteheat = ', urban_hac + ! Cathy [dev.04]: + write(iulog,*) ' urban explicit air-conditioning adoption rate = ', urban_explicit_ac write(iulog,*) ' urban traffic flux = ', urban_traffic end if From 30af382df1b3bb0b00ba7c9cfb3b115fa751eee4 Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Wed, 1 Mar 2023 17:51:09 -0600 Subject: [PATCH 13/68] [dev. 04] Add toggle `urban_explicit_ac` (cont'd) 5. Add `urban_explicit_ac` to __CLMBuildNamelist.pm__. --- bld/CLMBuildNamelist.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index c2a32da4ac..a56e5b12b7 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -2111,6 +2111,8 @@ sub setup_logic_urban { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'building_temp_method'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'urban_hac'); + # Cathy [dev.04] + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'urban_explicit_ac') add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'urban_traffic'); } From 4726cede9bb015acdcf8090440eda62d252314b8 Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Wed, 1 Mar 2023 18:01:23 -0600 Subject: [PATCH 14/68] [dev.04] debug Add missing ";" --- bld/CLMBuildNamelist.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index a56e5b12b7..7c185ff6a0 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -2112,7 +2112,7 @@ sub setup_logic_urban { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'building_temp_method'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'urban_hac'); # Cathy [dev.04] - add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'urban_explicit_ac') + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'urban_explicit_ac'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'urban_traffic'); } From ab2e87aa8fd6e591c7721011ecc14788fb9d87b9 Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Wed, 1 Mar 2023 18:13:04 -0600 Subject: [PATCH 15/68] [dev.04] debug Add "`end if`" --- src/biogeophys/UrbBuildTempOleson2015Mod.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 index 0ab72ac0a6..2a5440e324 100644 --- a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 +++ b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 @@ -943,6 +943,7 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, t_building(l) = t_building_max(l) eflx_urban_ac(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building(l) & - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) + end if else if (t_building_bef_hac(l) < t_building_min(l)) then t_building(l) = t_building_min(l) From 70125066da34fb3aa6a90cea491b3b99e9429db3 Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Mon, 24 Apr 2023 16:30:53 -0500 Subject: [PATCH 16/68] Update clm_varpar.F90 Changed nlevurb to 10 (line 207) to conform to the new surfdata file. --- src/main/clm_varpar.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/clm_varpar.F90 b/src/main/clm_varpar.F90 index f54b750181..7c7c1681b7 100644 --- a/src/main/clm_varpar.F90 +++ b/src/main/clm_varpar.F90 @@ -203,7 +203,8 @@ subroutine clm_varpar_init(actual_maxsoil_patches, surf_numpft, surf_numcft) max_patch_per_col= max(maxsoil_patches, surf_numcft, maxpatch_urb) nlevsoifl = 10 - nlevurb = 5 + [Cathy: to run prod.02 using new surf data from Keer, changed below from 5 to 10] + nlevurb = 10 ! originally 5 if ( masterproc ) write(iulog, *) 'soil_layerstruct_predefined varpar ', soil_layerstruct_predefined if ( masterproc ) write(iulog, *) 'soil_layerstruct_userdefined varpar ', soil_layerstruct_userdefined From 23876810d4f7eefd81dbe9d442edaf01b83b58de Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Mon, 24 Apr 2023 16:38:52 -0500 Subject: [PATCH 17/68] Update clm_varpar.F90 Fix syntax error --- src/main/clm_varpar.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/clm_varpar.F90 b/src/main/clm_varpar.F90 index 7c7c1681b7..e1179e43b3 100644 --- a/src/main/clm_varpar.F90 +++ b/src/main/clm_varpar.F90 @@ -203,7 +203,7 @@ subroutine clm_varpar_init(actual_maxsoil_patches, surf_numpft, surf_numcft) max_patch_per_col= max(maxsoil_patches, surf_numcft, maxpatch_urb) nlevsoifl = 10 - [Cathy: to run prod.02 using new surf data from Keer, changed below from 5 to 10] + ![Cathy: to run prod.02 using new surf data from Keer, changed below from 5 to 10] nlevurb = 10 ! originally 5 if ( masterproc ) write(iulog, *) 'soil_layerstruct_predefined varpar ', soil_layerstruct_predefined From 302556635395e7d30c58ef097219a1b242ff4dbf Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Thu, 13 Jul 2023 12:49:08 +0800 Subject: [PATCH 18/68] Update UrbBuildTempOleson2015Mod.F90 Bug fix: t_building calculation --- src/biogeophys/UrbBuildTempOleson2015Mod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 index 2a5440e324..e8f7555e0e 100644 --- a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 +++ b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 @@ -936,7 +936,7 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, eflx_urban_ac_sat(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_max(l) & - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) t_building(l) = t_building_max(l) + ( 1._r8 - p_ac(l) ) * eflx_urban_ac_sat(l) & - * dtime / (ht_roof(l) * rho_dair(l) * cpair) + * dtime / (ht_roof(l) * rho_dair(l) * cpair * wtlunit_roof(l)) eflx_urban_ac(l) = p_ac(l) * eflx_urban_ac_sat(l) else ! Cathy [orig] From af82c41c4ec51f471552295475e63d5d2b31bde5 Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Wed, 11 Oct 2023 15:51:57 -0500 Subject: [PATCH 19/68] Bug fix Bug fix on view factor and radiative energy balance check --- src/biogeophys/UrbBuildTempOleson2015Mod.F90 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 index e8f7555e0e..f6330ec10b 100644 --- a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 +++ b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 @@ -432,7 +432,10 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, vf_wf(l) = 0.5_r8*(1._r8 - vf_rf(l)) ! This view factor implicitly converts from per unit floor area to per unit wall area - vf_fw(l) = vf_wf(l) / building_hwr(l) + ! Cathy [orig] + ! vf_fw(l) = vf_wf(l) / building_hwr(l) + ! Cathy [bugfix] + vf_fw(l) = vf_wf(l) ! This view factor implicitly converts from per unit roof area to per unit wall area vf_rw(l) = vf_fw(l) @@ -838,7 +841,10 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, + em_floori(l)*sb*t_floor_bef(l)**4._r8 & + 4._r8*em_floori(l)*sb*t_floor_bef(l)**3.*(t_floor(l) - t_floor_bef(l)) - qrd_building(l) = qrd_roof(l) + building_hwr(l)*(qrd_sunw(l) + qrd_shdw(l)) + qrd_floor(l) + ! Cathy [orig] + ! qrd_building(l) = qrd_roof(l) + building_hwr(l)*(qrd_sunw(l) + qrd_shdw(l)) + qrd_floor(l) + ! Cathy [bugfix] + qrd_building(l) = qrd_roof(l) + qrd_sunw(l) + qrd_shdw(l) + qrd_floor(l) if (abs(qrd_building(l)) > .10_r8 ) then write (iulog,*) 'urban inside building net longwave radiation balance error ',qrd_building(l) From 529bd1593064060ef5234089ccaa43fba379775b Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Fri, 1 Dec 2023 17:26:58 -0600 Subject: [PATCH 20/68] preparing for PR Formalized comments in the code --- bld/CLMBuildNamelist.pm | 2 +- bld/namelist_files/namelist_defaults_ctsm.xml | 2 +- .../namelist_definition_ctsm.xml | 2 +- src/biogeophys/UrbBuildTempOleson2015Mod.F90 | 22 ++++---- src/biogeophys/UrbanParamsType.F90 | 10 ++-- src/cpl/share_esmf/UrbanTimeVarType.F90 | 56 +++++++++---------- src/main/clm_varpar.F90 | 2 +- 7 files changed, 48 insertions(+), 48 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 7c185ff6a0..0895a89ebb 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -2111,7 +2111,7 @@ sub setup_logic_urban { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'building_temp_method'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'urban_hac'); - # Cathy [dev.04] + # X. Li [dev.04] add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'urban_explicit_ac'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'urban_traffic'); } diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 5be2604c36..a3f488b8f9 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -167,7 +167,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). NONE - + .true. .true. diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index aae38a5cec..5f89da9d29 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -948,7 +948,7 @@ Turn urban air conditioning/heating ON or OFF and add wasteheat: - + diff --git a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 index f6330ec10b..c07b1ad0e3 100644 --- a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 +++ b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 @@ -210,9 +210,9 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, use clm_varctl , only : iulog use abortutils , only : endrun use clm_varpar , only : nlevurb, nlevsno, nlevmaxurbgrnd - ! Cathy [orig]: + ! X. Li [orig]: ! use UrbanParamsType , only : urban_hac, urban_hac_off, urban_hac_on, urban_wasteheat_on - ! Cathy [dev.04]: + ! X. Li [dev.04]: use UrbanParamsType , only : urban_hac, urban_hac_off, urban_hac_on, urban_wasteheat_on, urban_explicit_ac ! ! !ARGUMENTS: @@ -239,7 +239,7 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, real(r8) :: t_floor_bef(bounds%begl:bounds%endl) ! floor temperature at previous time step (K) real(r8) :: t_building_bef(bounds%begl:bounds%endl) ! internal building air temperature at previous time step [K] real(r8) :: t_building_bef_hac(bounds%begl:bounds%endl)! internal building air temperature before applying HAC [K] - ! Cathy [dev.03] + ! X. Li [dev.03] real(r8) :: eflx_urban_ac_sat(bounds%begl:bounds%endl) ! urban air conditioning flux under AC adoption saturation (W/m**2) real(r8) :: hcv_roofi(bounds%begl:bounds%endl) ! roof convective heat transfer coefficient (W m-2 K-1) real(r8) :: hcv_sunwi(bounds%begl:bounds%endl) ! sunwall convective heat transfer coefficient (W m-2 K-1) @@ -329,7 +329,7 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, t_floor => temperature_inst%t_floor_lun , & ! InOut: [real(r8) (:)] floor temperature (K) t_building => temperature_inst%t_building_lun , & ! InOut: [real(r8) (:)] internal building air temperature (K) - ! Cathy [dev] + ! X. Li [dev] p_ac => urbantv_inst%p_ac , & ! Input: [real(r8) (:)] air-conditioning penetration rate (-) t_building_max => urbantv_inst%t_building_max , & ! Input: [real(r8) (:)] maximum internal building air temperature (K) t_building_min => urbanparams_inst%t_building_min , & ! Input: [real(r8) (:)] minimum internal building air temperature (K) @@ -432,9 +432,9 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, vf_wf(l) = 0.5_r8*(1._r8 - vf_rf(l)) ! This view factor implicitly converts from per unit floor area to per unit wall area - ! Cathy [orig] + ! X. Li [orig] ! vf_fw(l) = vf_wf(l) / building_hwr(l) - ! Cathy [bugfix] + ! X. Li [bugfix] vf_fw(l) = vf_wf(l) ! This view factor implicitly converts from per unit roof area to per unit wall area @@ -841,9 +841,9 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, + em_floori(l)*sb*t_floor_bef(l)**4._r8 & + 4._r8*em_floori(l)*sb*t_floor_bef(l)**3.*(t_floor(l) - t_floor_bef(l)) - ! Cathy [orig] + ! X. Li [orig] ! qrd_building(l) = qrd_roof(l) + building_hwr(l)*(qrd_sunw(l) + qrd_shdw(l)) + qrd_floor(l) - ! Cathy [bugfix] + ! X. Li [bugfix] qrd_building(l) = qrd_roof(l) + qrd_sunw(l) + qrd_shdw(l) + qrd_floor(l) if (abs(qrd_building(l)) > .10_r8 ) then @@ -936,16 +936,16 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, ! rho_dair(l) = pstd / (rair*t_building(l)) if (t_building_bef_hac(l) > t_building_max(l)) then - ! Cathy [dev.04] + ! X. Li [dev.04] if (urban_explicit_ac) then ! use explicit ac adoption rate: - ! Cathy [dev.03] ! after the change, t_building_max is saturation setpoint + ! X. Li [dev.03] ! after the change, t_building_max is saturation setpoint eflx_urban_ac_sat(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_max(l) & - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) t_building(l) = t_building_max(l) + ( 1._r8 - p_ac(l) ) * eflx_urban_ac_sat(l) & * dtime / (ht_roof(l) * rho_dair(l) * cpair * wtlunit_roof(l)) eflx_urban_ac(l) = p_ac(l) * eflx_urban_ac_sat(l) else - ! Cathy [orig] + ! X. Li [orig] t_building(l) = t_building_max(l) eflx_urban_ac(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building(l) & - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) diff --git a/src/biogeophys/UrbanParamsType.F90 b/src/biogeophys/UrbanParamsType.F90 index c674aac2db..16da4b3ad0 100644 --- a/src/biogeophys/UrbanParamsType.F90 +++ b/src/biogeophys/UrbanParamsType.F90 @@ -101,7 +101,7 @@ module UrbanParamsType character(len= *), parameter, public :: urban_hac_on = 'ON' character(len= *), parameter, public :: urban_wasteheat_on = 'ON_WASTEHEAT' character(len= 16), public :: urban_hac = urban_hac_off - ! Cathy [dev.04] + ! X. Li [dev.04] logical, public :: urban_explicit_ac = .true. ! whether to use explicit, time-varying AC adoption rate logical, public :: urban_traffic = .false. ! urban traffic fluxes @@ -849,9 +849,9 @@ subroutine UrbanReadNML ( NLFilename ) integer :: unitn ! unit for namelist file character(len=32) :: subname = 'UrbanReadNML' ! subroutine name - ! Cathy [orig]: + ! X. Li [orig]: ! namelist / clmu_inparm / urban_hac, urban_traffic, building_temp_method - ! Cathy [dev.04]: + ! X. Li [dev.04]: namelist / clmu_inparm / urban_hac, urban_explicit_ac, urban_traffic, building_temp_method !EOP !----------------------------------------------------------------------- @@ -880,7 +880,7 @@ subroutine UrbanReadNML ( NLFilename ) ! Broadcast namelist variables read in call shr_mpi_bcast(urban_hac, mpicom) - ! Cathy [dev.04]: + ! X. Li [dev.04]: call shr_mpi_bcast(urban_explicit_ac, mpicom) call shr_mpi_bcast(urban_traffic, mpicom) call shr_mpi_bcast(building_temp_method, mpicom) @@ -893,7 +893,7 @@ subroutine UrbanReadNML ( NLFilename ) ! if ( masterproc )then write(iulog,*) ' urban air conditioning/heating and wasteheat = ', urban_hac - ! Cathy [dev.04]: + ! X. Li [dev.04]: write(iulog,*) ' urban explicit air-conditioning adoption rate = ', urban_explicit_ac write(iulog,*) ' urban traffic flux = ', urban_traffic end if diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index ae34449c1e..23dbf54086 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -12,7 +12,7 @@ module UrbanTimeVarType use abortutils , only : endrun use decompMod , only : bounds_type, subgrid_level_landunit use clm_varctl , only : iulog - use landunit_varcon , only : isturb_MIN, isturb_MAX ! Cathy: min and max types urban; equals 7 and 9, resp. + use landunit_varcon , only : isturb_MIN, isturb_MAX ! X. Li: min and max types urban; equals 7 and 9, resp. use clm_varcon , only : spval use LandunitType , only : lun use GridcellType , only : grc @@ -24,7 +24,7 @@ module UrbanTimeVarType type, public :: urbantv_type ! real(r8), public, pointer :: t_building_max(:) ! lun maximum internal building air temperature (K) - ! Cathy [dev] + ! X. Li [dev] real(r8), public, pointer :: p_ac(:) ! lun air-conditioning ownership rate (unitless, between 0 and 1) type(shr_strdata_type) :: sdat_urbantv ! urban time varying input data stream contains @@ -34,9 +34,9 @@ module UrbanTimeVarType procedure, public :: urbantv_interp ! Interpolate urban time varying stream end type urbantv_type - ! Cathy [orig] + ! X. Li [orig] ! character(15), private :: stream_varnames(isturb_MIN:isturb_MAX) - ! Cathy [dev]: + ! X. Li [dev]: character(15), private :: stream_varnames(1:6) ! 1-3 for t_building_max, 4-6 for p_ac character(len=*), parameter, private :: sourcefile = & @@ -60,7 +60,7 @@ subroutine Init(this, bounds, NLFilename) character(len=*) , intent(in) :: NLFilename ! Namelist filename ! ! !LOCAL VARIABLES: - integer :: begl, endl ! Cathy: beginning and ending landunit index, from src/main/decompMod + integer :: begl, endl ! X. Li: beginning and ending landunit index, from src/main/decompMod !--------------------------------------------------------------------- begl = bounds%begl; endl = bounds%endl @@ -68,18 +68,18 @@ subroutine Init(this, bounds, NLFilename) ! Allocate urbantv data structure allocate(this%t_building_max(begl:endl)); this%t_building_max(:) = nan - ! Cathy [dev] + ! X. Li [dev] allocate(this%p_ac(begl:endl)); this%p_ac(:) = nan call this%urbantv_init(bounds, NLFilename) call this%urbantv_interp(bounds) - ! Add history fields ! Cathy: this adds an output field. the subroutine is in scr/main/histFileMod.F90 + ! Add history fields ! X. Li: this adds an output field. the subroutine is in scr/main/histFileMod.F90 call hist_addfld1d (fname='TBUILD_MAX', units='K', & avgflag='A', long_name='prescribed maximum interior building temperature', & ptr_lunit=this%t_building_max, default='inactive', set_nourb=spval, & l2g_scale_type='unity') - ! Cathy [dev] + ! X. Li [dev] call hist_addfld1d (fname='P_AC', units='unitless', & avgflag='A', long_name='prescribed air-conditioning ownership rate (decimal)', & ptr_lunit=this%p_ac, default='inactive', set_nourb=spval, & @@ -97,7 +97,7 @@ subroutine urbantv_init(this, bounds, NLFilename) use clm_nlUtilsMod , only : find_nlgroup_name use spmdMod , only : masterproc, mpicom, iam use shr_mpi_mod , only : shr_mpi_bcast - use landunit_varcon , only : isturb_tbd, isturb_hd, isturb_md ! Cathy: equals 7, 8 and 9 + use landunit_varcon , only : isturb_tbd, isturb_hd, isturb_md ! X. Li: equals 7, 8 and 9 use dshr_strdata_mod , only : shr_strdata_init_from_inline use lnd_comp_shr , only : mesh, model_clock ! @@ -119,7 +119,7 @@ subroutine urbantv_init(this, bounds, NLFilename) character(len=CL) :: urbantvmapalgo = 'nn' ! mapping alogrithm for urban ac ??? character(len=CL) :: urbantv_tintalgo = 'linear' ! time interpolation alogrithm integer :: rc ! error code - ! Cathy [orig]: this is taken out because field strings are now hard coded in + ! X. Li [orig]: this is taken out because field strings are now hard coded in ! character(*), parameter :: urbantvString = "tbuildmax_" ! base string for field string character(*), parameter :: subName = "('urbantv_init')" ! ??? !----------------------------------------------------------------------- @@ -139,11 +139,11 @@ subroutine urbantv_init(this, bounds, NLFilename) model_year_align_urbantv = 1 ! align stream_year_first_urbantv with this model year stream_fldFileName_urbantv = ' ' stream_meshfile_urbantv = ' ' - ! Cathy [orig] + ! X. Li [orig] ! stream_varnames(isturb_tbd) = urbantvString//"TBD" ! stream_varnames(isturb_hd) = urbantvString//"HD" ! stream_varnames(isturb_md) = urbantvString//"MD" - ! Cathy [dev] + ! X. Li [dev] stream_varnames(1) = "tbuildmax_TBD" stream_varnames(2) = "tbuildmax_HD" stream_varnames(3) = "tbuildmax_MD" @@ -180,9 +180,9 @@ subroutine urbantv_init(this, bounds, NLFilename) write(iulog,'(a,a)' ) ' stream_fldFileName_urbantv = ',stream_fldFileName_urbantv write(iulog,'(a,a)' ) ' stream_meshfile_urbantv = ',stream_meshfile_urbantv write(iulog,'(a,a)' ) ' urbantv_tintalgo = ',urbantv_tintalgo - ! Cathy [orig] + ! X. Li [orig] ! do n = isturb_tbd,isturb_md - ! Cathy [dev] + ! X. Li [dev] do n = 1,6 write(iulog,'(a,a)' ) ' stream_varname = ',trim(stream_varnames(n)) end do @@ -200,10 +200,10 @@ subroutine urbantv_init(this, bounds, NLFilename) stream_lev_dimname = 'null', & stream_mapalgo = trim(urbantvmapalgo), & stream_filenames = (/trim(stream_fldfilename_urbantv)/), & - ! Cathy [orig] + ! X. Li [orig] ! stream_fldlistFile = stream_varnames(isturb_tbd:isturb_md),& ! stream_fldListModel = stream_varnames(isturb_tbd:isturb_md),& - ! Cathy [dev] + ! X. Li [dev] stream_fldlistFile = stream_varnames(1:6), & stream_fldListModel = stream_varnames(1:6), & stream_yearFirst = stream_year_first_urbantv, & @@ -265,10 +265,10 @@ subroutine urbantv_interp(this, bounds) ! Create 2d array for all stream variable data lsize = bounds%endg - bounds%begg + 1 - ! Cathy [orig] + ! X. Li [orig] ! allocate(dataptr2d(lsize, isturb_MIN:isturb_MAX)) ! do n = isturb_MIN,isturb_MAX - ! Cathy [dev] + ! X. Li [dev] allocate(dataptr2d(lsize, 1:6)) do n = 1,6 call dshr_fldbun_getFldPtr(this%sdat_urbantv%pstrm(1)%fldbun_model, trim(stream_varnames(n)), & @@ -291,13 +291,13 @@ subroutine urbantv_interp(this, bounds) ig = ig+1 if (g == lun%gridcell(l)) exit end do - ! Cathy [orig] + ! X. Li [orig] ! do n = isturb_MIN,isturb_MAX - ! Cathy [dev] + ! X. Li [dev] do n = 1,6 - ! Cathy [orig] + ! X. Li [orig] ! if (stream_varnames(lun%itype(l)) == stream_varnames(n)) then - ! Cathy [dev.02] + ! X. Li [dev.02] if (stream_varnames((lun%itype(l)-6)) == stream_varnames(n)) then this%t_building_max(l) = dataptr2d(ig,n) end if @@ -306,9 +306,9 @@ subroutine urbantv_interp(this, bounds) end if end do else - this%t_building_max(l) = spval ! Cathy: special value for real data, set to 1.e36 in src/main/clm_varcon - ! Cathy [dev] - this%p_ac(l) = 0._r8 ! Cathy: set to 0 for non-urban landunit + this%t_building_max(l) = spval ! X. Li: special value for real data, set to 1.e36 in src/main/clm_varcon + ! X. Li [dev] + this%p_ac(l) = 0._r8 ! X. Li: set to 0 for non-urban landunit end if end do deallocate(dataptr2d) @@ -322,9 +322,9 @@ subroutine urbantv_interp(this, bounds) ig = ig+1 if (g == lun%gridcell(l)) exit end do - ! Cathy [orig] + ! X. Li [orig] ! if ( .not. urban_valid(g) .or. (this%t_building_max(l) <= 0._r8)) then - ! Cathy [dev] + ! X. Li [dev] if ( .not. urban_valid(g) .or. (this%t_building_max(l) <= 0._r8) & .or. (this%p_ac(l) < 0._r8) .or. (this%p_ac(l) > 1._r8)) then found = .true. @@ -339,7 +339,7 @@ subroutine urbantv_interp(this, bounds) write(iulog,*)'landunit type: ',lun%itype(lindx) write(iulog,*)'urban_valid: ',urban_valid(gindx) write(iulog,*)'t_building_max: ',this%t_building_max(lindx) - ! Cathy [dev] + ! X. Li [dev] write(iulog,*)'p_ac: ',this%p_ac(lindx) call endrun(subgrid_index=lindx, subgrid_level=subgrid_level_landunit, & msg=errmsg(sourcefile, __LINE__)) diff --git a/src/main/clm_varpar.F90 b/src/main/clm_varpar.F90 index e1179e43b3..3ef9cf48a2 100644 --- a/src/main/clm_varpar.F90 +++ b/src/main/clm_varpar.F90 @@ -203,7 +203,7 @@ subroutine clm_varpar_init(actual_maxsoil_patches, surf_numpft, surf_numcft) max_patch_per_col= max(maxsoil_patches, surf_numcft, maxpatch_urb) nlevsoifl = 10 - ![Cathy: to run prod.02 using new surf data from Keer, changed below from 5 to 10] + ! X. Li: changed below from 5 to 10 to match new surface data nlevurb = 10 ! originally 5 if ( masterproc ) write(iulog, *) 'soil_layerstruct_predefined varpar ', soil_layerstruct_predefined From 2d8a0cf52ff3918280e28672033415aaefc81c2a Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Mon, 12 Feb 2024 18:17:23 -0600 Subject: [PATCH 21/68] Resolve comments on pull request 2275 to CTSM main Changes done: 1. Removed and modified comments as suggested 2. Changed `urban_explicit_ac` default under clm5_0 to .false. 3. Removed changes that are already/going to be on main (bugfix for view factor and number of urban layers) --- bld/CLMBuildNamelist.pm | 1 - bld/namelist_files/namelist_defaults_ctsm.xml | 6 +-- .../namelist_definition_ctsm.xml | 3 -- src/biogeophys/UrbBuildTempOleson2015Mod.F90 | 21 ++-------- src/biogeophys/UrbanParamsType.F90 | 6 --- src/cpl/share_esmf/UrbanTimeVarType.F90 | 42 +++++++------------ src/main/clm_varpar.F90 | 3 +- 7 files changed, 23 insertions(+), 59 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 0895a89ebb..0b9b161c20 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -2111,7 +2111,6 @@ sub setup_logic_urban { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'building_temp_method'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'urban_hac'); - # X. Li [dev.04] add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'urban_explicit_ac'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'urban_traffic'); } diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index a3f488b8f9..0d8e45a779 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -166,11 +166,9 @@ attributes from the config_cache.xml file (with keys converted to upper-case). FAST NONE - - - + .true. -.true. +.false. .false. diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 5f89da9d29..8334b46d2a 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -947,9 +947,6 @@ Turn urban air conditioning/heating ON or OFF and add wasteheat: ON_WASTEHEAT = Air conditioning/heating is ON and waste-heat sent to urban canyon - - - If TRUE, use explicit, time-varying AC adoption rate for air-conditioning flux and interior building temperature calculations. diff --git a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 index c07b1ad0e3..2e588e2e88 100644 --- a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 +++ b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 @@ -210,9 +210,6 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, use clm_varctl , only : iulog use abortutils , only : endrun use clm_varpar , only : nlevurb, nlevsno, nlevmaxurbgrnd - ! X. Li [orig]: - ! use UrbanParamsType , only : urban_hac, urban_hac_off, urban_hac_on, urban_wasteheat_on - ! X. Li [dev.04]: use UrbanParamsType , only : urban_hac, urban_hac_off, urban_hac_on, urban_wasteheat_on, urban_explicit_ac ! ! !ARGUMENTS: @@ -239,7 +236,6 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, real(r8) :: t_floor_bef(bounds%begl:bounds%endl) ! floor temperature at previous time step (K) real(r8) :: t_building_bef(bounds%begl:bounds%endl) ! internal building air temperature at previous time step [K] real(r8) :: t_building_bef_hac(bounds%begl:bounds%endl)! internal building air temperature before applying HAC [K] - ! X. Li [dev.03] real(r8) :: eflx_urban_ac_sat(bounds%begl:bounds%endl) ! urban air conditioning flux under AC adoption saturation (W/m**2) real(r8) :: hcv_roofi(bounds%begl:bounds%endl) ! roof convective heat transfer coefficient (W m-2 K-1) real(r8) :: hcv_sunwi(bounds%begl:bounds%endl) ! sunwall convective heat transfer coefficient (W m-2 K-1) @@ -329,7 +325,6 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, t_floor => temperature_inst%t_floor_lun , & ! InOut: [real(r8) (:)] floor temperature (K) t_building => temperature_inst%t_building_lun , & ! InOut: [real(r8) (:)] internal building air temperature (K) - ! X. Li [dev] p_ac => urbantv_inst%p_ac , & ! Input: [real(r8) (:)] air-conditioning penetration rate (-) t_building_max => urbantv_inst%t_building_max , & ! Input: [real(r8) (:)] maximum internal building air temperature (K) t_building_min => urbanparams_inst%t_building_min , & ! Input: [real(r8) (:)] minimum internal building air temperature (K) @@ -432,10 +427,7 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, vf_wf(l) = 0.5_r8*(1._r8 - vf_rf(l)) ! This view factor implicitly converts from per unit floor area to per unit wall area - ! X. Li [orig] - ! vf_fw(l) = vf_wf(l) / building_hwr(l) - ! X. Li [bugfix] - vf_fw(l) = vf_wf(l) + vf_fw(l) = vf_wf(l) / building_hwr(l) ! This view factor implicitly converts from per unit roof area to per unit wall area vf_rw(l) = vf_fw(l) @@ -841,10 +833,7 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, + em_floori(l)*sb*t_floor_bef(l)**4._r8 & + 4._r8*em_floori(l)*sb*t_floor_bef(l)**3.*(t_floor(l) - t_floor_bef(l)) - ! X. Li [orig] - ! qrd_building(l) = qrd_roof(l) + building_hwr(l)*(qrd_sunw(l) + qrd_shdw(l)) + qrd_floor(l) - ! X. Li [bugfix] - qrd_building(l) = qrd_roof(l) + qrd_sunw(l) + qrd_shdw(l) + qrd_floor(l) + qrd_building(l) = qrd_roof(l) + building_hwr(l)*(qrd_sunw(l) + qrd_shdw(l)) + qrd_floor(l) if (abs(qrd_building(l)) > .10_r8 ) then write (iulog,*) 'urban inside building net longwave radiation balance error ',qrd_building(l) @@ -936,16 +925,14 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, ! rho_dair(l) = pstd / (rair*t_building(l)) if (t_building_bef_hac(l) > t_building_max(l)) then - ! X. Li [dev.04] - if (urban_explicit_ac) then ! use explicit ac adoption rate: - ! X. Li [dev.03] ! after the change, t_building_max is saturation setpoint + if (urban_explicit_ac) then ! use explicit ac adoption rate parameterization scheme: + ! Here, t_building_max is the AC saturation setpoint eflx_urban_ac_sat(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_max(l) & - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) t_building(l) = t_building_max(l) + ( 1._r8 - p_ac(l) ) * eflx_urban_ac_sat(l) & * dtime / (ht_roof(l) * rho_dair(l) * cpair * wtlunit_roof(l)) eflx_urban_ac(l) = p_ac(l) * eflx_urban_ac_sat(l) else - ! X. Li [orig] t_building(l) = t_building_max(l) eflx_urban_ac(l) = wtlunit_roof(l) * abs( (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building(l) & - (ht_roof(l) * rho_dair(l) * cpair / dtime) * t_building_bef_hac(l) ) diff --git a/src/biogeophys/UrbanParamsType.F90 b/src/biogeophys/UrbanParamsType.F90 index 16da4b3ad0..4b7b80e4fe 100644 --- a/src/biogeophys/UrbanParamsType.F90 +++ b/src/biogeophys/UrbanParamsType.F90 @@ -101,7 +101,6 @@ module UrbanParamsType character(len= *), parameter, public :: urban_hac_on = 'ON' character(len= *), parameter, public :: urban_wasteheat_on = 'ON_WASTEHEAT' character(len= 16), public :: urban_hac = urban_hac_off - ! X. Li [dev.04] logical, public :: urban_explicit_ac = .true. ! whether to use explicit, time-varying AC adoption rate logical, public :: urban_traffic = .false. ! urban traffic fluxes @@ -849,9 +848,6 @@ subroutine UrbanReadNML ( NLFilename ) integer :: unitn ! unit for namelist file character(len=32) :: subname = 'UrbanReadNML' ! subroutine name - ! X. Li [orig]: - ! namelist / clmu_inparm / urban_hac, urban_traffic, building_temp_method - ! X. Li [dev.04]: namelist / clmu_inparm / urban_hac, urban_explicit_ac, urban_traffic, building_temp_method !EOP !----------------------------------------------------------------------- @@ -880,7 +876,6 @@ subroutine UrbanReadNML ( NLFilename ) ! Broadcast namelist variables read in call shr_mpi_bcast(urban_hac, mpicom) - ! X. Li [dev.04]: call shr_mpi_bcast(urban_explicit_ac, mpicom) call shr_mpi_bcast(urban_traffic, mpicom) call shr_mpi_bcast(building_temp_method, mpicom) @@ -893,7 +888,6 @@ subroutine UrbanReadNML ( NLFilename ) ! if ( masterproc )then write(iulog,*) ' urban air conditioning/heating and wasteheat = ', urban_hac - ! X. Li [dev.04]: write(iulog,*) ' urban explicit air-conditioning adoption rate = ', urban_explicit_ac write(iulog,*) ' urban traffic flux = ', urban_traffic end if diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index 23dbf54086..54d5c61d19 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -12,7 +12,7 @@ module UrbanTimeVarType use abortutils , only : endrun use decompMod , only : bounds_type, subgrid_level_landunit use clm_varctl , only : iulog - use landunit_varcon , only : isturb_MIN, isturb_MAX ! X. Li: min and max types urban; equals 7 and 9, resp. + use landunit_varcon , only : isturb_MIN, isturb_MAX use clm_varcon , only : spval use LandunitType , only : lun use GridcellType , only : grc @@ -24,8 +24,7 @@ module UrbanTimeVarType type, public :: urbantv_type ! real(r8), public, pointer :: t_building_max(:) ! lun maximum internal building air temperature (K) - ! X. Li [dev] - real(r8), public, pointer :: p_ac(:) ! lun air-conditioning ownership rate (unitless, between 0 and 1) + real(r8), public, pointer :: p_ac(:) ! lun air-conditioning adoption rate (unitless, between 0 and 1) type(shr_strdata_type) :: sdat_urbantv ! urban time varying input data stream contains ! !PUBLIC MEMBER FUNCTIONS: @@ -60,7 +59,7 @@ subroutine Init(this, bounds, NLFilename) character(len=*) , intent(in) :: NLFilename ! Namelist filename ! ! !LOCAL VARIABLES: - integer :: begl, endl ! X. Li: beginning and ending landunit index, from src/main/decompMod + integer :: begl, endl !--------------------------------------------------------------------- begl = bounds%begl; endl = bounds%endl @@ -68,20 +67,18 @@ subroutine Init(this, bounds, NLFilename) ! Allocate urbantv data structure allocate(this%t_building_max(begl:endl)); this%t_building_max(:) = nan - ! X. Li [dev] allocate(this%p_ac(begl:endl)); this%p_ac(:) = nan call this%urbantv_init(bounds, NLFilename) call this%urbantv_interp(bounds) - ! Add history fields ! X. Li: this adds an output field. the subroutine is in scr/main/histFileMod.F90 + ! Add history fields call hist_addfld1d (fname='TBUILD_MAX', units='K', & avgflag='A', long_name='prescribed maximum interior building temperature', & ptr_lunit=this%t_building_max, default='inactive', set_nourb=spval, & l2g_scale_type='unity') - ! X. Li [dev] call hist_addfld1d (fname='P_AC', units='unitless', & - avgflag='A', long_name='prescribed air-conditioning ownership rate (decimal)', & + avgflag='A', long_name='prescribed air-conditioning ownership rate (unitless, between 0 and 1)', & ptr_lunit=this%p_ac, default='inactive', set_nourb=spval, & l2g_scale_type='unity') @@ -97,7 +94,7 @@ subroutine urbantv_init(this, bounds, NLFilename) use clm_nlUtilsMod , only : find_nlgroup_name use spmdMod , only : masterproc, mpicom, iam use shr_mpi_mod , only : shr_mpi_bcast - use landunit_varcon , only : isturb_tbd, isturb_hd, isturb_md ! X. Li: equals 7, 8 and 9 + use landunit_varcon , only : isturb_tbd, isturb_hd, isturb_md use dshr_strdata_mod , only : shr_strdata_init_from_inline use lnd_comp_shr , only : mesh, model_clock ! @@ -105,23 +102,23 @@ subroutine urbantv_init(this, bounds, NLFilename) implicit none class(urbantv_type) :: this type(bounds_type), intent(in) :: bounds - character(len=*), intent(in) :: NLFilename ! Namelist filename ???is this the netCDF file name? + character(len=*), intent(in) :: NLFilename ! Namelist filename ! ! !LOCAL VARIABLES: integer :: n integer :: stream_year_first_urbantv ! first year in urban tv stream to use integer :: stream_year_last_urbantv ! last year in urban tv stream to use integer :: model_year_align_urbantv ! align stream_year_first_urbantv with this model year - integer :: nu_nml ! unit for namelist file ??? + integer :: nu_nml ! unit for namelist file integer :: nml_error ! namelist i/o error flag - character(len=CL) :: stream_fldFileName_urbantv ! urban tv streams filename ??? - character(len=CL) :: stream_meshfile_urbantv ! urban tv streams filename ??? - character(len=CL) :: urbantvmapalgo = 'nn' ! mapping alogrithm for urban ac ??? + character(len=CL) :: stream_fldFileName_urbantv ! urban tv streams filename + character(len=CL) :: stream_meshfile_urbantv ! urban tv streams filename + character(len=CL) :: urbantvmapalgo = 'nn' ! mapping alogrithm for urban ac character(len=CL) :: urbantv_tintalgo = 'linear' ! time interpolation alogrithm integer :: rc ! error code ! X. Li [orig]: this is taken out because field strings are now hard coded in ! character(*), parameter :: urbantvString = "tbuildmax_" ! base string for field string - character(*), parameter :: subName = "('urbantv_init')" ! ??? + character(*), parameter :: subName = "('urbantv_init')" !----------------------------------------------------------------------- namelist /urbantv_streams/ & @@ -215,7 +212,6 @@ subroutine urbantv_init(this, bounds, NLFilename) stream_tintalgo = urbantv_tintalgo, & stream_name = 'Urban time varying data', & rc = rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) then call ESMF_Finalize(endflag=ESMF_END_ABORT) end if @@ -257,11 +253,10 @@ subroutine urbantv_interp(this, bounds) ! Advance sdat stream call get_curr_date(year, mon, day, sec) mcdate = year*10000 + mon*100 + day - call shr_strdata_advance(this%sdat_urbantv, ymd=mcdate, tod=sec, logunit=iulog, istr='hdmdyn', rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) then call ESMF_Finalize(endflag=ESMF_END_ABORT) - end if + end if ! Create 2d array for all stream variable data lsize = bounds%endg - bounds%begg + 1 @@ -306,9 +301,8 @@ subroutine urbantv_interp(this, bounds) end if end do else - this%t_building_max(l) = spval ! X. Li: special value for real data, set to 1.e36 in src/main/clm_varcon - ! X. Li [dev] - this%p_ac(l) = 0._r8 ! X. Li: set to 0 for non-urban landunit + this%t_building_max(l) = spval + this%p_ac(l) = 0._r8 ! set to 0 for non-urban landunit end if end do deallocate(dataptr2d) @@ -322,11 +316,8 @@ subroutine urbantv_interp(this, bounds) ig = ig+1 if (g == lun%gridcell(l)) exit end do - ! X. Li [orig] - ! if ( .not. urban_valid(g) .or. (this%t_building_max(l) <= 0._r8)) then - ! X. Li [dev] if ( .not. urban_valid(g) .or. (this%t_building_max(l) <= 0._r8) & - .or. (this%p_ac(l) < 0._r8) .or. (this%p_ac(l) > 1._r8)) then + .or. (this%p_ac(l) < 0._r8) .or. (this%p_ac(l) > 1._r8)) then ! check if AC adoption rate is outside of range 0 to 1 found = .true. gindx = g lindx = l @@ -339,7 +330,6 @@ subroutine urbantv_interp(this, bounds) write(iulog,*)'landunit type: ',lun%itype(lindx) write(iulog,*)'urban_valid: ',urban_valid(gindx) write(iulog,*)'t_building_max: ',this%t_building_max(lindx) - ! X. Li [dev] write(iulog,*)'p_ac: ',this%p_ac(lindx) call endrun(subgrid_index=lindx, subgrid_level=subgrid_level_landunit, & msg=errmsg(sourcefile, __LINE__)) diff --git a/src/main/clm_varpar.F90 b/src/main/clm_varpar.F90 index 3ef9cf48a2..f54b750181 100644 --- a/src/main/clm_varpar.F90 +++ b/src/main/clm_varpar.F90 @@ -203,8 +203,7 @@ subroutine clm_varpar_init(actual_maxsoil_patches, surf_numpft, surf_numcft) max_patch_per_col= max(maxsoil_patches, surf_numcft, maxpatch_urb) nlevsoifl = 10 - ! X. Li: changed below from 5 to 10 to match new surface data - nlevurb = 10 ! originally 5 + nlevurb = 5 if ( masterproc ) write(iulog, *) 'soil_layerstruct_predefined varpar ', soil_layerstruct_predefined if ( masterproc ) write(iulog, *) 'soil_layerstruct_userdefined varpar ', soil_layerstruct_userdefined From d1d21137041ea091b8743ce3801eb7ff99960a34 Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Wed, 20 Mar 2024 15:17:23 -0500 Subject: [PATCH 22/68] Fix backward compatibility & p_ac dynamic read-in 1. set different paths for default stream_fldfilename_urbantv based on urban_explicit_ac (currently points to the file in my work directory when urban_explicit_ac=.true.) 2. only read in p_ac when urban_explicit_ac is true --- bld/namelist_files/namelist_defaults_ctsm.xml | 15 +++++ src/biogeophys/UrbBuildTempOleson2015Mod.F90 | 2 +- src/cpl/share_esmf/UrbanTimeVarType.F90 | 57 ++++++++++++++----- 3 files changed, 60 insertions(+), 14 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 0d8e45a779..0f7d9b948a 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1744,6 +1744,7 @@ lnd/clm2/surfdata_map/release-clm5.0.30/surfdata_ne0np4.CONUS.ne30x8_hist_78pfts 1850 2106 + +lnd/clm2/urbandata/CLM50_tbuildmax_Oleson_2016_0.9x1.25_simyr1849-2106_c160923.nc +/glade/work/xinchang/02_Explicit_AC_Adoption/02_data_present_day/CTSM52_urbantv_0.9x1.25_simyr1849-2106_c20230621.nc +lnd/clm2/urbandata/CLM50_tbuildmax_Oleson_2016_0.9x1_ESMFmesh_cdf5_100621.nc + +lnd/clm2/urbandata/CLM50_tbuildmax_Oleson_2016_0.9x1.25_simyr1849-2106_c160923.nc +/glade/work/xinchang/02_Explicit_AC_Adoption/02_data_present_day/CTSM52_urbantv_0.9x1.25_simyr1849-2106_c20230621.nc +lnd/clm2/urbandata/CLM50_tbuildmax_Oleson_2016_0.9x1_ESMFmesh_cdf5_100621.nc lnd/clm2/urbandata/CLM45_tbuildmax_Oleson_2016_0.9x1.25_simyr1849-2106_c160923.nc diff --git a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 index 2e588e2e88..ee824931cd 100644 --- a/src/biogeophys/UrbBuildTempOleson2015Mod.F90 +++ b/src/biogeophys/UrbBuildTempOleson2015Mod.F90 @@ -325,7 +325,7 @@ subroutine BuildingTemperature (bounds, num_urbanl, filter_urbanl, num_nolakec, t_floor => temperature_inst%t_floor_lun , & ! InOut: [real(r8) (:)] floor temperature (K) t_building => temperature_inst%t_building_lun , & ! InOut: [real(r8) (:)] internal building air temperature (K) - p_ac => urbantv_inst%p_ac , & ! Input: [real(r8) (:)] air-conditioning penetration rate (-) + p_ac => urbantv_inst%p_ac , & ! Input: [real(r8) (:)] air-conditioning penetration rate (a fraction between 0 and 1) t_building_max => urbantv_inst%t_building_max , & ! Input: [real(r8) (:)] maximum internal building air temperature (K) t_building_min => urbanparams_inst%t_building_min , & ! Input: [real(r8) (:)] minimum internal building air temperature (K) diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index 54d5c61d19..5f507a1e9c 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -36,7 +36,11 @@ module UrbanTimeVarType ! X. Li [orig] ! character(15), private :: stream_varnames(isturb_MIN:isturb_MAX) ! X. Li [dev]: - character(15), private :: stream_varnames(1:6) ! 1-3 for t_building_max, 4-6 for p_ac + ! character(15), private :: stream_varnames(1:6) ! 1-3 for t_building_max, 4-6 for p_ac + ! X. Li [03.19] + integer , private :: stream_varname_MIN ! minimum index for stream_varnames + integer , private :: stream_varname_MAX ! maximum index for stream_varnames + character(15), private :: stream_varnames(:) ! urban time varying variable names character(len=*), parameter, private :: sourcefile = & __FILE__ @@ -67,7 +71,9 @@ subroutine Init(this, bounds, NLFilename) ! Allocate urbantv data structure allocate(this%t_building_max(begl:endl)); this%t_building_max(:) = nan - allocate(this%p_ac(begl:endl)); this%p_ac(:) = nan + ! X. Li [03.19] + ! allocate(this%p_ac(begl:endl)); this%p_ac(:) = nan + allocate(this%p_ac(begl:endl)); this%p_ac(:) = 0._r8 call this%urbantv_init(bounds, NLFilename) call this%urbantv_interp(bounds) @@ -77,8 +83,8 @@ subroutine Init(this, bounds, NLFilename) avgflag='A', long_name='prescribed maximum interior building temperature', & ptr_lunit=this%t_building_max, default='inactive', set_nourb=spval, & l2g_scale_type='unity') - call hist_addfld1d (fname='P_AC', units='unitless', & - avgflag='A', long_name='prescribed air-conditioning ownership rate (unitless, between 0 and 1)', & + call hist_addfld1d (fname='P_AC', units='a fraction between 0 and 1', & + avgflag='A', long_name='prescribed air-conditioning ownership rate', & ptr_lunit=this%p_ac, default='inactive', set_nourb=spval, & l2g_scale_type='unity') @@ -97,6 +103,8 @@ subroutine urbantv_init(this, bounds, NLFilename) use landunit_varcon , only : isturb_tbd, isturb_hd, isturb_md use dshr_strdata_mod , only : shr_strdata_init_from_inline use lnd_comp_shr , only : mesh, model_clock + ! X. Li [03.19] + use UrbanParamsType , only : urban_explicit_ac ! ! !ARGUMENTS: implicit none @@ -136,6 +144,15 @@ subroutine urbantv_init(this, bounds, NLFilename) model_year_align_urbantv = 1 ! align stream_year_first_urbantv with this model year stream_fldFileName_urbantv = ' ' stream_meshfile_urbantv = ' ' + ! X. Li [03.19] + stream_varname_MIN = 1 + ! Get value for the maximum index for stream_varnames: if using explicit AC adoption scheme, + ! then set maximum index to 6 for reading in tbuildmax and p_ac for three urban density classes; + ! otherwise, set to 3 to only read in tbuildmax for three urban density classes. + if (urban_explicit_ac) then + stream_varname_MAX = 6 + else + stream_varname_MAX = 3 ! X. Li [orig] ! stream_varnames(isturb_tbd) = urbantvString//"TBD" ! stream_varnames(isturb_hd) = urbantvString//"HD" @@ -144,9 +161,11 @@ subroutine urbantv_init(this, bounds, NLFilename) stream_varnames(1) = "tbuildmax_TBD" stream_varnames(2) = "tbuildmax_HD" stream_varnames(3) = "tbuildmax_MD" - stream_varnames(4) = "p_ac_TBD" - stream_varnames(5) = "p_ac_HD" - stream_varnames(6) = "p_ac_MD" + ! X. Li [03.19] + if (urban_explicit_ac) then + stream_varnames(4) = "p_ac_TBD" + stream_varnames(5) = "p_ac_HD" + stream_varnames(6) = "p_ac_MD" ! Read urbantv_streams namelist if (masterproc) then @@ -180,7 +199,9 @@ subroutine urbantv_init(this, bounds, NLFilename) ! X. Li [orig] ! do n = isturb_tbd,isturb_md ! X. Li [dev] - do n = 1,6 + ! do n = 1,6 + ! X. Li [03.19] + do n = stream_varname_MIN,stream_varname_MAX write(iulog,'(a,a)' ) ' stream_varname = ',trim(stream_varnames(n)) end do write(iulog,*) ' ' @@ -201,8 +222,11 @@ subroutine urbantv_init(this, bounds, NLFilename) ! stream_fldlistFile = stream_varnames(isturb_tbd:isturb_md),& ! stream_fldListModel = stream_varnames(isturb_tbd:isturb_md),& ! X. Li [dev] - stream_fldlistFile = stream_varnames(1:6), & - stream_fldListModel = stream_varnames(1:6), & + ! stream_fldlistFile = stream_varnames(1:6), & + ! stream_fldListModel = stream_varnames(1:6), & + ! X. Li [03.19] + stream_fldlistFile = stream_varnames(stream_varname_MIN:stream_varname_MAX), & + stream_fldListModel = stream_varnames(stream_varname_MIN:stream_varname_MAX), & stream_yearFirst = stream_year_first_urbantv, & stream_yearLast = stream_year_last_urbantv, & stream_yearAlign = model_year_align_urbantv, & @@ -266,6 +290,9 @@ subroutine urbantv_interp(this, bounds) ! X. Li [dev] allocate(dataptr2d(lsize, 1:6)) do n = 1,6 + ! X. Li [03.19] + allocate(dataptr2d(lsize, stream_varname_MIN:stream_varname_MAX)) + do n = stream_varname_MIN,stream_varname_MAX call dshr_fldbun_getFldPtr(this%sdat_urbantv%pstrm(1)%fldbun_model, trim(stream_varnames(n)), & fldptr1=dataptr1d, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) then @@ -278,7 +305,7 @@ subroutine urbantv_interp(this, bounds) end do end do - ! Determine this%tbuilding_max for all landunits + ! Determine this%tbuilding_max (and this%p_ac, if applicable) for all landunits do l = bounds%begl,bounds%endl if (lun%urbpoi(l)) then ig = 0 @@ -289,7 +316,9 @@ subroutine urbantv_interp(this, bounds) ! X. Li [orig] ! do n = isturb_MIN,isturb_MAX ! X. Li [dev] - do n = 1,6 + ! do n = 1,6 + ! X. Li [03.19] + do n = stream_varname_MIN,stream_varname_MAX ! X. Li [orig] ! if (stream_varnames(lun%itype(l)) == stream_varnames(n)) then ! X. Li [dev.02] @@ -302,7 +331,9 @@ subroutine urbantv_interp(this, bounds) end do else this%t_building_max(l) = spval - this%p_ac(l) = 0._r8 ! set to 0 for non-urban landunit + ! this%p_ac(l) = 0._r8 ! set to 0 for non-urban landunit + ! X. Li [03.19] + this%p_ac(l) = nan ! set to nan for non-urban landunit end if end do deallocate(dataptr2d) From 79790a0d392178ca95b4a0bcf2b7e3a02618896c Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Thu, 21 Mar 2024 16:08:23 -0500 Subject: [PATCH 23/68] Bug fix Closed if blocks, commented out extra lines, defined nan --- src/cpl/share_esmf/UrbanTimeVarType.F90 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index 5f507a1e9c..fc670ca830 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -38,9 +38,9 @@ module UrbanTimeVarType ! X. Li [dev]: ! character(15), private :: stream_varnames(1:6) ! 1-3 for t_building_max, 4-6 for p_ac ! X. Li [03.19] - integer , private :: stream_varname_MIN ! minimum index for stream_varnames - integer , private :: stream_varname_MAX ! maximum index for stream_varnames - character(15), private :: stream_varnames(:) ! urban time varying variable names + integer , private :: stream_varname_MIN ! minimum index for stream_varnames + integer , private :: stream_varname_MAX ! maximum index for stream_varnames + character(15), private, allocatable :: stream_varnames(:) ! urban time varying variable names character(len=*), parameter, private :: sourcefile = & __FILE__ @@ -153,6 +153,7 @@ subroutine urbantv_init(this, bounds, NLFilename) stream_varname_MAX = 6 else stream_varname_MAX = 3 + end if ! X. Li [orig] ! stream_varnames(isturb_tbd) = urbantvString//"TBD" ! stream_varnames(isturb_hd) = urbantvString//"HD" @@ -166,6 +167,7 @@ subroutine urbantv_init(this, bounds, NLFilename) stream_varnames(4) = "p_ac_TBD" stream_varnames(5) = "p_ac_HD" stream_varnames(6) = "p_ac_MD" + end if ! Read urbantv_streams namelist if (masterproc) then @@ -253,6 +255,7 @@ subroutine urbantv_interp(this, bounds) use clm_instur , only : urban_valid use dshr_methods_mod , only : dshr_fldbun_getfldptr use dshr_strdata_mod , only : shr_strdata_advance + use shr_infnan_mod , only : nan => shr_infnan_nan, assignment(=) ! ! !ARGUMENTS: class(urbantv_type) :: this @@ -288,8 +291,8 @@ subroutine urbantv_interp(this, bounds) ! allocate(dataptr2d(lsize, isturb_MIN:isturb_MAX)) ! do n = isturb_MIN,isturb_MAX ! X. Li [dev] - allocate(dataptr2d(lsize, 1:6)) - do n = 1,6 + ! allocate(dataptr2d(lsize, 1:6)) + ! do n = 1,6 ! X. Li [03.19] allocate(dataptr2d(lsize, stream_varname_MIN:stream_varname_MAX)) do n = stream_varname_MIN,stream_varname_MAX From c383dee0be598f52766c330ff59965fd6b4eaa0c Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Fri, 22 Mar 2024 16:55:12 -0500 Subject: [PATCH 24/68] Fixing error SIGSEGV, segmentation fault occurred Trying to fix this error by changing "allocatable" to "pointer" for the variable `stream_varnames`, since the error message points to the line where this variable was first assigned values. --- src/cpl/share_esmf/UrbanTimeVarType.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index fc670ca830..5cd3f607ca 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -40,7 +40,7 @@ module UrbanTimeVarType ! X. Li [03.19] integer , private :: stream_varname_MIN ! minimum index for stream_varnames integer , private :: stream_varname_MAX ! maximum index for stream_varnames - character(15), private, allocatable :: stream_varnames(:) ! urban time varying variable names + character(15), private, pointer :: stream_varnames(:) ! urban time varying variable names character(len=*), parameter, private :: sourcefile = & __FILE__ From 0081443d8662dacce74da1790b922c98a7edfd64 Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Fri, 22 Mar 2024 18:12:21 -0500 Subject: [PATCH 25/68] Fixing the error SIGSEGV cont'd Adding parameter" attribute to `stream_varname_MIN/MAX` to see if it helps --- src/cpl/share_esmf/UrbanTimeVarType.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index 5cd3f607ca..ffecf07c2d 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -38,9 +38,9 @@ module UrbanTimeVarType ! X. Li [dev]: ! character(15), private :: stream_varnames(1:6) ! 1-3 for t_building_max, 4-6 for p_ac ! X. Li [03.19] - integer , private :: stream_varname_MIN ! minimum index for stream_varnames - integer , private :: stream_varname_MAX ! maximum index for stream_varnames - character(15), private, pointer :: stream_varnames(:) ! urban time varying variable names + integer , private, parameter :: stream_varname_MIN ! minimum index for stream_varnames + integer , private, parameter :: stream_varname_MAX ! maximum index for stream_varnames + character(15), private, pointer :: stream_varnames(stream_varname_MIN:stream_varname_MAX) ! urban time varying variable names character(len=*), parameter, private :: sourcefile = & __FILE__ From e4a42c8fec448dacd53bcb37c18fd05bc05161cb Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Fri, 22 Mar 2024 18:55:02 -0500 Subject: [PATCH 26/68] Fixing the error SIGSEGV cont'd Trying out determining `stream_varname_MIN/MAX` and allocating `stream_varnames` in a different subroutine, before stream_varnames are assigned values --- src/cpl/share_esmf/UrbanTimeVarType.F90 | 39 +++++++++++++++++-------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index ffecf07c2d..f9aab74b09 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -38,9 +38,9 @@ module UrbanTimeVarType ! X. Li [dev]: ! character(15), private :: stream_varnames(1:6) ! 1-3 for t_building_max, 4-6 for p_ac ! X. Li [03.19] - integer , private, parameter :: stream_varname_MIN ! minimum index for stream_varnames - integer , private, parameter :: stream_varname_MAX ! maximum index for stream_varnames - character(15), private, pointer :: stream_varnames(stream_varname_MIN:stream_varname_MAX) ! urban time varying variable names + integer , private :: stream_varname_MIN ! minimum index for stream_varnames + integer , private :: stream_varname_MAX ! maximum index for stream_varnames + character(15), private, pointer :: stream_varnames(:) ! urban time varying variable names character(len=*), parameter, private :: sourcefile = & __FILE__ @@ -56,6 +56,8 @@ subroutine Init(this, bounds, NLFilename) ! !USES: use shr_infnan_mod , only : nan => shr_infnan_nan, assignment(=) use histFileMod , only : hist_addfld1d + ! X. Li [03.22] + use UrbanParamsType , only : urban_explicit_ac ! ! !ARGUMENTS: class(urbantv_type) :: this @@ -68,12 +70,25 @@ subroutine Init(this, bounds, NLFilename) begl = bounds%begl; endl = bounds%endl + ! X. Li [03.22] + ! Determine the minimum and maximum indices for stream_varnames + stream_varname_MIN = 1 + ! Get value for the maximum index for stream_varnames: if using explicit AC adoption scheme, + ! then set maximum index to 6 for reading in tbuildmax and p_ac for three urban density classes; + ! otherwise, set to 3 to only read in tbuildmax for three urban density classes. + if (urban_explicit_ac) then + stream_varname_MAX = 6 + else + stream_varname_MAX = 3 + end if + ! Allocate urbantv data structure allocate(this%t_building_max(begl:endl)); this%t_building_max(:) = nan ! X. Li [03.19] ! allocate(this%p_ac(begl:endl)); this%p_ac(:) = nan allocate(this%p_ac(begl:endl)); this%p_ac(:) = 0._r8 + allocate(this%stream_varnames(stream_varname_MIN:stream_varname_MAX)) call this%urbantv_init(bounds, NLFilename) call this%urbantv_interp(bounds) @@ -145,15 +160,15 @@ subroutine urbantv_init(this, bounds, NLFilename) stream_fldFileName_urbantv = ' ' stream_meshfile_urbantv = ' ' ! X. Li [03.19] - stream_varname_MIN = 1 - ! Get value for the maximum index for stream_varnames: if using explicit AC adoption scheme, - ! then set maximum index to 6 for reading in tbuildmax and p_ac for three urban density classes; - ! otherwise, set to 3 to only read in tbuildmax for three urban density classes. - if (urban_explicit_ac) then - stream_varname_MAX = 6 - else - stream_varname_MAX = 3 - end if + ! stream_varname_MIN = 1 + ! ! Get value for the maximum index for stream_varnames: if using explicit AC adoption scheme, + ! ! then set maximum index to 6 for reading in tbuildmax and p_ac for three urban density classes; + ! ! otherwise, set to 3 to only read in tbuildmax for three urban density classes. + ! if (urban_explicit_ac) then + ! stream_varname_MAX = 6 + ! else + ! stream_varname_MAX = 3 + ! end if ! X. Li [orig] ! stream_varnames(isturb_tbd) = urbantvString//"TBD" ! stream_varnames(isturb_hd) = urbantvString//"HD" From f69173523060c05c06a665fd9c500fae43f5dab2 Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Fri, 22 Mar 2024 19:05:49 -0500 Subject: [PATCH 27/68] Fixing the error SIGSEGV cont'd Previous build had error "This is not a component name that is defined in the encompassing structure" for `stream_varnames` allocation, so removed "this%" --- src/cpl/share_esmf/UrbanTimeVarType.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index f9aab74b09..1a29abb9af 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -88,7 +88,7 @@ subroutine Init(this, bounds, NLFilename) ! X. Li [03.19] ! allocate(this%p_ac(begl:endl)); this%p_ac(:) = nan allocate(this%p_ac(begl:endl)); this%p_ac(:) = 0._r8 - allocate(this%stream_varnames(stream_varname_MIN:stream_varname_MAX)) + allocate(stream_varnames(stream_varname_MIN:stream_varname_MAX)) call this%urbantv_init(bounds, NLFilename) call this%urbantv_interp(bounds) From ccb91e21abd4f8bb6437f551b025444126787c94 Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Mon, 25 Mar 2024 20:03:01 -0500 Subject: [PATCH 28/68] Prepare for PR review Remove comments no longer needed to prepare for PR review --- bld/namelist_files/namelist_defaults_ctsm.xml | 11 ---- src/cpl/share_esmf/UrbanTimeVarType.F90 | 57 ------------------- 2 files changed, 68 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 0f7d9b948a..be3d776c2f 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1744,17 +1744,6 @@ lnd/clm2/surfdata_map/release-clm5.0.30/surfdata_ne0np4.CONUS.ne30x8_hist_78pfts 1850 2106 - lnd/clm2/urbandata/CLM50_tbuildmax_Oleson_2016_0.9x1.25_simyr1849-2106_c160923.nc shr_infnan_nan, assignment(=) use histFileMod , only : hist_addfld1d - ! X. Li [03.22] use UrbanParamsType , only : urban_explicit_ac ! ! !ARGUMENTS: @@ -70,7 +64,6 @@ subroutine Init(this, bounds, NLFilename) begl = bounds%begl; endl = bounds%endl - ! X. Li [03.22] ! Determine the minimum and maximum indices for stream_varnames stream_varname_MIN = 1 ! Get value for the maximum index for stream_varnames: if using explicit AC adoption scheme, @@ -85,8 +78,6 @@ subroutine Init(this, bounds, NLFilename) ! Allocate urbantv data structure allocate(this%t_building_max(begl:endl)); this%t_building_max(:) = nan - ! X. Li [03.19] - ! allocate(this%p_ac(begl:endl)); this%p_ac(:) = nan allocate(this%p_ac(begl:endl)); this%p_ac(:) = 0._r8 allocate(stream_varnames(stream_varname_MIN:stream_varname_MAX)) @@ -118,7 +109,6 @@ subroutine urbantv_init(this, bounds, NLFilename) use landunit_varcon , only : isturb_tbd, isturb_hd, isturb_md use dshr_strdata_mod , only : shr_strdata_init_from_inline use lnd_comp_shr , only : mesh, model_clock - ! X. Li [03.19] use UrbanParamsType , only : urban_explicit_ac ! ! !ARGUMENTS: @@ -139,8 +129,6 @@ subroutine urbantv_init(this, bounds, NLFilename) character(len=CL) :: urbantvmapalgo = 'nn' ! mapping alogrithm for urban ac character(len=CL) :: urbantv_tintalgo = 'linear' ! time interpolation alogrithm integer :: rc ! error code - ! X. Li [orig]: this is taken out because field strings are now hard coded in - ! character(*), parameter :: urbantvString = "tbuildmax_" ! base string for field string character(*), parameter :: subName = "('urbantv_init')" !----------------------------------------------------------------------- @@ -159,25 +147,9 @@ subroutine urbantv_init(this, bounds, NLFilename) model_year_align_urbantv = 1 ! align stream_year_first_urbantv with this model year stream_fldFileName_urbantv = ' ' stream_meshfile_urbantv = ' ' - ! X. Li [03.19] - ! stream_varname_MIN = 1 - ! ! Get value for the maximum index for stream_varnames: if using explicit AC adoption scheme, - ! ! then set maximum index to 6 for reading in tbuildmax and p_ac for three urban density classes; - ! ! otherwise, set to 3 to only read in tbuildmax for three urban density classes. - ! if (urban_explicit_ac) then - ! stream_varname_MAX = 6 - ! else - ! stream_varname_MAX = 3 - ! end if - ! X. Li [orig] - ! stream_varnames(isturb_tbd) = urbantvString//"TBD" - ! stream_varnames(isturb_hd) = urbantvString//"HD" - ! stream_varnames(isturb_md) = urbantvString//"MD" - ! X. Li [dev] stream_varnames(1) = "tbuildmax_TBD" stream_varnames(2) = "tbuildmax_HD" stream_varnames(3) = "tbuildmax_MD" - ! X. Li [03.19] if (urban_explicit_ac) then stream_varnames(4) = "p_ac_TBD" stream_varnames(5) = "p_ac_HD" @@ -213,11 +185,6 @@ subroutine urbantv_init(this, bounds, NLFilename) write(iulog,'(a,a)' ) ' stream_fldFileName_urbantv = ',stream_fldFileName_urbantv write(iulog,'(a,a)' ) ' stream_meshfile_urbantv = ',stream_meshfile_urbantv write(iulog,'(a,a)' ) ' urbantv_tintalgo = ',urbantv_tintalgo - ! X. Li [orig] - ! do n = isturb_tbd,isturb_md - ! X. Li [dev] - ! do n = 1,6 - ! X. Li [03.19] do n = stream_varname_MIN,stream_varname_MAX write(iulog,'(a,a)' ) ' stream_varname = ',trim(stream_varnames(n)) end do @@ -235,13 +202,6 @@ subroutine urbantv_init(this, bounds, NLFilename) stream_lev_dimname = 'null', & stream_mapalgo = trim(urbantvmapalgo), & stream_filenames = (/trim(stream_fldfilename_urbantv)/), & - ! X. Li [orig] - ! stream_fldlistFile = stream_varnames(isturb_tbd:isturb_md),& - ! stream_fldListModel = stream_varnames(isturb_tbd:isturb_md),& - ! X. Li [dev] - ! stream_fldlistFile = stream_varnames(1:6), & - ! stream_fldListModel = stream_varnames(1:6), & - ! X. Li [03.19] stream_fldlistFile = stream_varnames(stream_varname_MIN:stream_varname_MAX), & stream_fldListModel = stream_varnames(stream_varname_MIN:stream_varname_MAX), & stream_yearFirst = stream_year_first_urbantv, & @@ -302,13 +262,6 @@ subroutine urbantv_interp(this, bounds) ! Create 2d array for all stream variable data lsize = bounds%endg - bounds%begg + 1 - ! X. Li [orig] - ! allocate(dataptr2d(lsize, isturb_MIN:isturb_MAX)) - ! do n = isturb_MIN,isturb_MAX - ! X. Li [dev] - ! allocate(dataptr2d(lsize, 1:6)) - ! do n = 1,6 - ! X. Li [03.19] allocate(dataptr2d(lsize, stream_varname_MIN:stream_varname_MAX)) do n = stream_varname_MIN,stream_varname_MAX call dshr_fldbun_getFldPtr(this%sdat_urbantv%pstrm(1)%fldbun_model, trim(stream_varnames(n)), & @@ -331,15 +284,7 @@ subroutine urbantv_interp(this, bounds) ig = ig+1 if (g == lun%gridcell(l)) exit end do - ! X. Li [orig] - ! do n = isturb_MIN,isturb_MAX - ! X. Li [dev] - ! do n = 1,6 - ! X. Li [03.19] do n = stream_varname_MIN,stream_varname_MAX - ! X. Li [orig] - ! if (stream_varnames(lun%itype(l)) == stream_varnames(n)) then - ! X. Li [dev.02] if (stream_varnames((lun%itype(l)-6)) == stream_varnames(n)) then this%t_building_max(l) = dataptr2d(ig,n) end if @@ -349,8 +294,6 @@ subroutine urbantv_interp(this, bounds) end do else this%t_building_max(l) = spval - ! this%p_ac(l) = 0._r8 ! set to 0 for non-urban landunit - ! X. Li [03.19] this%p_ac(l) = nan ! set to nan for non-urban landunit end if end do From 7cc2965bef7a75966fdc69c52513bb88f027027a Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Wed, 17 Apr 2024 14:51:22 -0600 Subject: [PATCH 29/68] Fix to get correct urbantv streams file --- bld/CLMBuildNamelist.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 0b9b161c20..0b4893dbb6 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -3610,7 +3610,7 @@ sub setup_logic_urbantv_streams { 'sim_year_range'=>$nl_flags->{'sim_year_range'}); } add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_fldfilename_urbantv', 'phys'=>$nl_flags->{'phys'}, - 'hgrid'=>"0.9x1.25" ); + 'hgrid'=>"0.9x1.25", 'urban_explicit_ac'=>$nl->get_value('urban_explicit_ac') ); if ($opts->{'driver'} eq "nuopc" ) { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'stream_meshfile_urbantv', 'phys'=>$nl_flags->{'phys'}, 'hgrid'=>"0.9x1.25" ); From 52962a5e9e5f9ada9119a0beb7bccc313c71d955 Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Thu, 18 Apr 2024 16:46:42 -0500 Subject: [PATCH 30/68] Fix stream_varnames out of bounds error --- src/cpl/share_esmf/UrbanTimeVarType.F90 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index e6ceed7173..b4bb592e91 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -288,8 +288,10 @@ subroutine urbantv_interp(this, bounds) if (stream_varnames((lun%itype(l)-6)) == stream_varnames(n)) then this%t_building_max(l) = dataptr2d(ig,n) end if - if (stream_varnames((lun%itype(l)-3)) == stream_varnames(n)) then - this%p_ac(l) = dataptr2d(ig,n) + if (urban_explicit_ac) then + if (stream_varnames((lun%itype(l)-3)) == stream_varnames(n)) then + this%p_ac(l) = dataptr2d(ig,n) + end if end if end do else From d9402b92d78b016603342dcff668ecef1435ce78 Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:00:39 -0500 Subject: [PATCH 31/68] Add missing "use" statement --- src/cpl/share_esmf/UrbanTimeVarType.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index b4bb592e91..98d1d51989 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -231,6 +231,7 @@ subroutine urbantv_interp(this, bounds) use dshr_methods_mod , only : dshr_fldbun_getfldptr use dshr_strdata_mod , only : shr_strdata_advance use shr_infnan_mod , only : nan => shr_infnan_nan, assignment(=) + use UrbanParamsType , only : urban_explicit_ac ! ! !ARGUMENTS: class(urbantv_type) :: this From a1cb4db82f7709677fa7d1311358600cfe75a05a Mon Sep 17 00:00:00 2001 From: cathyxinchangli <55264121+cathyxinchangli@users.noreply.github.com> Date: Thu, 18 Apr 2024 23:22:02 -0500 Subject: [PATCH 32/68] Trying to fix "floating invalid" error Previous commit has "floating invalid" error if I try to output P_AC as an h0 history field. After P_AC is taken out from history field, it allows I2000Clm51Sp to run without an error under DEBUG mode, but leads to "floating invalid" error for I2000Clm50Sp run after 18-20mins. --- src/cpl/share_esmf/UrbanTimeVarType.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index 98d1d51989..c8566dcc82 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -297,7 +297,8 @@ subroutine urbantv_interp(this, bounds) end do else this%t_building_max(l) = spval - this%p_ac(l) = nan ! set to nan for non-urban landunit + ! this%p_ac(l) = nan ! set to nan for non-urban landunit + this%p_ac(l) = 0._r8 end if end do deallocate(dataptr2d) From 496d0903ad5bea1c1935e93f9666450579abcfa2 Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Tue, 23 Apr 2024 08:32:34 -0600 Subject: [PATCH 33/68] Only output P_AC if urban_explicit_ac is .true. --- src/cpl/share_esmf/UrbanTimeVarType.F90 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index c8566dcc82..23e30f3909 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -89,10 +89,12 @@ subroutine Init(this, bounds, NLFilename) avgflag='A', long_name='prescribed maximum interior building temperature', & ptr_lunit=this%t_building_max, default='inactive', set_nourb=spval, & l2g_scale_type='unity') - call hist_addfld1d (fname='P_AC', units='a fraction between 0 and 1', & - avgflag='A', long_name='prescribed air-conditioning ownership rate', & - ptr_lunit=this%p_ac, default='inactive', set_nourb=spval, & - l2g_scale_type='unity') + if (urban_explicit_ac) then + call hist_addfld1d (fname='P_AC', units='a fraction between 0 and 1', & + avgflag='A', long_name='prescribed air-conditioning ownership rate', & + ptr_lunit=this%p_ac, default='inactive', set_nourb=spval, & + l2g_scale_type='unity') + end if end subroutine Init From 1ae7a195ffcf5cbfe312d9e83497c36cd97876f2 Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Tue, 23 Apr 2024 12:11:42 -0600 Subject: [PATCH 34/68] Make P_AC history output consistent with TBUILD_MAX, TSA_U, etc. and only check for valid p_ac data if urban_explicit_ac is .true. --- src/cpl/share_esmf/UrbanTimeVarType.F90 | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/cpl/share_esmf/UrbanTimeVarType.F90 b/src/cpl/share_esmf/UrbanTimeVarType.F90 index 23e30f3909..01f37da564 100644 --- a/src/cpl/share_esmf/UrbanTimeVarType.F90 +++ b/src/cpl/share_esmf/UrbanTimeVarType.F90 @@ -78,7 +78,7 @@ subroutine Init(this, bounds, NLFilename) ! Allocate urbantv data structure allocate(this%t_building_max(begl:endl)); this%t_building_max(:) = nan - allocate(this%p_ac(begl:endl)); this%p_ac(:) = 0._r8 + allocate(this%p_ac(begl:endl)); this%p_ac(:) = nan allocate(stream_varnames(stream_varname_MIN:stream_varname_MAX)) call this%urbantv_init(bounds, NLFilename) @@ -299,8 +299,7 @@ subroutine urbantv_interp(this, bounds) end do else this%t_building_max(l) = spval - ! this%p_ac(l) = nan ! set to nan for non-urban landunit - this%p_ac(l) = 0._r8 + this%p_ac(l) = spval end if end do deallocate(dataptr2d) @@ -314,8 +313,13 @@ subroutine urbantv_interp(this, bounds) ig = ig+1 if (g == lun%gridcell(l)) exit end do - if ( .not. urban_valid(g) .or. (this%t_building_max(l) <= 0._r8) & - .or. (this%p_ac(l) < 0._r8) .or. (this%p_ac(l) > 1._r8)) then ! check if AC adoption rate is outside of range 0 to 1 + ! Check for valid urban data + if ( .not. urban_valid(g) .or. (this%t_building_max(l) <= 0._r8)) then + found = .true. + gindx = g + lindx = l + exit + else if (urban_explicit_ac .and. (this%p_ac(l) < 0._r8 .or. this%p_ac(l) > 1._r8)) then found = .true. gindx = g lindx = l From dd5671a824854ab270687cf669ee96656cad2fae Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Fri, 24 May 2024 09:56:34 -0600 Subject: [PATCH 35/68] Update streams file name and global attributes --- bld/namelist_files/namelist_defaults_ctsm.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 7f9e3de6b4..4b8b7d3571 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1871,15 +1871,15 @@ lnd/clm2/surfdata_esmf/NEON/surfdata_1x1_NEON_TOOL_hist_78pfts_CMIP6_simyr2000_c lnd/clm2/urbandata/CTSM52_tbuildmax_OlesonFeddema_2020_0.9x1.25_simyr1849-2106_c200605.nc /glade/work/xinchang/02_Explicit_AC_Adoption/02_data_present_day/CTSM52_urbantv_0.9x1.25_simyr1849-2106_c20230621.nc +>/glade/work/xinchang/02_Explicit_AC_Adoption/02_data_present_day/CTSM52_urbantv_Li_2024_0.9x1.25_simyr1849-2106_c20230621.nc lnd/clm2/urbandata/CTSM52_tbuildmax_OlesonFeddema_2020_0.9x1.25_simyr1849-2106_c200605.nc /glade/work/xinchang/02_Explicit_AC_Adoption/02_data_present_day/CTSM52_urbantv_0.9x1.25_simyr1849-2106_c20230621.nc +>/glade/work/xinchang/02_Explicit_AC_Adoption/02_data_present_day/CTSM52_urbantv_Li_2024_0.9x1.25_simyr1849-2106_c20230621.nc lnd/clm2/urbandata/CLM50_tbuildmax_Oleson_2016_0.9x1.25_simyr1849-2106_c160923.nc /glade/work/xinchang/02_Explicit_AC_Adoption/02_data_present_day/CTSM52_urbantv_0.9x1.25_simyr1849-2106_c20230621.nc +>/glade/work/xinchang/02_Explicit_AC_Adoption/02_data_present_day/CTSM52_urbantv_Li_2024_0.9x1.25_simyr1849-2106_c20230621.nc lnd/clm2/urbandata/CLM45_tbuildmax_Oleson_2016_0.9x1.25_simyr1849-2106_c160923.nc From afbdcbfd8517fbe951772c39bcb1f57da2abd24d Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 3 Jun 2024 17:16:08 -0600 Subject: [PATCH 36/68] Squashed '.lib/git-fleximod/' changes from a354b0528..a34070be0 a34070be0 Bump to 0.7.6 9e5d5f72b Merge pull request #40 from ESMCI/fix/change_url 00b7b3817 some fixes when modifying url git-subtree-dir: .lib/git-fleximod git-subtree-split: a34070be02d10071b544be3839f6c9ed79662665 --- git_fleximod/cli.py | 2 +- git_fleximod/git_fleximod.py | 49 ++++++++++++++++++++---------------- git_fleximod/gitmodules.py | 2 +- pyproject.toml | 2 +- tbump.toml | 2 +- 5 files changed, 31 insertions(+), 26 deletions(-) diff --git a/git_fleximod/cli.py b/git_fleximod/cli.py index 4c3fb1a8f9..7d09abd83b 100644 --- a/git_fleximod/cli.py +++ b/git_fleximod/cli.py @@ -2,7 +2,7 @@ import argparse from git_fleximod import utils -__version__ = "0.7.5" +__version__ = "0.7.6" def find_root_dir(filename=".gitmodules"): """ finds the highest directory in tree diff --git a/git_fleximod/git_fleximod.py b/git_fleximod/git_fleximod.py index f080513a52..a003c0da8c 100755 --- a/git_fleximod/git_fleximod.py +++ b/git_fleximod/git_fleximod.py @@ -263,6 +263,21 @@ def single_submodule_checkout( return +def add_remote(git, url): + remotes = git.git_operation("remote", "-v") + newremote = "newremote.00" + if url in remotes: + for line in remotes: + if url in line and "fetch" in line: + newremote = line.split()[0] + break + else: + i = 0 + while "newremote" in remotes: + i = i + 1 + newremote = f"newremote.{i:02d}" + git.git_operation("remote", "add", newremote, url) + return newremote def submodules_status(gitmodules, root_dir, toplevel=False): testfails = 0 @@ -271,6 +286,7 @@ def submodules_status(gitmodules, root_dir, toplevel=False): for name in gitmodules.sections(): path = gitmodules.get(name, "path") tag = gitmodules.get(name, "fxtag") + url = gitmodules.get(name, "url") required = gitmodules.get(name, "fxrequired") level = required and "Toplevel" in required if not path: @@ -280,7 +296,6 @@ def submodules_status(gitmodules, root_dir, toplevel=False): if not os.path.exists(os.path.join(newpath, ".git")): rootgit = GitInterface(root_dir, logger) # submodule commands use path, not name - url = gitmodules.get(name, "url") url = url.replace("git@github.com:", "https://github.com/") tags = rootgit.git_operation("ls-remote", "--tags", url) atag = None @@ -312,11 +327,11 @@ def submodules_status(gitmodules, root_dir, toplevel=False): with utils.pushd(newpath): git = GitInterface(newpath, logger) atag = git.git_operation("describe", "--tags", "--always").rstrip() - part = git.git_operation("status").partition("\n")[0] - # fake hash to initialize - ahash = "xxxx" - if part: - ahash = part.split()[-1] + ahash = git.git_operation("rev-list", "HEAD").partition("\n")[0] + rurl = git.git_operation("ls-remote","--get-url").rstrip() + if rurl != url: + remote = add_remote(git, url) + git.git_operation("fetch", remote) if tag and atag == tag: print(f" {name:>20} at tag {tag}") elif tag and ahash[: len(tag)] == tag: @@ -335,7 +350,7 @@ def submodules_status(gitmodules, root_dir, toplevel=False): ) testfails += 1 - status = git.git_operation("status", "--ignore-submodules") + status = git.git_operation("status", "--ignore-submodules", "-uno") if "nothing to commit" not in status: localmods = localmods + 1 print("M" + textwrap.indent(status, " ")) @@ -357,11 +372,11 @@ def submodules_update(gitmodules, root_dir, requiredlist, force): path = gitmodules.get(name, "path") url = gitmodules.get(name, "url") logger.info( - "name={} path={} url={} fxtag={} requiredlist={}".format( + "name={} path={} url={} fxtag={} requiredlist={} ".format( name, os.path.join(root_dir, path), url, fxtag, requiredlist ) ) - # if not os.path.exists(os.path.join(root_dir,path, ".git")): + fxrequired = gitmodules.get(name, "fxrequired") assert fxrequired in fxrequired_allowed_values() rgit = GitInterface(root_dir, logger) @@ -409,19 +424,7 @@ def submodules_update(gitmodules, root_dir, requiredlist, force): upstream = git.git_operation("ls-remote", "--get-url").rstrip() newremote = "origin" if upstream != url: - # TODO - this needs to be a unique name - remotes = git.git_operation("remote", "-v") - if url in remotes: - for line in remotes: - if url in line and "fetch" in line: - newremote = line.split()[0] - break - else: - i = 0 - while newremote in remotes: - i = i + 1 - newremote = f"newremote.{i:02d}" - git.git_operation("remote", "add", newremote, url) + add_remote(git, url) tags = git.git_operation("tag", "-l") if fxtag and fxtag not in tags: @@ -439,6 +442,8 @@ def submodules_update(gitmodules, root_dir, requiredlist, force): print(f"{name:>20} up to date.") + + def local_mods_output(): text = """\ The submodules labeled with 'M' above are not in a clean state. diff --git a/git_fleximod/gitmodules.py b/git_fleximod/gitmodules.py index 68c82d066f..7e4e05394a 100644 --- a/git_fleximod/gitmodules.py +++ b/git_fleximod/gitmodules.py @@ -59,7 +59,7 @@ def get(self, name, option, raw=False, vars=None, fallback=None): Uses the parent class's get method to access the value. Handles potential errors if the section or option doesn't exist. """ - self.logger.debug("get called {} {}".format(name, option)) + self.logger.debug("git get called {} {}".format(name, option)) section = f'submodule "{name}"' try: return ConfigParser.get( diff --git a/pyproject.toml b/pyproject.toml index ac1684ea0f..3c70c6c9c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "git-fleximod" -version = "0.7.5" +version = "0.7.6" description = "Extended support for git-submodule and git-sparse-checkout" authors = ["Jim Edwards "] maintainers = ["Jim Edwards "] diff --git a/tbump.toml b/tbump.toml index e644fc4d24..3854682df4 100644 --- a/tbump.toml +++ b/tbump.toml @@ -2,7 +2,7 @@ github_url = "https://github.com/jedwards4b/git-fleximod/" [version] -current = "0.7.5" +current = "0.7.6" # Example of a semver regexp. # Make sure this matches current_version before From 779c9b51b15f6e0c7663df72590d4d5e36654e38 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 7 Jun 2024 12:07:37 -0600 Subject: [PATCH 37/68] Squashed '.lib/git-fleximod/' changes from a34070be0..4ff1e98de 4ff1e98de Merge tag 'v0.7.7' into tmp-release 87640adf4 Bump to 0.7.7 c124dc590 Merge pull request #43 from ESMCI/fix/root_dir 3ff935b83 update tests 0593149d3 one more improvement d95f5d61b fix status issue c304487af update complex test git-subtree-dir: .lib/git-fleximod git-subtree-split: 4ff1e98de895eb146de451e6d676ecc78d224662 --- git_fleximod/cli.py | 4 ++-- git_fleximod/git_fleximod.py | 22 +++++++++++++++++----- pyproject.toml | 2 +- tbump.toml | 2 +- tests/conftest.py | 4 ++-- tests/test_d_complex.py | 13 ++++++------- 6 files changed, 29 insertions(+), 18 deletions(-) diff --git a/git_fleximod/cli.py b/git_fleximod/cli.py index 7d09abd83b..bc099fcbc0 100644 --- a/git_fleximod/cli.py +++ b/git_fleximod/cli.py @@ -2,7 +2,7 @@ import argparse from git_fleximod import utils -__version__ = "0.7.6" +__version__ = "0.7.7" def find_root_dir(filename=".gitmodules"): """ finds the highest directory in tree @@ -21,7 +21,7 @@ def find_root_dir(filename=".gitmodules"): attempt = dl / filename if attempt.is_file(): return str(dl) - utils.fatal_error("No .gitmodules found in directory tree") + return None def get_parser(): diff --git a/git_fleximod/git_fleximod.py b/git_fleximod/git_fleximod.py index a003c0da8c..ca5f90622d 100755 --- a/git_fleximod/git_fleximod.py +++ b/git_fleximod/git_fleximod.py @@ -298,15 +298,25 @@ def submodules_status(gitmodules, root_dir, toplevel=False): # submodule commands use path, not name url = url.replace("git@github.com:", "https://github.com/") tags = rootgit.git_operation("ls-remote", "--tags", url) + result = rootgit.git_operation("submodule","status",newpath).split() + ahash = None + if result: + ahash = result[0][1:] + hhash = None atag = None needsupdate += 1 if not toplevel and level: continue for htag in tags.split("\n"): - if tag and tag in htag: + if htag.endswith('^{}'): + htag = htag[:-3] + if ahash and not atag and ahash in htag: atag = (htag.split()[1])[10:] + if tag and not hhash and htag.endswith(tag): + hhash = htag.split()[0] + if hhash and atag: break - if tag and tag == atag: + if tag and (ahash == hhash or atag == tag): print(f"e {name:>20} not checked out, aligned at tag {tag}") elif tag: ahash = rootgit.git_operation( @@ -565,10 +575,12 @@ def main(): logger.info("action is {} root_dir={} file_name={}".format(action, root_dir, file_name)) - if not os.path.isfile(os.path.join(root_dir, file_name)): - file_path = utils.find_upwards(root_dir, file_name) + if not root_dir or not os.path.isfile(os.path.join(root_dir, file_name)): + if root_dir: + file_path = utils.find_upwards(root_dir, file_name) - if file_path is None: + if root_dir is None or file_path is None: + root_dir = "." utils.fatal_error( "No {} found in {} or any of it's parents".format(file_name, root_dir) ) diff --git a/pyproject.toml b/pyproject.toml index 3c70c6c9c7..a316914bf5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "git-fleximod" -version = "0.7.6" +version = "0.7.7" description = "Extended support for git-submodule and git-sparse-checkout" authors = ["Jim Edwards "] maintainers = ["Jim Edwards "] diff --git a/tbump.toml b/tbump.toml index 3854682df4..c22637ccda 100644 --- a/tbump.toml +++ b/tbump.toml @@ -2,7 +2,7 @@ github_url = "https://github.com/jedwards4b/git-fleximod/" [version] -current = "0.7.6" +current = "0.7.7" # Example of a semver regexp. # Make sure this matches current_version before diff --git a/tests/conftest.py b/tests/conftest.py index 942a0efb97..1cc008eb1d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -32,7 +32,7 @@ def logger(): "submodule_name": "test_optional", "status1" : "test_optional MPIserial_2.5.0-3-gd82ce7c is out of sync with .gitmodules MPIserial_2.4.0", "status2" : "test_optional at tag MPIserial_2.4.0", - "status3" : "test_optional not checked out, aligned at tag MPIserial_2.4.0", + "status3" : "test_optional not checked out, out of sync at tag None, expected tag is MPIserial_2.4.0", "status4" : "test_optional at tag MPIserial_2.4.0", "gitmodules_content": """ [submodule "test_optional"] @@ -46,7 +46,7 @@ def logger(): "submodule_name": "test_alwaysoptional", "status1" : "test_alwaysoptional MPIserial_2.3.0 is out of sync with .gitmodules e5cf35c", "status2" : "test_alwaysoptional at hash e5cf35c", - "status3" : "test_alwaysoptional not checked out, out of sync at tag MPIserial_2.3.0", + "status3" : "out of sync at tag None, expected tag is e5cf35c", "status4" : "test_alwaysoptional at hash e5cf35c", "gitmodules_content": """ [submodule "test_alwaysoptional"] diff --git a/tests/test_d_complex.py b/tests/test_d_complex.py index fdce516274..edde7d816d 100644 --- a/tests/test_d_complex.py +++ b/tests/test_d_complex.py @@ -7,8 +7,8 @@ def test_complex_checkout(git_fleximod, complex_repo, logger): assert("ToplevelOptional not checked out, aligned at tag v5.3.2" in status.stdout) assert("ToplevelRequired not checked out, aligned at tag MPIserial_2.5.0" in status.stdout) assert("AlwaysRequired not checked out, aligned at tag MPIserial_2.4.0" in status.stdout) - assert("Complex not checked out, aligned at tag testtag01" in status.stdout) - assert("AlwaysOptional not checked out, aligned at tag MPIserial_2.3.0" in status.stdout) + assert("Complex not checked out, aligned at tag testtag02" in status.stdout) + assert("AlwaysOptional not checked out, out of sync at tag None, expected tag is MPIserial_2.3.0" in status.stdout) # This should checkout and update test_submodule and complex_sub result = git_fleximod(complex_repo, "update") @@ -18,7 +18,7 @@ def test_complex_checkout(git_fleximod, complex_repo, logger): assert("ToplevelOptional not checked out, aligned at tag v5.3.2" in status.stdout) assert("ToplevelRequired at tag MPIserial_2.5.0" in status.stdout) assert("AlwaysRequired at tag MPIserial_2.4.0" in status.stdout) - assert("Complex at tag testtag01" in status.stdout) + assert("Complex at tag testtag02" in status.stdout) # now check the complex_sub root = (complex_repo / "modules" / "complex") @@ -39,9 +39,8 @@ def test_complex_checkout(git_fleximod, complex_repo, logger): assert("ToplevelOptional at tag v5.3.2" in status.stdout) assert("ToplevelRequired at tag MPIserial_2.5.0" in status.stdout) assert("AlwaysRequired at tag MPIserial_2.4.0" in status.stdout) - assert("Complex at tag testtag01" in status.stdout) - assert("AlwaysOptional not checked out, aligned at tag MPIserial_2.3.0" in status.stdout) - + assert("Complex at tag testtag02" in status.stdout) + assert("AlwaysOptional not checked out, out of sync at tag None, expected tag is MPIserial_2.3.0" in status.stdout) # Finally update optional result = git_fleximod(complex_repo, "update --optional") @@ -51,7 +50,7 @@ def test_complex_checkout(git_fleximod, complex_repo, logger): assert("ToplevelOptional at tag v5.3.2" in status.stdout) assert("ToplevelRequired at tag MPIserial_2.5.0" in status.stdout) assert("AlwaysRequired at tag MPIserial_2.4.0" in status.stdout) - assert("Complex at tag testtag01" in status.stdout) + assert("Complex at tag testtag02" in status.stdout) assert("AlwaysOptional at tag MPIserial_2.3.0" in status.stdout) # now check the complex_sub From 5eadc60c32d65b359fddee5947ffed57cdc02da8 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 7 Jun 2024 13:18:22 -0600 Subject: [PATCH 38/68] Tweak the documenation a bit --- .gitignore | 4 --- README | 2 +- README_GITFLEXIMOD.rst | 31 ++++++++++--------- cime_config/testdefs/ExpectedTestFails.xml | 2 +- cime_config/testdefs/testlist_clm.xml | 2 +- .../PLUMBER2/defaults/user_nl_datm_streams | 2 +- doc/README.CHECKLIST.master_tags | 4 +-- python/ctsm/run_sys_tests.py | 6 ++-- ...st_unit_gen_mksurfdata_jobscript_single.py | 2 +- tools/mksurfdata_esmf/README.md | 2 +- 10 files changed, 28 insertions(+), 29 deletions(-) diff --git a/.gitignore b/.gitignore index a083a7853f..27823e7f54 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,3 @@ -# ignore svn directories -**/.svn/** -.svn/ - # netcdf files *.nc # but don't ignore netcdf files here: diff --git a/README b/README index 4d33638e7e..8b4e15e557 100644 --- a/README +++ b/README @@ -49,7 +49,7 @@ src --------------- CTSM Source code. lilac ------------- Lightweight Infrastructure for Land-Atmosphere Coupling (for coupling to a host atmosphere model) tools ------------- CTSM Offline tools to prepare input datasets and process output. cime_config ------- Configuration files of cime for compsets and CTSM settings -bin/git-fleximod -- Script to manage the external source directories +bin/git-fleximod -- Script to manage the needed sub-component source directories (handled with git submodule) py_env_create ----- Script to setup the python environment for CTSM python tools using conda python ------------ Python modules used in tools and testing and automated checking of ALL CTSM python scirpts diff --git a/README_GITFLEXIMOD.rst b/README_GITFLEXIMOD.rst index ab8c412cee..de6bbf392f 100644 --- a/README_GITFLEXIMOD.rst +++ b/README_GITFLEXIMOD.rst @@ -9,7 +9,7 @@ To obtain the CTSM code you need to do the following: #. Clone the repository. :: - git clone https://github.com/escomp/ctsm.git my_ctsm_sandbox + git clone https://github.com/ESCOMP/CTSM.git my_ctsm_sandbox This will create a directory ``my_ctsm_sandbox/`` in your current working directory. @@ -25,6 +25,10 @@ To obtain the CTSM code you need to do the following: Additional documentation for git-fleximod appears here: https://github.com/ESMCI/git-fleximod?tab=readme-ov-file#git-fleximod +"components" here refers to seperate git repositories for seperable parts of +the code (such as the MOSART or mizuRoute river models). Because they are +managed with "submodule" in git hereafter we will refer to them as "submodule(s)". + At this point you have a working version of CTSM. To see full details of how to set up a case, compile and run, see the CIME documentation at http://esmci.github.io/cime/ . @@ -33,19 +37,19 @@ More details on git-fleximod ---------------------------- The file **.gitmodules** in your top-level CTSM directory tells -**git-fleximod** which tag/branch of each component should be -brought in to generate your sandbox. +**git-fleximod** which tag/branch of each submodule +should be brought in to generate your sandbox. -NOTE: If you manually modify an external without updating .gitmodules, +NOTE: If you manually modify a submodule without updating .gitmodules, e.g. switch to a different tag, then rerunning git-fleximod will warn you of local changes you need to resolve. -git-fleximod will not change a modified external back to what is specified in +git-fleximod will not change a modified submodule back to what is specified in .gitmodules without the --force option. See below documentation `Customizing your CTSM sandbox`_ for more details. **You need to rerun git-fleximod whenever .gitmodules has changed** (unless you have already manually updated the relevant -external(s) to have the correct branch/tag checked out). Common times +submodule(s) to have the correct branch/tag checked out). Common times when this is needed are: * After checking out a new CTSM branch/tag @@ -74,7 +78,7 @@ changes, or if you have any ongoing CTSM cases that were created from this sandbox. In these cases, it is often easiest to do a second **git clone**. -Pointing to a different version of a component +Pointing to a different version of a submodule ---------------------------------------------- Each entry in **.gitmodules** has the following form (we use CIME as an @@ -92,11 +96,11 @@ Each entry specifies either a tag or a hash. To point to a new tag or hash: #. Modify the relevant entry/entries in **.gitmodules** (e.g., changing ``cime6.0.246`` to ``cime6.0.247`` above) -#. Checkout the new component(s):: +#. Checkout the new submodule(s):: - ./bin/git-fleximod update + ./bin/git-fleximod update -Keep in mind that changing individual components from a tag may result +Keep in mind that changing individual submodule from a tag may result in an invalid model (won't compile, won't run, not scientifically meaningful) and is unsupported. @@ -105,11 +109,10 @@ Committing your change to .gitmodules After making this change, it's a good idea to commit the change in your local CTSM git repository. First create a branch in your local -repository, then commit it. (Unlike with subversion, branches are stored -locally unless you explicitly push them up to GitHub. Feel free to -create whatever local branches you'd like.) For example:: +repository, then commit it. Feel free to create whatever local branches +you'd like in git. For example:: git checkout -b my_ctsm_branch git add .gitmodules - git commit -m "Update CIME to cime5.4.0-alpha.20" + git commit -m "Update CIME to cime6.0.247" diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index 23e481222b..8b898a0627 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -272,7 +272,7 @@ - + diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 1ac2334ba8..b40f00d5a6 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -2913,7 +2913,7 @@ - + diff --git a/cime_config/usermods_dirs/PLUMBER2/defaults/user_nl_datm_streams b/cime_config/usermods_dirs/PLUMBER2/defaults/user_nl_datm_streams index 35071ff415..29a8c675ac 100644 --- a/cime_config/usermods_dirs/PLUMBER2/defaults/user_nl_datm_streams +++ b/cime_config/usermods_dirs/PLUMBER2/defaults/user_nl_datm_streams @@ -21,7 +21,7 @@ ! foo:year_first = 1950 ! would change the stream year_first stream_entry to 1950 for the foo stream block !------------------------------------------------------------------------ -! This will come out when cdeps externals are updated +! This will come out when the cdeps submodule are updated CLM_USRDAT.PLUMBER2:datavars = ZBOT Sa_z, \ TBOT Sa_tbot, \ QBOT Sa_shum, \ diff --git a/doc/README.CHECKLIST.master_tags b/doc/README.CHECKLIST.master_tags index 0da52acaaa..51386c4238 100644 --- a/doc/README.CHECKLIST.master_tags +++ b/doc/README.CHECKLIST.master_tags @@ -14,7 +14,7 @@ https://github.com/ESCOMP/ctsm/wiki/CTSM-development-workflow 2a -- run 'git pull' to pull in the latest version from GitHub 2b -- run 'git status' and/or 'git diff' to make sure you don't have any uncommitted local changes - 2c -- run './bin/git-fleximod status' to make sure all externals are + 2c -- run './bin/git-fleximod status' to make sure all submodules are updated and don't have any uncommitted changes. If any are marked with 's' in the first column, run './bin/git-fleximod update'. @@ -26,7 +26,7 @@ https://github.com/ESCOMP/ctsm/wiki/CTSM-development-workflow $EDITOR cime_config/testdefs/ExpectedTestFails.xml 3c -- make sure you understand any changes to the baselines -- to document in ChangeLog 3d -- Check the log file for run_sys_tests (../run_sys_test.log), to make sure that - externals are correct (see 2c above) + submodules are correct (see 2c above) (4) Use diff and status to make sure any new files are in the repo and only the correct changes are on the branch diff --git a/python/ctsm/run_sys_tests.py b/python/ctsm/run_sys_tests.py index ecea2342a7..f5a7ed04dc 100644 --- a/python/ctsm/run_sys_tests.py +++ b/python/ctsm/run_sys_tests.py @@ -124,7 +124,7 @@ def run_sys_tests( cime_path (str): path to root of cime skip_testroot_creation (bool): if True, assume the testroot directory has already been created, so don't try to recreate it or re-make the link to it - skip_git_status (bool): if True, skip printing git and manage_externals status + skip_git_status (bool): if True, skip printing git and git-fleximod status dry_run (bool): if True, print commands to be run but don't run them suite_name (str): name of test suite/category to run testfile (str): path to file containing list of tests to run @@ -476,11 +476,11 @@ def _commandline_args(): parser.add_argument( "--skip-git-status", action="store_true", - help="Skip printing git and manage_externals status,\n" + help="Skip printing git and git-fleximod status,\n" "both to screen and to the SRCROOT_GIT_STATUS file in TESTROOT.\n" "This printing can often be helpful, but this option can be used to\n" "avoid extraneous output, to reduce the time needed to run this script,\n" - "or if git or manage_externals are currently broken in your sandbox.\n", + "or if git or git-fleximod are currently broken in your sandbox.\n", ) parser.add_argument( diff --git a/python/ctsm/test/test_unit_gen_mksurfdata_jobscript_single.py b/python/ctsm/test/test_unit_gen_mksurfdata_jobscript_single.py index 5038c6b3e1..8b8e2df32a 100755 --- a/python/ctsm/test/test_unit_gen_mksurfdata_jobscript_single.py +++ b/python/ctsm/test/test_unit_gen_mksurfdata_jobscript_single.py @@ -136,7 +136,7 @@ def test_simple_derecho_args(self): def test_derecho_mpirun(self): """ test derecho mpirun. This would've helped caught a problem we ran into - It will also be helpful when externals are updated to guide to solutions + It will also be helpful when sumodules are updated to guide to solutions to problems """ machine = "derecho" diff --git a/tools/mksurfdata_esmf/README.md b/tools/mksurfdata_esmf/README.md index 3d19c88ff0..a9c0b80de6 100644 --- a/tools/mksurfdata_esmf/README.md +++ b/tools/mksurfdata_esmf/README.md @@ -41,7 +41,7 @@ In addition for the build: python, bash-shell, CMake and GNU-Make are required These libraries need to be built such that they can all work together in the same executable. Hence, the above order may be required in building them. -CTSM externals that are required are: cime and ccs_config. See [Building](#building-the-executable) on getting +CTSM submodules that are required are: cime and ccs_config. See [Building](#building-the-executable) on getting those. A python environment that includes particular packages is also required we demonstrate how to use the ctsm_pylib environment that we support in CTSM. From e65c2034682afd9e5024361415c9002f8d82ca60 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 7 Jun 2024 13:49:07 -0600 Subject: [PATCH 39/68] Start the changelog --- doc/ChangeLog | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++ doc/ChangeSum | 1 + 2 files changed, 91 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index 8b6bb8f0d2..4600af34be 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,94 @@ =============================================================== +Tag name: ctsm5.2.008 +Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) +Date: Fri 07 Jun 2024 01:23:07 PM MDT +One-line Summary: Another update of git-fleximod + +Purpose and description of changes +---------------------------------- + +Just update the gitfleximod subtree to v0.7.7. This fixes an issue in identifying that a tag is out of sync in a submodule. +An issue about recursion on a submodule. Allows untracked files, and fixes a MS Window Memory error. + + +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.] + +[ ] clm6_0 + +[ ] clm5_1 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- + +List of CTSM issues fixed: + Fixes #2591 -- Start using submodule rather than external + +Notes of particular relevance for users +--------------------------------------- +Caveats for users (e.g., need to interpolate initial conditions): + doc-builder checkout seems to be required to use "git commit ." at the top level + +Changes to documentation: + Tweak some of the documentation around git-fleximod and use submodule rather than external. + +Notes of particular relevance for developers: +--------------------------------------------- +NOTE: Be sure to review the steps in README.CHECKLIST.master_tags as well as the coding style in the Developers Guide +[Remove any lines that don't apply. Remove entire section if nothing applies.] + + +Testing summary: minimual +---------------- + + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + build-namelist tests (if CLMBuildNamelist.pm has changed): + + derecho - + + python testing (if python code has changed; see instructions in python/README.md; document testing done): + + (any machine) - + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- + izumi ------- + + any other testing (give details below): + +If the tag used for baseline comparisons was NOT the previous tag, note that here: + + +Answer changes +-------------- + +Changes answers relative to baseline: No bit-for-bit + +Other details +------------- +List any git submodules updated (cime, rtm, mosart, cism, fates, etc.): + git-fleximod subtree updated + +Pull Requests that document the changes (include PR ids): + #2577 -- Update git-fleximod +(https://github.com/ESCOMP/ctsm/pull) + +=============================================================== +=============================================================== Tag name: ctsm5.2.007 Originator(s): jedwards4b (Jim Edwards, UCAR/CGD) slevis (Sam Levis, UCAR/CGD) Date: Fri 31 May 2024 13:49:29 AM MDT diff --git a/doc/ChangeSum b/doc/ChangeSum index b3f1632571..275c4a5cfa 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + ctsm5.2.008 erik 06/07/2024 Another update of git-fleximod ctsm5.2.007 multiple 05/31/2024 Rm manage_externals and update documentation accordingly ctsm5.2.006 slevis 05/28/2024 Update externals to cesm2_3_beta17, remove mct, retire /test/tools ctsm5.2.005 erik 05/13/2024 Fix clm6_0 defaults and CESM testing issues, add tests to detect these problems From c2f52d19f48f98d97183d447a77b7947b4ab3051 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 13 Jun 2024 13:02:09 -0600 Subject: [PATCH 40/68] Squashed '.lib/git-fleximod/' changes from 4ff1e98de..25ccc15de 25ccc15de Merge tag 'v0.7.8' into tmp-release 8eae7e3fb Bump to 0.7.8 34daa0657 Merge pull request #46 from ESMCI/add_optional_keyword af12c80ca fix spelling 7ea36dc44 remove manage_externals error 2ede18208 add optional to status output git-subtree-dir: .lib/git-fleximod git-subtree-split: 25ccc15de3b2e62554243300e69d44df69a65305 --- git_fleximod/cli.py | 4 ++-- git_fleximod/git_fleximod.py | 10 ++++++---- git_fleximod/utils.py | 12 ++++++------ pyproject.toml | 2 +- tbump.toml | 2 +- tests/conftest.py | 2 +- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/git_fleximod/cli.py b/git_fleximod/cli.py index bc099fcbc0..a15a226de4 100644 --- a/git_fleximod/cli.py +++ b/git_fleximod/cli.py @@ -2,7 +2,7 @@ import argparse from git_fleximod import utils -__version__ = "0.7.7" +__version__ = "0.7.8" def find_root_dir(filename=".gitmodules"): """ finds the highest directory in tree @@ -26,7 +26,7 @@ def find_root_dir(filename=".gitmodules"): def get_parser(): description = """ - %(prog)s manages checking out groups of gitsubmodules with addtional support for Earth System Models + %(prog)s manages checking out groups of gitsubmodules with additional support for Earth System Models """ parser = argparse.ArgumentParser( description=description, formatter_class=argparse.RawDescriptionHelpFormatter diff --git a/git_fleximod/git_fleximod.py b/git_fleximod/git_fleximod.py index ca5f90622d..e1b8f484a5 100755 --- a/git_fleximod/git_fleximod.py +++ b/git_fleximod/git_fleximod.py @@ -304,6 +304,7 @@ def submodules_status(gitmodules, root_dir, toplevel=False): ahash = result[0][1:] hhash = None atag = None + needsupdate += 1 if not toplevel and level: continue @@ -316,22 +317,23 @@ def submodules_status(gitmodules, root_dir, toplevel=False): hhash = htag.split()[0] if hhash and atag: break + optional = " (optional)" if required and "Optional" in required else "" if tag and (ahash == hhash or atag == tag): - print(f"e {name:>20} not checked out, aligned at tag {tag}") + print(f"e {name:>20} not checked out, aligned at tag {tag}{optional}") elif tag: ahash = rootgit.git_operation( "submodule", "status", "{}".format(path) ).rstrip() ahash = ahash[1 : len(tag) + 1] if tag == ahash: - print(f"e {name:>20} not checked out, aligned at hash {ahash}") + print(f"e {name:>20} not checked out, aligned at hash {ahash}{optional}") else: print( - f"e {name:>20} not checked out, out of sync at tag {atag}, expected tag is {tag}" + f"e {name:>20} not checked out, out of sync at tag {atag}, expected tag is {tag}{optional}" ) testfails += 1 else: - print(f"e {name:>20} has no fxtag defined in .gitmodules") + print(f"e {name:>20} has no fxtag defined in .gitmodules{optional}") testfails += 1 else: with utils.pushd(newpath): diff --git a/git_fleximod/utils.py b/git_fleximod/utils.py index 7cc1de38cc..1a2d5ccf2f 100644 --- a/git_fleximod/utils.py +++ b/git_fleximod/utils.py @@ -241,12 +241,12 @@ def _hanging_msg(working_directory, command): has taken {hanging_sec} seconds. It may be hanging. The command will continue to run, but you may want to abort -manage_externals with ^C and investigate. A possible cause of hangs is -when svn or git require authentication to access a private -repository. On some systems, svn and git requests for authentication -information will not be displayed to the user. In this case, the program -will appear to hang. Ensure you can run svn and git manually and access -all repositories without entering your authentication information. +git-fleximod with ^C and investigate. A possible cause of hangs is git +requires authentication to access a private repository. On some +systems, git requests for authentication information will not +be displayed to the user. In this case, the program will appear to +hang. Ensure you can run git manually and access all +repositories without entering your authentication information. """.format( command=command, diff --git a/pyproject.toml b/pyproject.toml index a316914bf5..5b1332549c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "git-fleximod" -version = "0.7.7" +version = "0.7.8" description = "Extended support for git-submodule and git-sparse-checkout" authors = ["Jim Edwards "] maintainers = ["Jim Edwards "] diff --git a/tbump.toml b/tbump.toml index c22637ccda..c4f7ac96ea 100644 --- a/tbump.toml +++ b/tbump.toml @@ -2,7 +2,7 @@ github_url = "https://github.com/jedwards4b/git-fleximod/" [version] -current = "0.7.7" +current = "0.7.8" # Example of a semver regexp. # Make sure this matches current_version before diff --git a/tests/conftest.py b/tests/conftest.py index 1cc008eb1d..65ee85d23d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -32,7 +32,7 @@ def logger(): "submodule_name": "test_optional", "status1" : "test_optional MPIserial_2.5.0-3-gd82ce7c is out of sync with .gitmodules MPIserial_2.4.0", "status2" : "test_optional at tag MPIserial_2.4.0", - "status3" : "test_optional not checked out, out of sync at tag None, expected tag is MPIserial_2.4.0", + "status3" : "test_optional not checked out, out of sync at tag None, expected tag is MPIserial_2.4.0 (optional)", "status4" : "test_optional at tag MPIserial_2.4.0", "gitmodules_content": """ [submodule "test_optional"] From 4deb704ebbfdb2accb099d79f58680c0f8fa4906 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 13 Jun 2024 13:14:02 -0600 Subject: [PATCH 41/68] Update changelog a bit --- doc/ChangeLog | 21 ++++++++++----------- doc/ChangeSum | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 4600af34be..984d6c1c2b 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,14 +1,15 @@ =============================================================== Tag name: ctsm5.2.008 Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) -Date: Fri 07 Jun 2024 01:23:07 PM MDT +Date: Thu 13 Jun 2024 01:13:24 PM MDT One-line Summary: Another update of git-fleximod Purpose and description of changes ---------------------------------- -Just update the gitfleximod subtree to v0.7.7. This fixes an issue in identifying that a tag is out of sync in a submodule. -An issue about recursion on a submodule. Allows untracked files, and fixes a MS Window Memory error. +Just update the gitfleximod subtree to v0.7.8. This fixes an issue in identifying that a tag is out of sync in a submodule. +An issue about recursion on a submodule. Allows untracked files, and fixes a MS Window Memory error. And +also git-fleximod status marks optional submodules, which helps explain why they are marked as not-checked out. Significant changes to scientifically-supported configurations @@ -39,7 +40,7 @@ List of CTSM issues fixed: Notes of particular relevance for users --------------------------------------- Caveats for users (e.g., need to interpolate initial conditions): - doc-builder checkout seems to be required to use "git commit ." at the top level + doc-builder checkout requires use of "git commit ." at the top level Changes to documentation: Tweak some of the documentation around git-fleximod and use submodule rather than external. @@ -50,25 +51,23 @@ NOTE: Be sure to review the steps in README.CHECKLIST.master_tags as well as the [Remove any lines that don't apply. Remove entire section if nothing applies.] -Testing summary: minimual +Testing summary: regular ---------------- [PASS means all tests PASS; OK means tests PASS other than expected fails.] build-namelist tests (if CLMBuildNamelist.pm has changed): - derecho - + derecho - PASS python testing (if python code has changed; see instructions in python/README.md; document testing done): - (any machine) - + derecho - PASS regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): - derecho ----- - izumi ------- - - any other testing (give details below): + derecho ----- OK + izumi ------- OK If the tag used for baseline comparisons was NOT the previous tag, note that here: diff --git a/doc/ChangeSum b/doc/ChangeSum index 275c4a5cfa..145279cdf6 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,6 +1,6 @@ Tag Who Date Summary ============================================================================================================================ - ctsm5.2.008 erik 06/07/2024 Another update of git-fleximod + ctsm5.2.008 erik 06/13/2024 Another update of git-fleximod ctsm5.2.007 multiple 05/31/2024 Rm manage_externals and update documentation accordingly ctsm5.2.006 slevis 05/28/2024 Update externals to cesm2_3_beta17, remove mct, retire /test/tools ctsm5.2.005 erik 05/13/2024 Fix clm6_0 defaults and CESM testing issues, add tests to detect these problems From 39798ea2b05d0d1d970b35dee0ff95f61c6e55df Mon Sep 17 00:00:00 2001 From: Sean Swenson Date: Fri, 14 Jun 2024 11:26:31 -0600 Subject: [PATCH 42/68] add hillslope_fsat_equals_zero --- bld/CLMBuildNamelist.pm | 1 + bld/namelist_files/namelist_defaults_ctsm.xml | 1 + bld/namelist_files/namelist_definition_ctsm.xml | 5 +++++ src/biogeophys/SaturatedExcessRunoffMod.F90 | 17 +++++++++++++++-- src/main/clm_varctl.F90 | 2 ++ src/main/controlMod.F90 | 7 ++++++- 6 files changed, 30 insertions(+), 3 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index f65414e4af..fbf7b9a8bc 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -3525,6 +3525,7 @@ sub setup_logic_hillslope { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'hillslope_pft_distribution_method' ); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'hillslope_soil_profile_method' ); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_hillslope_routing', 'use_hillslope'=>$nl_flags->{'use_hillslope'} ); + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'hillslope_fsat_equals_zero', 'use_hillslope'=>$nl_flags->{'use_hillslope'} ); my $use_hillslope = $nl->get_value('use_hillslope'); my $use_hillslope_routing = $nl->get_value('use_hillslope_routing'); if ( (! &value_is_true($use_hillslope)) && &value_is_true($use_hillslope_routing) ) { diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 655e97c47c..e04db59cae 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -596,6 +596,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). Standard Uniform .true. +.true. .false. diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 37c457141c..1a6a5581a8 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -828,6 +828,11 @@ Toggle to turn on meteorological downscaling in hillslope model Toggle to turn on surface water routing in the hillslope hydrology model + +If true, set fsat to zero for hillslope columns + + Method for calculating hillslope saturated head gradient diff --git a/src/biogeophys/SaturatedExcessRunoffMod.F90 b/src/biogeophys/SaturatedExcessRunoffMod.F90 index 5643a95394..9956a7dfb8 100644 --- a/src/biogeophys/SaturatedExcessRunoffMod.F90 +++ b/src/biogeophys/SaturatedExcessRunoffMod.F90 @@ -12,8 +12,8 @@ module SaturatedExcessRunoffMod use shr_log_mod , only : errMsg => shr_log_errMsg use decompMod , only : bounds_type use abortutils , only : endrun - use clm_varctl , only : iulog, use_vichydro, crop_fsat_equals_zero - use clm_varcon , only : spval + use clm_varctl , only : iulog, use_vichydro, crop_fsat_equals_zero, hillslope_fsat_equals_zero + use clm_varcon , only : spval,ispval use LandunitType , only : landunit_type use landunit_varcon , only : istcrop use ColumnType , only : column_type @@ -266,6 +266,19 @@ subroutine SaturatedExcessRunoff (this, bounds, num_hydrologyc, filter_hydrology end do endif + ! ------------------------------------------------------------------------ + ! Set fsat to zero for upland hillslope columns + ! ------------------------------------------------------------------------ + if (hillslope_fsat_equals_zero) then + do fc = 1, num_hydrologyc + c = filter_hydrologyc(fc) + if(col%is_hillslope_column(c) .and. col%active(c)) then + ! Set fsat to zero for upland columns + if (col%cold(c) /= ispval) fsat(c) = 0._r8 + endif + end do + endif + ! ------------------------------------------------------------------------ ! Compute qflx_sat_excess_surf ! diff --git a/src/main/clm_varctl.F90 b/src/main/clm_varctl.F90 index 0daedbbb1f..7423b5ad6a 100644 --- a/src/main/clm_varctl.F90 +++ b/src/main/clm_varctl.F90 @@ -414,6 +414,8 @@ module clm_varctl logical, public :: use_hillslope = .false. ! true => use multi-column hillslope hydrology logical, public :: downscale_hillslope_meteorology = .false. ! true => downscale meteorological forcing in hillslope model logical, public :: use_hillslope_routing = .false. ! true => use surface water routing in hillslope hydrology + logical, public :: hillslope_fsat_equals_zero = .false. ! set saturated excess runoff to zero for hillslope columns + !---------------------------------------------------------- ! excess ice physics switch diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90 index 46d9e9958a..cde67aa12a 100644 --- a/src/main/controlMod.F90 +++ b/src/main/controlMod.F90 @@ -270,6 +270,8 @@ subroutine control_init(dtime) namelist /clm_inparm/ use_hillslope_routing + namelist /clm_inparm/ hillslope_fsat_equals_zero + namelist /clm_inparm/ use_hydrstress namelist /clm_inparm/ use_dynroot @@ -840,6 +842,8 @@ subroutine control_spmd() call mpi_bcast (use_hillslope_routing, 1, MPI_LOGICAL, 0, mpicom, ier) + call mpi_bcast (hillslope_fsat_equals_zero, 1, MPI_LOGICAL, 0, mpicom, ier) + call mpi_bcast (use_hydrstress, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_dynroot, 1, MPI_LOGICAL, 0, mpicom, ier) @@ -1124,8 +1128,9 @@ subroutine control_print () write(iulog,*) ' land-ice albedos (unitless 0-1) = ', albice write(iulog,*) ' hillslope hydrology = ', use_hillslope - write(iulog,*) ' downscale hillslope meteorology = ', downscale_hillslope_meteorology + write(iulog,*) ' downscale hillslope meteorology = ', downscale_hillslope_meteorology write(iulog,*) ' hillslope routing = ', use_hillslope_routing + write(iulog,*) ' hillslope_fsat_equals_zero = ', hillslope_fsat_equals_zero write(iulog,*) ' pre-defined soil layer structure = ', soil_layerstruct_predefined write(iulog,*) ' user-defined soil layer structure = ', soil_layerstruct_userdefined write(iulog,*) ' user-defined number of soil layers = ', soil_layerstruct_userdefined_nlevsoi From a8f1daa14affaca9ddb21b51fe4cd49f6f1e8771 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 21 Jun 2024 09:20:45 -0600 Subject: [PATCH 43/68] Add header with notes on variables (copied from the CESM header) --- .gitmodules | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.gitmodules b/.gitmodules index 699ad22969..8a173f0ddd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,30 @@ +# This is a git submodule file with additional support for +# git-fleximod (https://github.com/ESMCI/git-fleximod) +# +# The additional flags supported by git-fleximod are +# fxtag - the tag associated with the submodule, this tag can be tested for +# consistancy with the submodule hash using git-fleximod status +# the hash can be updated to the tag using git-fleximod update +# +# fxrequired - indicates if a given submodule should be checked out on install +# submoudules can be toplevel or internal and required or optional +# toplevel means that the submodule should only be checked out if the +# module is the toplevel of the git repo (is not a submodule itself) +# internal means that the submodule is needed by the component whether +# the component is toplevel or the submodule of another repo +# required means that the submodule should always be checked out +# optional means that the submodule should only be checked out if the +# optional flag is provided to git-fleximod or the submodule name is +# explicitly listed on the git-fleximod command line. +# +# fxsparse - this is a path to a git sparse checkout file indicating that the +# submodule should be checked out in sparse mode +# +# fxDONOTUSEurl - this field is used by git-fleximod test to insure that the url is pointing +# to the official url of the repo and not to an unofficial fork. +# It is intended for use of github workflows to test commits to protected +# repository branches. +# [submodule "fates"] path = src/fates url = https://github.com/NGEET/fates From 64f1229cebd936536967a9522af703079379d7e3 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 21 Jun 2024 13:56:04 -0600 Subject: [PATCH 44/68] Add note about each fxDONOTUSEurl line --- .gitmodules | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.gitmodules b/.gitmodules index 8a173f0ddd..e437f56d61 100644 --- a/.gitmodules +++ b/.gitmodules @@ -30,6 +30,7 @@ path = src/fates url = https://github.com/NGEET/fates fxtag = sci.1.73.0_api.35.0.0 fxrequired = AlwaysRequired +# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NCAR/fates-release [submodule "cism"] @@ -37,6 +38,7 @@ path = components/cism url = https://github.com/ESCOMP/CISM-wrapper fxtag = cismwrap_2_2_001 fxrequired = ToplevelRequired +# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/CISM-wrapper [submodule "rtm"] @@ -44,6 +46,7 @@ path = components/rtm url = https://github.com/ESCOMP/RTM fxtag = rtm1_0_79 fxrequired = ToplevelRequired +# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/RTM [submodule "mosart"] @@ -51,6 +54,7 @@ path = components/mosart url = https://github.com/ESCOMP/MOSART fxtag = mosart1_0_49 fxrequired = ToplevelRequired +# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/MOSART [submodule "mizuRoute"] @@ -58,6 +62,7 @@ path = components/mizuRoute url = https://github.com/ESCOMP/mizuRoute fxtag = cesm-coupling.n02_v2.1.2 fxrequired = ToplevelRequired +# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute [submodule "ccs_config"] @@ -65,6 +70,7 @@ path = ccs_config url = https://github.com/ESMCI/ccs_config_cesm.git fxtag = ccs_config_cesm0.0.106 fxrequired = ToplevelRequired +# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git [submodule "cime"] @@ -72,6 +78,7 @@ path = cime url = https://github.com/ESMCI/cime fxtag = cime6.0.246 fxrequired = ToplevelRequired +# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESMCI/cime [submodule "cmeps"] @@ -79,6 +86,7 @@ path = components/cmeps url = https://github.com/ESCOMP/CMEPS.git fxtag = cmeps0.14.63 fxrequired = ToplevelRequired +# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git [submodule "cdeps"] @@ -86,6 +94,7 @@ path = components/cdeps url = https://github.com/ESCOMP/CDEPS.git fxtag = cdeps1.0.34 fxrequired = ToplevelRequired +# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS.git [submodule "share"] @@ -93,6 +102,7 @@ path = share url = https://github.com/ESCOMP/CESM_share fxtag = share1.0.19 fxrequired = ToplevelRequired +# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/CESM_share [submodule "mct"] @@ -100,6 +110,7 @@ path = libraries/mct url = https://github.com/MCSclimate/MCT fxtag = MCT_2.11.0 fxrequired = ToplevelRequired +# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/MCSclimate/MCT [submodule "parallelio"] @@ -107,6 +118,7 @@ path = libraries/parallelio url = https://github.com/NCAR/ParallelIO fxtag = pio2_6_2 fxrequired = ToplevelRequired +# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NCAR/ParallelIO [submodule "doc-builder"] @@ -114,4 +126,5 @@ path = doc/doc-builder url = https://github.com/ESMCI/doc-builder fxtag = v1.0.8 fxrequired = ToplevelOptional +# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESMCI/doc-builder From c2e471833dfbbb95bac1e3bf31ddf5de8d16e5f1 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 21 Jun 2024 22:23:47 -0600 Subject: [PATCH 45/68] Update change files --- doc/ChangeLog | 4 +--- doc/ChangeSum | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 4da6b9379f..c4e7ca469e 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,7 +1,7 @@ =============================================================== Tag name: tmp-240620.n02.ctsm5.2.007 Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) -Date: Thu 13 Jun 2024 01:13:24 PM MDT +Date: Fri 21 Jun 2024 10:21:01 PM MDT One-line Summary: Another update of git-fleximod Purpose and description of changes @@ -47,8 +47,6 @@ Changes to documentation: Notes of particular relevance for developers: --------------------------------------------- -NOTE: Be sure to review the steps in README.CHECKLIST.master_tags as well as the coding style in the Developers Guide -[Remove any lines that don't apply. Remove entire section if nothing applies.] Testing summary: regular diff --git a/doc/ChangeSum b/doc/ChangeSum index 029f88fe7e..0bffb18cf4 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,6 +1,6 @@ Tag Who Date Summary ============================================================================================================================ -tmp-240620.n02.ctsm5.2.007 erik 06/13/2024 Another update of git-fleximod +tmp-240620.n02.ctsm5.2.007 erik 06/21/2024 Another update of git-fleximod tmp-240620.n01.ctsm5.2.007 slevis 06/21/2024 Merge b4b-dev (full tag name is tmp-240620.n01.ctsm5.2.007) ctsm5.2.007 multiple 05/31/2024 Rm manage_externals and update documentation accordingly ctsm5.2.006 slevis 05/28/2024 Update externals to cesm2_3_beta17, remove mct, retire /test/tools From 5f5c10a30cb78b6d5b8a8c80d545ca5c980303de Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Mon, 24 Jun 2024 10:35:14 -0600 Subject: [PATCH 46/68] Turn off explicit ac for clm6_0 and clm5_1 --- bld/namelist_files/namelist_defaults_ctsm.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 4b8b7d3571..d0a45c5727 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -147,8 +147,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). NONE -.true. -.true. +.false. +.false. .false. .false. From 6f3a068cc301039ce7eb6ce98fc062f4a1257bb0 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 27 Jun 2024 14:22:32 -0600 Subject: [PATCH 47/68] Finish fsat_hillslope merge (update ChangeLog/Sum). --- doc/ChangeLog | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++ doc/ChangeSum | 1 + 2 files changed, 60 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index c4e7ca469e..05b43c20ab 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,63 @@ =============================================================== +Tag name: tmp-240620.n03.ctsm5.2.007 +Originator(s): samrabin (Sam Rabin, UCAR/TSS, samrabin@ucar.edu) +Date: Thu Jun 27 14:17:02 MDT 2024 +One-line Summary: Set upland hillslope column fsat values to zero + +Purpose and description of changes +---------------------------------- + +The topmodel-based fsat surface runoff scheme is not appropriate for upland hillslope columns, so set upland hillslope column fsat values to zero. User can revert this behavior by setting hillslope_fsat_equals_zero to false. + + +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.) + +[ ] clm6_0 + +[ ] clm5_1 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + + +Notes of particular relevance for users +--------------------------------------- + +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): +- Added parameter hillslope_fsat_equals_zero (default true). Set to false for previous behavior. + + +Testing summary: +---------------- + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- DIFF + izumi ------- DIFF + + +Answer changes +-------------- + +Changes answers relative to baseline: Yes, but only for hillslope tests. + + +Other details +------------- + +Pull Requests that document the changes (include PR ids): +- ESCOMP/CTSM#2600 (https://github.com/ESCOMP/CTSM/pull/2600) + +=============================================================== +=============================================================== Tag name: tmp-240620.n02.ctsm5.2.007 Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) Date: Fri 21 Jun 2024 10:21:01 PM MDT diff --git a/doc/ChangeSum b/doc/ChangeSum index 0bffb18cf4..7dd063df45 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ +tmp-240620.n03.ctsm5.2.007 samrabin 06/27/2024 Set upland hillslope column fsat values to zero tmp-240620.n02.ctsm5.2.007 erik 06/21/2024 Another update of git-fleximod tmp-240620.n01.ctsm5.2.007 slevis 06/21/2024 Merge b4b-dev (full tag name is tmp-240620.n01.ctsm5.2.007) ctsm5.2.007 multiple 05/31/2024 Rm manage_externals and update documentation accordingly From 35d5a5081c6b95690276f43d78e965792d7b3dd6 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 28 Jun 2024 12:26:54 -0600 Subject: [PATCH 48/68] Update Change files --- doc/ChangeLog | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++ doc/ChangeSum | 7 +++--- 2 files changed, 72 insertions(+), 3 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 05b43c20ab..2ab7676ddc 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,72 @@ =============================================================== +Tag name: ctsm5.2.008 +Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) +Date: Fri 28 Jun 2024 12:22:46 PM MDT +One-line Summary: Bring changes on temp-branch to master: b4b-dev, git-fleximod, hillslope fsat + +Purpose and description of changes +---------------------------------- + +Bring in changes that came in on the tmp-240620 branch to master now that cesm3_0_beta01 has +been made. The changes are documented in below but include the following tags: + + tmp-240620.n03.ctsm5.2.007 samrabin -- upland hillslope column fsat values to zero + tmp-240620.n02.ctsm5.2.007 erik ------ Another update of git-fleximod + tmp-240620.n01.ctsm5.2.007 slevis ---- Merge b4b-dev + +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.] + +[ ] clm6_0 + +[ ] clm5_1 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- + +Notes of particular relevance for users +--------------------------------------- + +Notes of particular relevance for developers: +--------------------------------------------- + +Testing summary: +---------------- + + build-namelist tests (if CLMBuildNamelist.pm has changed): + + derecho - PASS + + python testing (if python code has changed; see instructions in python/README.md; document testing done): + + derecho - PASS + + +Answer changes +-------------- + +Changes answers relative to baseline: No bit-for-bit with branch_tags/tmp-240620.n03.ctsm5.2.007 + +Other details +------------- + +Pull Requests that document the changes (include PR ids): +(https://github.com/ESCOMP/ctsm/pull) + +=============================================================== +=============================================================== Tag name: tmp-240620.n03.ctsm5.2.007 Originator(s): samrabin (Sam Rabin, UCAR/TSS, samrabin@ucar.edu) Date: Thu Jun 27 14:17:02 MDT 2024 diff --git a/doc/ChangeSum b/doc/ChangeSum index 7dd063df45..ea9417fe41 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,8 +1,9 @@ Tag Who Date Summary ============================================================================================================================ -tmp-240620.n03.ctsm5.2.007 samrabin 06/27/2024 Set upland hillslope column fsat values to zero -tmp-240620.n02.ctsm5.2.007 erik 06/21/2024 Another update of git-fleximod -tmp-240620.n01.ctsm5.2.007 slevis 06/21/2024 Merge b4b-dev (full tag name is tmp-240620.n01.ctsm5.2.007) + ctsm5.2.008 erik 06/28/2024 Bring changes on temp-branch to master: b4b-dev, git-fleximod, hillslope fsat +tmp-240620.n03.ctsm5.2.007 06/27/2024 Set upland hillslope column fsat values to zero (samrabin) +tmp-240620.n02.ctsm5.2.007 06/21/2024 Another update of git-fleximod (erik) +tmp-240620.n01.ctsm5.2.007 06/21/2024 Merge b4b-dev (full tag name is tmp-240620.n01.ctsm5.2.007) (slevis) ctsm5.2.007 multiple 05/31/2024 Rm manage_externals and update documentation accordingly ctsm5.2.006 slevis 05/28/2024 Update externals to cesm2_3_beta17, remove mct, retire /test/tools ctsm5.2.005 erik 05/13/2024 Fix clm6_0 defaults and CESM testing issues, add tests to detect these problems From 8ae9c3329165f8f5f63cd35a415e3ba9478d52f8 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 5 Jul 2024 13:53:49 -0600 Subject: [PATCH 49/68] Add cam7 lnd_tuning moode options and settings --- bld/namelist_files/namelist_defaults_ctsm.xml | 468 ++++++++++++++++++ .../namelist_definition_ctsm.xml | 4 +- bld/unit_testers/build-namelist_test.pl | 4 +- 3 files changed, 472 insertions(+), 4 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index e04db59cae..8656389103 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -243,18 +243,24 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >30.0d00 30.0d00 +20.0d00 20.0d00 20.0d00 20.0d00 +20.0d00 20.0d00 20.0d00 20.0d00 +20.0d00 20.0d00 0.010d00 0.010d00 +0.008d00 0.008d00 0.008d00 0.008d00 +0.008d00 0.008d00 0.008d00 0.008d00 +0.008d00 0.008d00 + + +.true. +.true. +.true. +.true. + +.true. + + +.true. + + +.true. +.true. +.true. +.true. + +.true. + + +.true. + + + +.true. +.true. +.true. +.true. + +.true. + + +.true. + @@ -701,6 +772,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). .true. .true. +.true. .true. @@ -734,6 +806,10 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.true. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. + + hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. @@ -755,6 +831,10 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. + + hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. @@ -777,6 +857,10 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >hgrid=1.9x2.5 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. @@ -800,6 +884,150 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >hgrid=1.9x2.5 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + + + +hgrid=ne120np4.pg3 maxpft=79 mask=tx0.1v3 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + + + +hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=ne0np4.ARCTIC.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + + +hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + + +hgrid=ne0np4CONUS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + + + lnd/clm2/initdata_map/clmi.I1850Clm45BgcCruGs.1101-01-01.0.9x1.25_gx1v7_simyr1850_c200806.nc +lnd/clm2/initdata_map/clmi.B1850Clm45BgcGs.0161-01-01.0.9x1.25_gx1v7_simyr1850_c200806.nc + + lnd/clm2/initdata_esmf/ctsm5.2/clmi.I1850Clm50BgcCropCru-ciso.1526-01-01.0.9x1.25_gx1v7_simyr1850_c240223.nc +lnd/clm2/initdata_map/clmi.B1850Clm50BgcCrop.0161-01-01.0.9x1.25_gx1v7_simyr1850_c200729.nc + lnd/clm2/initdata_esmf/ctsm5.2/clmi.I2000Clm50BgcCrop.2011-01-01.1.9x2.5_gx1v7_gl4_simyr2000_c240223.nc + +lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc + + lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc + + +lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc + + +lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.1.9x2.5_gx1v7_simyr1979_c200806.nc + + + +lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTIC_ne30x4_mt12_simyr1979_c200806.nc + + + +lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc + + + +lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc + + + +lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc + + +lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc + + +lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc + + + +lnd/clm2/initdata_map/clmi.BHISTSp.2000-01-01.1.9x2.5_gx1v7_simyr2003_c200807.nc + + + + +lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc + + +lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc + + +lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.1.9x2.5_gx1v7_simyr1979_c200806.nc + + + +lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTIC_ne30x4_mt12_simyr1979_c200806.nc + + + +lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc + + + +lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc + + + +lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc + + + +lnd/clm2/initdata_map/clmi.BHISTSp.2000-01-01.1.9x2.5_gx1v7_simyr2003_c200807.nc + + + + +lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc + + +lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc + + +lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.1.9x2.5_gx1v7_simyr1979_c200806.nc + + + +lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTIC_ne30x4_mt12_simyr1979_c200806.nc + + + +lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc + + + +lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc + + + +lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc + + + +lnd/clm2/initdata_map/clmi.BHISTSp.2000-01-01.1.9x2.5_gx1v7_simyr2003_c200807.nc + + + + +lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc + + @@ -1951,6 +2407,12 @@ lnd/clm2/surfdata_esmf/NEON/surfdata_1x1_NEON_TOOL_hist_78pfts_CMIP6_simyr2000_c Zender_2003 atm bilinear +lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc +lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc +lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source1x1tuned-cam4-forCLM_cdf5_c240202.nc lnd/clm2/dustemisdata/dst_source1x1tuned-cam4-forCLM_cdf5_c240202.nc +lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc +lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc +lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc - + + valid_values="clm4_5_CRUv7,clm4_5_GSWP3v1,clm4_5_cam7.0,clm4_5_cam6.0,clm4_5_cam5.0,clm4_5_cam4_0,clm5_0_cam7.0,clm5_0_cam6.0,clm5_0_cam5.0,clm5_0_cam4.0,clm5_0_CRUv7,clm5_0_GSWP3v1,clm5_1_GSWP3v1,clm5_1_CRUv7,clm5_1_cam7.0,clm5_1_cam6.0,clm5_1_cam5.0,clm5_1_cam4.0,clm6_0_GSWP3v1,clm6_0_cam7.0,clm6_0_cam6.0,clm6_0_cam5.0,clm6_0_cam4.0"> General configuration of model version and atmospheric forcing to tune the model to run under. This sets the model to run with constants and initial conditions that were set to run well under the configuration of model version and atmospheric forcing. To run well constants would need to be changed diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 53c71ae0e9..2147fdea31 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -163,7 +163,7 @@ sub cat_and_create_namelistinfile { # # Figure out number of tests that will run # -my $ntests = 3254; +my $ntests = 3278; if ( defined($opts{'compare'}) ) { $ntests += 2001; @@ -1802,7 +1802,7 @@ sub cat_and_create_namelistinfile { my $mode = "-phys $phys"; &make_config_cache($phys); my @forclist = (); - @forclist = ( "CRUv7", "GSWP3v1", "cam6.0", "cam5.0", "cam4.0" ); + @forclist = ( "CRUv7", "GSWP3v1", "cam7.0", "cam6.0", "cam5.0", "cam4.0" ); foreach my $forc ( @forclist ) { foreach my $bgc ( "sp", "bgc" ) { my $lndtuningmode = "${phys}_${forc}"; From f303264ff62cfc0f9752573a0bc404573287c787 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 5 Jul 2024 15:11:58 -0600 Subject: [PATCH 50/68] Fix cam4.0 clm4_5 lnd_tuning_mode name --- bld/namelist_files/namelist_definition_ctsm.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 02b7356b52..5e65a3a603 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -2043,7 +2043,7 @@ Land mask description + valid_values="clm4_5_CRUv7,clm4_5_GSWP3v1,clm4_5_cam7.0,clm4_5_cam6.0,clm4_5_cam5.0,clm4_5_cam4.0,clm5_0_cam7.0,clm5_0_cam6.0,clm5_0_cam5.0,clm5_0_cam4.0,clm5_0_CRUv7,clm5_0_GSWP3v1,clm5_1_GSWP3v1,clm5_1_CRUv7,clm5_1_cam7.0,clm5_1_cam6.0,clm5_1_cam5.0,clm5_1_cam4.0,clm6_0_GSWP3v1,clm6_0_cam7.0,clm6_0_cam6.0,clm6_0_cam5.0,clm6_0_cam4.0"> General configuration of model version and atmospheric forcing to tune the model to run under. This sets the model to run with constants and initial conditions that were set to run well under the configuration of model version and atmospheric forcing. To run well constants would need to be changed From 4670b6e2c3df9af6d03eb900cd0eed4877eaab59 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 5 Jul 2024 15:57:35 -0600 Subject: [PATCH 51/68] Allow a C or E to follow the period, which is needed by cesm3 all active compsets --- cime_config/config_component.xml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml index d69bdbc302..859883db8e 100644 --- a/cime_config/config_component.xml +++ b/cime_config/config_component.xml @@ -199,22 +199,22 @@ UNSET - 2010_control - 2000_control - 1850_control + 2010_control + 2000_control + 1850_control 1850_noanthro_control 1850_noanthro_control - 20thC_transient - 1850-2100_SSP5-8.5_transient - 1850-2100_SSP1-2.6_transient - 1850-2100_SSP3-7.0_transient - 1850-2100_SSP5-3.4_transient - 1850-2100_SSP2-4.5_transient + 20thC_transient + 1850-2100_SSP5-8.5_transient + 1850-2100_SSP1-2.6_transient + 1850-2100_SSP3-7.0_transient + 1850-2100_SSP5-3.4_transient + 1850-2100_SSP2-4.5_transient 1850-2100_SSP2-4.5_transient - 1850-2100_SSP1-1.9_transient - 1850-2100_SSP4-3.4_transient - 1850-2100_SSP4-6.0_transient - 1850-2100_SSP5-8.5_transient + 1850-2100_SSP1-1.9_transient + 1850-2100_SSP4-3.4_transient + 1850-2100_SSP4-6.0_transient + 1850-2100_SSP5-8.5_transient 20thC_transient 1850-2100_SSP5-8.5_transient From de689e418343c903193bbb4e0f7075a91a94dc1b Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 8 Jul 2024 11:23:22 -0600 Subject: [PATCH 52/68] Update bld/namelist_files/namelist_defaults_ctsm.xml Co-authored-by: Samuel Levis --- bld/namelist_files/namelist_defaults_ctsm.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 8656389103..e81cd6dab9 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2407,11 +2407,11 @@ lnd/clm2/surfdata_esmf/NEON/surfdata_1x1_NEON_TOOL_hist_78pfts_CMIP6_simyr2000_c Zender_2003 atm bilinear -lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc -lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc -lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc From f745c21641baa3cbabd0e2dbe5e734a237a31e22 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 8 Jul 2024 13:33:10 -0600 Subject: [PATCH 53/68] Consistency in RE and don't require a C or E Make the Regular Expressions more consistent. Don't allow the use of CLM51 for all options. Make CPLHIST CAM version depend on which CLM version is used. Make sure explicit matches for CAM60 are there. --- cime_config/config_component.xml | 68 +++++++++++++++++--------------- 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml index 859883db8e..04306c0e40 100644 --- a/cime_config/config_component.xml +++ b/cime_config/config_component.xml @@ -87,10 +87,11 @@ clm4_5_CRUv7 clm4_5_GSWP3v1 clm4_5_cam6.0 - clm4_5_cam4.0 - clm4_5_cam5.0 - clm4_5_cam7.0 - clm4_5_cam6.0 + clm4_5_cam4.0 + clm4_5_cam5.0 + clm4_5_cam6.0 + clm4_5_cam7.0 + clm4_5_cam5.0 clm4_5_QIAN clm4_5_QIAN clm4_5_1PT @@ -102,9 +103,10 @@ clm5_0_GSWP3v1 clm5_0_GSWP3v1 clm5_0_cam6.0 - clm5_0_cam4.0 - clm5_0_cam5.0 - clm5_0_cam7.0 + clm5_0_cam4.0 + clm5_0_cam5.0 + clm5_0_cam6.0 + clm5_0_cam7.0 clm5_0_cam6.0 clm5_0_QIAN clm5_0_QIAN @@ -112,22 +114,24 @@ clm5_0_NLDAS2 clm5_0_ERA5 - clm5_1_GSWP3v1 clm5_1_GSWP3v1 - clm5_1_cam6.0 - clm5_1_cam4.0 - clm5_1_cam5.0 - clm5_1_cam6.0 + INVALID_USE_CLM60_NOT_CLM51 + clm5_1_cam4.0 + clm5_1_cam5.0 + clm5_1_cam6.0 + INVALID_USE_CLM60_NOT_CLM51_FOR_CAM70 + INVALID_USE_CLM60_NOT_CLM51_FOR_CPLHIST clm6_0_CRUv7 clm6_0_CRUv7 clm6_0_GSWP3v1 clm6_0_GSWP3v1 clm6_0_cam6.0 - clm6_0_cam4.0 - clm6_0_cam5.0 - clm6_0_cam7.0 - clm6_0_cam6.0 + clm6_0_cam4.0 + clm6_0_cam5.0 + clm6_0_cam6.0 + clm6_0_cam7.0 + clm6_0_cam7.0 clm6_0_QIAN clm6_0_QIAN clm6_0_1PT @@ -199,24 +203,24 @@ UNSET - 2010_control - 2000_control - 1850_control + 2010_control + 2000_control + 1850_control 1850_noanthro_control 1850_noanthro_control - 20thC_transient - 1850-2100_SSP5-8.5_transient - 1850-2100_SSP1-2.6_transient - 1850-2100_SSP3-7.0_transient - 1850-2100_SSP5-3.4_transient - 1850-2100_SSP2-4.5_transient - 1850-2100_SSP2-4.5_transient - 1850-2100_SSP1-1.9_transient - 1850-2100_SSP4-3.4_transient - 1850-2100_SSP4-6.0_transient - 1850-2100_SSP5-8.5_transient - 20thC_transient - 1850-2100_SSP5-8.5_transient + 20thC_transient + 1850-2100_SSP5-8.5_transient + 1850-2100_SSP1-2.6_transient + 1850-2100_SSP3-7.0_transient + 1850-2100_SSP5-3.4_transient + 1850-2100_SSP2-4.5_transient + 1850-2100_SSP2-4.5_transient + 1850-2100_SSP1-1.9_transient + 1850-2100_SSP4-3.4_transient + 1850-2100_SSP4-6.0_transient + 1850-2100_SSP5-8.5_transient + 20thC_transient + 1850-2100_SSP5-8.5_transient run_component_ctsm env_run.xml From bf02a881a6e18c137e5e7917754d381d62c2b94b Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 8 Jul 2024 13:51:42 -0600 Subject: [PATCH 54/68] Change some comments to respond to @slevis-lmwg review --- bld/namelist_files/namelist_defaults_ctsm.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index e81cd6dab9..eb25cbf486 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -706,7 +706,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). maxpft="17" use_cn=".false." use_crop=".false." hgrid="ne0np4CONUS.ne30x8" >.true. .true. lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc - + lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc - + lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc - + lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc - + lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc - + lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc - + Date: Mon, 8 Jul 2024 14:07:35 -0600 Subject: [PATCH 55/68] More lines to describe the finidat sections Add some comments to talk about what kind of land tuning mode is being done for a section of finidat files. --- bld/namelist_files/namelist_defaults_ctsm.xml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index eb25cbf486..c6430bfff2 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1326,7 +1326,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). - + lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc + + lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc + lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc + - + lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc + lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc + Date: Mon, 8 Jul 2024 14:30:22 -0600 Subject: [PATCH 56/68] Update test number --- bld/unit_testers/build-namelist_test.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 2147fdea31..3464dfadef 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -166,7 +166,7 @@ sub cat_and_create_namelistinfile { my $ntests = 3278; if ( defined($opts{'compare'}) ) { - $ntests += 2001; + $ntests += 1981; } plan( tests=>$ntests ); From 7fac3e9c5c205391b0e359a4838bc48447b58240 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 8 Jul 2024 16:46:10 -0600 Subject: [PATCH 57/68] Change cam6 lnd_tuning_mode to cam7, and remove the cam7 Zender Dust tests (as Zender won't be the option for cam7) --- cime_config/testdefs/testlist_clm.xml | 79 ++++++++++--------- .../include_user_mods | 1 - .../clm60cam6LndTuningModeCiso/user_nl_clm | 5 -- .../include_user_mods | 1 - .../user_nl_clm | 3 - .../include_user_mods | 1 - .../include_user_mods | 1 - .../include_user_mods | 1 + .../shell_commands | 0 .../include_user_mods | 1 + .../shell_commands | 0 11 files changed, 42 insertions(+), 51 deletions(-) delete mode 100644 cime_config/testdefs/testmods_dirs/clm/clm60cam6LndTuningModeCiso/include_user_mods delete mode 100644 cime_config/testdefs/testmods_dirs/clm/clm60cam6LndTuningModeCiso/user_nl_clm delete mode 100644 cime_config/testdefs/testmods_dirs/clm/clm60cam6LndTuningModeZDustSoilErod/include_user_mods delete mode 100644 cime_config/testdefs/testmods_dirs/clm/clm60cam6LndTuningModeZDustSoilErod/user_nl_clm delete mode 100644 cime_config/testdefs/testmods_dirs/clm/clm60cam6LndTuningMode_1979Start/include_user_mods delete mode 100644 cime_config/testdefs/testmods_dirs/clm/clm60cam6LndTuningMode_2013Start/include_user_mods create mode 100644 cime_config/testdefs/testmods_dirs/clm/clm60cam7LndTuningMode_1979Start/include_user_mods rename cime_config/testdefs/testmods_dirs/clm/{clm60cam6LndTuningMode_1979Start => clm60cam7LndTuningMode_1979Start}/shell_commands (100%) create mode 100644 cime_config/testdefs/testmods_dirs/clm/clm60cam7LndTuningMode_2013Start/include_user_mods rename cime_config/testdefs/testmods_dirs/clm/{clm60cam6LndTuningMode_2013Start => clm60cam7LndTuningMode_2013Start}/shell_commands (100%) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 707a310f89..4b6f1dc46f 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -63,6 +63,7 @@ + @@ -80,22 +81,22 @@ - + - + - + - + @@ -109,7 +110,7 @@ - + @@ -118,7 +119,7 @@ - + @@ -127,7 +128,7 @@ - + @@ -136,7 +137,7 @@ - + @@ -145,7 +146,7 @@ - + @@ -155,7 +156,7 @@ - + @@ -182,7 +183,7 @@ - + @@ -191,7 +192,7 @@ - + @@ -200,7 +201,7 @@ - + @@ -209,7 +210,7 @@ - + @@ -218,7 +219,7 @@ - + @@ -227,7 +228,7 @@ - + @@ -236,7 +237,7 @@ - + @@ -246,7 +247,7 @@