Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(idm): update EVT package for IDM #1385

Merged
merged 3 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions doc/mf6io/mf6ivar/dfn/gwf-evt.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ reader urword
optional true
longname print input to listing file
description REPLACE print_input {'{#1}': 'evapotranspiration'}
mf6internal iprpak

block options
name print_flows
Expand All @@ -52,6 +53,7 @@ reader urword
optional true
longname print evapotranspiration rates to listing file
description REPLACE print_flows {'{#1}': 'evapotranspiration'}
mf6internal iprflow

block options
name save_flows
Expand All @@ -60,6 +62,7 @@ reader urword
optional true
longname save evapotranspiration rates to budget file
description REPLACE save_flows {'{#1}': 'evapotranspiration'}
mf6internal ipakcb

block options
name ts_filerecord
Expand Down Expand Up @@ -143,6 +146,7 @@ reader urword
optional true
longname specify proportion of evapotranspiration rate at ET surface
description indicates that the proportion of the evapotranspiration rate at the ET surface will be specified as PETM0 in list input.
mf6internal surfratespec

# --------------------- gwf evt dimensions ---------------------

Expand Down Expand Up @@ -184,6 +188,7 @@ shape (maxbound)
reader urword
longname
description
mf6internal spd

block period
name cellid
Expand Down Expand Up @@ -235,6 +240,7 @@ shape (nseg-1)
tagged false
in_record true
reader urword
optional true
time_series true
longname proportion of ET extinction depth
description is the proportion of the ET extinction depth at the bottom of a segment (dimensionless). pxdp is an array of size (nseg - 1). Values in pxdp must be greater than 0.0 and less than 1.0. pxdp values for a cell must increase monotonically. 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.
Expand All @@ -246,6 +252,7 @@ shape (nseg-1)
tagged false
in_record true
reader urword
optional true
time_series true
longname proportion of maximum ET rate
description is the proportion of the maximum ET flux rate at the bottom of a segment (dimensionless). petm is an array of size (nseg - 1). 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.
Expand Down Expand Up @@ -273,6 +280,7 @@ optional true
time_series true
longname auxiliary variables
description REPLACE aux {'{#1}': 'evapotranspiration'}
mf6internal auxvar

block period
name boundname
Expand Down
9 changes: 8 additions & 1 deletion doc/mf6io/mf6ivar/dfn/gwf-evta.dfn
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# --------------------- gwf evta options ---------------------
# flopy multi-package
# modflow6 aux-sfac-param rate

block options
name readasarrays
Expand Down Expand Up @@ -45,6 +46,7 @@ reader urword
optional true
longname print input to listing file
description REPLACE print_input {'{#1}': 'evapotranspiration'}
mf6internal iprpak

block options
name print_flows
Expand All @@ -53,6 +55,7 @@ reader urword
optional true
longname print evapotranspiration rates to listing file
description REPLACE print_flows {'{#1}': 'evapotranspiration'}
mf6internal iprflow

block options
name save_flows
Expand All @@ -61,6 +64,7 @@ reader urword
optional true
longname save CHD flows to budget file
description REPLACE save_flows {'{#1}': 'evapotranspiration'}
mf6internal ipakcb

block options
name tas_filerecord
Expand Down Expand Up @@ -177,6 +181,7 @@ name rate
type double precision
shape (ncol*nrow; ncpl)
reader readarray
time_series true
longname evapotranspiration surface
description is the maximum ET flux rate ($LT^{-1}$).
default_value 1.e-3
Expand All @@ -191,9 +196,11 @@ description is the ET extinction depth ($L$).
default_value 1.0

