MODFLOW 6  version 6.9.0.dev0
USGS Modular Hydrologic Model
gwtmwtmodule Module Reference

Data Types

type  gwtmwttype
 

Functions/Subroutines

subroutine, public mwt_create (packobj, id, ibcnum, inunit, iout, namemodel, pakname, mempath, fmi, eqnsclfac, dvt, dvu, dvua)
 Create new MWT package. More...
 
subroutine find_mwt_package (this)
 find corresponding mwt package More...
 
real(dp) function mwt_setting_value (this, itemno, key)
 Value for a package-specific PERIOD setting. More...
 
subroutine mwt_fc_expanded (this, rhs, ia, idxglo, matrix_sln)
 Add matrix terms related to MWT. More...
 
subroutine mwt_solve (this)
 @ brief Add terms specific to multi-aquifer wells to the explicit multi- aquifer well solute transport solve More...
 
integer(i4b) function mwt_get_nbudterms (this)
 Function to return the number of budget terms just for this package. More...
 
subroutine mwt_setup_budobj (this, idx)
 Set up the budget object that stores all the mwt flows. More...
 
subroutine mwt_fill_budobj (this, idx, x, flowja, ccratin, ccratout)
 Copy flow terms into thisbudobj. More...
 
subroutine allocate_scalars (this)
 Allocate scalars specific to the streamflow mass transport (SFT) package. More...
 
subroutine mwt_allocate_arrays (this)
 Allocate arrays specific to the streamflow mass transport (SFT) package. More...
 
subroutine mwt_da (this)
 Deallocate memory. More...
 
subroutine mwt_rate_term (this, ientry, n1, n2, rrate, rhsval, hcofval)
 Rate term associated with pumping (or injection) More...
 
subroutine mwt_fwrt_term (this, ientry, n1, n2, rrate, rhsval, hcofval)
 Transport matrix term(s) associated with a flowing- well rate term associated with pumping (or injection) More...
 
subroutine mwt_rtmv_term (this, ientry, n1, n2, rrate, rhsval, hcofval)
 Rate-to-mvr term associated with pumping (or injection) More...
 
subroutine mwt_frtm_term (this, ientry, n1, n2, rrate, rhsval, hcofval)
 Flowing well rate-to-mvr term (or injection) More...
 
subroutine mwt_df_obs (this)
 Observations. More...
 
subroutine mwt_rp_obs (this, obsrv, found)
 Process package specific obs. More...
 
subroutine mwt_bd_obs (this, obstypeid, jj, v, found)
 Calculate observation value and pass it back to APT. More...
 

Variables

character(len= *), parameter ftype = 'MWT'
 
character(len= *), parameter flowtype = 'MAW'
 
character(len=16) text = ' MWT'
 

Function/Subroutine Documentation

◆ allocate_scalars()

subroutine gwtmwtmodule::allocate_scalars ( class(gwtmwttype)  this)

Definition at line 546 of file gwt-mwt.f90.

547  ! -- modules
549  ! -- dummy
550  class(GwtMwtType) :: this
551  ! -- local
552  !
553  ! -- allocate scalars in TspAptType
554  call this%TspAptType%allocate_scalars()
555  !
556  ! -- Allocate
557  call mem_allocate(this%idxbudrate, 'IDXBUDRATE', this%memoryPath)
558  call mem_allocate(this%idxbudfwrt, 'IDXBUDFWRT', this%memoryPath)
559  call mem_allocate(this%idxbudrtmv, 'IDXBUDRTMV', this%memoryPath)
560  call mem_allocate(this%idxbudfrtm, 'IDXBUDFRTM', this%memoryPath)
561  !
562  ! -- Initialize
563  this%idxbudrate = 0
564  this%idxbudfwrt = 0
565  this%idxbudrtmv = 0
566  this%idxbudfrtm = 0

◆ find_mwt_package()

subroutine gwtmwtmodule::find_mwt_package ( class(gwtmwttype)  this)

Definition at line 149 of file gwt-mwt.f90.

