Skip to content

Commit

Permalink
feat(gwt1cnc1idm.f90): add IDM support for CNC (MODFLOW-USGS#1413)
Browse files Browse the repository at this point in the history
* feat(gwt1cnc1idm.f90): add IDM support for CNC

* address errors

* remove errant line

* Add new function that accounts for auxiliary multiplier > 0 in response to MODFLOW-USGS#1413 (comment)

* fprettify

* change made in response to
MODFLOW-USGS#1413 (comment)
MODFLOW-USGS#1413 (comment)
MODFLOW-USGS#1413 (comment)
  • Loading branch information
emorway-usgs authored Nov 3, 2023
1 parent dea7cf7 commit d40522f
Show file tree
Hide file tree
Showing 9 changed files with 680 additions and 170 deletions.
7 changes: 7 additions & 0 deletions doc/mf6io/mf6ivar/dfn/gwt-cnc.dfn
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# --------------------- gwt cnc options ---------------------
# flopy multi-package

block options
name auxiliary
Expand Down Expand Up @@ -34,6 +35,7 @@ reader urword
optional true
longname print input to listing file
description REPLACE print_input {'{#1}': 'constant concentration'}
mf6internal iprflow

block options
name print_flows
Expand All @@ -42,6 +44,7 @@ reader urword
optional true
longname print calculated flows to listing file
description REPLACE print_flows {'{#1}': 'constant concentration'}
mf6internal ipakcb

block options
name save_flows
Expand All @@ -50,6 +53,7 @@ reader urword
optional true
longname save constant concentration flows to budget file
description REPLACE save_flows {'{#1}': 'constant concentration'}
mf6internal iprpak

block options
name ts_filerecord
Expand Down Expand Up @@ -160,6 +164,7 @@ shape (maxbound)
reader urword
longname
description
mf6internal spd

block period
name cellid
Expand All @@ -181,6 +186,7 @@ reader urword
time_series true
longname constant concentration value
description is the constant concentration value. If the Options block includes a TIMESERIESFILE entry (see the ``Time-Variable Input'' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.
mf6internal tspvar

block period
name aux
Expand All @@ -193,6 +199,7 @@ optional true
time_series true
longname auxiliary variables
description REPLACE aux {'{#1}': 'constant concentration'}
mf6internal auxvar

block period
name boundname
Expand Down
67 changes: 34 additions & 33 deletions make/makefile
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
# makefile created by pymake (version 1.2.9.dev0) for the 'mf6' executable.
# makefile created by pymake (version 1.2.7) for the 'mf6' executable.


include ./makedefaults

# Define the source file directories
SOURCEDIR1=../src
SOURCEDIR2=../src/Exchange
SOURCEDIR3=../src/Distributed
SOURCEDIR4=../src/Solution
SOURCEDIR5=../src/Solution/LinearMethods
SOURCEDIR6=../src/Solution/ParticleTracker
SOURCEDIR7=../src/Solution/PETSc
SOURCEDIR8=../src/Timing
SOURCEDIR9=../src/Utilities
SOURCEDIR10=../src/Utilities/Idm
SOURCEDIR11=../src/Utilities/Idm/selector
SOURCEDIR12=../src/Utilities/Idm/mf6blockfile
SOURCEDIR13=../src/Utilities/TimeSeries
SOURCEDIR14=../src/Utilities/Memory
SOURCEDIR15=../src/Utilities/OutputControl
SOURCEDIR16=../src/Utilities/ArrayRead
SOURCEDIR17=../src/Utilities/Libraries
SOURCEDIR18=../src/Utilities/Libraries/rcm
SOURCEDIR19=../src/Utilities/Libraries/blas
SOURCEDIR20=../src/Utilities/Libraries/sparskit2
SOURCEDIR21=../src/Utilities/Libraries/daglib
SOURCEDIR22=../src/Utilities/Libraries/sparsekit
SOURCEDIR23=../src/Utilities/Vector
SOURCEDIR24=../src/Utilities/Matrix
SOURCEDIR25=../src/Utilities/Observation
SOURCEDIR26=../src/Model
SOURCEDIR27=../src/Model/Connection
SOURCEDIR28=../src/Model/GroundWaterTransport
SOURCEDIR29=../src/Model/ModelUtilities
SOURCEDIR30=../src/Model/GroundWaterFlow
SOURCEDIR31=../src/Model/TransportModel
SOURCEDIR32=../src/Model/Geometry
SOURCEDIR2=../src/Distributed
SOURCEDIR3=../src/Exchange
SOURCEDIR4=../src/Model
SOURCEDIR5=../src/Model/Connection
SOURCEDIR6=../src/Model/Geometry
SOURCEDIR7=../src/Model/GroundWaterFlow
SOURCEDIR8=../src/Model/GroundWaterTransport
SOURCEDIR9=../src/Model/ModelUtilities
SOURCEDIR10=../src/Model/TransportModel
SOURCEDIR11=../src/Solution
SOURCEDIR12=../src/Solution/LinearMethods
SOURCEDIR13=../src/Solution/ParticleTracker
SOURCEDIR14=../src/Solution/PETSc
SOURCEDIR15=../src/Timing
SOURCEDIR16=../src/Utilities
SOURCEDIR17=../src/Utilities/ArrayRead
SOURCEDIR18=../src/Utilities/Idm
SOURCEDIR19=../src/Utilities/Idm/mf6blockfile
SOURCEDIR20=../src/Utilities/Idm/selector
SOURCEDIR21=../src/Utilities/Libraries
SOURCEDIR22=../src/Utilities/Libraries/blas
SOURCEDIR23=../src/Utilities/Libraries/daglib
SOURCEDIR24=../src/Utilities/Libraries/rcm
SOURCEDIR25=../src/Utilities/Libraries/sparsekit
SOURCEDIR26=../src/Utilities/Libraries/sparskit2
SOURCEDIR27=../src/Utilities/Matrix
SOURCEDIR28=../src/Utilities/Memory
SOURCEDIR29=../src/Utilities/Observation
SOURCEDIR30=../src/Utilities/OutputControl
SOURCEDIR31=../src/Utilities/TimeSeries
SOURCEDIR32=../src/Utilities/Vector

VPATH = \
${SOURCEDIR1} \
Expand Down Expand Up @@ -69,7 +69,7 @@ ${SOURCEDIR28} \
${SOURCEDIR29} \
${SOURCEDIR30} \
${SOURCEDIR31} \
${SOURCEDIR32}
$(SOURCEDIR32)

.SUFFIXES: .f90 .F90 .o

Expand Down Expand Up @@ -102,6 +102,7 @@ $(OBJDIR)/gwt1dsp1idm.o \
$(OBJDIR)/gwt1disv1idm.o \
$(OBJDIR)/gwt1disu1idm.o \
$(OBJDIR)/gwt1dis1idm.o \
$(OBJDIR)/gwt1cnc1idm.o \
$(OBJDIR)/gwf3wel8idm.o \
$(OBJDIR)/gwf3riv8idm.o \
$(OBJDIR)/gwf3rch8idm.o \
Expand Down
1 change: 1 addition & 0 deletions msvs/mf6core.vfproj
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1apt1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1cnc1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1cnc1idm.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1dis1idm.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1disu1idm.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1disv1idm.f90"/>
Expand Down
12 changes: 7 additions & 5 deletions src/Model/GroundWaterTransport/gwt1.f90
Original file line number Diff line number Diff line change
Expand Up @@ -756,8 +756,8 @@ end subroutine allocate_scalars
!!
!! Call the package create routines for packages activated by the user.
!<
subroutine package_create(this, filtyp, ipakid, ipaknum, pakname, inunit, &
iout)
subroutine package_create(this, filtyp, ipakid, ipaknum, pakname, mempath, &
inunit, iout)
! -- modules
use ConstantsModule, only: LINELENGTH
use SimModule, only: store_error
Expand All @@ -776,6 +776,7 @@ subroutine package_create(this, filtyp, ipakid, ipaknum, pakname, inunit, &
integer(I4B), intent(in) :: ipakid
integer(I4B), intent(in) :: ipaknum
character(len=*), intent(in) :: pakname
character(len=*), intent(in) :: mempath
integer(I4B), intent(in) :: inunit
integer(I4B), intent(in) :: iout
! -- local
Expand All @@ -786,7 +787,8 @@ subroutine package_create(this, filtyp, ipakid, ipaknum, pakname, inunit, &
! -- This part creates the package object
select case (filtyp)
case ('CNC6')
call cnc_create(packobj, ipakid, ipaknum, inunit, iout, this%name, pakname)
call cnc_create(packobj, ipakid, ipaknum, inunit, iout, this%name, &
pakname, dvt, mempath)
case ('SRC6')
call src_create(packobj, ipakid, ipaknum, inunit, iout, this%name, pakname)
case ('LKT6')
Expand Down Expand Up @@ -888,8 +890,8 @@ subroutine create_bndpkgs(this, bndpkgs, pkgtypes, pkgnames, &
bndptype = pkgtype
end if
!
call this%package_create(pkgtype, ipakid, ipaknum, pkgname, inunit, &
this%iout)
call this%package_create(pkgtype, ipakid, ipaknum, pkgname, mempath, &
inunit, this%iout)
ipakid = ipakid + 1
ipaknum = ipaknum + 1
end do
Expand Down
Loading

0 comments on commit d40522f

Please sign in to comment.