block period
name aux(iaux)
name aux
type double precision
shape (ncol*nrow; ncpl)
reader readarray
time_series true
longname auxiliary variable iaux
description is an array of values for auxiliary variable AUX(IAUX), where iaux is a value from 1 to NAUX, and AUX(IAUX) must be listed as part of the auxiliary variables. A separate array can be specified for each auxiliary variable. If an array is not specified for an auxiliary variable, then a value of zero is assigned. If the value specified here for the auxiliary variable is the same as auxmultname, then the evapotranspiration rate will be multiplied by this array.
mf6internal auxvar
58 changes: 29 additions & 29 deletions make/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,35 @@ 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
SOURCEDIR3=../src/Model
SOURCEDIR4=../src/Model/Geometry
SOURCEDIR5=../src/Model/TransportModel
SOURCEDIR6=../src/Model/ModelUtilities
SOURCEDIR7=../src/Model/Connection
SOURCEDIR8=../src/Model/GroundWaterTransport
SOURCEDIR9=../src/Model/GroundWaterFlow
SOURCEDIR10=../src/Distributed
SOURCEDIR11=../src/Solution
SOURCEDIR12=../src/Solution/PETSc
SOURCEDIR13=../src/Solution/LinearMethods
SOURCEDIR14=../src/Timing
SOURCEDIR15=../src/Utilities
SOURCEDIR16=../src/Utilities/TimeSeries
SOURCEDIR17=../src/Utilities/Libraries
SOURCEDIR18=../src/Utilities/Libraries/rcm
SOURCEDIR19=../src/Utilities/Libraries/blas
SOURCEDIR19=../src/Utilities/Libraries/sparsekit
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
SOURCEDIR21=../src/Utilities/Libraries/blas
SOURCEDIR22=../src/Utilities/Libraries/daglib
SOURCEDIR23=../src/Utilities/Idm
SOURCEDIR24=../src/Utilities/Idm/selector
SOURCEDIR25=../src/Utilities/Idm/mf6blockfile
SOURCEDIR26=../src/Utilities/Matrix
SOURCEDIR27=../src/Utilities/Vector
SOURCEDIR28=../src/Utilities/Observation
SOURCEDIR29=../src/Utilities/OutputControl
SOURCEDIR30=../src/Utilities/Memory
SOURCEDIR31=../src/Utilities/ArrayRead

VPATH = \
${SOURCEDIR1} \
Expand Down Expand Up @@ -68,8 +67,7 @@ ${SOURCEDIR27} \
${SOURCEDIR28} \
${SOURCEDIR29} \
${SOURCEDIR30} \
${SOURCEDIR31} \
${SOURCEDIR32}
${SOURCEDIR31}

.SUFFIXES: .f90 .F90 .o