150  ! -- modules
152  ! -- dummy
153  class(GwtMwtType) :: this
154  ! -- local
155  character(len=LINELENGTH) :: errmsg
156  class(BndType), pointer :: packobj
157  integer(I4B) :: ip, icount
158  integer(I4B) :: nbudterm
159  logical :: found
160  !
161  ! -- Initialize found to false, and error later if flow package cannot
162  ! be found
163  found = .false.
164  !
165  ! -- If user is specifying flows in a binary budget file, then set up
166  ! the budget file reader, otherwise set a pointer to the flow package
167  ! budobj
168  if (this%fmi%flows_from_file) then
169  call this%fmi%set_aptbudobj_pointer(this%flowpackagename, this%flowbudptr)
170  if (associated(this%flowbudptr)) found = .true.
171  !
172  else
173  if (associated(this%fmi%gwfbndlist)) then
174  ! -- Look through gwfbndlist for a flow package with the same name as
175  ! this transport package name
176  do ip = 1, this%fmi%gwfbndlist%Count()
177  packobj => getbndfromlist(this%fmi%gwfbndlist, ip)
178  if (packobj%packName == this%flowpackagename) then
179  found = .true.
180  !
181  ! -- store BndType pointer to packobj, and then
182  ! use the select type to point to the budobj in flow package
183  this%flowpackagebnd => packobj
184  select type (packobj)
185  type is (mawtype)
186  this%flowbudptr => packobj%budobj
187  end select
188  end if
189  if (found) exit
190  end do
191  end if
192  end if
193  !
194  ! -- error if flow package not found
195  if (.not. found) then
196  write (errmsg, '(a)') 'Could not find flow package with name '&
197  &//trim(adjustl(this%flowpackagename))//'.'
198  call store_error(errmsg)
199  call store_error_filename(this%input_fname)
200  end if
201  !
202  ! -- allocate space for idxbudssm, which indicates whether this is a
203  ! special budget term or one that is a general source and sink
204  nbudterm = this%flowbudptr%nbudterm
205  call mem_allocate(this%idxbudssm, nbudterm, 'IDXBUDSSM', this%memoryPath)
206  !
207  ! -- Process budget terms and identify special budget terms
208  write (this%iout, '(/, a, a)') &
209  'PROCESSING '//ftype//' INFORMATION FOR ', this%packName
210  write (this%iout, '(a)') ' IDENTIFYING FLOW TERMS IN '//flowtype//' PACKAGE'
211  write (this%iout, '(a, i0)') &
212  ' NUMBER OF '//flowtype//' = ', this%flowbudptr%ncv
213  icount = 1
214  do ip = 1, this%flowbudptr%nbudterm
215  select case (trim(adjustl(this%flowbudptr%budterm(ip)%flowtype)))
216  case ('FLOW-JA-FACE')
217  this%idxbudfjf = ip
218  this%idxbudssm(ip) = 0
219  case ('GWF')
220  this%idxbudgwf = ip
221  this%idxbudssm(ip) = 0
222  case ('STORAGE')
223  this%idxbudsto = ip
224  this%idxbudssm(ip) = 0
225  case ('RATE')
226  this%idxbudrate = ip
227  this%idxbudssm(ip) = 0
228  case ('FW-RATE')
229  this%idxbudfwrt = ip
230  this%idxbudssm(ip) = 0
231  case ('RATE-TO-MVR')
232  this%idxbudrtmv = ip
233  this%idxbudssm(ip) = 0
234  case ('FW-RATE-TO-MVR')
235  this%idxbudfrtm = ip
236  this%idxbudssm(ip) = 0
237  case ('TO-MVR')
238  this%idxbudtmvr = ip
239  this%idxbudssm(ip) = 0
240  case ('FROM-MVR')
241  this%idxbudfmvr = ip
242  this%idxbudssm(ip) = 0
243  case ('AUXILIARY')
244  this%idxbudaux = ip
245  this%idxbudssm(ip) = 0
246  case default
247  !
248  ! -- set idxbudssm equal to a column index for where the concentrations
249  ! are stored in the concbud(nbudssm, ncv) array
250  this%idxbudssm(ip) = icount
251  icount = icount + 1
252  end select
253  write (this%iout, '(a, i0, " = ", a,/, a, i0)') &
254  ' TERM ', ip, trim(adjustl(this%flowbudptr%budterm(ip)%flowtype)), &
255  ' MAX NO. OF ENTRIES = ', this%flowbudptr%budterm(ip)%maxlist
256  end do
257  write (this%iout, '(a, //)') 'DONE PROCESSING '//ftype//' INFORMATION'
Here is the call graph for this function:

◆ mwt_allocate_arrays()

subroutine gwtmwtmodule::mwt_allocate_arrays ( class(gwtmwttype), intent(inout)  this)

Definition at line 572 of file gwt-mwt.f90.

573  ! -- modules
575  ! -- dummy
576  class(GwtMwtType), intent(inout) :: this
577  !
578  ! -- alias into the input context's permanent, feature-indexed RATE
579  ! array (allocated and DZERO-initialized by the input context)
580  call mem_setptr(this%concrate, 'RATE', this%input_mempath)
581  !
582  ! -- call standard TspAptType allocate arrays
583  call this%TspAptType%apt_allocate_arrays()
584  !

◆ mwt_bd_obs()

