Skip to content

Commit

Permalink
feat(idm): update WEL package for IDM (MODFLOW-USGS#1372)
Browse files Browse the repository at this point in the history
* feat(idm): update WEL package for IDM

* rebuild makefiles

* wel package cleanup

---------

Co-authored-by: mjreno <mreno@IGSAAA071L00066.gs.doi.net>
  • Loading branch information
mjreno and mjreno authored Sep 29, 2023
1 parent 68a1cef commit 2a946f1
Show file tree
Hide file tree
Showing 11 changed files with 758 additions and 84 deletions.
4 changes: 2 additions & 2 deletions autotest/test_gwf_libmf6_evt01.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def api_func(exe, idx, model_ws=None):
max_iter = mf6.get_value(mxit_tag)

# get copy of well data
well_tag = mf6.get_var_address("BOUND", name, "WEL_0")
well_tag = mf6.get_var_address("Q", name, "WEL_0")
well = mf6.get_value(well_tag)

# check NPF type
Expand Down Expand Up @@ -215,7 +215,7 @@ def api_func(exe, idx, model_ws=None):

# update well rate
twell[:] = head2et_wellrate(head[0])
well[:, 0] = twell[:]
well[:] = twell[:]
mf6.set_value(well_tag, well)

# solve with updated well rate
Expand Down
8 changes: 8 additions & 0 deletions doc/mf6io/mf6ivar/dfn/gwf-wel.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ reader urword
optional true
longname print input to listing file
description REPLACE print_input {'{#1}': 'well'}
mf6internal iprpak

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

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

block options
name auto_flow_reduce
Expand All @@ -59,6 +62,7 @@ reader urword
optional true
longname cell fractional thickness for reduced pumping
description keyword and real value that defines the fraction of the cell thickness used as an interval for smoothly adjusting negative pumping rates to 0 in cells with head values less than or equal to the bottom of the cell. Negative pumping rates are adjusted to 0 or a smaller negative value when the head in the cell is equal to or less than the calculated interval above the cell bottom. AUTO\_FLOW\_REDUCE is set to 0.1 if the specified value is less than or equal to zero. By default, negative pumping rates are not reduced during a simulation.
mf6internal flowred

block options
name afrcsv_filerecord
Expand All @@ -69,6 +73,7 @@ tagged true
optional true
longname
description
mf6internal afrcsv_rec

block options
name auto_flow_reduce_csv
Expand All @@ -80,6 +85,7 @@ tagged true
optional false
longname budget keyword
description keyword to specify that record corresponds to the AUTO\_FLOW\_REDUCE output option in which a new record is written for each well and for each time step in which the user-requested extraction rate is reduced by the program.
mf6internal afrcsv

block options
name fileout
Expand Down Expand Up @@ -221,6 +227,7 @@ shape (maxbound)
reader urword
longname
description
mf6internal spd

block period
name cellid
Expand Down Expand Up @@ -254,6 +261,7 @@ optional true
time_series true
longname auxiliary variables
description REPLACE aux {'{#1}': 'well'}
mf6internal auxvar

block period
name boundname
Expand Down
3 changes: 2 additions & 1 deletion make/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ $(OBJDIR)/gwt1dsp1idm.o \
$(OBJDIR)/gwt1disv1idm.o \
$(OBJDIR)/gwt1disu1idm.o \
$(OBJDIR)/gwt1dis1idm.o \
$(OBJDIR)/gwf3wel8idm.o \
$(OBJDIR)/gwf3npf8idm.o \
$(OBJDIR)/gwf3idm.o \
$(OBJDIR)/gwf3disv8idm.o \
Expand Down Expand Up @@ -217,13 +218,13 @@ $(OBJDIR)/gwt1mst1.o \
$(OBJDIR)/GwtDspOptions.o \
$(OBJDIR)/gwf3npf8.o \
$(OBJDIR)/GwtAdvOptions.o \
$(OBJDIR)/BoundaryPackageExt.o \
$(OBJDIR)/gwf3tvs8.o \
$(OBJDIR)/GwfStorageUtils.o \
$(OBJDIR)/Mover.o \
$(OBJDIR)/GwfMvrPeriodData.o \
$(OBJDIR)/ims8misc.o \
$(OBJDIR)/GwfBuyInputData.o \
$(OBJDIR)/BoundaryPackageExt.o \
$(OBJDIR)/VirtualSolution.o \
$(OBJDIR)/SparseMatrix.o \
$(OBJDIR)/LinearSolverBase.o \
Expand Down
3 changes: 2 additions & 1 deletion msvs/mf6core.vfproj
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@
<File RelativePath="..\src\Model\GroundWaterFlow\gwf3tvs8.f90"/>
<File RelativePath="..\src\Model\GroundWaterFlow\gwf3uzf8.f90"/>
<File RelativePath="..\src\Model\GroundWaterFlow\gwf3vsc8.f90"/>
<File RelativePath="..\src\Model\GroundWaterFlow\gwf3wel8.f90"/></Filter>
<File RelativePath="..\src\Model\GroundWaterFlow\gwf3wel8.f90"/>
<File RelativePath="..\src\Model\GroundWaterFlow\gwf3wel8idm.f90"/></Filter>
<Filter Name="GroundWaterTransport">
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1adv1.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 @@ -1293,7 +1293,8 @@ subroutine package_create(this, filtyp, ipakid, ipaknum, pakname, mempath, &
call chd_create(packobj, ipakid, ipaknum, inunit, iout, this%name, &
pakname, mempath)
case ('WEL6')
call wel_create(packobj, ipakid, ipaknum, inunit, iout, this%name, pakname)
call wel_create(packobj, ipakid, ipaknum, inunit, iout, this%name, &
pakname, mempath)
case ('DRN6')
call drn_create(packobj, ipakid, ipaknum, inunit, iout, this%name, pakname)
case ('RIV6')
Expand Down
Loading

0 comments on commit 2a946f1

Please sign in to comment.