diff --git a/make/makefile b/make/makefile
index adffc5fe84e..0afe8256a21 100644
--- a/make/makefile
+++ b/make/makefile
@@ -206,8 +206,9 @@ $(OBJDIR)/gwf3drn8.o \
$(OBJDIR)/IndexMap.o \
$(OBJDIR)/VirtualModel.o \
$(OBJDIR)/BaseExchange.o \
-$(OBJDIR)/UzfCellGroup.o \
$(OBJDIR)/tsp1fmi1.o \
+$(OBJDIR)/TspAdvOptions.o \
+$(OBJDIR)/UzfCellGroup.o \
$(OBJDIR)/OutputControlData.o \
$(OBJDIR)/gwf3ic8.o \
$(OBJDIR)/Xt3dInterface.o \
@@ -220,6 +221,7 @@ $(OBJDIR)/ImsLinearSettings.o \
$(OBJDIR)/ConvergenceSummary.o \
$(OBJDIR)/CellWithNbrs.o \
$(OBJDIR)/NumericalExchange.o \
+$(OBJDIR)/tsp1adv1.o \
$(OBJDIR)/gwf3disv8.o \
$(OBJDIR)/gwf3disu8.o \
$(OBJDIR)/gwf3dis8.o \
@@ -231,7 +233,6 @@ $(OBJDIR)/gwt1ic1.o \
$(OBJDIR)/gwt1mst1.o \
$(OBJDIR)/GwtDspOptions.o \
$(OBJDIR)/gwf3npf8.o \
-$(OBJDIR)/GwtAdvOptions.o \
$(OBJDIR)/gwf3tvs8.o \
$(OBJDIR)/GwfStorageUtils.o \
$(OBJDIR)/Mover.o \
@@ -259,7 +260,6 @@ $(OBJDIR)/gwt1lkt1.o \
$(OBJDIR)/gwt1ist1.o \
$(OBJDIR)/gwt1dsp1.o \
$(OBJDIR)/gwt1cnc1.o \
-$(OBJDIR)/gwt1adv1.o \
$(OBJDIR)/gwf3api8.o \
$(OBJDIR)/gwf3wel8.o \
$(OBJDIR)/gwf3rch8.o \
diff --git a/msvs/mf6core.vfproj b/msvs/mf6core.vfproj
index 1a428652844..55ea9d954e8 100644
--- a/msvs/mf6core.vfproj
+++ b/msvs/mf6core.vfproj
@@ -163,7 +163,6 @@
-
@@ -196,18 +195,19 @@
-
+
+
diff --git a/src/Model/Connection/GwtInterfaceModel.f90 b/src/Model/Connection/GwtInterfaceModel.f90
index 04fab6facfe..435410a9712 100644
--- a/src/Model/Connection/GwtInterfaceModel.f90
+++ b/src/Model/Connection/GwtInterfaceModel.f90
@@ -7,8 +7,8 @@ module GwtInterfaceModelModule
use GwtModule, only: GwtModelType, CastAsGwtModel
use GwfDisuModule, only: disu_cr, CastAsDisuType
use TspFmiModule, only: fmi_cr, TspFmiType
- use GwtAdvModule, only: adv_cr, GwtAdvType
- use GwtAdvOptionsModule, only: GwtAdvOptionsType
+ use TspAdvModule, only: adv_cr, TspAdvType
+ use TspAdvOptionsModule, only: TspAdvOptionsType
use GwtDspModule, only: dsp_cr, GwtDspType
use GwtDspOptionsModule, only: GwtDspOptionsType
use GwtMstModule, only: mst_cr
@@ -123,7 +123,7 @@ subroutine gwtifmod_df(this)
class(GwtInterfaceModelType) :: this !< the GWT interface model
! local
class(*), pointer :: disPtr
- type(GwtAdvOptionsType) :: adv_options
+ type(TspAdvOptionsType) :: adv_options
type(GwtDspOptionsType) :: dsp_options
this%moffset = 0
diff --git a/src/Model/GroundWaterTransport/gwt1.f90 b/src/Model/GroundWaterTransport/gwt1.f90
index 6c34835ad4a..901ab373f1d 100644
--- a/src/Model/GroundWaterTransport/gwt1.f90
+++ b/src/Model/GroundWaterTransport/gwt1.f90
@@ -17,7 +17,6 @@ module GwtModule
use BndModule, only: BndType, AddBndToList, GetBndFromList
use GwtIcModule, only: GwtIcType
use TspFmiModule, only: TspFmiType
- use GwtAdvModule, only: GwtAdvType
use GwtDspModule, only: GwtDspType
use GwtSsmModule, only: GwtSsmType
use GwtMvtModule, only: GwtMvtType
@@ -41,7 +40,6 @@ module GwtModule
type(GwtIcType), pointer :: ic => null() ! initial conditions package
type(GwtMstType), pointer :: mst => null() ! mass storage and transfer package
- type(GwtAdvType), pointer :: adv => null() ! advection package
type(GwtDspType), pointer :: dsp => null() ! dispersion package
type(GwtSsmType), pointer :: ssm => null() ! source sink mixing package
type(GwtMvtType), pointer :: mvt => null() ! mover transport package
@@ -50,7 +48,6 @@ module GwtModule
integer(I4B), pointer :: inic => null() ! unit number IC
integer(I4B), pointer :: inmvt => null() ! unit number MVT
integer(I4B), pointer :: inmst => null() ! unit number MST
- integer(I4B), pointer :: inadv => null() ! unit number ADV
integer(I4B), pointer :: indsp => null() ! DSP enabled flag
integer(I4B), pointer :: inssm => null() ! unit number SSM
integer(I4B), pointer :: inoc => null() ! unit number OC
@@ -88,6 +85,7 @@ module GwtModule
contains
!> @brief Create a new groundwater transport model object
+ !<
subroutine gwt_cr(filename, id, modelname)
! -- modules
use ListsModule, only: basemodellist
@@ -156,7 +154,7 @@ subroutine gwt_cr(filename, id, modelname)
! -- create model packages
call this%create_packages(indis)
!
- ! -- return
+ ! -- Return
return
end subroutine gwt_cr
@@ -214,7 +212,7 @@ subroutine gwt_df(this)
! -- Store information needed for observations
call this%obs%obs_df(this%iout, this%name, 'GWT', this%dis)
!
- ! -- return
+ ! -- Return
return
end subroutine gwt_df
@@ -241,11 +239,12 @@ subroutine gwt_ac(this, sparse)
call packobj%bnd_ac(this%moffset, sparse)
end do
!
- ! -- return
+ ! -- Return
return
end subroutine gwt_ac
!> @brief Map connection positions in numerical solution coefficient matrix.
+ !<
subroutine gwt_mc(this, matrix_sln)
! -- dummy
class(GwtModelType) :: this
@@ -265,7 +264,7 @@ subroutine gwt_mc(this, matrix_sln)
call packobj%bnd_mc(this%moffset, matrix_sln)
end do
!
- ! -- return
+ ! -- Return
return
end subroutine gwt_mc
@@ -273,7 +272,6 @@ end subroutine gwt_mc
!
! (1) allocates and reads packages part of this model,
! (2) allocates memory for arrays part of this model object
- !
!<
subroutine gwt_ar(this)
! -- modules
@@ -319,7 +317,7 @@ subroutine gwt_ar(this)
call packobj%bnd_ar()
end do
!
- ! -- return
+ ! -- Return
return
end subroutine gwt_ar
@@ -405,7 +403,7 @@ subroutine gwt_ad(this)
! -- Push simulated values to preceding time/subtime step
call this%obs%obs_ad()
!
- ! -- return
+ ! -- Return
return
end subroutine gwt_ad
@@ -425,7 +423,7 @@ subroutine gwt_cf(this, kiter)
call packobj%bnd_cf()
end do
!
- ! -- return
+ ! -- Return
return
end subroutine gwt_cf
@@ -469,7 +467,7 @@ subroutine gwt_fc(this, kiter, matrix_sln, inwtflag)
call packobj%bnd_fc(this%rhs, this%ia, this%idxglo, matrix_sln)
end do
!
- ! -- return
+ ! -- Return
return
end subroutine gwt_fc
@@ -499,7 +497,7 @@ subroutine gwt_cc(this, innertot, kiter, iend, icnvgmod, cpak, ipak, dpak)
! call packobj%bnd_cc(iend, icnvg, hclose, rclose)
! enddo
!
- ! -- return
+ ! -- Return
return
end subroutine gwt_cc
@@ -554,7 +552,6 @@ end subroutine gwt_cq
!
! (1) Calculate intercell flows (flowja)
! (2) Calculate package contributions to model budget
- !
!<
subroutine gwt_bd(this, icnvg, isuppress_output)
use ConstantsModule, only: DZERO
@@ -835,10 +832,11 @@ subroutine gwt_da(this)
! -- Internal flow packages deallocate
call this%dis%dis_da()
call this%ic%ic_da()
+ call this%fmi%fmi_da()
+ call this%adv%adv_da()
call this%dsp%dsp_da()
call this%ssm%ssm_da()
call this%mst%mst_da()
- call this%adv%adv_da()
call this%mvt%mvt_da()
call this%budget%budget_da()
call this%oc%oc_da()
@@ -865,7 +863,6 @@ subroutine gwt_da(this)
!
! -- Scalars
call mem_deallocate(this%inic)
- call mem_deallocate(this%inadv)
call mem_deallocate(this%indsp)
call mem_deallocate(this%inssm)
call mem_deallocate(this%inmst)
@@ -954,7 +951,6 @@ subroutine allocate_scalars(this, modelname)
!
! -- allocate members that are part of model class
call mem_allocate(this%inic, 'INIC', this%memoryPath)
- call mem_allocate(this%inadv, 'INADV', this%memoryPath)
call mem_allocate(this%inmvt, 'INMVT', this%memoryPath)
call mem_allocate(this%inmst, 'INMST', this%memoryPath)
call mem_allocate(this%indsp, 'INDSP', this%memoryPath)
@@ -963,7 +959,6 @@ subroutine allocate_scalars(this, modelname)
call mem_allocate(this%inobs, 'INOBS', this%memoryPath)
!
this%inic = 0
- this%inadv = 0
this%inmvt = 0
this%inmst = 0
this%indsp = 0
@@ -1050,6 +1045,7 @@ subroutine package_create(this, filtyp, ipakid, ipaknum, pakname, inunit, &
end subroutine package_create
!> @brief Cast to GwtModelType
+ !<
function CastAsGwtModel(model) result(gwtmodel)
class(*), pointer :: model !< The object to be cast
class(GwtModelType), pointer :: gwtmodel !< The GWT model
@@ -1133,7 +1129,6 @@ subroutine create_gwt_packages(this, indis)
use SimVariablesModule, only: idm_context
use GwtIcModule, only: ic_cr
use GwtMstModule, only: mst_cr
- use GwtAdvModule, only: adv_cr
use GwtDspModule, only: dsp_cr
use GwtSsmModule, only: ssm_cr
use GwtMvtModule, only: mvt_cr
@@ -1185,8 +1180,6 @@ subroutine create_gwt_packages(this, indis)
this%inmvt = inunit
case ('MST6')
this%inmst = inunit
- case ('ADV6')
- this%inadv = inunit
case ('DSP6')
this%indsp = 1
mempathdsp = mempath
@@ -1208,8 +1201,6 @@ subroutine create_gwt_packages(this, indis)
! -- Create packages that are tied directly to model
call ic_cr(this%ic, this%name, this%inic, this%iout, this%dis)
call mst_cr(this%mst, this%name, this%inmst, this%iout, this%fmi)
- call adv_cr(this%adv, this%name, this%inadv, this%iout, this%fmi, &
- this%eqnsclfac)
call dsp_cr(this%dsp, this%name, mempathdsp, this%indsp, this%iout, &
this%fmi)
call ssm_cr(this%ssm, this%name, this%inssm, this%iout, this%fmi)
diff --git a/src/Model/ModelUtilities/GwtAdvOptions.f90 b/src/Model/ModelUtilities/TspAdvOptions.f90
similarity index 53%
rename from src/Model/ModelUtilities/GwtAdvOptions.f90
rename to src/Model/ModelUtilities/TspAdvOptions.f90
index 4e724a745d0..08beb0e0d80 100644
--- a/src/Model/ModelUtilities/GwtAdvOptions.f90
+++ b/src/Model/ModelUtilities/TspAdvOptions.f90
@@ -1,10 +1,10 @@
-module GwtAdvOptionsModule
+module TspAdvOptionsModule
use KindModule, only: I4B
implicit none
private
- type, public :: GwtAdvOptionsType
+ type, public :: TspAdvOptionsType
integer(I4B) :: iAdvScheme !< the advection scheme: 0 = up, 1 = central, 2 = TVD
- end type GwtAdvOptionsType
+ end type TspAdvOptionsType
-end module GwtAdvOptionsModule
+end module TspAdvOptionsModule
diff --git a/src/Model/TransportModel/tsp1.f90 b/src/Model/TransportModel/tsp1.f90
index cef33d6bb0b..124036429c8 100644
--- a/src/Model/TransportModel/tsp1.f90
+++ b/src/Model/TransportModel/tsp1.f90
@@ -12,6 +12,7 @@ module TransportModelModule
use SimVariablesModule, only: errmsg
use NumericalModelModule, only: NumericalModelType
use TspFmiModule, only: TspFmiType
+ use TspAdvModule, only: TspAdvType
use BudgetModule, only: BudgetType
use MatrixBaseModule
@@ -24,8 +25,10 @@ module TransportModelModule
type, extends(NumericalModelType) :: TransportModelType
type(TspFmiType), pointer :: fmi => null() ! flow model interface
+ type(TspAdvType), pointer :: adv => null() !< advection package
type(BudgetType), pointer :: budget => null() !< budget object
integer(I4B), pointer :: infmi => null() ! unit number FMI
+ integer(I4B), pointer :: inadv => null() !< unit number ADV
real(DP), pointer :: eqnsclfac => null() !< constant factor by which all terms in the model's governing equation are scaled (divided) for formulation and solution
! Labels that will be defined
character(len=LENVARNAME) :: tsptype = '' !< "solute" or "heat"
@@ -277,9 +280,11 @@ subroutine allocate_tsp_scalars(this, modelname)
!
! -- allocate members that are part of model class
call mem_allocate(this%infmi, 'INFMI', this%memoryPath)
+ call mem_allocate(this%inadv, 'INADV', this%memoryPath)
call mem_allocate(this%eqnsclfac, 'EQNSCLFAC', this%memoryPath)
!
this%infmi = 0
+ this%inadv = 0
this%eqnsclfac = DZERO
!
! -- Return
@@ -326,14 +331,9 @@ subroutine tsp_da(this)
class(TransportModelType) :: this
! -- local
!
- ! -- Internal flow packages deallocate
- call this%fmi%fmi_da()
- !
- ! -- Internal package objects
- deallocate (this%fmi)
- !
! -- Scalars
call mem_deallocate(this%infmi)
+ call mem_deallocate(this%inadv)
call mem_deallocate(this%eqnsclfac)
!
! -- Return
@@ -384,6 +384,8 @@ subroutine ftype_check(this, indis, inmst, inic)
return
end subroutine ftype_check
+ !> @brief Create listing output file
+ !<
subroutine create_lstfile(this, lst_fname, model_fname, defined)
! -- modules
use KindModule, only: LGP
@@ -432,7 +434,7 @@ subroutine create_lstfile(this, lst_fname, model_fname, defined)
return
end subroutine create_lstfile
- !> @brief Write model namfile options to list file
+ !> @brief Write model name file options to list file
!<
subroutine log_namfile_options(this, found)
use GwfNamInputModule, only: GwfNamParamFoundType
@@ -486,6 +488,7 @@ subroutine create_tsp_packages(this, indis)
use GwfDisvModule, only: disv_cr
use GwfDisuModule, only: disu_cr
use TspFmiModule, only: fmi_cr
+ use TspAdvModule, only: adv_cr
! -- dummy
class(TransportModelType) :: this
integer(I4B), intent(inout) :: indis ! DIS enabled flag
@@ -538,12 +541,16 @@ subroutine create_tsp_packages(this, indis)
call disu_cr(this%dis, this%name, mempath, indis, this%iout)
case ('FMI6')
this%infmi = inunit
+ case ('ADV6')
+ this%inadv = inunit
end select
end do
!
! -- Create packages that are tied directly to model
call fmi_cr(this%fmi, this%name, this%infmi, this%iout, this%eqnsclfac, &
this%depvartype)
+ call adv_cr(this%adv, this%name, this%inadv, this%iout, this%fmi, &
+ this%eqnsclfac)
!
! -- Return
return
diff --git a/src/Model/GroundWaterTransport/gwt1adv1.f90 b/src/Model/TransportModel/tsp1adv1.f90
similarity index 73%
rename from src/Model/GroundWaterTransport/gwt1adv1.f90
rename to src/Model/TransportModel/tsp1adv1.f90
index ba54de606d3..f08d61351ca 100644
--- a/src/Model/GroundWaterTransport/gwt1adv1.f90
+++ b/src/Model/TransportModel/tsp1adv1.f90
@@ -1,19 +1,19 @@
-module GwtAdvModule
+module TspAdvModule
use KindModule, only: DP, I4B
use ConstantsModule, only: DONE, DZERO, DHALF, DTWO
use NumericalPackageModule, only: NumericalPackageType
use BaseDisModule, only: DisBaseType
use TspFmiModule, only: TspFmiType
- use GwtAdvOptionsModule, only: GwtAdvOptionsType
+ use TspAdvOptionsModule, only: TspAdvOptionsType
use MatrixBaseModule
implicit none
private
- public :: GwtAdvType
+ public :: TspAdvType
public :: adv_cr
- type, extends(NumericalPackageType) :: GwtAdvType
+ type, extends(NumericalPackageType) :: TspAdvType
integer(I4B), pointer :: iadvwt => null() !< advection scheme (0 up, 1 central, 2 tvd)
integer(I4B), dimension(:), pointer, contiguous :: ibound => null() !< pointer to model ibound
@@ -35,25 +35,22 @@ module GwtAdvModule
procedure :: adv_weight
procedure :: advtvd
- end type GwtAdvType
+ end type TspAdvType
contains
+ !> @ brief Create a new ADV object
+ !!
+ !! Create a new ADV package
+ !<
subroutine adv_cr(advobj, name_model, inunit, iout, fmi, eqnsclfac)
-! ******************************************************************************
-! adv_cr -- Create a new ADV object
-! ******************************************************************************
-!
-! SPECIFICATIONS:
-! ------------------------------------------------------------------------------
! -- dummy
- type(GwtAdvType), pointer :: advobj
+ type(TspAdvType), pointer :: advobj
character(len=*), intent(in) :: name_model
integer(I4B), intent(in) :: inunit
integer(I4B), intent(in) :: iout
type(TspFmiType), intent(in), target :: fmi
real(DP), intent(in), pointer :: eqnsclfac !< governing equation scale factor
-! ------------------------------------------------------------------------------
!
! -- Create the object
allocate (advobj)
@@ -74,9 +71,14 @@ subroutine adv_cr(advobj, name_model, inunit, iout, fmi, eqnsclfac)
return
end subroutine adv_cr
+ !> @brief Define ADV object
+ !!
+ !! Define the ADV package
+ !<
subroutine adv_df(this, adv_options)
- class(GwtAdvType) :: this
- type(GwtAdvOptionsType), optional, intent(in) :: adv_options !< the optional options, for when not constructing from file
+ ! -- dummy
+ class(TspAdvType) :: this
+ type(TspAdvOptionsType), optional, intent(in) :: adv_options !< the optional options, for when not constructing from file
! -- local
character(len=*), parameter :: fmtadv = &
"(1x,/1x,'ADV-- ADVECTION PACKAGE, VERSION 1, 8/25/2017', &
@@ -104,21 +106,18 @@ subroutine adv_df(this, adv_options)
return
end subroutine adv_df
+ !> @brief Allocate and read method for package
+ !!
+ !! Method to allocate and read static data for the ADV package.
+ !<
subroutine adv_ar(this, dis, ibound)
-! ******************************************************************************
-! adv_ar -- Allocate and Read
-! ******************************************************************************
-!
-! SPECIFICATIONS:
-! ------------------------------------------------------------------------------
! -- modules
! -- dummy
- class(GwtAdvType) :: this
+ class(TspAdvType) :: this
class(DisBaseType), pointer, intent(in) :: dis
integer(I4B), dimension(:), pointer, contiguous, intent(in) :: ibound
! -- local
! -- formats
-! ------------------------------------------------------------------------------
!
! -- adv pointers to arguments that were passed in
this%dis => dis
@@ -128,16 +127,14 @@ subroutine adv_ar(this, dis, ibound)
return
end subroutine adv_ar
+ !> @brief Fill coefficient method for ADV package
+ !!
+ !! Method to calculate coefficients and fill amat and rhs.
+ !<
subroutine adv_fc(this, nodes, matrix_sln, idxglo, cnew, rhs)
-! ******************************************************************************
-! adv_fc -- Calculate coefficients and fill amat and rhs
-! ******************************************************************************
-!
-! SPECIFICATIONS:
-! ------------------------------------------------------------------------------
! -- modules
! -- dummy
- class(GwtAdvType) :: this
+ class(TspAdvType) :: this
integer, intent(in) :: nodes
class(MatrixBaseType), pointer :: matrix_sln
integer(I4B), intent(in), dimension(:) :: idxglo
@@ -146,7 +143,6 @@ subroutine adv_fc(this, nodes, matrix_sln, idxglo, cnew, rhs)
! -- local
integer(I4B) :: n, m, idiag, ipos
real(DP) :: omega, qnm
-! ------------------------------------------------------------------------------
!
! -- Calculate advection terms and add to solution rhs and hcof. qnm
! is the volumetric flow rate and has dimensions of L^/T.
@@ -176,23 +172,21 @@ subroutine adv_fc(this, nodes, matrix_sln, idxglo, cnew, rhs)
return
end subroutine adv_fc
+ !> @brief Calculate TVD
+ !!
+ !! Use explicit scheme to calculate the advective component of transport.
+ !! TVD is an acronym for Total-Variation Diminishing
+ !<
subroutine advtvd(this, n, cnew, rhs)
-! ******************************************************************************
-! advtvd -- Calculate TVD
-! ******************************************************************************
-!
-! SPECIFICATIONS:
-! ------------------------------------------------------------------------------
! -- modules
! -- dummy
- class(GwtAdvType) :: this
+ class(TspAdvType) :: this
integer(I4B), intent(in) :: n
real(DP), dimension(:), intent(in) :: cnew
real(DP), dimension(:), intent(inout) :: rhs
! -- local
real(DP) :: qtvd
integer(I4B) :: m, ipos
-! ------------------------------------------------------------------------------
!
! -- Loop through each n connection. This will
do ipos = this%dis%con%ia(n) + 1, this%dis%con%ia(n + 1) - 1
@@ -209,19 +203,18 @@ subroutine advtvd(this, n, cnew, rhs)
return
end subroutine advtvd
+ !> @brief Calculate TVD
+ !!
+ !! Use explicit scheme to calculate the advective component of transport.
+ !! TVD is an acronym for Total-Variation Diminishing
+ !<
function advqtvd(this, n, m, iposnm, cnew) result(qtvd)
-! ******************************************************************************
-! advqtvd -- Calculate TVD
-! ******************************************************************************
-!
-! SPECIFICATIONS:
-! ------------------------------------------------------------------------------
! -- modules
use ConstantsModule, only: DPREC
! -- return
real(DP) :: qtvd
! -- dummy
- class(GwtAdvType) :: this
+ class(TspAdvType) :: this
integer(I4B), intent(in) :: n
integer(I4B), intent(in) :: m
integer(I4B), intent(in) :: iposnm
@@ -230,7 +223,6 @@ function advqtvd(this, n, m, iposnm, cnew) result(qtvd)
integer(I4B) :: ipos, isympos, iup, idn, i2up, j
real(DP) :: qnm, qmax, qupj, elupdn, elup2up
real(DP) :: smooth, cdiff, alimiter
-! ------------------------------------------------------------------------------
!
! -- intialize
qtvd = DZERO
@@ -282,23 +274,18 @@ function advqtvd(this, n, m, iposnm, cnew) result(qtvd)
return
end function advqtvd
+ !> @brief Calculate advection contribution to flowja
+ !<
subroutine adv_cq(this, cnew, flowja)
-! ******************************************************************************
-! adv_cq -- Calculate advection contribution to flowja
-! ******************************************************************************
-!
-! SPECIFICATIONS:
-! ------------------------------------------------------------------------------
! -- modules
! -- dummy
- class(GwtAdvType) :: this
+ class(TspAdvType) :: this
real(DP), intent(in), dimension(:) :: cnew
real(DP), intent(inout), dimension(:) :: flowja
! -- local
integer(I4B) :: nodes
integer(I4B) :: n, m, idiag, ipos
real(DP) :: omega, qnm
-! ------------------------------------------------------------------------------
!
! -- Calculate advection and add to flowja. qnm is the volumetric flow
! rate and has dimensions of L^/T.
@@ -323,22 +310,16 @@ subroutine adv_cq(this, cnew, flowja)
return
end subroutine adv_cq
+ !> @brief Add TVD contribution to flowja
subroutine advtvd_bd(this, cnew, flowja)
-! ******************************************************************************
-! advtvd_bd -- Add TVD contribution to flowja
-! ******************************************************************************
-!
-! SPECIFICATIONS:
-! ------------------------------------------------------------------------------
! -- modules
! -- dummy
- class(GwtAdvType) :: this
+ class(TspAdvType) :: this
real(DP), dimension(:), intent(in) :: cnew
real(DP), dimension(:), intent(inout) :: flowja
! -- local
real(DP) :: qtvd, qnm
integer(I4B) :: nodes, n, m, ipos
-! ------------------------------------------------------------------------------
!
nodes = this%dis%nodes
do n = 1, nodes
@@ -357,18 +338,13 @@ subroutine advtvd_bd(this, cnew, flowja)
return
end subroutine advtvd_bd
+ !> @brief Deallocate memory
+ !<
subroutine adv_da(this)
-! ******************************************************************************
-! adv_da -- Deallocate variables
-! ******************************************************************************
-!
-! SPECIFICATIONS:
-! ------------------------------------------------------------------------------
! -- modules
use MemoryManagerModule, only: mem_deallocate
! -- dummy
- class(GwtAdvType) :: this
-! ------------------------------------------------------------------------------
+ class(TspAdvType) :: this
!
! -- Deallocate arrays if package was active
if (this%inunit > 0) then
@@ -387,17 +363,14 @@ subroutine adv_da(this)
return
end subroutine adv_da
+ !> @brief Allocate scalars specific to the streamflow energy transport (SFE)
+ !! package.
+ !<
subroutine allocate_scalars(this)
-! ******************************************************************************
-! allocate_scalars
-! ******************************************************************************
-!
-! SPECIFICATIONS:
-! ------------------------------------------------------------------------------
! -- modules
use MemoryManagerModule, only: mem_allocate, mem_setptr
! -- dummy
- class(GwtAdvType) :: this
+ class(TspAdvType) :: this
! -- local
! ------------------------------------------------------------------------------
!
@@ -417,18 +390,16 @@ subroutine allocate_scalars(this)
return
end subroutine allocate_scalars
+ !> @brief Read options
+ !!
+ !! Read the options block
+ !<
subroutine read_options(this)
-! ******************************************************************************
-! read_options -- Allocate and Read
-! ******************************************************************************
-!
-! SPECIFICATIONS:
-! ------------------------------------------------------------------------------
! -- modules
use ConstantsModule, only: LINELENGTH
use SimModule, only: store_error
! -- dummy
- class(GwtAdvType) :: this
+ class(TspAdvType) :: this
! -- local
character(len=LINELENGTH) :: errmsg, keyword
integer(I4B) :: ierr
@@ -436,7 +407,6 @@ subroutine read_options(this)
! -- formats
character(len=*), parameter :: fmtiadvwt = &
&"(4x,'ADVECTION WEIGHTING SCHEME HAS BEEN SET TO: ', a)"
-! ------------------------------------------------------------------------------
!
! -- get options block
call this%parser%GetBlock('OPTIONS', isfound, ierr, blockRequired=.false., &
@@ -484,17 +454,15 @@ subroutine read_options(this)
return
end subroutine read_options
+ !> @ brief Advection weight
+ !!
+ !! Calculate the advection weight
+ !<
function adv_weight(this, iadvwt, ipos, n, m, qnm) result(omega)
-! ******************************************************************************
-! adv_weight -- calculate advection weight
-! ******************************************************************************
-!
-! SPECIFICATIONS:
-! ------------------------------------------------------------------------------
! -- return
real(DP) :: omega
! -- dummy
- class(GwtAdvType) :: this
+ class(TspAdvType) :: this
integer, intent(in) :: iadvwt
integer, intent(in) :: ipos
integer, intent(in) :: n
@@ -530,4 +498,4 @@ function adv_weight(this, iadvwt, ipos, n, m, qnm) result(omega)
return
end function adv_weight
-end module GwtAdvModule
+end module TspAdvModule
diff --git a/src/meson.build b/src/meson.build
index e6f28bdb05e..6b84eab5c8f 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -90,7 +90,6 @@ modflow_sources = files(
'Model' / 'GroundWaterFlow' / 'gwf3wel8.f90',
'Model' / 'GroundWaterFlow' / 'gwf3wel8idm.f90',
'Model' / 'GroundWaterTransport' / 'gwt1.f90',
- 'Model' / 'GroundWaterTransport' / 'gwt1adv1.f90',
'Model' / 'GroundWaterTransport' / 'gwt1apt1.f90',
'Model' / 'GroundWaterTransport' / 'gwt1cnc1.f90',
'Model' / 'GroundWaterTransport' / 'gwt1dis1idm.f90',
@@ -122,17 +121,18 @@ modflow_sources = files(
'Model' / 'ModelUtilities' / 'GwfNpfOptions.f90',
'Model' / 'ModelUtilities' / 'GwfStorageUtils.f90',
'Model' / 'ModelUtilities' / 'GwfVscInputData.f90',
- 'Model' / 'ModelUtilities' / 'GwtAdvOptions.f90',
'Model' / 'ModelUtilities' / 'GwtDspOptions.f90',
'Model' / 'ModelUtilities' / 'GwtSpc.f90',
'Model' / 'ModelUtilities' / 'Mover.f90',
'Model' / 'ModelUtilities' / 'PackageMover.f90',
'Model' / 'ModelUtilities' / 'SfrCrossSectionManager.f90',
'Model' / 'ModelUtilities' / 'SfrCrossSectionUtils.f90',
+ 'Model' / 'ModelUtilities' / 'TspAdvOptions.f90',
'Model' / 'ModelUtilities' / 'UzfCellGroup.f90',
'Model' / 'ModelUtilities' / 'Xt3dAlgorithm.f90',
'Model' / 'ModelUtilities' / 'Xt3dInterface.f90',
'Model' / 'TransportModel' / 'tsp1.f90',
+ 'Model' / 'TransportModel' / 'tsp1adv1.f90',
'Model' / 'TransportModel' / 'tsp1fmi1.f90',
'Model' / 'BaseModel.f90',
'Model' / 'ExplicitModel.f90',