subroutine gwtmwtmodule::mwt_bd_obs ( class(gwtmwttype), intent(inout)  this,
character(len=*), intent(in)  obstypeid,
integer(i4b), intent(in)  jj,
real(dp), intent(inout)  v,
logical, intent(inout)  found 
)

Definition at line 820 of file gwt-mwt.f90.

821  ! -- dummy
822  class(GwtMwtType), intent(inout) :: this
823  character(len=*), intent(in) :: obstypeid
824  real(DP), intent(inout) :: v
825  integer(I4B), intent(in) :: jj
826  logical, intent(inout) :: found
827  ! -- local
828  integer(I4B) :: n1, n2
829  !
830  found = .true.
831  select case (obstypeid)
832  case ('RATE')
833  if (this%iboundpak(jj) /= 0) then
834  call this%mwt_rate_term(jj, n1, n2, v)
835  end if
836  case ('FW-RATE')
837  if (this%iboundpak(jj) /= 0 .and. this%idxbudfwrt > 0) then
838  call this%mwt_fwrt_term(jj, n1, n2, v)
839  end if
840  case ('RATE-TO-MVR')
841  if (this%iboundpak(jj) /= 0 .and. this%idxbudrtmv > 0) then
842  call this%mwt_rtmv_term(jj, n1, n2, v)
843  end if
844  case ('FW-RATE-TO-MVR')
845  if (this%iboundpak(jj) /= 0 .and. this%idxbudfrtm > 0) then
846  call this%mwt_frtm_term(jj, n1, n2, v)
847  end if
848  case default
849  found = .false.
850  end select

◆ mwt_create()

subroutine, public gwtmwtmodule::mwt_create ( class(bndtype), pointer  packobj,
integer(i4b), intent(in)  id,
integer(i4b), intent(in)  ibcnum,
integer(i4b), intent(in)  inunit,
integer(i4b), intent(in)  iout,
character(len=*), intent(in)  namemodel,
character(len=*), intent(in)  pakname,
character(len=*), intent(in)  mempath,
type(tspfmitype), pointer  fmi,
real(dp), intent(in), pointer  eqnsclfac,
character(len=*), intent(in)  dvt,
character(len=*), intent(in)  dvu,
character(len=*), intent(in)  dvua 
)
Parameters
[in]mempathinput memory path
[in]eqnsclfacgoverning equation scale factor
[in]dvtFor GWT, set to "CONCENTRATION" in TspAptType
[in]dvuFor GWT, set to "mass" in TspAptType
[in]dvuaFor GWT, set to "M" in TspAptType

Definition at line 92 of file gwt-mwt.f90.

94  ! -- dummy
95  class(BndType), pointer :: packobj
96  integer(I4B), intent(in) :: id
97  integer(I4B), intent(in) :: ibcnum
98  integer(I4B), intent(in) :: inunit
99  integer(I4B), intent(in) :: iout
100  character(len=*), intent(in) :: namemodel
101  character(len=*), intent(in) :: pakname
102  character(len=*), intent(in) :: mempath !< input memory path
103  type(TspFmiType), pointer :: fmi
104  real(DP), intent(in), pointer :: eqnsclfac !< governing equation scale factor
105  character(len=*), intent(in) :: dvt !< For GWT, set to "CONCENTRATION" in TspAptType
106  character(len=*), intent(in) :: dvu !< For GWT, set to "mass" in TspAptType
107  character(len=*), intent(in) :: dvua !< For GWT, set to "M" in TspAptType
108  ! -- local
109  type(GwtMwtType), pointer :: mwtobj
110  !
111  ! -- allocate the object and assign values to object variables
112  allocate (mwtobj)
113  packobj => mwtobj
114  !
115  ! -- create name and memory path
116  call packobj%set_names(ibcnum, namemodel, pakname, ftype, mempath)
117  packobj%text = text
118  !
119  ! -- allocate scalars
120  call mwtobj%allocate_scalars()
121  !
122  ! -- initialize package
123  call packobj%pack_initialize()
124 
125  packobj%inunit = inunit
126  packobj%iout = iout
127  packobj%id = id
128  packobj%ibcnum = ibcnum
129  packobj%ncolbnd = 1
130  packobj%iscloc = 1
131  packobj%isadvpak = 1
132 
133  ! -- Store pointer to flow model interface. When the GwfGwt exchange is
134  ! created, it sets fmi%bndlist so that the GWT model has access to all
135  ! the flow packages
136  mwtobj%fmi => fmi
137  !
138  ! -- Store pointer to governing equation scale factor
139  mwtobj%eqnsclfac => eqnsclfac
140  !
141  ! -- Set labels that will be used in generalized APT class
142  mwtobj%depvartype = dvt
143  mwtobj%depvarunit = dvu
144  mwtobj%depvarunitabbrev = dvua
Here is the caller graph for this function:

