MODFLOW 6  version 6.7.0.dev3
USGS Modular Hydrologic Model
methodmodelmodule Module Reference

Data Types

type  methodmodeltype
 

Functions/Subroutines

subroutine assess (this, particle, cell_defn, tmax)
 Check particle reporting/termination status. More...
 
integer(i4b) function get_level (this)
 Get the model method's level. More...
 
subroutine cap_cell_wt_flow (this, defn)
 Prevent non-boundary upwards flow at the water table. More...
 
subroutine load_cell_no_exit_face (this, defn)
 Set flag indicating if the cell has any faces with outflow. Assumes cell properties and flows are already loaded. More...
 
subroutine load_cell_saturation_status (this, defn)
 Set the saturation status of a cell. See the status enumeration in CellDefnModule. More...
 

Function/Subroutine Documentation

◆ assess()

subroutine methodmodelmodule::assess ( class(methodmodeltype), intent(inout)  this,
type(particletype), intent(inout), pointer  particle,
type(celldefntype), intent(inout), pointer  cell_defn,
real(dp), intent(in)  tmax 
)
private

Definition at line 29 of file MethodModel.f90.

30  ! dummy
31  class(MethodModelType), intent(inout) :: this
32  type(ParticleType), pointer, intent(inout) :: particle
33  type(CellDefnType), pointer, intent(inout) :: cell_defn
34  real(DP), intent(in) :: tmax
35  ! noop

◆ cap_cell_wt_flow()

subroutine methodmodelmodule::cap_cell_wt_flow ( class(methodmodeltype), intent(inout)  this,
type(celldefntype), intent(inout), pointer  defn 
)
private

Unless the top face is an assigned boundary with outflow, cells which contain a water table should not have upward flow through the top (i.e., the water table). Prevent it by capping the top face flow at zero in these conditions.

Assumes cell properties and flows are already loaded.

Definition at line 54 of file MethodModel.f90.

55  class(MethodModelType), intent(inout) :: this
56  type(CellDefnType), pointer, intent(inout) :: defn
57  ! local
58  integer(I4B) :: itopface
59 
60  ! If the cell contains a water table that is not an
61  ! assigned boundary face with upflow, cap flow at 0.
62  itopface = this%fmi%max_faces ! fmi's lateral face indices are not closed
63  if (this%fmi%is_boundary_face(defn%icell, itopface)) return
64  if (defn%isatstat == saturation_watertable) then
65  itopface = defn%npolyverts + 3 ! cell defn's lateral face indices are closed
66  defn%faceflow(itopface) = max(dzero, defn%faceflow(itopface))
67  end if
68 

◆ get_level()

integer(i4b) function methodmodelmodule::get_level ( class(methodmodeltype), intent(in)  this)
private

Definition at line 39 of file MethodModel.f90.

40  class(MethodModelType), intent(in) :: this
41  integer(I4B) :: level
42  level = level_model

◆ load_cell_no_exit_face()

subroutine methodmodelmodule::load_cell_no_exit_face ( class(methodmodeltype), intent(inout)  this,
type(celldefntype), intent(inout), pointer  defn 
)
private

Definition at line 73 of file MethodModel.f90.

74  ! dummy
75  class(MethodModelType), intent(inout) :: this
76  type(CellDefnType), pointer, intent(inout) :: defn
77  ! local
78  integer(I4B) :: m, nfaces
79 
80  defn%inoexitface = 1
81  nfaces = defn%npolyverts + 3
82  do m = 1, nfaces
83  if (defn%faceflow(m) < dzero) defn%inoexitface = 0
84  end do
85 

◆ load_cell_saturation_status()

subroutine methodmodelmodule::load_cell_saturation_status ( class(methodmodeltype), intent(inout)  this,
type(celldefntype), intent(inout), pointer  defn 
)
private

Definition at line 90 of file MethodModel.f90.

91  ! dummy
92  class(MethodModelType), intent(inout) :: this
93  type(CellDefnType), pointer, intent(inout) :: defn
94  ! local
95  integer(I4B) :: ic, ictopnbr, itopface, idiag, ipos
96 
97  ic = defn%icell
98  defn%isatstat = saturation_saturated
99 
100  ! dry?
101  if (this%fmi%ibdgwfsat0(ic) == 0) then
102  defn%isatstat = saturation_dry
103  return
104  end if
105 
106  ! partially saturated?
107  if (this%fmi%gwfsat(ic) < done) then
108  defn%isatstat = saturation_watertable
109  return
110  end if
111 
112  ! no top neighbor?
113  itopface = defn%npolyverts + 3 ! cell defn's lateral face indices are closed
114  if (defn%facenbr(itopface) == 0) then
115  defn%isatstat = saturation_saturated
116  return
117  end if
118 
119  ! dry top neighbor?
120  idiag = this%fmi%dis%con%ia(ic)
121  ipos = idiag + defn%facenbr(itopface)
122  ictopnbr = this%fmi%dis%con%ja(ipos)
123  if (this%fmi%ibdgwfsat0(ictopnbr) == 0) then
124  defn%isatstat = saturation_watertable
125  return
126  end if
127