Skip to content

Commit

Permalink
Merge pull request #267 from UMEP-dev/sunt05/issue266
Browse files Browse the repository at this point in the history
SUEWS-SS with same building fractions won't run
  • Loading branch information
sunt05 authored Jun 9, 2024
2 parents 32ef24a + dec3f1f commit a34a6fb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/suews/src/suews_ctrl_driver.f95
Original file line number Diff line number Diff line change
Expand Up @@ -9850,7 +9850,10 @@ SUBROUTINE SUEWS_cal_surf_DTS( &
! get individual building fractions of each layer
! NB.: sum(sfr_roof) = building_frac(1)
sfr_roof = 0.
IF (nlayer > 1) sfr_roof(1:nlayer - 1) = building_frac(1:nlayer - 1) - building_frac(2:nlayer)
IF (nlayer > 1) sfr_roof(1:nlayer - 1) = &
MAX( &
building_frac(1:nlayer - 1) - building_frac(2:nlayer), &
0.01) ! minimum value for sfr_roof to avoid zero fractions when adjacent layers have the same building fraction
sfr_roof(nlayer) = building_frac(nlayer)

! get individual net building height of each layer
Expand Down

0 comments on commit a34a6fb

Please sign in to comment.