◆ mwt_da()

subroutine gwtmwtmodule::mwt_da ( class(gwtmwttype)  this)

Definition at line 589 of file gwt-mwt.f90.

590  ! -- modules
592  ! -- dummy
593  class(GwtMwtType) :: this
594  ! -- local
595  !
596  ! -- deallocate scalars
597  call mem_deallocate(this%idxbudrate)
598  call mem_deallocate(this%idxbudfwrt)
599  call mem_deallocate(this%idxbudrtmv)
600  call mem_deallocate(this%idxbudfrtm)
601  !
602  ! -- input-context-owned alias, not package-allocated
603  nullify (this%concrate)
604  !
605  ! -- deallocate scalars in TspAptType
606  call this%TspAptType%bnd_da()

◆ mwt_df_obs()

subroutine gwtmwtmodule::mwt_df_obs ( class(gwtmwttype)  this)

Store the observation type supported by the APT package and override BndTypebnd_df_obs

Definition at line 731 of file gwt-mwt.f90.

732  ! -- modules
733  ! -- dummy
734  class(GwtMwtType) :: this
735  ! -- local
736  integer(I4B) :: indx
737  !
738  ! -- Store obs type and assign procedure pointer
739  ! for concentration observation type.
740  call this%obs%StoreObsType('concentration', .false., indx)
741  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
742  !
743  ! -- flow-ja-face not supported for MWT
744  !call this%obs%StoreObsType('flow-ja-face', .true., indx)
745  !this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsID
746  !
747  ! -- Store obs type and assign procedure pointer
748  ! for from-mvr observation type.
749  call this%obs%StoreObsType('from-mvr', .true., indx)
750  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
751  !
752  ! -- to-mvr not supported for mwt
753  !call this%obs%StoreObsType('to-mvr', .true., indx)
754  !this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsID
755  !
756  ! -- Store obs type and assign procedure pointer
757  ! for storage observation type.
758  call this%obs%StoreObsType('storage', .true., indx)
759  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
760  !
761  ! -- Store obs type and assign procedure pointer
762  ! for constant observation type.
763  call this%obs%StoreObsType('constant', .true., indx)
764  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
765  !
766  ! -- Store obs type and assign procedure pointer
767  ! for observation type: mwt
768  call this%obs%StoreObsType('mwt', .true., indx)
769  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid12
770  !
771  ! -- Store obs type and assign procedure pointer
772  ! for rate observation type.
773  call this%obs%StoreObsType('rate', .true., indx)
774  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
775  !
776  ! -- Store obs type and assign procedure pointer
777  ! for observation type.
778  call this%obs%StoreObsType('fw-rate', .true., indx)
779  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
780  !
781  ! -- Store obs type and assign procedure pointer
782  ! for observation type.
783  call this%obs%StoreObsType('rate-to-mvr', .true., indx)
784  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
785  !
786  ! -- Store obs type and assign procedure pointer
787  ! for observation type.
788  call this%obs%StoreObsType('fw-rate-to-mvr', .true., indx)
789  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
Here is the call graph for this function:

◆ mwt_fc_expanded()

subroutine gwtmwtmodule::mwt_fc_expanded ( class(gwtmwttype)  this,
real(dp), dimension(:), intent(inout)  rhs,
integer(i4b), dimension(:), intent(in)  ia,
integer(i4b), dimension(:), intent(in)  idxglo,
class(matrixbasetype), pointer  matrix_sln 
)

This routine is called from TspAptTypeapt_fc_expanded() in order to add matrix terms specifically for MWT

Definition at line 284 of file gwt-mwt.f90.

