Skip to content

Commit

Permalink
fixes the following comments: MODFLOW-USGS#1306 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
emorway-usgs committed Sep 14, 2023
1 parent 830646b commit 8ba4d6f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
15 changes: 2 additions & 13 deletions src/Model/TransportModel/tsp1adv1.f90
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ module TspAdvModule
integer(I4B), pointer :: iadvwt => null() !< advection scheme (0 up, 1 central, 2 tvd)
integer(I4B), dimension(:), pointer, contiguous :: ibound => null() !< pointer to model ibound
type(TspFmiType), pointer :: fmi => null() !< pointer to fmi object
real(DP), dimension(:), pointer, contiguous :: cpw => null() ! pointer to GWE heat capacity of water
real(DP), dimension(:), pointer, contiguous :: rhow => null() ! fixed density of water
real(DP), pointer :: eqnsclfac => null() !< governing equation scale factor; =1. for solute; =rhow*cpw for energy
real(DP), pointer :: eqnsclfac => null() !< governing equation scale factor; =1.0 for solute; =rhow*cpw for energy

contains

Expand Down Expand Up @@ -114,14 +112,12 @@ end subroutine adv_df
!!
!! Method to allocate and read static data for the ADV package.
!<
subroutine adv_ar(this, dis, ibound, cpw, rhow)
subroutine adv_ar(this, dis, ibound)
! -- modules
! -- dummy
class(TspAdvType) :: this
class(DisBaseType), pointer, intent(in) :: dis
integer(I4B), dimension(:), pointer, contiguous, intent(in) :: ibound
real(DP), dimension(:), pointer, contiguous, optional, intent(in) :: cpw
real(DP), dimension(:), pointer, contiguous, optional, intent(in) :: rhow
! -- local
! -- formats
! ------------------------------------------------------------------------------
Expand All @@ -130,10 +126,6 @@ subroutine adv_ar(this, dis, ibound, cpw, rhow)
this%dis => dis
this%ibound => ibound
!
! -- if part of a GWE simulation, need heat capacity(cpw) and density (rhow)
if (present(cpw)) this%cpw => cpw
if (present(rhow)) this%rhow => rhow
!
! -- Return
return
end subroutine adv_ar
Expand Down Expand Up @@ -165,7 +157,6 @@ subroutine adv_fc(this, nodes, matrix_sln, idxglo, cnew, rhs)
if (this%dis%con%mask(ipos) == 0) cycle
m = this%dis%con%ja(ipos)
if (this%ibound(m) == 0) cycle
!! qnm = this%fmi%gwfflowja(ipos)
qnm = this%fmi%gwfflowja(ipos) * this%eqnsclfac
omega = this%adv_weight(this%iadvwt, ipos, n, m, qnm)
call matrix_sln%add_value_pos(idxglo(ipos), qnm * (DONE - omega))
Expand Down Expand Up @@ -370,8 +361,6 @@ subroutine adv_da(this)
!
! -- nullify pointers
this%ibound => null()
nullify (this%cpw)
nullify (this%rhow)
!
! -- Scalars
call mem_deallocate(this%iadvwt)
Expand Down
2 changes: 1 addition & 1 deletion src/Model/TransportModel/tsp1ssm1.f90
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ subroutine ssm_term(this, ipackage, ientry, rrate, rhsval, hcofval, &
! -- set requested values
if (present(hcofval)) hcofval = hcoftmp
if (present(rhsval)) rhsval = rhstmp
if (present(rrate)) rrate = (hcoftmp * ctmp - rhstmp)
if (present(rrate)) rrate = hcoftmp * ctmp - rhstmp
if (present(cssm)) cssm = ctmp
if (present(qssm)) qssm = qbnd
!
Expand Down

0 comments on commit 8ba4d6f

Please sign in to comment.