diff --git a/src/Model/GroundWaterEnergy/gwe-uze.f90 b/src/Model/GroundWaterEnergy/gwe-uze.f90 index 978a5af0ca4..6a2dc89ec2f 100644 --- a/src/Model/GroundWaterEnergy/gwe-uze.f90 +++ b/src/Model/GroundWaterEnergy/gwe-uze.f90 @@ -79,6 +79,7 @@ module GweUzeModule procedure :: pak_rp_obs => uze_rp_obs procedure :: pak_bd_obs => uze_bd_obs procedure :: pak_set_stressperiod => uze_set_stressperiod + procedure :: apt_chk_aux_area => uze_chk_aux_area procedure :: bnd_ac => uze_ac procedure :: bnd_mc => uze_mc procedure :: get_mvr_depvar @@ -279,6 +280,49 @@ subroutine find_uze_package(this) this%idxbudtheq = this%flowbudptr%nbudterm + 1 end subroutine find_uze_package + subroutine uze_rp(this) + ! -- dummy + class(GweUzeType), intent(inout) :: this + ! -- local + integer(I4B) :: nuz + integer(I4B) :: idxbudgwf + integer(I4B) :: nbudterm + ! + ! Check for multiple UZF objects per cell, if found report to user + ! Determine index of 'gwf' entry in flowbudptr since the variable + ! this%idxbudgwf has not been set yet + nbudterm = this%tspapttype%flowbudptr%nbudterm + do idxbudgwf = 1, nbudterm + if (this%flowbudptr%budterm(idxbudgwf)%flowtype == ' GWF') exit + end do + nuz = this%flowbudptr%budterm(idxbudgwf)%maxlist + call this%uzarea_chk(nuz, idxbudgwf) + ! + ! -- call parent _rp routines + call this%TspAptType%bnd_rp() + end subroutine uze_rp + + !> @brief Check to ensure auxillary areas equal respective cell areas + !< + subroutine uze_chk_aux_area(this) + ! -- dummy + class(GweUzeType), intent(inout) :: this + ! -- local + integer(I4B) :: nuz + integer(I4B) :: idxbudgwf + integer(I4B) :: nbudterm + ! + ! if discrepancy in areas found, report to user + ! Determine index of 'gwf' entry in flowbudptr since the variable + ! this%idxbudgwf has not been set yet + nbudterm = this%tspapttype%flowbudptr%nbudterm + do idxbudgwf = 1, nbudterm + if (this%flowbudptr%budterm(idxbudgwf)%flowtype == ' GWF') exit + end do + nuz = this%flowbudptr%budterm(idxbudgwf)%maxlist + call this%uzarea_chk(nuz, idxbudgwf) + end subroutine uze_chk_aux_area + !> @brief Add package connection to matrix. !! !! Overrides apt_ac to fold the UZE heat balance terms into the row diff --git a/src/Model/GroundWaterFlow/gwf-uzf.f90 b/src/Model/GroundWaterFlow/gwf-uzf.f90 index 00f7910b3f7..e1d1d08664b 100644 --- a/src/Model/GroundWaterFlow/gwf-uzf.f90 +++ b/src/Model/GroundWaterFlow/gwf-uzf.f90 @@ -649,6 +649,9 @@ subroutine uzf_rp(this) integer(I4B) :: j integer(I4B) :: jj integer(I4B) :: ierr + integer(I4B) :: idxbudgwf + integer(I4B) :: nbudterm + real(DP) :: rval1 real(DP), pointer :: bndElem => null() ! -- table output character(len=20) :: cellid @@ -915,6 +918,22 @@ subroutine uzf_rp(this) ! ! -- Save old ss flag this%issflagold = this%issflag + ! + ! -- Update uzf area + if (this%iauxmultcol > 0) then + nbudterm = this%budobj%nbudterm + do idxbudgwf = 1, nbudterm + if (this%budobj%budterm(idxbudgwf)%flowtype == ' GWF') exit + end do + + do i = 1, this%nodes + if (this%noupdateauxvar(this%iauxmultcol) /= 0) cycle + this%auxvar(this%iauxmultcol, i) = this%uauxvar(this%iauxmultcol, i) + rval1 = this%uauxvar(this%iauxmultcol, i) + call this%uzfobj%setdatauzfarea(i, rval1) + this%budobj%budterm(idxbudgwf)%auxvar(1, i) = this%uzfobj%uzfarea(i) + end do + end if end subroutine uzf_rp !> @brief Advance UZF Package diff --git a/src/Model/TransportModel/tsp-apt.f90 b/src/Model/TransportModel/tsp-apt.f90 index e8f03957c34..2fc7acf9fb9 100644 --- a/src/Model/TransportModel/tsp-apt.f90 +++ b/src/Model/TransportModel/tsp-apt.f90 @@ -136,6 +136,7 @@ module TspAptModule procedure :: bnd_reset => apt_reset procedure :: bnd_fc => apt_fc procedure, public :: apt_fc_expanded ! Made public for uze + procedure, public :: apt_chk_aux_area ! Made public for uze procedure :: pak_fc_expanded procedure, private :: apt_fc_nonexpanded procedure, public :: apt_cfupdate ! Made public for uze @@ -383,6 +384,9 @@ subroutine apt_rp(this) character(len=*), parameter :: fmtlsp = & &"(1X,/1X,'REUSING ',A,'S FROM LAST STRESS PERIOD')" ! + ! -- run aux area check (for uze) + call this%apt_chk_aux_area() + ! ! -- set nbound to maxbound this%nbound = this%maxbound ! @@ -479,6 +483,12 @@ subroutine apt_rp(this) end do end subroutine apt_rp + subroutine apt_chk_aux_area(this) + ! -- dummy + class(TspAptType), intent(inout) :: this + ! function available for override by packages + end subroutine apt_chk_aux_area + !> @brief Advanced package transport set stress period routine. !! !! Set a stress period attribute for an advanced transport package feature