285  ! -- modules
286  ! -- dummy
287  class(GwtMwtType) :: this
288  real(DP), dimension(:), intent(inout) :: rhs
289  integer(I4B), dimension(:), intent(in) :: ia
290  integer(I4B), dimension(:), intent(in) :: idxglo
291  class(MatrixBaseType), pointer :: matrix_sln
292  ! -- local
293  integer(I4B) :: j, n1, n2
294  integer(I4B) :: iloc
295  integer(I4B) :: iposd
296  real(DP) :: rrate
297  real(DP) :: rhsval
298  real(DP) :: hcofval
299  !
300  ! -- add puping rate contribution
301  if (this%idxbudrate /= 0) then
302  do j = 1, this%flowbudptr%budterm(this%idxbudrate)%nlist
303  call this%mwt_rate_term(j, n1, n2, rrate, rhsval, hcofval)
304  iloc = this%idxlocnode(n1)
305  iposd = this%idxpakdiag(n1)
306  call matrix_sln%add_value_pos(iposd, hcofval)
307  rhs(iloc) = rhs(iloc) + rhsval
308  end do
309  end if
310  !
311  ! -- add flowing well rate contribution
312  if (this%idxbudfwrt /= 0) then
313  do j = 1, this%flowbudptr%budterm(this%idxbudfwrt)%nlist
314  call this%mwt_fwrt_term(j, n1, n2, rrate, rhsval, hcofval)
315  iloc = this%idxlocnode(n1)
316  iposd = this%idxpakdiag(n1)
317  call matrix_sln%add_value_pos(iposd, hcofval)
318  rhs(iloc) = rhs(iloc) + rhsval
319  end do
320  end if
321  !
322  ! -- add rate to mover contribution
323  if (this%idxbudrtmv /= 0) then
324  do j = 1, this%flowbudptr%budterm(this%idxbudrtmv)%nlist
325  call this%mwt_rtmv_term(j, n1, n2, rrate, rhsval, hcofval)
326  iloc = this%idxlocnode(n1)
327  iposd = this%idxpakdiag(n1)
328  call matrix_sln%add_value_pos(iposd, hcofval)
329  rhs(iloc) = rhs(iloc) + rhsval
330  end do
331  end if
332  !
333  ! -- add puping rate contribution
334  if (this%idxbudfrtm /= 0) then
335  do j = 1, this%flowbudptr%budterm(this%idxbudfrtm)%nlist
336  call this%mwt_frtm_term(j, n1, n2, rrate, rhsval, hcofval)
337  iloc = this%idxlocnode(n1)
338  iposd = this%idxpakdiag(n1)
339  call matrix_sln%add_value_pos(iposd, hcofval)
340  rhs(iloc) = rhs(iloc) + rhsval
341  end do
342  end if

◆ mwt_fill_budobj()

subroutine gwtmwtmodule::mwt_fill_budobj ( class(gwtmwttype)  this,
integer(i4b), intent(inout)  idx,
real(dp), dimension(:), intent(in)  x,
real(dp), dimension(:), intent(inout), contiguous  flowja,
real(dp), intent(inout)  ccratin,
real(dp), intent(inout)  ccratout 
)

Definition at line 481 of file gwt-mwt.f90.

482  ! -- modules
483  ! -- dummy
484  class(GwtMwtType) :: this
485  integer(I4B), intent(inout) :: idx
486  real(DP), dimension(:), intent(in) :: x
487  real(DP), dimension(:), contiguous, intent(inout) :: flowja
488  real(DP), intent(inout) :: ccratin
489  real(DP), intent(inout) :: ccratout
490  ! -- local
491  integer(I4B) :: j, n1, n2
492  integer(I4B) :: nlist
493  real(DP) :: q
494  ! -- formats
495  !
496  ! -- RATE
497  idx = idx + 1
498  nlist = this%flowbudptr%budterm(this%idxbudrate)%nlist
499  call this%budobj%budterm(idx)%reset(nlist)
500  do j = 1, nlist
501  call this%mwt_rate_term(j, n1, n2, q)
502  call this%budobj%budterm(idx)%update_term(n1, n2, q)
503  call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
504  end do
505  !
506  ! -- FW-RATE
507  if (this%idxbudfwrt /= 0) then
508  idx = idx + 1
509  nlist = this%flowbudptr%budterm(this%idxbudfwrt)%nlist
510  call this%budobj%budterm(idx)%reset(nlist)
511  do j = 1, nlist
512  call this%mwt_fwrt_term(j, n1, n2, q)
513  call this%budobj%budterm(idx)%update_term(n1, n2, q)
514  call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
515  end do
516  end if
517  !
518  ! -- RATE-TO-MVR
519  if (this%idxbudrtmv /= 0) then
520  idx = idx + 1
521  nlist = this%flowbudptr%budterm(this%idxbudrtmv)%nlist
522  call this%budobj%budterm(idx)%reset(nlist)
523  do j = 1, nlist
524  call this%mwt_rtmv_term(j, n1, n2, q)
525  call this%budobj%budterm(idx)%update_term(n1, n2, q)
526  call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
527  end do
528  end if
529  !
530  ! -- FW-RATE-TO-MVR
531  if (this%idxbudfrtm /= 0) then
532  idx = idx + 1
533  nlist = this%flowbudptr%budterm(this%idxbudfrtm)%nlist
534  call this%budobj%budterm(idx)%reset(nlist)
535  do j = 1, nlist
536  call this%mwt_frtm_term(j, n1, n2, q)
537  call this%budobj%budterm(idx)%update_term(n1, n2, q)
538  call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
539  end do
540  end if

