diff --git a/doc/mf6io/mf6ivar/md/mf6ivar.md b/doc/mf6io/mf6ivar/md/mf6ivar.md
index cd2ee91d2d7..5079a6c8f5a 100644
--- a/doc/mf6io/mf6ivar/md/mf6ivar.md
+++ b/doc/mf6io/mf6ivar/md/mf6ivar.md
@@ -381,7 +381,7 @@
| GWF | WEL | OPTIONS | PRINT_INPUT | KEYWORD | keyword to indicate that the list of well information will be written to the listing file immediately after it is read. |
| GWF | WEL | OPTIONS | PRINT_FLOWS | KEYWORD | keyword to indicate that the list of well flow rates will be printed to the listing file for every stress period time step in which ``BUDGET PRINT'' is specified in Output Control. If there is no Output Control option and ``PRINT\_FLOWS'' is specified, then flow rates are printed for the last time step of each stress period. |
| GWF | WEL | OPTIONS | SAVE_FLOWS | KEYWORD | keyword to indicate that well flow terms will be written to the file specified with ``BUDGET FILEOUT'' in Output Control. |
-| GWF | WEL | OPTIONS | AUTO_FLOW_REDUCE | DOUBLE PRECISION | 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. |
+| GWF | WEL | OPTIONS | AUTO_FLOW_REDUCE | DOUBLE PRECISION | 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. This AUTO\_FLOW\_REDUCE option only applies to wells in model cells that are marked as ``convertible'' (ICELLTYPE /= 0) in the Node Property Flow (NPF) input file. Reduction in flow will not occur for wells in cells marked as confined (ICELLTYPE = 0). |
| GWF | WEL | OPTIONS | AUTO_FLOW_REDUCE_CSV | KEYWORD | 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. |
| GWF | WEL | OPTIONS | FILEOUT | KEYWORD | keyword to specify that an output filename is expected next. |
| GWF | WEL | OPTIONS | AFRCSVFILE | STRING | name of the comma-separated value (CSV) output file to write information about well extraction rates that have been reduced by the program. Entries are only written if the extraction rates are reduced. |
diff --git a/doc/mf6io/mf6ivar/md/mf6memvar.md b/doc/mf6io/mf6ivar/md/mf6memvar.md
index 92d54ce30e2..b23923fe4a0 100644
--- a/doc/mf6io/mf6ivar/md/mf6memvar.md
+++ b/doc/mf6io/mf6ivar/md/mf6memvar.md
@@ -756,39 +756,7 @@
| PackageMover.f90 | PackageMoverModule | PackageMoverType | QTOMVR | 1 |
| PackageMover.f90 | PackageMoverModule | PackageMoverType | QFROMMVR | 1 |
| PackageMover.f90 | PackageMoverModule | PackageMoverType | QFROMMVR0 | 1 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | TOP1D | 1 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | BOT1D | 1 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | AREA1D | 1 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | IDOMAIN | 1 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | VERTICES | 2 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | IAINP | 1 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | JAINP | 1 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | IHCINP | 1 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | CL12INP | 1 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | HWVAINP | 1 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | ANGLDEGXINP | 1 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | CELLXY | 2 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | IAVERT | 1 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | JAVERT | 1 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | NJAUSR | 0 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | NVERT | 0 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | VOFFSETTOL | 0 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | IANGLEDEGX | 0 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | NODEUSER | 1 |
-| gwf-disu.f90 | GwfDisuModule | GwfDisuType | NODEREDUCED | 1 |
| gwf-ic.f90 | GwfIcModule | GwfIcType | STRT | 1 |
-| gwf-disv.f90 | GwfDisvModule | GwfDisvType | IDOMAIN | 2 |
-| gwf-disv.f90 | GwfDisvModule | GwfDisvType | TOP1D | 1 |
-| gwf-disv.f90 | GwfDisvModule | GwfDisvType | BOT2D | 2 |
-| gwf-disv.f90 | GwfDisvModule | GwfDisvType | VERTICES | 2 |
-| gwf-disv.f90 | GwfDisvModule | GwfDisvType | CELLXY | 2 |
-| gwf-disv.f90 | GwfDisvModule | GwfDisvType | IAVERT | 1 |
-| gwf-disv.f90 | GwfDisvModule | GwfDisvType | JAVERT | 1 |
-| gwf-disv.f90 | GwfDisvModule | GwfDisvType | NLAY | 0 |
-| gwf-disv.f90 | GwfDisvModule | GwfDisvType | NCPL | 0 |
-| gwf-disv.f90 | GwfDisvModule | GwfDisvType | NVERT | 0 |
-| gwf-disv.f90 | GwfDisvModule | GwfDisvType | NODEUSER | 1 |
-| gwf-disv.f90 | GwfDisvModule | GwfDisvType | NODEREDUCED | 1 |
| gwf-npf.f90 | GwfNpfModule | GwfNpftype | INAME | 0 |
| gwf-npf.f90 | GwfNpfModule | GwfNpftype | IXT3D | 0 |
| gwf-npf.f90 | GwfNpfModule | GwfNpftype | IXT3DRHS | 0 |
@@ -1344,20 +1312,52 @@
| gwf-sfr.f90 | SfrModule | SfrType | QAUXCBC | 1 |
| gwf-sfr.f90 | SfrModule | SfrType | DENSETERMS | 2 |
| gwf-sfr.f90 | SfrModule | SfrType | VISCRATIOS | 2 |
-| gwf-dis.f90 | GwfDisModule | GwfDisType | DELR | 1 |
-| gwf-dis.f90 | GwfDisModule | GwfDisType | DELC | 1 |
-| gwf-dis.f90 | GwfDisModule | GwfDisType | IDOMAIN | 3 |
-| gwf-dis.f90 | GwfDisModule | GwfDisType | TOP2D | 2 |
-| gwf-dis.f90 | GwfDisModule | GwfDisType | BOT3D | 3 |
-| gwf-dis.f90 | GwfDisModule | GwfDisType | CELLX | 1 |
-| gwf-dis.f90 | GwfDisModule | GwfDisType | CELLY | 1 |
-| gwf-dis.f90 | GwfDisModule | GwfDisType | NLAY | 0 |
-| gwf-dis.f90 | GwfDisModule | GwfDisType | NROW | 0 |
-| gwf-dis.f90 | GwfDisModule | GwfDisType | NCOL | 0 |
-| gwf-dis.f90 | GwfDisModule | GwfDisType | NODEUSER | 1 |
-| gwf-dis.f90 | GwfDisModule | GwfDisType | NODEREDUCED | 1 |
| gwf-drn.f90 | DrnModule | DrnType | IAUXDDRNCOL | 0 |
| gwf-drn.f90 | DrnModule | DrnType | ICUBIC_SCALING | 0 |
+| Disv.f90 | DisvModule | DisvType | IDOMAIN | 2 |
+| Disv.f90 | DisvModule | DisvType | TOP1D | 1 |
+| Disv.f90 | DisvModule | DisvType | BOT2D | 2 |
+| Disv.f90 | DisvModule | DisvType | VERTICES | 2 |
+| Disv.f90 | DisvModule | DisvType | CELLXY | 2 |
+| Disv.f90 | DisvModule | DisvType | IAVERT | 1 |
+| Disv.f90 | DisvModule | DisvType | JAVERT | 1 |
+| Disv.f90 | DisvModule | DisvType | NLAY | 0 |
+| Disv.f90 | DisvModule | DisvType | NCPL | 0 |
+| Disv.f90 | DisvModule | DisvType | NVERT | 0 |
+| Disv.f90 | DisvModule | DisvType | NODEUSER | 1 |
+| Disv.f90 | DisvModule | DisvType | NODEREDUCED | 1 |
+| Disu.f90 | DisuModule | DisuType | TOP1D | 1 |
+| Disu.f90 | DisuModule | DisuType | BOT1D | 1 |
+| Disu.f90 | DisuModule | DisuType | AREA1D | 1 |
+| Disu.f90 | DisuModule | DisuType | IDOMAIN | 1 |
+| Disu.f90 | DisuModule | DisuType | VERTICES | 2 |
+| Disu.f90 | DisuModule | DisuType | IAINP | 1 |
+| Disu.f90 | DisuModule | DisuType | JAINP | 1 |
+| Disu.f90 | DisuModule | DisuType | IHCINP | 1 |
+| Disu.f90 | DisuModule | DisuType | CL12INP | 1 |
+| Disu.f90 | DisuModule | DisuType | HWVAINP | 1 |
+| Disu.f90 | DisuModule | DisuType | ANGLDEGXINP | 1 |
+| Disu.f90 | DisuModule | DisuType | CELLXY | 2 |
+| Disu.f90 | DisuModule | DisuType | IAVERT | 1 |
+| Disu.f90 | DisuModule | DisuType | JAVERT | 1 |
+| Disu.f90 | DisuModule | DisuType | NJAUSR | 0 |
+| Disu.f90 | DisuModule | DisuType | NVERT | 0 |
+| Disu.f90 | DisuModule | DisuType | VOFFSETTOL | 0 |
+| Disu.f90 | DisuModule | DisuType | IANGLEDEGX | 0 |
+| Disu.f90 | DisuModule | DisuType | NODEUSER | 1 |
+| Disu.f90 | DisuModule | DisuType | NODEREDUCED | 1 |
+| Dis.f90 | DisModule | DisType | DELR | 1 |
+| Dis.f90 | DisModule | DisType | DELC | 1 |
+| Dis.f90 | DisModule | DisType | IDOMAIN | 3 |
+| Dis.f90 | DisModule | DisType | TOP2D | 2 |
+| Dis.f90 | DisModule | DisType | BOT3D | 3 |
+| Dis.f90 | DisModule | DisType | CELLX | 1 |
+| Dis.f90 | DisModule | DisType | CELLY | 1 |
+| Dis.f90 | DisModule | DisType | NLAY | 0 |
+| Dis.f90 | DisModule | DisType | NROW | 0 |
+| Dis.f90 | DisModule | DisType | NCOL | 0 |
+| Dis.f90 | DisModule | DisType | NODEUSER | 1 |
+| Dis.f90 | DisModule | DisType | NODEREDUCED | 1 |
| tsp-apt.f90 | TspAptModule | TspAptType | IAUXFPCONC | 0 |
| tsp-apt.f90 | TspAptModule | TspAptType | IMATROWS | 0 |
| tsp-apt.f90 | TspAptModule | TspAptType | IPRCONC | 0 |
diff --git a/doc/mf6io/mf6ivar/tex/gwf-wel-desc.tex b/doc/mf6io/mf6ivar/tex/gwf-wel-desc.tex
index 5834632c55f..a256ff09f78 100644
--- a/doc/mf6io/mf6ivar/tex/gwf-wel-desc.tex
+++ b/doc/mf6io/mf6ivar/tex/gwf-wel-desc.tex
@@ -15,7 +15,7 @@
\item \texttt{SAVE\_FLOWS}---keyword to indicate that well flow terms will be written to the file specified with ``BUDGET FILEOUT'' in Output Control.
-\item \texttt{auto\_flow\_reduce}---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.
+\item \texttt{auto\_flow\_reduce}---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. This AUTO\_FLOW\_REDUCE option only applies to wells in model cells that are marked as ``convertible'' (ICELLTYPE /= 0) in the Node Property Flow (NPF) input file. Reduction in flow will not occur for wells in cells marked as confined (ICELLTYPE = 0).
\item \texttt{AUTO\_FLOW\_REDUCE\_CSV}---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.
diff --git a/make/makefile b/make/makefile
index dcc22ac2537..eca740dd8ec 100644
--- a/make/makefile
+++ b/make/makefile
@@ -37,9 +37,10 @@ SOURCEDIR30=../src/Model/SurfaceWaterFlow
SOURCEDIR31=../src/Model/GroundWaterTransport
SOURCEDIR32=../src/Model/ModelUtilities
SOURCEDIR33=../src/Model/GroundWaterFlow
-SOURCEDIR34=../src/Model/TransportModel
-SOURCEDIR35=../src/Model/Geometry
-SOURCEDIR36=../src/Model/GroundWaterEnergy
+SOURCEDIR34=../src/Model/Discretization
+SOURCEDIR35=../src/Model/TransportModel
+SOURCEDIR36=../src/Model/Geometry
+SOURCEDIR37=../src/Model/GroundWaterEnergy
VPATH = \
${SOURCEDIR1} \
@@ -77,7 +78,8 @@ ${SOURCEDIR32} \
${SOURCEDIR33} \
${SOURCEDIR34} \
${SOURCEDIR35} \
-${SOURCEDIR36}
+${SOURCEDIR36} \
+${SOURCEDIR37}
.SUFFIXES: .f90 .F90 .o
@@ -206,7 +208,6 @@ $(OBJDIR)/BudgetObject.o \
$(OBJDIR)/BoundaryPackage.o \
$(OBJDIR)/CellDefn.o \
$(OBJDIR)/Particle.o \
-$(OBJDIR)/gwf-disv.o \
$(OBJDIR)/FlowModelInterface.o \
$(OBJDIR)/Subcell.o \
$(OBJDIR)/TrackData.o \
@@ -219,7 +220,6 @@ $(OBJDIR)/TernarySolveTrack.o \
$(OBJDIR)/SubcellTri.o \
$(OBJDIR)/Method.o \
$(OBJDIR)/SubcellRect.o \
-$(OBJDIR)/gwf-dis.o \
$(OBJDIR)/VirtualBase.o \
$(OBJDIR)/STLVecInt.o \
$(OBJDIR)/BaseModel.o \
@@ -280,7 +280,9 @@ $(OBJDIR)/tsp-oc.o \
$(OBJDIR)/tsp-obs.o \
$(OBJDIR)/tsp-mvt.o \
$(OBJDIR)/tsp-adv.o \
-$(OBJDIR)/gwf-disu.o \
+$(OBJDIR)/Disv.o \
+$(OBJDIR)/Disu.o \
+$(OBJDIR)/Dis.o \
$(OBJDIR)/gwf-uzf.o \
$(OBJDIR)/tsp-apt.o \
$(OBJDIR)/gwt-mst.o \
diff --git a/msvs/mf6core.vfproj b/msvs/mf6core.vfproj
index 54ae3f978c7..dba032b5f44 100644
--- a/msvs/mf6core.vfproj
+++ b/msvs/mf6core.vfproj
@@ -215,9 +215,9 @@
-
-
-
+
+
+
diff --git a/msvs/mf6lib.vfproj b/msvs/mf6lib.vfproj
index 2c27e0c358b..dedc1f6723d 100644
--- a/msvs/mf6lib.vfproj
+++ b/msvs/mf6lib.vfproj
@@ -68,9 +68,9 @@
-
-
-
+
+
+
diff --git a/src/Model/Connection/GridConnection.f90 b/src/Model/Connection/GridConnection.f90
index 03a61f5ae3d..8ad009e905a 100644
--- a/src/Model/Connection/GridConnection.f90
+++ b/src/Model/Connection/GridConnection.f90
@@ -11,7 +11,7 @@ module GridConnectionModule
use MemoryHelperModule, only: create_mem_path
use ListModule, only: ListType, isEqualIface
use NumericalModelModule
- use GwfDisuModule
+ use DisuModule
use DisConnExchangeModule
use VirtualModelModule, only: VirtualModelType, get_virtual_model, &
get_virtual_model_from_list
@@ -973,7 +973,7 @@ subroutine getDiscretization(this, disu)
use ConnectionsModule
use SparseModule, only: sparsematrix
class(GridConnectionType) :: this !< the grid connection
- class(GwfDisuType), pointer :: disu !< the target disu object
+ class(DisuType), pointer :: disu !< the target disu object
! local
integer(I4B) :: icell, nrOfCells, idx
class(VirtualModelType), pointer :: v_model
diff --git a/src/Model/Connection/GweInterfaceModel.f90 b/src/Model/Connection/GweInterfaceModel.f90
index d7f1978f5ff..cc7590e40ec 100644
--- a/src/Model/Connection/GweInterfaceModel.f90
+++ b/src/Model/Connection/GweInterfaceModel.f90
@@ -5,7 +5,7 @@ module GweInterfaceModelModule
use MemoryHelperModule, only: create_mem_path
use NumericalModelModule, only: NumericalModelType
use GweModule, only: GweModelType, CastAsGweModel
- use GwfDisuModule, only: disu_cr, CastAsDisuType
+ use DisuModule, only: disu_cr, CastAsDisuType
use TspFmiModule, only: fmi_cr, TspFmiType
use TspAdvModule, only: adv_cr, TspAdvType
use TspAdvOptionsModule, only: TspAdvOptionsType
diff --git a/src/Model/Connection/GwfInterfaceModel.f90 b/src/Model/Connection/GwfInterfaceModel.f90
index 1d3fd25744f..80f3816c74e 100644
--- a/src/Model/Connection/GwfInterfaceModel.f90
+++ b/src/Model/Connection/GwfInterfaceModel.f90
@@ -9,7 +9,7 @@ module GwfInterfaceModelModule
use GwfBuyModule, only: buy_cr
use GridConnectionModule
use BaseDisModule
- use GwfDisuModule
+ use DisuModule
use GwfNpfModule
use GwfNpfOptionsModule
use GwfBuyInputDataModule
diff --git a/src/Model/Connection/GwtInterfaceModel.f90 b/src/Model/Connection/GwtInterfaceModel.f90
index 59d5eec3827..6cc3f6bf0f6 100644
--- a/src/Model/Connection/GwtInterfaceModel.f90
+++ b/src/Model/Connection/GwtInterfaceModel.f90
@@ -5,7 +5,7 @@ module GwtInterfaceModelModule
use MemoryHelperModule, only: create_mem_path
use NumericalModelModule, only: NumericalModelType
use GwtModule, only: GwtModelType, CastAsGwtModel
- use GwfDisuModule, only: disu_cr, CastAsDisuType
+ use DisuModule, only: disu_cr, CastAsDisuType
use TspFmiModule, only: fmi_cr, TspFmiType
use TspAdvModule, only: adv_cr, TspAdvType
use TspAdvOptionsModule, only: TspAdvOptionsType
diff --git a/src/Model/GroundWaterFlow/gwf-dis.f90 b/src/Model/Discretization/Dis.f90
similarity index 95%
rename from src/Model/GroundWaterFlow/gwf-dis.f90
rename to src/Model/Discretization/Dis.f90
index 5ddb0adb81b..cd9bc86f349 100644
--- a/src/Model/GroundWaterFlow/gwf-dis.f90
+++ b/src/Model/Discretization/Dis.f90
@@ -1,4 +1,4 @@
-module GwfDisModule
+module DisModule
use ArrayReadersModule, only: ReadArray
use KindModule, only: DP, I4B, LGP
@@ -14,24 +14,24 @@ module GwfDisModule
use MemoryManagerModule, only: mem_allocate, mem_deallocate
use MemoryManagerExtModule, only: mem_set_value, memorylist_remove
use TdisModule, only: kstp, kper, pertim, totim, delt
- use GwfDisInputModule, only: GwfDisParamFoundType
implicit none
private
- public dis_cr, GwfDisType
+ public dis_cr, DisType
- type, extends(DisBaseType) :: GwfDisType
- integer(I4B), pointer :: nlay => null() ! number of layers
- integer(I4B), pointer :: nrow => null() ! number of rows
- integer(I4B), pointer :: ncol => null() ! number of columns
- real(DP), dimension(:), pointer, contiguous :: delr => null() ! spacing along a row
- real(DP), dimension(:), pointer, contiguous :: delc => null() ! spacing along a column
- real(DP), dimension(:, :), pointer, contiguous :: top2d => null() ! top elevations for each cell at top of model (ncol, nrow)
- real(DP), dimension(:, :, :), pointer, contiguous :: bot3d => null() ! bottom elevations for each cell (ncol, nrow, nlay)
- integer(I4B), dimension(:, :, :), pointer, contiguous :: idomain => null() ! idomain (ncol, nrow, nlay)
- real(DP), dimension(:, :, :), pointer :: botm => null() ! top and bottom elevations for each cell (ncol, nrow, nlay)
- real(DP), dimension(:), pointer, contiguous :: cellx => null() ! cell center x coordinate for column j
- real(DP), dimension(:), pointer, contiguous :: celly => null() ! cell center y coordinate for row i
+ !> @brief Structured grid discretization
+ type, extends(DisBaseType) :: DisType
+ integer(I4B), pointer :: nlay => null() !< number of layers
+ integer(I4B), pointer :: nrow => null() !< number of rows
+ integer(I4B), pointer :: ncol => null() !< number of columns
+ real(DP), dimension(:), pointer, contiguous :: delr => null() !< spacing along a row
+ real(DP), dimension(:), pointer, contiguous :: delc => null() !< spacing along a column
+ real(DP), dimension(:, :), pointer, contiguous :: top2d => null() !< top elevations for each cell at top of model (ncol, nrow)
+ real(DP), dimension(:, :, :), pointer, contiguous :: bot3d => null() !< bottom elevations for each cell (ncol, nrow, nlay)
+ integer(I4B), dimension(:, :, :), pointer, contiguous :: idomain => null() !< idomain (ncol, nrow, nlay)
+ real(DP), dimension(:, :, :), pointer :: botm => null() !< top and bottom elevations for each cell (ncol, nrow, nlay)
+ real(DP), dimension(:), pointer, contiguous :: cellx => null() !< cell center x coordinate for column j
+ real(DP), dimension(:), pointer, contiguous :: celly => null() !< cell center y coordinate for row i
contains
@@ -69,7 +69,24 @@ module GwfDisModule
! -- Read a node-sized model array (reduced or not)
procedure :: read_int_array
procedure :: read_dbl_array
- end type GwfDisType
+ end type DisType
+
+ !> @brief Simplifies tracking parameters sourced from the input context.
+ type DisFoundType
+ logical :: length_units = .false.
+ logical :: nogrb = .false.
+ logical :: xorigin = .false.
+ logical :: yorigin = .false.
+ logical :: angrot = .false.
+ logical :: nlay = .false.
+ logical :: nrow = .false.
+ logical :: ncol = .false.
+ logical :: delr = .false.
+ logical :: delc = .false.
+ logical :: top = .false.
+ logical :: botm = .false.
+ logical :: idomain = .false.
+ end type DisFoundtype
contains
@@ -83,7 +100,7 @@ subroutine dis_cr(dis, name_model, input_mempath, inunit, iout)
integer(I4B), intent(in) :: inunit
integer(I4B), intent(in) :: iout
! -- locals
- type(GwfDisType), pointer :: disnew
+ type(DisType), pointer :: disnew
! -- formats
character(len=*), parameter :: fmtheader = &
"(1X, /1X, 'DIS -- STRUCTURED GRID DISCRETIZATION PACKAGE,', &
@@ -110,7 +127,7 @@ end subroutine dis_cr
!<
subroutine dis3d_df(this)
! -- dummy
- class(GwfDisType) :: this
+ class(DisType) :: this
!
! -- Transfer the data from the memory manager into this package object
if (this%inunit /= 0) then
@@ -134,7 +151,7 @@ end subroutine dis3d_df
!<
subroutine dis3d_da(this)
! -- dummy
- class(GwfDisType) :: this
+ class(DisType) :: this
!
! -- Deallocate idm memory
call memorylist_remove(this%name_model, 'DIS', idm_context)
@@ -164,11 +181,11 @@ end subroutine dis3d_da
!<
subroutine source_options(this)
! -- dummy
- class(GwfDisType) :: this
+ class(DisType) :: this
! -- locals
character(len=LENVARNAME), dimension(3) :: lenunits = &
&[character(len=LENVARNAME) :: 'FEET', 'METERS', 'CENTIMETERS']
- type(GwfDisParamFoundType) :: found
+ type(DisFoundType) :: found
!
! -- update defaults with idm sourced values
call mem_set_value(this%lenuni, 'LENGTH_UNITS', this%input_mempath, &
@@ -189,8 +206,8 @@ end subroutine source_options
!<
subroutine log_options(this, found)
! -- dummy
- class(GwfDisType) :: this
- type(GwfDisParamFoundType), intent(in) :: found
+ class(DisType) :: this
+ type(DisFoundType), intent(in) :: found
!
write (this%iout, '(1x,a)') 'Setting Discretization Options'
!
@@ -224,10 +241,10 @@ end subroutine log_options
!<
subroutine source_dimensions(this)
! -- dummy
- class(GwfDisType) :: this
+ class(DisType) :: this
! -- locals
integer(I4B) :: i, j, k
- type(GwfDisParamFoundType) :: found
+ type(DisFoundType) :: found
!
! -- update defaults with idm sourced values
call mem_set_value(this%nlay, 'NLAY', this%input_mempath, found%nlay)
@@ -285,8 +302,8 @@ end subroutine source_dimensions
!<
subroutine log_dimensions(this, found)
! -- dummy
- class(GwfDisType) :: this
- type(GwfDisParamFoundType), intent(in) :: found
+ class(DisType) :: this
+ type(DisFoundType), intent(in) :: found
!
write (this%iout, '(1x,a)') 'Setting Discretization Dimensions'
!
@@ -310,8 +327,8 @@ end subroutine log_dimensions
!<
subroutine source_griddata(this)
! -- dummy
- class(GwfDisType) :: this
- type(GwfDisParamFoundType) :: found
+ class(DisType) :: this
+ type(DisFoundType) :: found
!
! -- update defaults with idm sourced values
call mem_set_value(this%delr, 'DELR', this%input_mempath, found%delr)
@@ -331,8 +348,8 @@ end subroutine source_griddata
!<
subroutine log_griddata(this, found)
! -- dummy
- class(GwfDisType) :: this
- type(GwfDisParamFoundType), intent(in) :: found
+ class(DisType) :: this
+ type(DisFoundType), intent(in) :: found
!
write (this%iout, '(1x,a)') 'Setting Discretization Griddata'
!
@@ -366,7 +383,7 @@ subroutine grid_finalize(this)
! -- modules
use MemoryManagerModule, only: mem_allocate
! -- dummy
- class(GwfDisType) :: this
+ class(DisType) :: this
! -- locals
integer(I4B) :: n, i, j, k
integer(I4B) :: node
@@ -530,7 +547,7 @@ subroutine write_grb(this, icelltype)
! -- modules
use OpenSpecModule, only: access, form
! -- dummy
- class(GwfDisType) :: this
+ class(DisType) :: this
integer(I4B), dimension(:), intent(in) :: icelltype
! -- local
integer(I4B) :: iunit, ntxt, ncpl
@@ -644,7 +661,7 @@ end subroutine write_grb
!<
subroutine nodeu_to_string(this, nodeu, str)
! -- dummy
- class(GwfDisType) :: this
+ class(DisType) :: this
integer(I4B), intent(in) :: nodeu
character(len=*), intent(inout) :: str
! -- local
@@ -665,7 +682,7 @@ end subroutine nodeu_to_string
!<
subroutine nodeu_to_array(this, nodeu, arr)
! -- dummy
- class(GwfDisType) :: this
+ class(DisType) :: this
integer(I4B), intent(in) :: nodeu
integer(I4B), dimension(:), intent(inout) :: arr
! -- local
@@ -697,7 +714,7 @@ function get_nodenumber_idx1(this, nodeu, icheck) result(nodenumber)
! -- return
integer(I4B) :: nodenumber
! -- dummy
- class(GwfDisType), intent(in) :: this
+ class(DisType), intent(in) :: this
integer(I4B), intent(in) :: nodeu
integer(I4B), intent(in) :: icheck
!
@@ -728,7 +745,7 @@ function get_nodenumber_idx3(this, k, i, j, icheck) result(nodenumber)
! -- return
integer(I4B) :: nodenumber
! -- dummy
- class(GwfDisType), intent(in) :: this
+ class(DisType), intent(in) :: this
integer(I4B), intent(in) :: k, i, j
integer(I4B), intent(in) :: icheck
! -- local
@@ -770,7 +787,7 @@ end function get_nodenumber_idx3
!<
subroutine allocate_scalars(this, name_model, input_mempath)
! -- dummy
- class(GwfDisType) :: this
+ class(DisType) :: this
character(len=*), intent(in) :: name_model
character(len=*), intent(in) :: input_mempath
!
@@ -794,12 +811,12 @@ end subroutine allocate_scalars
!<
subroutine allocate_arrays(this)
! -- dummy
- class(GwfDisType) :: this
+ class(DisType) :: this
!
! -- Allocate arrays in DisBaseType (mshape, top, bot, area)
call this%DisBaseType%allocate_arrays()
!
- ! -- Allocate arrays for GwfDisType
+ ! -- Allocate arrays for DisType
if (this%nodes < this%nodesuser) then
call mem_allocate(this%nodeuser, this%nodes, 'NODEUSER', this%memoryPath)
call mem_allocate(this%nodereduced, this%nodesuser, 'NODEREDUCED', &
@@ -825,7 +842,7 @@ end subroutine allocate_arrays
function nodeu_from_string(this, lloc, istart, istop, in, iout, line, &
flag_string, allow_zero) result(nodeu)
! -- dummy
- class(GwfDisType) :: this
+ class(DisType) :: this
integer(I4B), intent(inout) :: lloc
integer(I4B), intent(inout) :: istart
integer(I4B), intent(inout) :: istop
@@ -918,7 +935,7 @@ function nodeu_from_cellid(this, cellid, inunit, iout, flag_string, &
! -- return
integer(I4B) :: nodeu
! -- dummy
- class(GwfDisType) :: this
+ class(DisType) :: this
character(len=*), intent(inout) :: cellid
integer(I4B), intent(in) :: inunit
integer(I4B), intent(in) :: iout
@@ -1000,7 +1017,7 @@ end function nodeu_from_cellid
!<
logical function supports_layers(this)
! -- dummy
- class(GwfDisType) :: this
+ class(DisType) :: this
!
supports_layers = .true.
!
@@ -1010,7 +1027,7 @@ end function supports_layers
!<
function get_ncpl(this)
integer(I4B) :: get_ncpl
- class(GwfDisType) :: this
+ class(DisType) :: this
get_ncpl = this%nrow * this%ncol
end function get_ncpl
@@ -1021,7 +1038,7 @@ end function get_ncpl
subroutine connection_normal(this, noden, nodem, ihc, xcomp, ycomp, zcomp, &
ipos)
! -- dummy
- class(GwfDisType) :: this
+ class(DisType) :: this
integer(I4B), intent(in) :: noden !< cell (reduced nn)
integer(I4B), intent(in) :: nodem !< neighbor (reduced nn)
integer(I4B), intent(in) :: ihc !< horizontal connection flag
@@ -1078,7 +1095,7 @@ subroutine connection_vector(this, noden, nodem, nozee, satn, satm, ihc, &
! -- modules
use DisvGeom, only: line_unit_vector
! -- dummy
- class(GwfDisType) :: this
+ class(DisType) :: this
integer(I4B), intent(in) :: noden !< cell (reduced nn)
integer(I4B), intent(in) :: nodem !< neighbor (reduced nn)
logical, intent(in) :: nozee
@@ -1147,7 +1164,7 @@ subroutine connection_vector(this, noden, nodem, nozee, satn, satm, ihc, &
!<
subroutine get_dis_type(this, dis_type)
! -- dummy
- class(GwfDisType), intent(in) :: this
+ class(DisType), intent(in) :: this
character(len=*), intent(out) :: dis_type
!
dis_type = "DIS"
@@ -1160,7 +1177,7 @@ end subroutine get_dis_type
!<
subroutine get_polyverts(this, ic, polyverts, closed)
! -- dummy
- class(GwfDisType), intent(inout) :: this
+ class(DisType), intent(inout) :: this
integer(I4B), intent(in) :: ic !< cell number (reduced)
real(DP), allocatable, intent(out) :: polyverts(:, :) !< polygon vertices (column-major indexing)
logical(LGP), intent(in), optional :: closed !< whether to close the polygon, duplicating a vertex
@@ -1208,7 +1225,7 @@ subroutine get_polyverts(this, ic, polyverts, closed)
subroutine read_int_array(this, line, lloc, istart, istop, iout, in, &
iarray, aname)
! -- dummy
- class(GwfDisType), intent(inout) :: this
+ class(DisType), intent(inout) :: this
character(len=*), intent(inout) :: line
integer(I4B), intent(inout) :: lloc
integer(I4B), intent(inout) :: istart
@@ -1267,7 +1284,7 @@ end subroutine read_int_array
subroutine read_dbl_array(this, line, lloc, istart, istop, iout, in, &
darray, aname)
! -- dummy
- class(GwfDisType), intent(inout) :: this
+ class(DisType), intent(inout) :: this
character(len=*), intent(inout) :: line
integer(I4B), intent(inout) :: lloc
integer(I4B), intent(inout) :: istart
@@ -1329,7 +1346,7 @@ end subroutine read_dbl_array
subroutine read_layer_array(this, nodelist, darray, ncolbnd, maxbnd, &
icolbnd, aname, inunit, iout)
! -- dummy
- class(GwfDisType) :: this
+ class(DisType) :: this
integer(I4B), intent(in) :: maxbnd
integer(I4B), dimension(maxbnd) :: nodelist
integer(I4B), intent(in) :: ncolbnd
@@ -1375,7 +1392,7 @@ end subroutine read_layer_array
subroutine record_array(this, darray, iout, iprint, idataun, aname, &
cdatafmp, nvaluesp, nwidthp, editdesc, dinact)
! -- dummy
- class(GwfDisType), intent(inout) :: this
+ class(DisType), intent(inout) :: this
real(DP), dimension(:), pointer, contiguous, intent(inout) :: darray !< double precision array to record
integer(I4B), intent(in) :: iout !< ascii output unit number
integer(I4B), intent(in) :: iprint !< whether to print the array
@@ -1464,7 +1481,7 @@ subroutine record_srcdst_list_header(this, text, textmodel, textpackage, &
dstmodel, dstpackage, naux, auxtxt, &
ibdchn, nlist, iout)
! -- dummy
- class(GwfDisType) :: this
+ class(DisType) :: this
character(len=16), intent(in) :: text
character(len=16), intent(in) :: textmodel
character(len=16), intent(in) :: textpackage
@@ -1493,7 +1510,7 @@ end subroutine record_srcdst_list_header
!<
subroutine nlarray_to_nodelist(this, darray, nodelist, maxbnd, nbound, aname)
! -- dummy
- class(GwfDisType) :: this
+ class(DisType) :: this
integer(I4B), intent(in) :: maxbnd
integer(I4B), dimension(:), pointer, contiguous :: darray
integer(I4B), dimension(maxbnd), intent(inout) :: nodelist
@@ -1565,4 +1582,4 @@ subroutine nlarray_to_nodelist(this, darray, nodelist, maxbnd, nbound, aname)
!
end subroutine nlarray_to_nodelist
-end module GwfDisModule
+end module DisModule
diff --git a/src/Model/GroundWaterFlow/gwf-disu.f90 b/src/Model/Discretization/Disu.f90
similarity index 95%
rename from src/Model/GroundWaterFlow/gwf-disu.f90
rename to src/Model/Discretization/Disu.f90
index e5ee2aaac74..0a24483f4f1 100644
--- a/src/Model/GroundWaterFlow/gwf-disu.f90
+++ b/src/Model/Discretization/Disu.f90
@@ -1,4 +1,4 @@
-module GwfDisuModule
+module DisuModule
use ArrayReadersModule, only: ReadArray
use KindModule, only: DP, I4B, LGP
@@ -15,17 +15,17 @@ module GwfDisuModule
mem_reallocate, mem_setptr
use MemoryManagerExtModule, only: mem_set_value, memorylist_remove
use TdisModule, only: kstp, kper, pertim, totim, delt
- use GwfDisuInputModule, only: GwfDisuParamFoundType
use DisvGeom, only: line_unit_vector
implicit none
private
- public :: GwfDisuType
+ public :: DisuType
public :: disu_cr
public :: CastAsDisuType
- type, extends(DisBaseType) :: GwfDisuType
+ !> @brief Unstructured grid discretization
+ type, extends(DisBaseType) :: DisuType
integer(I4B), pointer :: njausr => null() ! user-specified nja size
integer(I4B), pointer :: nvert => null() ! number of x,y vertices
real(DP), pointer :: voffsettol => null() ! vertical offset tolerance
@@ -86,7 +86,37 @@ module GwfDisuModule
procedure :: read_int_array
procedure :: read_dbl_array
- end type GwfDisuType
+ end type DisuType
+
+ type DisuFoundType
+ logical :: length_units = .false.
+ logical :: nogrb = .false.
+ logical :: xorigin = .false.
+ logical :: yorigin = .false.
+ logical :: angrot = .false.
+ logical :: voffsettol = .false.
+ logical :: nodes = .false.
+ logical :: nja = .false.
+ logical :: nvert = .false.
+ logical :: top = .false.
+ logical :: bot = .false.
+ logical :: area = .false.
+ logical :: idomain = .false.
+ logical :: iac = .false.
+ logical :: ja = .false.
+ logical :: ihc = .false.
+ logical :: cl12 = .false.
+ logical :: hwva = .false.
+ logical :: angldegx = .false.
+ logical :: iv = .false.
+ logical :: xv = .false.
+ logical :: yv = .false.
+ logical :: icell2d = .false.
+ logical :: xc = .false.
+ logical :: yc = .false.
+ logical :: ncvert = .false.
+ logical :: icvert = .false.
+ end type DisuFoundType
contains
@@ -100,7 +130,7 @@ subroutine disu_cr(dis, name_model, input_mempath, inunit, iout)
integer(I4B), intent(in) :: inunit
integer(I4B), intent(in) :: iout
! -- local
- type(GwfDisuType), pointer :: disnew
+ type(DisuType), pointer :: disnew
character(len=*), parameter :: fmtheader = &
"(1X, /1X, 'DISU -- UNSTRUCTURED GRID DISCRETIZATION PACKAGE,', &
&' VERSION 2 : 3/27/2014 - INPUT READ FROM MEMPATH: ', A, //)"
@@ -132,7 +162,7 @@ end subroutine disu_cr
!<
subroutine disu_load(this)
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
!
! -- source input data
call this%source_options()
@@ -159,7 +189,7 @@ end subroutine disu_load
!<
subroutine disu_df(this)
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
!
call this%grid_finalize()
!
@@ -169,7 +199,7 @@ end subroutine disu_df
!<
subroutine grid_finalize(this)
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
! -- locals
integer(I4B) :: n
integer(I4B) :: node
@@ -279,7 +309,7 @@ end subroutine grid_finalize
!<
subroutine disu_ck(this)
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
! -- local
integer(I4B) :: n, m
integer(I4B) :: ipos
@@ -399,7 +429,7 @@ end subroutine disu_ck
!<
subroutine disu_da(this)
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
!
! -- Deallocate idm memory
call memorylist_remove(this%name_model, 'DISU', idm_context)
@@ -445,7 +475,7 @@ end subroutine disu_da
!<
subroutine nodeu_to_string(this, nodeu, str)
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
integer(I4B), intent(in) :: nodeu
character(len=*), intent(inout) :: str
! -- local
@@ -459,7 +489,7 @@ end subroutine nodeu_to_string
!> @brief Convert a user nodenumber to an array (nodenumber)
!<
subroutine nodeu_to_array(this, nodeu, arr)
- class(GwfDisuType) :: this
+ class(DisuType) :: this
integer(I4B), intent(in) :: nodeu
integer(I4B), dimension(:), intent(inout) :: arr
! -- local
@@ -479,12 +509,39 @@ subroutine nodeu_to_array(this, nodeu, arr)
!
end subroutine nodeu_to_array
+ !> @brief Copy options from IDM into package
+ !<
+ subroutine source_options(this)
+ ! -- dummy
+ class(DisuType) :: this
+ ! -- locals
+ character(len=LENVARNAME), dimension(3) :: lenunits = &
+ &[character(len=LENVARNAME) :: 'FEET', 'METERS', 'CENTIMETERS']
+ type(DisuFoundType) :: found
+ !
+ ! -- update defaults with idm sourced values
+ call mem_set_value(this%lenuni, 'LENGTH_UNITS', this%input_mempath, &
+ lenunits, found%length_units)
+ call mem_set_value(this%nogrb, 'NOGRB', this%input_mempath, found%nogrb)
+ call mem_set_value(this%xorigin, 'XORIGIN', this%input_mempath, found%xorigin)
+ call mem_set_value(this%yorigin, 'YORIGIN', this%input_mempath, found%yorigin)
+ call mem_set_value(this%angrot, 'ANGROT', this%input_mempath, found%angrot)
+ call mem_set_value(this%voffsettol, 'VOFFSETTOL', this%input_mempath, &
+ found%voffsettol)
+ !
+ ! -- log values to list file
+ if (this%iout > 0) then
+ call this%log_options(found)
+ end if
+ !
+ end subroutine source_options
+
!> @brief Write user options to list file
!<
subroutine log_options(this, found)
! -- dummy
- class(GwfDisuType) :: this
- type(GwfDisuParamFoundType), intent(in) :: found
+ class(DisuType) :: this
+ type(DisuFoundType), intent(in) :: found
!
write (this%iout, '(1x,a)') 'Setting Discretization Options'
!
@@ -519,65 +576,14 @@ subroutine log_options(this, found)
!
end subroutine log_options
- !> @brief Copy options from IDM into package
- !<
- subroutine source_options(this)
- ! -- dummy
- class(GwfDisuType) :: this
- ! -- locals
- character(len=LENVARNAME), dimension(3) :: lenunits = &
- &[character(len=LENVARNAME) :: 'FEET', 'METERS', 'CENTIMETERS']
- type(GwfDisuParamFoundType) :: found
- !
- ! -- update defaults with idm sourced values
- call mem_set_value(this%lenuni, 'LENGTH_UNITS', this%input_mempath, &
- lenunits, found%length_units)
- call mem_set_value(this%nogrb, 'NOGRB', this%input_mempath, found%nogrb)
- call mem_set_value(this%xorigin, 'XORIGIN', this%input_mempath, found%xorigin)
- call mem_set_value(this%yorigin, 'YORIGIN', this%input_mempath, found%yorigin)
- call mem_set_value(this%angrot, 'ANGROT', this%input_mempath, found%angrot)
- call mem_set_value(this%voffsettol, 'VOFFSETTOL', this%input_mempath, &
- found%voffsettol)
- !
- ! -- log values to list file
- if (this%iout > 0) then
- call this%log_options(found)
- end if
- !
- end subroutine source_options
-
- !> @brief Write dimensions to list file
- !<
- subroutine log_dimensions(this, found)
- class(GwfDisuType) :: this
- type(GwfDisuParamFoundType), intent(in) :: found
- !
- write (this%iout, '(1x,a)') 'Setting Discretization Dimensions'
- !
- if (found%nodes) then
- write (this%iout, '(4x,a,i0)') 'NODES = ', this%nodesuser
- end if
- !
- if (found%nja) then
- write (this%iout, '(4x,a,i0)') 'NJA = ', this%njausr
- end if
- !
- if (found%nvert) then
- write (this%iout, '(4x,a,i0)') 'NVERT = ', this%nvert
- end if
- !
- write (this%iout, '(1x,a,/)') 'End Setting Discretization Dimensions'
- !
- end subroutine log_dimensions
-
!> @brief Copy dimensions from IDM into package
!<
subroutine source_dimensions(this)
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
! -- locals
integer(I4B) :: n
- type(GwfDisuParamFoundType) :: found
+ type(DisuFoundType) :: found
!
! -- update defaults with idm sourced values
call mem_set_value(this%nodesuser, 'NODES', this%input_mempath, found%nodes)
@@ -631,42 +637,37 @@ subroutine source_dimensions(this)
!
end subroutine source_dimensions
- !> @brief Write griddata found to list file
+ !> @brief Write dimensions to list file
!<
- subroutine log_griddata(this, found)
- ! -- dummy
- class(GwfDisuType) :: this
- type(GwfDisuParamFoundType), intent(in) :: found
- !
- write (this%iout, '(1x,a)') 'Setting Discretization Griddata'
+ subroutine log_dimensions(this, found)
+ class(DisuType) :: this
+ type(DisuFoundType), intent(in) :: found
!
- if (found%top) then
- write (this%iout, '(4x,a)') 'TOP set from input file'
- end if
+ write (this%iout, '(1x,a)') 'Setting Discretization Dimensions'
!
- if (found%bot) then
- write (this%iout, '(4x,a)') 'BOT set from input file'
+ if (found%nodes) then
+ write (this%iout, '(4x,a,i0)') 'NODES = ', this%nodesuser
end if
!
- if (found%area) then
- write (this%iout, '(4x,a)') 'AREA set from input file'
+ if (found%nja) then
+ write (this%iout, '(4x,a,i0)') 'NJA = ', this%njausr
end if
!
- if (found%idomain) then
- write (this%iout, '(4x,a)') 'IDOMAIN set from input file'
+ if (found%nvert) then
+ write (this%iout, '(4x,a,i0)') 'NVERT = ', this%nvert
end if
!
- write (this%iout, '(1x,a,/)') 'End Setting Discretization Griddata'
+ write (this%iout, '(1x,a,/)') 'End Setting Discretization Dimensions'
!
- end subroutine log_griddata
+ end subroutine log_dimensions
!> @brief Copy grid data from IDM into package
!<
subroutine source_griddata(this)
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
! -- locals
- type(GwfDisuParamFoundType) :: found
+ type(DisuFoundType) :: found
!
! -- update defaults with idm sourced values
call mem_set_value(this%top1d, 'TOP', this%input_mempath, found%top)
@@ -683,48 +684,40 @@ end subroutine source_griddata
!> @brief Write griddata found to list file
!<
- subroutine log_connectivity(this, found, iac)
- class(GwfDisuType) :: this
- type(GwfDisuParamFoundType), intent(in) :: found
- integer(I4B), dimension(:), contiguous, pointer, intent(in) :: iac
- !
- write (this%iout, '(1x,a)') 'Setting Discretization Connectivity'
- !
- if (associated(iac)) then
- write (this%iout, '(4x,a)') 'IAC set from input file'
- end if
+ subroutine log_griddata(this, found)
+ ! -- dummy
+ class(DisuType) :: this
+ type(DisuFoundType), intent(in) :: found
!
- if (found%ja) then
- write (this%iout, '(4x,a)') 'JA set from input file'
- end if
+ write (this%iout, '(1x,a)') 'Setting Discretization Griddata'
!
- if (found%ihc) then
- write (this%iout, '(4x,a)') 'IHC set from input file'
+ if (found%top) then
+ write (this%iout, '(4x,a)') 'TOP set from input file'
end if
!
- if (found%cl12) then
- write (this%iout, '(4x,a)') 'CL12 set from input file'
+ if (found%bot) then
+ write (this%iout, '(4x,a)') 'BOT set from input file'
end if
!
- if (found%hwva) then
- write (this%iout, '(4x,a)') 'HWVA set from input file'
+ if (found%area) then
+ write (this%iout, '(4x,a)') 'AREA set from input file'
end if
!
- if (found%angldegx) then
- write (this%iout, '(4x,a)') 'ANGLDEGX set from input file'
+ if (found%idomain) then
+ write (this%iout, '(4x,a)') 'IDOMAIN set from input file'
end if
!
- write (this%iout, '(1x,a,/)') 'End Setting Discretization Connectivity'
+ write (this%iout, '(1x,a,/)') 'End Setting Discretization Griddata'
!
- end subroutine log_connectivity
+ end subroutine log_griddata
!> @brief Copy grid connectivity info from IDM into package
!<
subroutine source_connectivity(this)
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
! -- locals
- type(GwfDisuParamFoundType) :: found
+ type(DisuFoundType) :: found
integer(I4B), dimension(:), contiguous, pointer :: iac => null()
! -- formats
!
@@ -752,11 +745,48 @@ subroutine source_connectivity(this)
!
end subroutine source_connectivity
+ !> @brief Write griddata found to list file
+ !<
+ subroutine log_connectivity(this, found, iac)
+ class(DisuType) :: this
+ type(DisuFoundType), intent(in) :: found
+ integer(I4B), dimension(:), contiguous, pointer, intent(in) :: iac
+ !
+ write (this%iout, '(1x,a)') 'Setting Discretization Connectivity'
+ !
+ if (associated(iac)) then
+ write (this%iout, '(4x,a)') 'IAC set from input file'
+ end if
+ !
+ if (found%ja) then
+ write (this%iout, '(4x,a)') 'JA set from input file'
+ end if
+ !
+ if (found%ihc) then
+ write (this%iout, '(4x,a)') 'IHC set from input file'
+ end if
+ !
+ if (found%cl12) then
+ write (this%iout, '(4x,a)') 'CL12 set from input file'
+ end if
+ !
+ if (found%hwva) then
+ write (this%iout, '(4x,a)') 'HWVA set from input file'
+ end if
+ !
+ if (found%angldegx) then
+ write (this%iout, '(4x,a)') 'ANGLDEGX set from input file'
+ end if
+ !
+ write (this%iout, '(1x,a,/)') 'End Setting Discretization Connectivity'
+ !
+ end subroutine log_connectivity
+
!> @brief Copy grid vertex data from IDM into package
!<
subroutine source_vertices(this)
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
! -- local
integer(I4B) :: i
real(DP), dimension(:), contiguous, pointer :: vert_x => null()
@@ -790,7 +820,7 @@ subroutine define_cellverts(this, icell2d, ncvert, icvert)
! -- modules
use SparseModule, only: sparsematrix
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
integer(I4B), dimension(:), contiguous, pointer, intent(in) :: icell2d
integer(I4B), dimension(:), contiguous, pointer, intent(in) :: ncvert
integer(I4B), dimension(:), contiguous, pointer, intent(in) :: icvert
@@ -829,7 +859,7 @@ end subroutine define_cellverts
!<
subroutine source_cell2d(this)
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
! -- locals
integer(I4B), dimension(:), contiguous, pointer :: icell2d => null()
integer(I4B), dimension(:), contiguous, pointer :: ncvert => null()
@@ -878,7 +908,7 @@ subroutine write_grb(this, icelltype)
! -- modules
use OpenSpecModule, only: access, form
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
integer(I4B), dimension(:), intent(in) :: icelltype
! -- local
integer(I4B) :: i, iunit, ntxt
@@ -996,7 +1026,7 @@ end subroutine write_grb
!> @brief Get reduced node number from user node number
!<
function get_nodenumber_idx1(this, nodeu, icheck) result(nodenumber)
- class(GwfDisuType), intent(in) :: this
+ class(DisuType), intent(in) :: this
integer(I4B), intent(in) :: nodeu
integer(I4B), intent(in) :: icheck
integer(I4B) :: nodenumber
@@ -1027,7 +1057,7 @@ end function get_nodenumber_idx1
subroutine connection_normal(this, noden, nodem, ihc, xcomp, ycomp, zcomp, &
ipos)
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
integer(I4B), intent(in) :: noden !< cell (reduced nn)
integer(I4B), intent(in) :: nodem !< neighbor (reduced nn)
integer(I4B), intent(in) :: ihc !< horizontal connection flag
@@ -1074,7 +1104,7 @@ end subroutine connection_normal
subroutine connection_vector(this, noden, nodem, nozee, satn, satm, ihc, &
xcomp, ycomp, zcomp, conlen)
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
integer(I4B), intent(in) :: noden
integer(I4B), intent(in) :: nodem
logical, intent(in) :: nozee
@@ -1132,7 +1162,7 @@ end subroutine connection_vector
!<
subroutine get_dis_type(this, dis_type)
! -- dummy
- class(GwfDisuType), intent(in) :: this
+ class(DisuType), intent(in) :: this
character(len=*), intent(out) :: dis_type
!
dis_type = "DISU"
@@ -1143,7 +1173,7 @@ end subroutine get_dis_type
!<
subroutine allocate_scalars(this, name_model, input_mempath)
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
character(len=*), intent(in) :: name_model
character(len=*), intent(in) :: input_mempath
!
@@ -1170,7 +1200,7 @@ end subroutine allocate_scalars
!<
subroutine allocate_arrays(this)
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
!
! -- Allocate arrays in DisBaseType (mshape, top, bot, area)
call this%DisBaseType%allocate_arrays()
@@ -1196,7 +1226,7 @@ subroutine allocate_arrays_mem(this)
! -- modules
use MemoryManagerModule, only: mem_allocate
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
!
call mem_allocate(this%idomain, this%nodes, 'IDOMAIN', this%memoryPath)
call mem_allocate(this%vertices, 2, this%nvert, 'VERTICES', this%memoryPath)
@@ -1213,7 +1243,7 @@ end subroutine allocate_arrays_mem
function nodeu_from_string(this, lloc, istart, istop, in, iout, line, &
flag_string, allow_zero) result(nodeu)
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
integer(I4B), intent(inout) :: lloc
integer(I4B), intent(inout) :: istart
integer(I4B), intent(inout) :: istop
@@ -1275,7 +1305,7 @@ function nodeu_from_cellid(this, cellid, inunit, iout, flag_string, &
! -- return
integer(I4B) :: nodeu
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
character(len=*), intent(inout) :: cellid
integer(I4B), intent(in) :: inunit
integer(I4B), intent(in) :: iout
@@ -1326,7 +1356,7 @@ end function nodeu_from_cellid
!<
logical function supports_layers(this)
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
!
supports_layers = .false.
!
@@ -1338,7 +1368,7 @@ function get_ncpl(this)
! -- return
integer(I4B) :: get_ncpl
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
!
get_ncpl = this%nodesuser
!
@@ -1349,7 +1379,7 @@ end function get_ncpl
subroutine read_int_array(this, line, lloc, istart, istop, iout, in, &
iarray, aname)
! -- dummy
- class(GwfDisuType), intent(inout) :: this
+ class(DisuType), intent(inout) :: this
character(len=*), intent(inout) :: line
integer(I4B), intent(inout) :: lloc
integer(I4B), intent(inout) :: istart
@@ -1390,7 +1420,7 @@ end subroutine read_int_array
subroutine read_dbl_array(this, line, lloc, istart, istop, iout, in, &
darray, aname)
! -- dummy
- class(GwfDisuType), intent(inout) :: this
+ class(DisuType), intent(inout) :: this
character(len=*), intent(inout) :: line
integer(I4B), intent(inout) :: lloc
integer(I4B), intent(inout) :: istart
@@ -1433,7 +1463,7 @@ end subroutine read_dbl_array
subroutine record_array(this, darray, iout, iprint, idataun, aname, &
cdatafmp, nvaluesp, nwidthp, editdesc, dinact)
! -- dummy
- class(GwfDisuType), intent(inout) :: this
+ class(DisuType), intent(inout) :: this
real(DP), dimension(:), pointer, contiguous, intent(inout) :: darray !< double precision array to record
integer(I4B), intent(in) :: iout !< ascii output unit number
integer(I4B), intent(in) :: iprint !< whether to print the array
@@ -1522,7 +1552,7 @@ subroutine record_srcdst_list_header(this, text, textmodel, textpackage, &
dstmodel, dstpackage, naux, auxtxt, &
ibdchn, nlist, iout)
! -- dummy
- class(GwfDisuType) :: this
+ class(DisuType) :: this
character(len=16), intent(in) :: text
character(len=16), intent(in) :: textmodel
character(len=16), intent(in) :: textpackage
@@ -1553,14 +1583,14 @@ function CastAsDisuType(dis) result(disu)
! -- dummy
class(*), pointer :: dis !< base pointer to DISU object
! -- return
- class(GwfDisuType), pointer :: disu !< the resulting DISU pointer
+ class(DisuType), pointer :: disu !< the resulting DISU pointer
!
disu => null()
select type (dis)
- class is (GwfDisuType)
+ class is (DisuType)
disu => dis
end select
!
end function CastAsDisuType
-end module GwfDisuModule
+end module DisuModule
diff --git a/src/Model/GroundWaterFlow/gwf-disv.f90 b/src/Model/Discretization/Disv.f90
similarity index 95%
rename from src/Model/GroundWaterFlow/gwf-disv.f90
rename to src/Model/Discretization/Disv.f90
index 63752778967..846539d7248 100644
--- a/src/Model/GroundWaterFlow/gwf-disv.f90
+++ b/src/Model/Discretization/Disv.f90
@@ -1,4 +1,4 @@
-module GwfDisvModule
+module DisvModule
use ArrayReadersModule, only: ReadArray
use KindModule, only: DP, I4B, LGP
@@ -15,23 +15,23 @@ module GwfDisvModule
use MemoryManagerModule, only: mem_allocate, mem_deallocate, mem_setptr
use MemoryManagerExtModule, only: mem_set_value, memorylist_remove
use TdisModule, only: kstp, kper, pertim, totim, delt
- use GwfDisvInputModule, only: GwfDisvParamFoundType
implicit none
private
- public disv_cr, GwfDisvType
+ public disv_cr, DisvType
- type, extends(DisBaseType) :: GwfDisvType
- integer(I4B), pointer :: nlay => null() ! number of layers
- integer(I4B), pointer :: ncpl => null() ! number of cells per layer
- integer(I4B), pointer :: nvert => null() ! number of x,y vertices
- real(DP), dimension(:, :), pointer, contiguous :: vertices => null() ! cell vertices stored as 2d array of x and y
- real(DP), dimension(:, :), pointer, contiguous :: cellxy => null() ! cell center stored as 2d array of x and y
- integer(I4B), dimension(:), pointer, contiguous :: iavert => null() ! cell vertex pointer ia array
- integer(I4B), dimension(:), pointer, contiguous :: javert => null() ! cell vertex pointer ja array
- real(DP), dimension(:), pointer, contiguous :: top1d => null() ! top elevations for each cell at top of model (ncpl)
- real(DP), dimension(:, :), pointer, contiguous :: bot2d => null() ! bottom elevations for each cell (ncpl, nlay)
- integer(I4B), dimension(:, :), pointer, contiguous :: idomain => null() ! idomain (ncpl, nlay)
+ !> @brief Vertex grid discretization
+ type, extends(DisBaseType) :: DisvType
+ integer(I4B), pointer :: nlay => null() !< number of layers
+ integer(I4B), pointer :: ncpl => null() !< number of cells per layer
+ integer(I4B), pointer :: nvert => null() !< number of x,y vertices
+ real(DP), dimension(:, :), pointer, contiguous :: vertices => null() !< cell vertices stored as 2d array of x and y
+ real(DP), dimension(:, :), pointer, contiguous :: cellxy => null() !< cell center stored as 2d array of x and y
+ integer(I4B), dimension(:), pointer, contiguous :: iavert => null() !< cell vertex pointer ia array
+ integer(I4B), dimension(:), pointer, contiguous :: javert => null() !< cell vertex pointer ja array
+ real(DP), dimension(:), pointer, contiguous :: top1d => null() !< top elevations for each cell at top of model (ncpl)
+ real(DP), dimension(:, :), pointer, contiguous :: bot2d => null() !< bottom elevations for each cell (ncpl, nlay)
+ integer(I4B), dimension(:, :), pointer, contiguous :: idomain => null() !< idomain (ncpl, nlay)
contains
@@ -59,11 +59,11 @@ module GwfDisvModule
procedure :: source_options
procedure :: source_dimensions
procedure :: source_griddata
- procedure :: source_vertices
- procedure :: source_cell2d
procedure :: log_options
procedure :: log_dimensions
procedure :: log_griddata
+ procedure :: source_vertices
+ procedure :: source_cell2d
procedure :: define_cellverts
procedure :: grid_finalize
procedure :: connect
@@ -76,7 +76,29 @@ module GwfDisvModule
procedure :: read_int_array
procedure :: read_dbl_array
- end type GwfDisvType
+ end type DisvType
+
+ type DisvFoundType
+ logical :: length_units = .false.
+ logical :: nogrb = .false.
+ logical :: xorigin = .false.
+ logical :: yorigin = .false.
+ logical :: angrot = .false.
+ logical :: nlay = .false.
+ logical :: ncpl = .false.
+ logical :: nvert = .false.
+ logical :: top = .false.
+ logical :: botm = .false.
+ logical :: idomain = .false.
+ logical :: iv = .false.
+ logical :: xv = .false.
+ logical :: yv = .false.
+ logical :: icell2d = .false.
+ logical :: xc = .false.
+ logical :: yc = .false.
+ logical :: ncvert = .false.
+ logical :: icvert = .false.
+ end type DisvFoundType
contains
@@ -90,7 +112,7 @@ subroutine disv_cr(dis, name_model, input_mempath, inunit, iout)
integer(I4B), intent(in) :: inunit
integer(I4B), intent(in) :: iout
! -- local
- type(GwfDisvType), pointer :: disnew
+ type(DisvType), pointer :: disnew
! -- formats
character(len=*), parameter :: fmtheader = &
"(1X, /1X, 'DISV -- VERTEX GRID DISCRETIZATION PACKAGE,', &
@@ -120,7 +142,7 @@ end subroutine disv_cr
!<
subroutine disv_load(this)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
!
! -- source input data
call this%source_options()
@@ -135,7 +157,7 @@ end subroutine disv_load
!<
subroutine disv_df(this)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
!
call this%grid_finalize()
!
@@ -145,7 +167,7 @@ end subroutine disv_df
!<
subroutine disv_da(this)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
!
! -- Deallocate idm memory
call memorylist_remove(this%name_model, 'DISV', idm_context)
@@ -177,11 +199,11 @@ end subroutine disv_da
!<
subroutine source_options(this)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
! -- locals
character(len=LENVARNAME), dimension(3) :: lenunits = &
&[character(len=LENVARNAME) :: 'FEET', 'METERS', 'CENTIMETERS']
- type(GwfDisvParamFoundType) :: found
+ type(DisvFoundType) :: found
!
! -- update defaults with idm sourced values
call mem_set_value(this%lenuni, 'LENGTH_UNITS', this%input_mempath, &
@@ -202,8 +224,8 @@ end subroutine source_options
!<
subroutine log_options(this, found)
! -- dummy
- class(GwfDisvType) :: this
- type(GwfDisvParamFoundType), intent(in) :: found
+ class(DisvType) :: this
+ type(DisvFoundType), intent(in) :: found
!
write (this%iout, '(1x,a)') 'Setting Discretization Options'
!
@@ -237,10 +259,10 @@ end subroutine log_options
!<
subroutine source_dimensions(this)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
! -- locals
integer(I4B) :: j, k
- type(GwfDisvParamFoundType) :: found
+ type(DisvFoundType) :: found
!
! -- update defaults with idm sourced values
call mem_set_value(this%nlay, 'NLAY', this%input_mempath, found%nlay)
@@ -296,8 +318,8 @@ end subroutine source_dimensions
!<
subroutine log_dimensions(this, found)
! -- dummy
- class(GwfDisvType) :: this
- type(GwfDisvParamFoundType), intent(in) :: found
+ class(DisvType) :: this
+ type(DisvFoundType), intent(in) :: found
!
write (this%iout, '(1x,a)') 'Setting Discretization Dimensions'
!
@@ -321,10 +343,9 @@ end subroutine log_dimensions
!<
subroutine source_griddata(this)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
! -- locals
- type(GwfDisvParamFoundType) :: found
- ! -- formats
+ type(DisvFoundType) :: found
!
! -- update defaults with idm sourced values
call mem_set_value(this%top1d, 'TOP', this%input_mempath, found%top)
@@ -342,8 +363,8 @@ end subroutine source_griddata
!<
subroutine log_griddata(this, found)
! -- dummy
- class(GwfDisvType) :: this
- type(GwfDisvParamFoundType), intent(in) :: found
+ class(DisvType) :: this
+ type(DisvFoundType), intent(in) :: found
!
write (this%iout, '(1x,a)') 'Setting Discretization Griddata'
!
@@ -367,7 +388,7 @@ end subroutine log_griddata
!<
subroutine grid_finalize(this)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
! -- locals
integer(I4B) :: node, noder, j, k
real(DP) :: top
@@ -494,7 +515,7 @@ end subroutine grid_finalize
!<
subroutine source_vertices(this)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
! -- local
integer(I4B) :: i
real(DP), dimension(:), contiguous, pointer :: vert_x => null()
@@ -527,7 +548,7 @@ subroutine define_cellverts(this, icell2d, ncvert, icvert)
! -- modules
use SparseModule, only: sparsematrix
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
integer(I4B), dimension(:), contiguous, pointer, intent(in) :: icell2d
integer(I4B), dimension(:), contiguous, pointer, intent(in) :: ncvert
integer(I4B), dimension(:), contiguous, pointer, intent(in) :: icvert
@@ -566,7 +587,7 @@ end subroutine define_cellverts
!<
subroutine source_cell2d(this)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
! -- locals
integer(I4B), dimension(:), contiguous, pointer :: icell2d => null()
integer(I4B), dimension(:), contiguous, pointer :: ncvert => null()
@@ -614,7 +635,7 @@ end subroutine source_cell2d
!<
subroutine connect(this)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
! -- local
integer(I4B) :: j, k
integer(I4B) :: noder, nrsize
@@ -688,7 +709,7 @@ subroutine write_grb(this, icelltype)
! -- modules
use OpenSpecModule, only: access, form
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
integer(I4B), dimension(:), intent(in) :: icelltype
! -- local
integer(I4B) :: iunit, i, ntxt
@@ -820,7 +841,7 @@ end subroutine write_grb
!<
subroutine nodeu_to_string(this, nodeu, str)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
integer(I4B), intent(in) :: nodeu
character(len=*), intent(inout) :: str
! -- local
@@ -839,7 +860,7 @@ end subroutine nodeu_to_string
!<
subroutine nodeu_to_array(this, nodeu, arr)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
integer(I4B), intent(in) :: nodeu
integer(I4B), dimension(:), intent(inout) :: arr
! -- local
@@ -870,7 +891,7 @@ function get_nodenumber_idx1(this, nodeu, icheck) result(nodenumber)
! -- return
integer(I4B) :: nodenumber
! -- dummy
- class(GwfDisvType), intent(in) :: this
+ class(DisvType), intent(in) :: this
integer(I4B), intent(in) :: nodeu
integer(I4B), intent(in) :: icheck
! -- local
@@ -902,7 +923,7 @@ function get_nodenumber_idx2(this, k, j, icheck) result(nodenumber)
! -- return
integer(I4B) :: nodenumber
! -- dummy
- class(GwfDisvType), intent(in) :: this
+ class(DisvType), intent(in) :: this
integer(I4B), intent(in) :: k, j
integer(I4B), intent(in) :: icheck
! -- local
@@ -957,7 +978,7 @@ end function get_nodenumber_idx2
subroutine connection_normal(this, noden, nodem, ihc, xcomp, ycomp, zcomp, &
ipos)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
integer(I4B), intent(in) :: noden !< cell (reduced nn)
integer(I4B), intent(in) :: nodem !< neighbor (reduced nn)
integer(I4B), intent(in) :: ihc !< horizontal connection flag
@@ -1003,7 +1024,7 @@ end subroutine connection_normal
subroutine connection_vector(this, noden, nodem, nozee, satn, satm, ihc, &
xcomp, ycomp, zcomp, conlen)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
integer(I4B), intent(in) :: noden !< cell (reduced nn)
integer(I4B), intent(in) :: nodem !< neighbor (reduced nn)
logical, intent(in) :: nozee
@@ -1061,7 +1082,7 @@ end subroutine connection_vector
!<
subroutine get_dis_type(this, dis_type)
! -- dummy
- class(GwfDisvType), intent(in) :: this
+ class(DisvType), intent(in) :: this
character(len=*), intent(out) :: dis_type
!
dis_type = "DISV"
@@ -1072,7 +1093,7 @@ end subroutine get_dis_type
!<
subroutine allocate_scalars(this, name_model, input_mempath)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
character(len=*), intent(in) :: name_model
character(len=*), intent(in) :: input_mempath
!
@@ -1096,12 +1117,12 @@ end subroutine allocate_scalars
!<
subroutine allocate_arrays(this)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
!
! -- Allocate arrays in DisBaseType (mshape, top, bot, area)
call this%DisBaseType%allocate_arrays()
!
- ! -- Allocate arrays for GwfDisvType
+ ! -- Allocate arrays for DisvType
if (this%nodes < this%nodesuser) then
call mem_allocate(this%nodeuser, this%nodes, 'NODEUSER', this%memoryPath)
call mem_allocate(this%nodereduced, this%nodesuser, 'NODEREDUCED', &
@@ -1125,7 +1146,7 @@ end subroutine allocate_arrays
!<
function get_cell2d_area(this, icell2d) result(area)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
integer(I4B), intent(in) :: icell2d
! -- return
real(DP) :: area
@@ -1181,7 +1202,7 @@ end function get_cell2d_area
function nodeu_from_string(this, lloc, istart, istop, in, iout, line, &
flag_string, allow_zero) result(nodeu)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
integer(I4B), intent(inout) :: lloc
integer(I4B), intent(inout) :: istart
integer(I4B), intent(inout) :: istop
@@ -1268,7 +1289,7 @@ function nodeu_from_cellid(this, cellid, inunit, iout, flag_string, &
! -- return
integer(I4B) :: nodeu
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
character(len=*), intent(inout) :: cellid
integer(I4B), intent(in) :: inunit
integer(I4B), intent(in) :: iout
@@ -1344,7 +1365,7 @@ end function nodeu_from_cellid
!<
logical function supports_layers(this)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
!
supports_layers = .true.
!
@@ -1356,7 +1377,7 @@ function get_ncpl(this)
! -- return
integer(I4B) :: get_ncpl
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
!
get_ncpl = this%ncpl
!
@@ -1367,7 +1388,7 @@ end function get_ncpl
!<
subroutine get_polyverts(this, ic, polyverts, closed)
! -- dummy
- class(GwfDisvType), intent(inout) :: this
+ class(DisvType), intent(inout) :: this
integer(I4B), intent(in) :: ic !< cell number (reduced)
real(DP), allocatable, intent(out) :: polyverts(:, :) !< polygon vertices (column-major indexing)
logical(LGP), intent(in), optional :: closed !< whether to close the polygon, duplicating a vertex (default false)
@@ -1414,7 +1435,7 @@ subroutine get_polyverts(this, ic, polyverts, closed)
subroutine read_int_array(this, line, lloc, istart, istop, iout, in, &
iarray, aname)
! -- dummy
- class(GwfDisvType), intent(inout) :: this
+ class(DisvType), intent(inout) :: this
character(len=*), intent(inout) :: line
integer(I4B), intent(inout) :: lloc
integer(I4B), intent(inout) :: istart
@@ -1473,7 +1494,7 @@ end subroutine read_int_array
subroutine read_dbl_array(this, line, lloc, istart, istop, iout, in, &
darray, aname)
! -- dummy
- class(GwfDisvType), intent(inout) :: this
+ class(DisvType), intent(inout) :: this
character(len=*), intent(inout) :: line
integer(I4B), intent(inout) :: lloc
integer(I4B), intent(inout) :: istart
@@ -1535,7 +1556,7 @@ end subroutine read_dbl_array
subroutine read_layer_array(this, nodelist, darray, ncolbnd, maxbnd, &
icolbnd, aname, inunit, iout)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
integer(I4B), intent(in) :: ncolbnd
integer(I4B), intent(in) :: maxbnd
integer(I4B), dimension(maxbnd) :: nodelist
@@ -1579,7 +1600,7 @@ end subroutine read_layer_array
subroutine record_array(this, darray, iout, iprint, idataun, aname, &
cdatafmp, nvaluesp, nwidthp, editdesc, dinact)
! -- dummy
- class(GwfDisvType), intent(inout) :: this
+ class(DisvType), intent(inout) :: this
real(DP), dimension(:), pointer, contiguous, intent(inout) :: darray !< double precision array to record
integer(I4B), intent(in) :: iout !< ascii output unit number
integer(I4B), intent(in) :: iprint !< whether to print the array
@@ -1668,7 +1689,7 @@ subroutine record_srcdst_list_header(this, text, textmodel, textpackage, &
dstmodel, dstpackage, naux, auxtxt, &
ibdchn, nlist, iout)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
character(len=16), intent(in) :: text
character(len=16), intent(in) :: textmodel
character(len=16), intent(in) :: textpackage
@@ -1697,7 +1718,7 @@ end subroutine record_srcdst_list_header
!<
subroutine nlarray_to_nodelist(this, darray, nodelist, maxbnd, nbound, aname)
! -- dummy
- class(GwfDisvType) :: this
+ class(DisvType) :: this
integer(I4B), intent(in) :: maxbnd
integer(I4B), dimension(:), pointer, contiguous :: darray
integer(I4B), dimension(maxbnd), intent(inout) :: nodelist
@@ -1753,4 +1774,4 @@ subroutine nlarray_to_nodelist(this, darray, nodelist, maxbnd, nbound, aname)
!
end subroutine nlarray_to_nodelist
-end module GwfDisvModule
+end module DisvModule
diff --git a/src/Model/GroundWaterFlow/gwf.f90 b/src/Model/GroundWaterFlow/gwf.f90
index 21ee5400f06..1caed0d0fec 100644
--- a/src/Model/GroundWaterFlow/gwf.f90
+++ b/src/Model/GroundWaterFlow/gwf.f90
@@ -1468,9 +1468,9 @@ subroutine create_packages(this)
use MemoryManagerModule, only: mem_setptr
use MemoryHelperModule, only: create_mem_path
use SimVariablesModule, only: idm_context
- use GwfDisModule, only: dis_cr
- use GwfDisvModule, only: disv_cr
- use GwfDisuModule, only: disu_cr
+ use DisModule, only: dis_cr
+ use DisvModule, only: disv_cr
+ use DisuModule, only: disu_cr
use GwfNpfModule, only: npf_cr
use Xt3dModule, only: xt3d_cr
use GwfBuyModule, only: buy_cr
diff --git a/src/Model/ParticleTracking/prt-fmi.f90 b/src/Model/ParticleTracking/prt-fmi.f90
index 5fd7acb5f53..274dbc59192 100644
--- a/src/Model/ParticleTracking/prt-fmi.f90
+++ b/src/Model/ParticleTracking/prt-fmi.f90
@@ -155,7 +155,6 @@ end subroutine prtfmi_df
!> @brief Accumulate flows
subroutine accumulate_flows(this)
- use GwfDisvModule ! kluge???
implicit none
! -- dummy
class(PrtFmiType) :: this
diff --git a/src/Model/ParticleTracking/prt-prp.f90 b/src/Model/ParticleTracking/prt-prp.f90
index eb7c60e14a7..aa970c8ec9b 100644
--- a/src/Model/ParticleTracking/prt-prp.f90
+++ b/src/Model/ParticleTracking/prt-prp.f90
@@ -295,8 +295,8 @@ end subroutine prp_ar
subroutine prp_ad(this)
! -- modules
use TdisModule, only: totimc, delt, kstp
- use GwfDisModule, only: GwfDisType
- use GwfDisvModule, only: GwfDisvType
+ use DisModule, only: DisType
+ use DisvModule, only: DisvType
! -- dummy
class(PrtPrpType) :: this
! -- local
@@ -398,9 +398,9 @@ subroutine prp_ad(this)
particle%istopzone = this%istopzone
particle%icu = icu
select type (dis => this%dis)
- type is (GwfDisType)
+ type is (DisType)
call get_ijk(icu, dis%nrow, dis%ncol, dis%nlay, irow, icol, ilay)
- type is (GwfDisvType)
+ type is (DisvType)
call get_jk(icu, dis%ncpl, dis%nlay, icpl, ilay)
end select
particle%ilay = ilay
diff --git a/src/Model/ParticleTracking/prt.f90 b/src/Model/ParticleTracking/prt.f90
index 91c98536dec..94462f0b940 100644
--- a/src/Model/ParticleTracking/prt.f90
+++ b/src/Model/ParticleTracking/prt.f90
@@ -9,8 +9,9 @@ module PrtModule
use NumericalModelModule, only: NumericalModelType
use BaseModelModule, only: BaseModelType
use BndModule, only: BndType, AddBndToList, GetBndFromList
- use GwfDisModule, only: GwfDisType
- use GwfDisvModule, only: GwfDisvType
+ use DisModule, only: DisType, dis_cr
+ use DisvModule, only: DisvType, disv_cr
+ use DisuModule, only: DisuType, disu_cr
use PrtPrpModule, only: PrtPrpType
use PrtFmiModule, only: PrtFmiType
use PrtMipModule, only: PrtMipType
@@ -262,7 +263,7 @@ subroutine prt_ar(this)
! -- Initialize tracking method
select type (dis => this%dis)
- type is (GwfDisType)
+ type is (DisType)
call method_dis%init( &
fmi=this%fmi, &
trackfilectl=this%trackfilectl, &
@@ -272,7 +273,7 @@ subroutine prt_ar(this)
retfactor=this%mip%retfactor, &
tracktimes=this%oc%tracktimes)
this%method => method_dis
- type is (GwfDisvType)
+ type is (DisvType)
call method_disv%init( &
fmi=this%fmi, &
trackfilectl=this%trackfilectl, &
@@ -1066,9 +1067,6 @@ subroutine create_packages(this)
use MemoryManagerModule, only: mem_setptr
use MemoryHelperModule, only: create_mem_path
use SimVariablesModule, only: idm_context
- use GwfDisModule, only: dis_cr
- use GwfDisvModule, only: disv_cr
- use GwfDisuModule, only: disu_cr
use BudgetModule, only: budget_cr
use MethodPoolModule, only: create_method_pool
use MethodCellPoolModule, only: create_method_cell_pool
diff --git a/src/Model/TransportModel/tsp.f90 b/src/Model/TransportModel/tsp.f90
index aaf90cf0e67..15f997bff07 100644
--- a/src/Model/TransportModel/tsp.f90
+++ b/src/Model/TransportModel/tsp.f90
@@ -724,9 +724,9 @@ subroutine create_tsp_packages(this, indis)
use MemoryManagerModule, only: mem_setptr
use MemoryHelperModule, only: create_mem_path
use SimVariablesModule, only: idm_context
- use GwfDisModule, only: dis_cr
- use GwfDisvModule, only: disv_cr
- use GwfDisuModule, only: disu_cr
+ use DisModule, only: dis_cr
+ use DisvModule, only: disv_cr
+ use DisuModule, only: disu_cr
use TspIcModule, only: ic_cr
use TspFmiModule, only: fmi_cr
use TspAdvModule, only: adv_cr
diff --git a/src/Solution/ParticleTracker/MethodDis.f90 b/src/Solution/ParticleTracker/MethodDis.f90
index b1f9eb17119..91c87a61864 100644
--- a/src/Solution/ParticleTracker/MethodDis.f90
+++ b/src/Solution/ParticleTracker/MethodDis.f90
@@ -8,7 +8,7 @@ module MethodDisModule
use CellRectModule
use ParticleModule
use PrtFmiModule, only: PrtFmiType
- use GwfDisModule, only: GwfDisType
+ use DisModule, only: DisType
use TrackModule, only: TrackFileControlType
use GeomUtilModule, only: get_ijk, get_jk
use ArrayHandlersModule, only: ExpandArray
@@ -79,7 +79,7 @@ subroutine load_dis(this, particle, next_level, submethod)
select type (cell => this%cell)
type is (CellRectType)
select type (dis => this%fmi%dis)
- type is (GwfDisType)
+ type is (DisType)
ic = particle%idomain(next_level)
call this%load_cell_defn(ic, cell%defn)
@@ -165,7 +165,7 @@ subroutine pass_dis(this, particle)
select type (cell => this%cell)
type is (CellRectType)
select type (dis => this%fmi%dis)
- type is (GwfDisType)
+ type is (DisType)
inbr = cell%defn%facenbr(inface)
if (inbr .eq. 0) then
! -- Exterior face; no neighbor to map to
@@ -259,7 +259,7 @@ subroutine load_cell_defn(this, ic, defn)
type(CellDefnType), pointer, intent(inout) :: defn
select type (dis => this%fmi%dis)
- type is (GwfDisType)
+ type is (DisType)
! -- Set basic cell properties
defn%icell = ic
defn%npolyverts = 4 ! rectangular cell always has 4 vertices
@@ -319,7 +319,7 @@ subroutine load_nbrs_to_defn(this, defn)
call ExpandArray(defn%facenbr, defn%npolyverts + 3)
select type (dis => this%fmi%dis)
- type is (GwfDisType)
+ type is (DisType)
! -- Load face neighbors
defn%facenbr = 0
ic1 = defn%icell
diff --git a/src/Solution/ParticleTracker/MethodDisv.f90 b/src/Solution/ParticleTracker/MethodDisv.f90
index 15781913592..c19017cce95 100644
--- a/src/Solution/ParticleTracker/MethodDisv.f90
+++ b/src/Solution/ParticleTracker/MethodDisv.f90
@@ -9,7 +9,7 @@ module MethodDisvModule
use CellPolyModule
use ParticleModule
use PrtFmiModule, only: PrtFmiType
- use GwfDisvModule, only: GwfDisvType
+ use DisvModule, only: DisvType
use ArrayHandlersModule, only: ExpandArray
use TrackModule, only: TrackFileControlType
use GeomUtilModule, only: get_jk
@@ -126,7 +126,7 @@ end subroutine load_disv
!> @brief Pass a particle to the next cell, if there is one
subroutine pass_disv(this, particle)
! -- modules
- use GwfDisvModule, only: GwfDisvType
+ use DisvModule, only: DisvType
use TdisModule, only: kper, kstp
! -- dummy
class(MethodDisvType), intent(inout) :: this
@@ -148,7 +148,7 @@ subroutine pass_disv(this, particle)
select type (cell => this%cell)
type is (CellPolyType)
select type (dis => this%fmi%dis)
- type is (GwfDisvType)
+ type is (DisvType)
inbr = cell%defn%facenbr(inface)
if (inbr .eq. 0) then
! -- Exterior face; no neighbor to map to
@@ -281,7 +281,7 @@ function get_npolyverts(this, ic) result(npolyverts)
integer(I4B) :: npolyverts
select type (dis => this%fmi%dis)
- type is (GwfDisvType)
+ type is (DisvType)
ncpl = dis%get_ncpl()
icu = dis%get_nodeuser(ic)
icu2d = icu - ((icu - 1) / ncpl) * ncpl ! kluge note: use MOD or MODULO???
@@ -382,7 +382,7 @@ subroutine load_nbrs_to_defn(this, defn)
call ExpandArray(defn%facenbr, npolyverts + 3)
select type (dis => this%fmi%dis)
- type is (GwfDisvType)
+ type is (DisvType)
! -- Load face neighbors.
defn%facenbr = 0
ic1 = ic
diff --git a/src/Solution/ParticleTracker/MethodSubcellPollock.f90 b/src/Solution/ParticleTracker/MethodSubcellPollock.f90
index 86d01e44ad2..f4d54e37b99 100644
--- a/src/Solution/ParticleTracker/MethodSubcellPollock.f90
+++ b/src/Solution/ParticleTracker/MethodSubcellPollock.f90
@@ -7,7 +7,6 @@ module MethodSubcellPollockModule
use PrtFmiModule, only: PrtFmiType
use TrackModule, only: TrackFileControlType
use BaseDisModule, only: DisBaseType
- use GwfDisModule, only: GwfDisType
use CellModule, only: CellType
implicit none
private
diff --git a/src/Solution/ParticleTracker/MethodSubcellTernary.f90 b/src/Solution/ParticleTracker/MethodSubcellTernary.f90
index 04a7151449c..33721911b10 100644
--- a/src/Solution/ParticleTracker/MethodSubcellTernary.f90
+++ b/src/Solution/ParticleTracker/MethodSubcellTernary.f90
@@ -11,7 +11,6 @@ module MethodSubcellTernaryModule
use TernarySolveTrack, only: traverse_triangle, step_analytical, canonical
use PrtFmiModule, only: PrtFmiType
use BaseDisModule, only: DisBaseType
- use GwfDisvModule, only: GwfDisvType
implicit none
private
diff --git a/src/meson.build b/src/meson.build
index 3a565ecb248..96b3fa34afb 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -110,6 +110,9 @@ modflow_sources = files(
'Model' / 'Connection' / 'GwtInterfaceModel.f90',
'Model' / 'Connection' / 'SpatialModelConnection.f90',
'Model' / 'Connection' / 'DistributedVariable.f90',
+ 'Model' / 'Discretization' / 'Dis.f90',
+ 'Model' / 'Discretization' / 'Disu.f90',
+ 'Model' / 'Discretization' / 'Disv.f90',
'Model' / 'Geometry' / 'BaseGeometry.f90',
'Model' / 'Geometry' / 'CircularGeometry.f90',
'Model' / 'Geometry' / 'RectangularGeometry.f90',
@@ -127,9 +130,6 @@ modflow_sources = files(
'Model' / 'GroundWaterFlow' / 'gwf-buy.f90',
'Model' / 'GroundWaterFlow' / 'gwf-chd.f90',
'Model' / 'GroundWaterFlow' / 'gwf-csub.f90',
- 'Model' / 'GroundWaterFlow' / 'gwf-dis.f90',
- 'Model' / 'GroundWaterFlow' / 'gwf-disu.f90',
- 'Model' / 'GroundWaterFlow' / 'gwf-disv.f90',
'Model' / 'GroundWaterFlow' / 'gwf-drn.f90',
'Model' / 'GroundWaterFlow' / 'gwf-evt.f90',
'Model' / 'GroundWaterFlow' / 'gwf-ghb.f90',