Skip to content

Commit 5152ff7

Browse files
committed
transfer wetted surface area to SFE
1 parent 7c0c7b9 commit 5152ff7

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

src/Model/GroundWaterEnergy/gwe-sfe.f90

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,13 +1066,18 @@ subroutine sfe_shf_term(this, ientry, n1, n2, rrate, rhsval, hcofval)
10661066
! -- local
10671067
real(DP) :: sensheat
10681068
real(DP) :: strmtemp
1069+
integer(I4B) :: auxpos
1070+
real(DP) :: sa !< surface area of stream reach, different than wetted area
10691071
!
1070-
n1 = this%flowbudptr%budterm(this%idxbudgwf)%id1(ientry)
1072+
n1 = this%flowbudptr%budterm(this%idxbudevap)%id1(ientry)
1073+
! -- For now, there is only 1 aux variable under 'EVAPORATION'
1074+
auxpos = this%flowbudptr%budterm(this%idxbudevap)%naux
1075+
sa = this%flowbudptr%budterm(this%idxbudevap)%auxvar(auxpos, ientry)
10711076
!
10721077
strmtemp = this%xnewpak(n1)
10731078
call this%shf%shf_cq(n1, strmtemp, sensheat)
10741079
!
1075-
if (present(rrate)) rrate = sensheat
1080+
if (present(rrate)) rrate = sensheat * sa
10761081
if (present(rhsval)) rhsval = -rrate
10771082
if (present(hcofval)) hcofval = DZERO
10781083
end subroutine sfe_shf_term

src/Model/GroundWaterFlow/gwf-sfr.f90

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5121,14 +5121,15 @@ subroutine sfr_setup_budobj(this)
51215121
text = ' EVAPORATION'
51225122
idx = idx + 1
51235123
maxlist = this%maxbound
5124-
naux = 0
5124+
naux = 1
5125+
auxtxt(1) = ' SURFACE-AREA'
51255126
call this%budobj%budterm(idx)%initialize(text, &
51265127
this%name_model, &
51275128
this%packName, &
51285129
this%name_model, &
51295130
this%packName, &
5130-
maxlist, .false., .false., &
5131-
naux)
5131+
maxlist, .false., .true., &
5132+
naux, auxtxt)
51325133
!
51335134
! --
51345135
text = ' RUNOFF'
@@ -5260,7 +5261,7 @@ subroutine sfr_fill_budobj(this)
52605261
real(DP) :: d
52615262
real(DP) :: ca
52625263
real(DP) :: a
5263-
real(DP) :: wp
5264+
real(DP) :: wp !< wetted perimeter
52645265
real(DP) :: l
52655266
!
52665267
! -- initialize counter
@@ -5345,11 +5346,18 @@ subroutine sfr_fill_budobj(this)
53455346
call this%budobj%budterm(idx)%reset(this%maxbound)
53465347
do n = 1, this%maxbound
53475348
if (this%iboundpak(n) /= 0) then
5349+
if (this%depth(n) > DZERO) then
5350+
a = this%calc_surface_area_wet(n, this%depth(n))
5351+
else
5352+
a = DZERO
5353+
end if
5354+
this%qauxcbc(1) = a
53485355
q = -this%simevap(n)
53495356
else
5357+
this%qauxcbc(1) = DZERO
53505358
q = DZERO
53515359
end if
5352-
call this%budobj%budterm(idx)%update_term(n, n, q)
5360+
call this%budobj%budterm(idx)%update_term(n, n, q, this%qauxcbc)
53535361
end do
53545362
!
53555363
! -- RUNOFF

0 commit comments

Comments
 (0)