◆ mwt_frtm_term()

subroutine gwtmwtmodule::mwt_frtm_term ( class(gwtmwttype)  this,
integer(i4b), intent(in)  ientry,
integer(i4b), intent(inout)  n1,
integer(i4b), intent(inout)  n2,
real(dp), intent(inout), optional  rrate,
real(dp), intent(inout), optional  rhsval,
real(dp), intent(inout), optional  hcofval 
)

Pumped water that is made available to the MVR package for transfer to another advanced package

Definition at line 703 of file gwt-mwt.f90.

705  ! -- dummy
706  class(GwtMwtType) :: this
707  integer(I4B), intent(in) :: ientry
708  integer(I4B), intent(inout) :: n1
709  integer(I4B), intent(inout) :: n2
710  real(DP), intent(inout), optional :: rrate
711  real(DP), intent(inout), optional :: rhsval
712  real(DP), intent(inout), optional :: hcofval
713  ! -- local
714  real(DP) :: qbnd
715  real(DP) :: ctmp
716  !
717  n1 = this%flowbudptr%budterm(this%idxbudfrtm)%id1(ientry)
718  n2 = this%flowbudptr%budterm(this%idxbudfrtm)%id2(ientry)
719  qbnd = this%flowbudptr%budterm(this%idxbudfrtm)%flow(ientry)
720  ctmp = this%xnewpak(n1)
721  if (present(rrate)) rrate = ctmp * qbnd
722  if (present(rhsval)) rhsval = dzero
723  if (present(hcofval)) hcofval = qbnd

◆ mwt_fwrt_term()

subroutine gwtmwtmodule::mwt_fwrt_term ( class(gwtmwttype)  this,
integer(i4b), intent(in)  ientry,
integer(i4b), intent(inout)  n1,
integer(i4b), intent(inout)  n2,
real(dp), intent(inout), optional  rrate,
real(dp), intent(inout), optional  rhsval,
real(dp), intent(inout), optional  hcofval 
)

Definition at line 647 of file gwt-mwt.f90.

649  ! -- dummy
650  class(GwtMwtType) :: this
651  integer(I4B), intent(in) :: ientry
652  integer(I4B), intent(inout) :: n1
653  integer(I4B), intent(inout) :: n2
654  real(DP), intent(inout), optional :: rrate
655  real(DP), intent(inout), optional :: rhsval
656  real(DP), intent(inout), optional :: hcofval
657  ! -- local
658  real(DP) :: qbnd
659  real(DP) :: ctmp
660  !
661  n1 = this%flowbudptr%budterm(this%idxbudfwrt)%id1(ientry)
662  n2 = this%flowbudptr%budterm(this%idxbudfwrt)%id2(ientry)
663  qbnd = this%flowbudptr%budterm(this%idxbudfwrt)%flow(ientry)
664  ctmp = this%xnewpak(n1)
665  if (present(rrate)) rrate = ctmp * qbnd
666  if (present(rhsval)) rhsval = dzero
667  if (present(hcofval)) hcofval = qbnd

◆ mwt_get_nbudterms()

integer(i4b) function gwtmwtmodule::mwt_get_nbudterms ( class(gwtmwttype)  this)

This overrides a function in the parent class.

Definition at line 393 of file gwt-mwt.f90.

394  ! -- modules
395  ! -- dummy
396  class(GwtMwtType) :: this
397  ! -- Return
398  integer(I4B) :: nbudterms
399  ! -- local
400  !
401  ! -- Number of budget terms is 4
402  nbudterms = 1
403  if (this%idxbudfwrt /= 0) nbudterms = nbudterms + 1
404  if (this%idxbudrtmv /= 0) nbudterms = nbudterms + 1
405  if (this%idxbudfrtm /= 0) nbudterms = nbudterms + 1

◆ mwt_rate_term()

subroutine gwtmwtmodule::mwt_rate_term ( class(gwtmwttype)  this,
integer(i4b), intent(in)  ientry,
integer(i4b), intent(inout)  n1,
integer(i4b), intent(inout)  n2,
real(dp), intent(inout), optional  rrate,
real(dp), intent(inout), optional  rhsval,
real(dp), intent(inout), optional  hcofval 
)

Definition at line 611 of file gwt-mwt.f90.