Expand Down Expand Up @@ -109,6 +107,8 @@ $(OBJDIR)/gwf3rcha8idm.o \
$(OBJDIR)/gwf3npf8idm.o \
$(OBJDIR)/gwf3idm.o \
$(OBJDIR)/gwf3ghb8idm.o \
$(OBJDIR)/gwf3evt8idm.o \
$(OBJDIR)/gwf3evta8idm.o \
$(OBJDIR)/gwf3drn8idm.o \
$(OBJDIR)/gwf3disv8idm.o \
$(OBJDIR)/gwf3disu8idm.o \
Expand Down
2 changes: 2 additions & 0 deletions msvs/mf6core.vfproj
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@
<File RelativePath="..\src\Model\GroundWaterFlow\gwf3drn8.f90"/>
<File RelativePath="..\src\Model\GroundWaterFlow\gwf3drn8idm.f90"/>
<File RelativePath="..\src\Model\GroundWaterFlow\gwf3evt8.f90"/>
<File RelativePath="..\src\Model\GroundWaterFlow\gwf3evt8idm.f90"/>
<File RelativePath="..\src\Model\GroundWaterFlow\gwf3evta8idm.f90"/>
<File RelativePath="..\src\Model\GroundWaterFlow\gwf3ghb8.f90"/>
<File RelativePath="..\src\Model\GroundWaterFlow\gwf3ghb8idm.f90"/>
<File RelativePath="..\src\Model\GroundWaterFlow\gwf3hfb8.f90"/>
Expand Down
3 changes: 2 additions & 1 deletion src/Model/GroundWaterFlow/gwf3.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,8 @@ subroutine package_create(this, filtyp, ipakid, ipaknum, pakname, mempath, &
call rch_create(packobj, ipakid, ipaknum, inunit, iout, this%name, &
pakname, mempath)
case ('EVT6')
call evt_create(packobj, ipakid, ipaknum, inunit, iout, this%name, pakname)
call evt_create(packobj, ipakid, ipaknum, inunit, iout, this%name, &
pakname, mempath)
case ('MAW6')
call maw_create(packobj, ipakid, ipaknum, inunit, iout, this%name, pakname)
case ('SFR6')
Expand Down
98 changes: 3 additions & 95 deletions src/Model/GroundWaterFlow/gwf3dis8.f90
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ module GwfDisModule
procedure, public :: read_layer_array
procedure, public :: record_srcdst_list_header
procedure, public :: nlarray_to_nodelist
procedure, public :: nlarray_to_nodelist2
! -- helper functions
procedure :: get_nodenumber_idx1
procedure :: get_nodenumber_idx3
Expand Down Expand Up @@ -1657,100 +1656,9 @@ subroutine record_srcdst_list_header(this, text, textmodel, textpackage, &
return
end subroutine record_srcdst_list_header

subroutine nlarray_to_nodelist(this, nodelist, maxbnd, nbound, aname, &
inunit, iout)
subroutine nlarray_to_nodelist(this, darray, nodelist, maxbnd, nbound, aname)
! ******************************************************************************
! nlarray_to_nodelist -- Read an integer array into nodelist. For structured
! model, integer array is layer number; for unstructured
! model, integer array is node number.
! ******************************************************************************
!
! SPECIFICATIONS:
! ------------------------------------------------------------------------------
! -- modules
use InputOutputModule, only: get_node
use ConstantsModule, only: LINELENGTH
! -- dummy
class(GwfDisType) :: this
integer(I4B), intent(in) :: maxbnd
integer(I4B), dimension(maxbnd), intent(inout) :: nodelist
integer(I4B), intent(inout) :: nbound
character(len=*), intent(in) :: aname
integer(I4B), intent(in) :: inunit
integer(I4B), intent(in) :: iout
! -- local
integer(I4B) :: il, ir, ic, ncol, nrow, nlay, nval, nodeu, noder, ipos, ierr
! ------------------------------------------------------------------------------
!
! -- set variables
nlay = this%mshape(1)
nrow = this%mshape(2)
ncol = this%mshape(3)
!
if (this%ndim > 1) then
!
nval = ncol * nrow
call ReadArray(inunit, this%ibuff, aname, this%ndim, ncol, nrow, nlay, &
nval, iout, 0, 0)
!
! -- Copy array into nodelist
ipos = 1
ierr = 0
do ir = 1, nrow
do ic = 1, ncol
nodeu = get_node(1, ir, ic, nlay, nrow, ncol)
il = this%ibuff(nodeu)
if (il < 1 .or. il > nlay) then
write (errmsg, '(a,1x,i0)') 'Invalid layer number:', il
call store_error(errmsg, terminate=.TRUE.)
end if
nodeu = get_node(il, ir, ic, nlay, nrow, ncol)
noder = this%get_nodenumber(nodeu, 0)
if (ipos > maxbnd) then
ierr = ipos
else
nodelist(ipos) = noder
end if
ipos = ipos + 1
end do
end do
!
! -- Check for errors
nbound = ipos - 1
if (ierr > 0) then
write (errmsg, '(a,1x,i0)') &
'MAXBOUND dimension is too small.'// &
'INCREASE MAXBOUND TO:', ierr
call store_error(errmsg, terminate=.TRUE.)
end if
!
! -- If nbound < maxbnd, then initialize nodelist to zero in this range
if (nbound < maxbnd) then
do ipos = nbound + 1, maxbnd
nodelist(ipos) = 0
end do
end if
!
else
!
! -- For unstructured, read nodelist directly, then check node numbers
call ReadArray(inunit, nodelist, aname, this%ndim, maxbnd, iout, 0)
do noder = 1, maxbnd
if (noder < 1 .or. noder > this%nodes) then
write (errmsg, '(a,1x,i0)') 'Invalid node number:', noder
call store_error(errmsg, terminate=.TRUE.)
end if
end do
nbound = maxbnd
!
end if
!
! -- return
end subroutine nlarray_to_nodelist

subroutine nlarray_to_nodelist2(this, darray, nodelist, maxbnd, nbound, aname)
! ******************************************************************************
! nlarray_to_nodelist -- Read an integer array into nodelist. For structured
! nlarray_to_nodelist -- Convert an integer array into nodelist. For structured
! model, integer array is layer number; for unstructured
! model, integer array is node number.
! ******************************************************************************
Expand Down Expand Up @@ -1833,6 +1741,6 @@ subroutine nlarray_to_nodelist2(this, darray, nodelist, maxbnd, nbound, aname)
end if
!
! -- return
end subroutine nlarray_to_nodelist2
end subroutine nlarray_to_nodelist

end module GwfDisModule
Loading