Skip to content

Commit 0f49b61

Browse files
sunt05claude
andauthored
Remove BaseTmethod parameter and always use weekday/weekend base temperatures (#749)
* refactor: remove BaseTmethod parameter and always use weekday/weekend base temperatures Removes the BaseTmethod parameter which controlled whether to use a single BaseT_HC value or separate weekday/weekend base temperatures for heating/ cooling degree day (HDD/CDD) calculations in the anthropogenic heat flux module. Changes: - Remove BaseTMethod parameter from suews_ctrl_const.f95 - Remove BaseTMethod and BaseT_HC from update_DailyState_Day subroutine - Always use weekday/weekend-specific BaseT_Heating and BaseT_Cooling arrays - Simplify HDD/CDD calculation logic by removing SELECT CASE branching This change aligns with the data model which already provides weekday/weekend base temperature profiles, and follows the removal of BaseT_HC from input files in SUEWS v2023a. Note: BaseT and BaseTe remain as separate parameters for vegetation LAI phenology calculations (growing degree days and senescence degree days). Addresses #144 * docs: deprecate BaseTMethod in documentation and update CHANGELOG (#144) - Mark BaseTMethod as deprecated in scheme_options.rst with v2025a notice - Add CHANGELOG entry for BaseTMethod removal - Update requirement from "Required" to "Optional (ignored)" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5399941 commit 0f49b61

4 files changed

Lines changed: 19 additions & 28 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@
3333

3434
## 2025
3535

36+
### 5 Dec 2025
37+
38+
- [change] Removed `BaseTMethod` parameter from HDD/CDD calculations (#144)
39+
- Model now always uses weekday/weekend-specific base temperatures (`BaseT_Heating`, `BaseT_Cooling`)
40+
- Simplifies anthropogenic heat flux calculation logic
41+
- `BaseTMethod` in legacy input files is now ignored
42+
3643
### 3 Dec 2025
3744
- [feature] Improved albedos ranges (ge=0.0 and le=1.0) in Field of Pydantic classes for alb_id, air_ssa_lw, air_ssa_sw, veg_ssa_lw, veg_ssa_sw (PR #978)
3845
- [feature] Improved ranges (ge=0.0) in Field of Pydantic classes for preciplimitalb, roof_albedo_dir_mult_fact, and ground_albedo_dir_mult_fact. (PR #978)

docs/source/inputs/tables/RunControl/scheme_options.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,17 @@ Scheme options
4646

4747
.. option:: BaseTMethod
4848

49+
.. deprecated:: v2025a
50+
51+
This option has been removed. The model now always uses weekday/weekend-specific
52+
base temperatures (``BaseT_Heating`` and ``BaseT_Cooling``) for HDD/CDD calculations.
53+
If present in legacy input files, this parameter is ignored.
54+
4955
:Requirement:
50-
Required
56+
Optional (ignored)
5157
:Description:
52-
Determines method for base temperature used in HDD/CDD calculations.
53-
:Configuration:
54-
.. csv-table::
55-
:file: csv-table/BaseTMethod.csv
56-
:header-rows: 1
57-
:widths: 10 80
58+
Previously determined method for base temperature used in HDD/CDD calculations.
59+
Now deprecated in favour of always using weekday/weekend-specific base temperatures.
5860

5961
.. option:: EmissionsMethod
6062

src/suews/src/suews_ctrl_const.f95

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,6 @@ MODULE module_ctrl_const_datain
11431143

11441144
! ---- Model options set in RunControl --------------------------------------------------------
11451145
INTEGER :: EmissionsMethod, & ! anthropogenic emissions method
1146-
BaseTMethod, & ! base temperature method for HDD/CDD calculations used in QF module
11471146
CBLuse, & !CBL slab model used (1) or not used (0)
11481147
MultipleMetFiles, & !Indicates whether a single met file is used for all grids (0) or one for each grid (1)
11491148
MultipleInitFiles, & !Indicates whether a single initial conditions file is used for all grids (0) or one for each grid (1)

src/suews/src/suews_phys_dailystate.f95

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ SUBROUTINE SUEWS_cal_DailyState( &
8383
TYPE(SUEWS_STATE), INTENT(INOUT) :: modState
8484

8585
! INTEGER :: WaterUseMethod
86-
INTEGER, PARAMETER :: BaseTMethod = 2 ! base t method [-]
87-
REAL(KIND(1D0)), PARAMETER :: BaseT_HC = 18.2 !base temperature for heating degree dayb [degC] ! to be fully removed TODO
8886

8987
! TYPE(IRRIGATION_PRM), INTENT(IN) :: irrPrm
9088
! INTEGER :: Ie_start !Starting time of water use (DOY)
@@ -504,12 +502,10 @@ SUBROUTINE SUEWS_cal_DailyState( &
504502
! regular update at all timesteps of a day
505503
IF (execute_subroutines) THEN
506504
CALL update_DailyState_Day( &
507-
BaseTMethod, &
508505
DayofWeek_id, &
509506
avkdn, & !input
510507
Tair, &
511508
Precip, &
512-
BaseT_HC, &
513509
BaseT_Heating, BaseT_Cooling, &
514510
nsh_real, &
515511
Tmin_id, Tmax_id, lenDay_id, & !inout
@@ -747,26 +743,22 @@ END SUBROUTINE SUEWS_cal_DailyState
747743
! END SUBROUTINE update_DailyState_End
748744

749745
SUBROUTINE update_DailyState_Day( &
750-
BaseTMethod, &
751746
DayofWeek_id, &
752747
avkdn, & !input
753748
Tair, &
754749
Precip, &
755-
BaseT_HC, &
756750
BaseT_Heating, BaseT_Cooling, &
757751
nsh_real, &
758752
Tmin_id, Tmax_id, lenDay_id, & !inout
759753
HDD_id) !inout
760754
! use time, only: id, id_prev_t
761755
IMPLICIT NONE
762756

763-
INTEGER, INTENT(IN) :: BaseTMethod
764757
INTEGER, DIMENSION(3), INTENT(in) :: DayofWeek_id
765758

766759
REAL(KIND(1D0)), INTENT(IN) :: avkdn
767760
REAL(KIND(1D0)), INTENT(IN) :: Tair ! Ambient air temperature [degC], this can be from either forcing or diagnostic
768761
REAL(KIND(1D0)), INTENT(IN) :: Precip
769-
REAL(KIND(1D0)), INTENT(IN) :: BaseT_HC
770762
REAL(KIND(1D0)), DIMENSION(2), INTENT(IN) :: BaseT_Heating
771763
REAL(KIND(1D0)), DIMENSION(2), INTENT(IN) :: BaseT_Cooling
772764
REAL(KIND(1D0)), INTENT(IN) :: nsh_real
@@ -794,18 +786,9 @@ SUBROUTINE update_DailyState_Day( &
794786
iu = 1 !Set to 1=weekday
795787
IF (DayofWeek_id(1) == 1 .OR. DayofWeek_id(1) == 7) iu = 2 !Set to 2=weekend
796788

797-
SELECT CASE (BaseTMethod)
798-
CASE (1)
799-
BaseT_Heating_use = BaseT_HC
800-
BaseT_Cooling_use = BaseT_HC
801-
CASE (2)
802-
BaseT_Heating_use = BaseT_Heating(iu)
803-
BaseT_Cooling_use = BaseT_Cooling(iu)
804-
805-
CASE default
806-
CALL ErrorHint(75, "RunControl.nml", -999, -999, -999)
807-
808-
END SELECT
789+
! Use weekday/weekend-specific base temperatures for heating/cooling degree day calculations
790+
BaseT_Heating_use = BaseT_Heating(iu)
791+
BaseT_Cooling_use = BaseT_Cooling(iu)
809792

810793
! Daily min and max temp (these get updated through the day) ---------------------
811794
Tmin_id = MIN(Tair, Tmin_id) !Daily min T in column 3

0 commit comments

Comments
 (0)