613  ! -- dummy
614  class(GwtMwtType) :: this
615  integer(I4B), intent(in) :: ientry
616  integer(I4B), intent(inout) :: n1
617  integer(I4B), intent(inout) :: n2
618  real(DP), intent(inout), optional :: rrate
619  real(DP), intent(inout), optional :: rhsval
620  real(DP), intent(inout), optional :: hcofval
621  ! -- local
622  real(DP) :: qbnd
623  real(DP) :: ctmp
624  real(DP) :: h, r
625  !
626  n1 = this%flowbudptr%budterm(this%idxbudrate)%id1(ientry)
627  n2 = this%flowbudptr%budterm(this%idxbudrate)%id2(ientry)
628  ! -- note that qbnd is negative for extracting well
629  qbnd = this%flowbudptr%budterm(this%idxbudrate)%flow(ientry)
630  if (qbnd < dzero) then
631  ctmp = this%xnewpak(n1)
632  h = qbnd
633  r = dzero
634  else
635  ctmp = this%concrate(n1)
636  h = dzero
637  r = -qbnd * ctmp
638  end if
639  if (present(rrate)) rrate = qbnd * ctmp
640  if (present(rhsval)) rhsval = r
641  if (present(hcofval)) hcofval = h

◆ mwt_rp_obs()

subroutine gwtmwtmodule::mwt_rp_obs ( class(gwtmwttype), intent(inout)  this,
type(observetype), intent(inout)  obsrv,
logical, intent(inout)  found 
)

Method to process specific observations for this package.

Parameters
[in,out]thispackage class
[in,out]obsrvobservation object
[in,out]foundindicate whether observation was found

Definition at line 796 of file gwt-mwt.f90.

797  ! -- dummy
798  class(GwtMwtType), intent(inout) :: this !< package class
799  type(ObserveType), intent(inout) :: obsrv !< observation object
800  logical, intent(inout) :: found !< indicate whether observation was found
801  ! -- local
802  !
803  found = .true.
804  select case (obsrv%ObsTypeId)
805  case ('RATE')
806  call this%rp_obs_byfeature(obsrv)
807  case ('FW-RATE')
808  call this%rp_obs_byfeature(obsrv)
809  case ('RATE-TO-MVR')
810  call this%rp_obs_byfeature(obsrv)
811  case ('FW-RATE-TO-MVR')
812  call this%rp_obs_byfeature(obsrv)
813  case default
814  found = .false.
815  end select

◆ mwt_rtmv_term()

subroutine gwtmwtmodule::mwt_rtmv_term ( class(gwtmwttype)  this,
integer(i4b), intent(in)  ientry,
integer(i4b), intent(inout)  n1,
integer(i4b), intent(inout)  n2,
real(dp), intent(inout), optional  rrate,
real(dp), intent(inout), optional  rhsval,
real(dp), intent(inout), optional  hcofval 
)

Pumped water that is made available to the MVR package for transfer to another advanced package

Definition at line 675 of file gwt-mwt.f90.

677  ! -- dummy
678  class(GwtMwtType) :: this
679  integer(I4B), intent(in) :: ientry
680  integer(I4B), intent(inout) :: n1
681  integer(I4B), intent(inout) :: n2
682  real(DP), intent(inout), optional :: rrate
683  real(DP), intent(inout), optional :: rhsval
684  real(DP), intent(inout), optional :: hcofval
685  ! -- local
686  real(DP) :: qbnd
687  real(DP) :: ctmp
688  !
689  n1 = this%flowbudptr%budterm(this%idxbudrtmv)%id1(ientry)
690  n2 = this%flowbudptr%budterm(this%idxbudrtmv)%id2(ientry)
691  qbnd = this%flowbudptr%budterm(this%idxbudrtmv)%flow(ientry)
692  ctmp = this%xnewpak(n1)
693  if (present(rrate)) rrate = ctmp * qbnd
694  if (present(rhsval)) rhsval = dzero
695  if (present(hcofval)) hcofval = qbnd

◆ mwt_setting_value()

real(dp) function gwtmwtmodule::mwt_setting_value ( class(gwtmwttype), intent(inout)  this,
integer(i4b), intent(in)  itemno,
character(len=*), intent(in)  key 
)

Already resolved by the input context; this only supplies it for the shared apt_rp table echo.

Definition at line 265 of file gwt-mwt.f90.

266  ! -- dummy
267  class(GwtMwtType), intent(inout) :: this
268  integer(I4B), intent(in) :: itemno
269  character(len=*), intent(in) :: key
270  real(DP) :: val
271  !
272  val = dzero
273  select case (trim(key))
274  case ('RATE')
275  val = this%concrate(itemno)
276  end select

◆ mwt_setup_budobj()

subroutine gwtmwtmodule::mwt_setup_budobj ( class(gwtmwttype)  this,
integer(i4b), intent(inout)  idx 
)

Definition at line 410 of file gwt-mwt.f90.

