Skip to content

Commit dcfe54e

Browse files
committed
touch-up budget object allocation when shf not active
1 parent 76b237b commit dcfe54e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/Model/GroundWaterEnergy/gwe-sfe.f90

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,16 @@ function sfe_get_nbudterms(this) result(nbudterms)
538538
! 4. ext-inflow
539539
! 5. ext-outflow
540540
! 6. strmbed-cond
541-
! 7. sensible heat flux
542-
nbudterms = 7
541+
nbudterms = 6
542+
! -- optional utilities
543+
! X. shortwave radiation
544+
! X. longwave radiation
545+
! X. sensible heat flux
546+
! X. latent heat
547+
if (this%inshf /= 0) then
548+
nbudterms = nbudterms + 1
549+
end if
550+
!
543551
end function sfe_get_nbudterms
544552

545553
!> @brief Set up the budget object that stores all the sfe flows

0 commit comments

Comments
 (0)