411  ! -- modules
412  use constantsmodule, only: lenbudtxt
413  ! -- dummy
414  class(GwtMwtType) :: this
415  integer(I4B), intent(inout) :: idx
416  ! -- local
417  integer(I4B) :: maxlist, naux
418  character(len=LENBUDTXT) :: text
419  !
420  ! --
421  text = ' RATE'
422  idx = idx + 1
423  maxlist = this%flowbudptr%budterm(this%idxbudrate)%maxlist
424  naux = 0
425  call this%budobj%budterm(idx)%initialize(text, &
426  this%name_model, &
427  this%packName, &
428  this%name_model, &
429  this%packName, &
430  maxlist, .false., .false., &
431  naux)
432  !
433  ! --
434  if (this%idxbudfwrt /= 0) then
435  text = ' FW-RATE'
436  idx = idx + 1
437  maxlist = this%flowbudptr%budterm(this%idxbudfwrt)%maxlist
438  naux = 0
439  call this%budobj%budterm(idx)%initialize(text, &
440  this%name_model, &
441  this%packName, &
442  this%name_model, &
443  this%packName, &
444  maxlist, .false., .false., &
445  naux)
446  end if
447  !
448  ! --
449  if (this%idxbudrtmv /= 0) then
450  text = ' RATE-TO-MVR'
451  idx = idx + 1
452  maxlist = this%flowbudptr%budterm(this%idxbudrtmv)%maxlist
453  naux = 0
454  call this%budobj%budterm(idx)%initialize(text, &
455  this%name_model, &
456  this%packName, &
457  this%name_model, &
458  this%packName, &
459  maxlist, .false., .false., &
460  naux)
461  end if
462  !
463  ! --
464  if (this%idxbudfrtm /= 0) then
465  text = ' FW-RATE-TO-MVR'
466  idx = idx + 1
467  maxlist = this%flowbudptr%budterm(this%idxbudfrtm)%maxlist
468  naux = 0
469  call this%budobj%budterm(idx)%initialize(text, &
470  this%name_model, &
471  this%packName, &
472  this%name_model, &
473  this%packName, &
474  maxlist, .false., .false., &
475  naux)
476  end if
This module contains simulation constants.
Definition: Constants.f90:9
integer(i4b), parameter lenbudtxt
maximum length of a budget component names
Definition: Constants.f90:37

◆ mwt_solve()

subroutine gwtmwtmodule::mwt_solve ( class(gwtmwttype)  this)

Definition at line 348 of file gwt-mwt.f90.

349  ! -- dummy
350  class(GwtMwtType) :: this
351  ! -- local
352  integer(I4B) :: j
353  integer(I4B) :: n1, n2
354  real(DP) :: rrate
355  !
356  ! -- add well pumping contribution
357  if (this%idxbudrate /= 0) then
358  do j = 1, this%flowbudptr%budterm(this%idxbudrate)%nlist
359  call this%mwt_rate_term(j, n1, n2, rrate)
360  this%dbuff(n1) = this%dbuff(n1) + rrate
361  end do
362  end if
363  !
364  ! -- add flowing well rate contribution
365  if (this%idxbudfwrt /= 0) then
366  do j = 1, this%flowbudptr%budterm(this%idxbudfwrt)%nlist
367  call this%mwt_fwrt_term(j, n1, n2, rrate)
368  this%dbuff(n1) = this%dbuff(n1) + rrate
369  end do
370  end if
371  !
372  ! -- add well pumping rate to mover contribution
373  if (this%idxbudrtmv /= 0) then
374  do j = 1, this%flowbudptr%budterm(this%idxbudrtmv)%nlist
375  call this%mwt_rtmv_term(j, n1, n2, rrate)
376  this%dbuff(n1) = this%dbuff(n1) + rrate
377  end do
378  end if
379  !
380  ! -- add flowing well rate to mover contribution
381  if (this%idxbudfrtm /= 0) then
382  do j = 1, this%flowbudptr%budterm(this%idxbudfrtm)%nlist
383  call this%mwt_frtm_term(j, n1, n2, rrate)
384  this%dbuff(n1) = this%dbuff(n1) + rrate
385  end do
386  end if

Variable Documentation

◆ flowtype

character(len=*), parameter gwtmwtmodule::flowtype = 'MAW'

Definition at line 55 of file gwt-mwt.f90.

55  character(len=*), parameter :: flowtype = 'MAW'

◆ ftype

character(len=*), parameter gwtmwtmodule::ftype = 'MWT'

Definition at line 54 of file gwt-mwt.f90.

54  character(len=*), parameter :: ftype = 'MWT'

◆ text

character(len=16) gwtmwtmodule::text = ' MWT'

Definition at line 56 of file gwt-mwt.f90.

56  character(len=16) :: text = ' MWT'