MODFLOW 6  version 6.6.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, fmi, eqnsclfac, dvt, dvu, dvua)
 Create new MWT package. More...
 
subroutine find_mwt_package (this)
 find corresponding mwt package 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...
 
subroutine mwt_set_stressperiod (this, itemno, keyword, found)
 Sets the stress period attributes for keyword use. 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 523 of file gwt-mwt.f90.

524  ! -- modules
526  ! -- dummy
527  class(GwtMwtType) :: this
528  ! -- local
529  !
530  ! -- allocate scalars in TspAptType
531  call this%TspAptType%allocate_scalars()
532  !
533  ! -- Allocate
534  call mem_allocate(this%idxbudrate, 'IDXBUDRATE', this%memoryPath)
535  call mem_allocate(this%idxbudfwrt, 'IDXBUDFWRT', this%memoryPath)
536  call mem_allocate(this%idxbudrtmv, 'IDXBUDRTMV', this%memoryPath)
537  call mem_allocate(this%idxbudfrtm, 'IDXBUDFRTM', this%memoryPath)
538  !
539  ! -- Initialize
540  this%idxbudrate = 0
541  this%idxbudfwrt = 0
542  this%idxbudrtmv = 0
543  this%idxbudfrtm = 0

◆ find_mwt_package()

subroutine gwtmwtmodule::find_mwt_package ( class(gwtmwttype this)

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

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

550  ! -- modules
552  ! -- dummy
553  class(GwtMwtType), intent(inout) :: this
554  ! -- local
555  integer(I4B) :: n
556  !
557  ! -- time series
558  call mem_allocate(this%concrate, this%ncv, 'CONCRATE', this%memoryPath)
559  !
560  ! -- call standard TspAptType allocate arrays
561  call this%TspAptType%apt_allocate_arrays()
562  !
563  ! -- Initialize
564  do n = 1, this%ncv
565  this%concrate(n) = dzero
566  end do
567  !

◆ 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 803 of file gwt-mwt.f90.

804  ! -- dummy
805  class(GwtMwtType), intent(inout) :: this
806  character(len=*), intent(in) :: obstypeid
807  real(DP), intent(inout) :: v
808  integer(I4B), intent(in) :: jj
809  logical, intent(inout) :: found
810  ! -- local
811  integer(I4B) :: n1, n2
812  !
813  found = .true.
814  select case (obstypeid)
815  case ('RATE')
816  if (this%iboundpak(jj) /= 0) then
817  call this%mwt_rate_term(jj, n1, n2, v)
818  end if
819  case ('FW-RATE')
820  if (this%iboundpak(jj) /= 0 .and. this%idxbudfwrt > 0) then
821  call this%mwt_fwrt_term(jj, n1, n2, v)
822  end if
823  case ('RATE-TO-MVR')
824  if (this%iboundpak(jj) /= 0 .and. this%idxbudrtmv > 0) then
825  call this%mwt_rtmv_term(jj, n1, n2, v)
826  end if
827  case ('FW-RATE-TO-MVR')
828  if (this%iboundpak(jj) /= 0 .and. this%idxbudfrtm > 0) then
829  call this%mwt_frtm_term(jj, n1, n2, v)
830  end if
831  case default
832  found = .false.
833  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,
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]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 90 of file gwt-mwt.f90.

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

◆ mwt_da()

subroutine gwtmwtmodule::mwt_da ( class(gwtmwttype this)

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

573  ! -- modules
575  ! -- dummy
576  class(GwtMwtType) :: this
577  ! -- local
578  !
579  ! -- deallocate scalars
580  call mem_deallocate(this%idxbudrate)
581  call mem_deallocate(this%idxbudfwrt)
582  call mem_deallocate(this%idxbudrtmv)
583  call mem_deallocate(this%idxbudfrtm)
584  !
585  ! -- deallocate time series
586  call mem_deallocate(this%concrate)
587  !
588  ! -- deallocate scalars in TspAptType
589  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 714 of file gwt-mwt.f90.

715  ! -- modules
716  ! -- dummy
717  class(GwtMwtType) :: this
718  ! -- local
719  integer(I4B) :: indx
720  !
721  ! -- Store obs type and assign procedure pointer
722  ! for concentration observation type.
723  call this%obs%StoreObsType('concentration', .false., indx)
724  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
725  !
726  ! -- flow-ja-face not supported for MWT
727  !call this%obs%StoreObsType('flow-ja-face', .true., indx)
728  !this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsID
729  !
730  ! -- Store obs type and assign procedure pointer
731  ! for from-mvr observation type.
732  call this%obs%StoreObsType('from-mvr', .true., indx)
733  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
734  !
735  ! -- to-mvr not supported for mwt
736  !call this%obs%StoreObsType('to-mvr', .true., indx)
737  !this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsID
738  !
739  ! -- Store obs type and assign procedure pointer
740  ! for storage observation type.
741  call this%obs%StoreObsType('storage', .true., indx)
742  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
743  !
744  ! -- Store obs type and assign procedure pointer
745  ! for constant observation type.
746  call this%obs%StoreObsType('constant', .true., indx)
747  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
748  !
749  ! -- Store obs type and assign procedure pointer
750  ! for observation type: mwt
751  call this%obs%StoreObsType('mwt', .true., indx)
752  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid12
753  !
754  ! -- Store obs type and assign procedure pointer
755  ! for rate observation type.
756  call this%obs%StoreObsType('rate', .true., indx)
757  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
758  !
759  ! -- Store obs type and assign procedure pointer
760  ! for observation type.
761  call this%obs%StoreObsType('fw-rate', .true., indx)
762  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
763  !
764  ! -- Store obs type and assign procedure pointer
765  ! for observation type.
766  call this%obs%StoreObsType('rate-to-mvr', .true., indx)
767  this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
768  !
769  ! -- Store obs type and assign procedure pointer
770  ! for observation type.
771  call this%obs%StoreObsType('fw-rate-to-mvr', .true., indx)
772  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 261 of file gwt-mwt.f90.

262  ! -- modules
263  ! -- dummy
264  class(GwtMwtType) :: this
265  real(DP), dimension(:), intent(inout) :: rhs
266  integer(I4B), dimension(:), intent(in) :: ia
267  integer(I4B), dimension(:), intent(in) :: idxglo
268  class(MatrixBaseType), pointer :: matrix_sln
269  ! -- local
270  integer(I4B) :: j, n1, n2
271  integer(I4B) :: iloc
272  integer(I4B) :: iposd
273  real(DP) :: rrate
274  real(DP) :: rhsval
275  real(DP) :: hcofval
276  !
277  ! -- add puping rate contribution
278  if (this%idxbudrate /= 0) then
279  do j = 1, this%flowbudptr%budterm(this%idxbudrate)%nlist
280  call this%mwt_rate_term(j, n1, n2, rrate, rhsval, hcofval)
281  iloc = this%idxlocnode(n1)
282  iposd = this%idxpakdiag(n1)
283  call matrix_sln%add_value_pos(iposd, hcofval)
284  rhs(iloc) = rhs(iloc) + rhsval
285  end do
286  end if
287  !
288  ! -- add flowing well rate contribution
289  if (this%idxbudfwrt /= 0) then
290  do j = 1, this%flowbudptr%budterm(this%idxbudfwrt)%nlist
291  call this%mwt_fwrt_term(j, n1, n2, rrate, rhsval, hcofval)
292  iloc = this%idxlocnode(n1)
293  iposd = this%idxpakdiag(n1)
294  call matrix_sln%add_value_pos(iposd, hcofval)
295  rhs(iloc) = rhs(iloc) + rhsval
296  end do
297  end if
298  !
299  ! -- add rate to mover contribution
300  if (this%idxbudrtmv /= 0) then
301  do j = 1, this%flowbudptr%budterm(this%idxbudrtmv)%nlist
302  call this%mwt_rtmv_term(j, n1, n2, rrate, rhsval, hcofval)
303  iloc = this%idxlocnode(n1)
304  iposd = this%idxpakdiag(n1)
305  call matrix_sln%add_value_pos(iposd, hcofval)
306  rhs(iloc) = rhs(iloc) + rhsval
307  end do
308  end if
309  !
310  ! -- add puping rate contribution
311  if (this%idxbudfrtm /= 0) then
312  do j = 1, this%flowbudptr%budterm(this%idxbudfrtm)%nlist
313  call this%mwt_frtm_term(j, n1, n2, rrate, rhsval, hcofval)
314  iloc = this%idxlocnode(n1)
315  iposd = this%idxpakdiag(n1)
316  call matrix_sln%add_value_pos(iposd, hcofval)
317  rhs(iloc) = rhs(iloc) + rhsval
318  end do
319  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 458 of file gwt-mwt.f90.

459  ! -- modules
460  ! -- dummy
461  class(GwtMwtType) :: this
462  integer(I4B), intent(inout) :: idx
463  real(DP), dimension(:), intent(in) :: x
464  real(DP), dimension(:), contiguous, intent(inout) :: flowja
465  real(DP), intent(inout) :: ccratin
466  real(DP), intent(inout) :: ccratout
467  ! -- local
468  integer(I4B) :: j, n1, n2
469  integer(I4B) :: nlist
470  real(DP) :: q
471  ! -- formats
472  !
473  ! -- RATE
474  idx = idx + 1
475  nlist = this%flowbudptr%budterm(this%idxbudrate)%nlist
476  call this%budobj%budterm(idx)%reset(nlist)
477  do j = 1, nlist
478  call this%mwt_rate_term(j, n1, n2, q)
479  call this%budobj%budterm(idx)%update_term(n1, n2, q)
480  call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
481  end do
482  !
483  ! -- FW-RATE
484  if (this%idxbudfwrt /= 0) then
485  idx = idx + 1
486  nlist = this%flowbudptr%budterm(this%idxbudfwrt)%nlist
487  call this%budobj%budterm(idx)%reset(nlist)
488  do j = 1, nlist
489  call this%mwt_fwrt_term(j, n1, n2, q)
490  call this%budobj%budterm(idx)%update_term(n1, n2, q)
491  call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
492  end do
493  end if
494  !
495  ! -- RATE-TO-MVR
496  if (this%idxbudrtmv /= 0) then
497  idx = idx + 1
498  nlist = this%flowbudptr%budterm(this%idxbudrtmv)%nlist
499  call this%budobj%budterm(idx)%reset(nlist)
500  do j = 1, nlist
501  call this%mwt_rtmv_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  end if
506  !
507  ! -- FW-RATE-TO-MVR
508  if (this%idxbudfrtm /= 0) then
509  idx = idx + 1
510  nlist = this%flowbudptr%budterm(this%idxbudfrtm)%nlist
511  call this%budobj%budterm(idx)%reset(nlist)
512  do j = 1, nlist
513  call this%mwt_frtm_term(j, n1, n2, q)
514  call this%budobj%budterm(idx)%update_term(n1, n2, q)
515  call this%apt_accumulate_ccterm(n1, q, ccratin, ccratout)
516  end do
517  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 686 of file gwt-mwt.f90.

688  ! -- dummy
689  class(GwtMwtType) :: this
690  integer(I4B), intent(in) :: ientry
691  integer(I4B), intent(inout) :: n1
692  integer(I4B), intent(inout) :: n2
693  real(DP), intent(inout), optional :: rrate
694  real(DP), intent(inout), optional :: rhsval
695  real(DP), intent(inout), optional :: hcofval
696  ! -- local
697  real(DP) :: qbnd
698  real(DP) :: ctmp
699  !
700  n1 = this%flowbudptr%budterm(this%idxbudfrtm)%id1(ientry)
701  n2 = this%flowbudptr%budterm(this%idxbudfrtm)%id2(ientry)
702  qbnd = this%flowbudptr%budterm(this%idxbudfrtm)%flow(ientry)
703  ctmp = this%xnewpak(n1)
704  if (present(rrate)) rrate = ctmp * qbnd
705  if (present(rhsval)) rhsval = dzero
706  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 630 of file gwt-mwt.f90.

632  ! -- dummy
633  class(GwtMwtType) :: this
634  integer(I4B), intent(in) :: ientry
635  integer(I4B), intent(inout) :: n1
636  integer(I4B), intent(inout) :: n2
637  real(DP), intent(inout), optional :: rrate
638  real(DP), intent(inout), optional :: rhsval
639  real(DP), intent(inout), optional :: hcofval
640  ! -- local
641  real(DP) :: qbnd
642  real(DP) :: ctmp
643  !
644  n1 = this%flowbudptr%budterm(this%idxbudfwrt)%id1(ientry)
645  n2 = this%flowbudptr%budterm(this%idxbudfwrt)%id2(ientry)
646  qbnd = this%flowbudptr%budterm(this%idxbudfwrt)%flow(ientry)
647  ctmp = this%xnewpak(n1)
648  if (present(rrate)) rrate = ctmp * qbnd
649  if (present(rhsval)) rhsval = dzero
650  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 370 of file gwt-mwt.f90.

371  ! -- modules
372  ! -- dummy
373  class(GwtMwtType) :: this
374  ! -- Return
375  integer(I4B) :: nbudterms
376  ! -- local
377  !
378  ! -- Number of budget terms is 4
379  nbudterms = 1
380  if (this%idxbudfwrt /= 0) nbudterms = nbudterms + 1
381  if (this%idxbudrtmv /= 0) nbudterms = nbudterms + 1
382  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 594 of file gwt-mwt.f90.

596  ! -- dummy
597  class(GwtMwtType) :: this
598  integer(I4B), intent(in) :: ientry
599  integer(I4B), intent(inout) :: n1
600  integer(I4B), intent(inout) :: n2
601  real(DP), intent(inout), optional :: rrate
602  real(DP), intent(inout), optional :: rhsval
603  real(DP), intent(inout), optional :: hcofval
604  ! -- local
605  real(DP) :: qbnd
606  real(DP) :: ctmp
607  real(DP) :: h, r
608  !
609  n1 = this%flowbudptr%budterm(this%idxbudrate)%id1(ientry)
610  n2 = this%flowbudptr%budterm(this%idxbudrate)%id2(ientry)
611  ! -- note that qbnd is negative for extracting well
612  qbnd = this%flowbudptr%budterm(this%idxbudrate)%flow(ientry)
613  if (qbnd < dzero) then
614  ctmp = this%xnewpak(n1)
615  h = qbnd
616  r = dzero
617  else
618  ctmp = this%concrate(n1)
619  h = dzero
620  r = -qbnd * ctmp
621  end if
622  if (present(rrate)) rrate = qbnd * ctmp
623  if (present(rhsval)) rhsval = r
624  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 779 of file gwt-mwt.f90.

780  ! -- dummy
781  class(GwtMwtType), intent(inout) :: this !< package class
782  type(ObserveType), intent(inout) :: obsrv !< observation object
783  logical, intent(inout) :: found !< indicate whether observation was found
784  ! -- local
785  !
786  found = .true.
787  select case (obsrv%ObsTypeId)
788  case ('RATE')
789  call this%rp_obs_byfeature(obsrv)
790  case ('FW-RATE')
791  call this%rp_obs_byfeature(obsrv)
792  case ('RATE-TO-MVR')
793  call this%rp_obs_byfeature(obsrv)
794  case ('FW-RATE-TO-MVR')
795  call this%rp_obs_byfeature(obsrv)
796  case default
797  found = .false.
798  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 658 of file gwt-mwt.f90.

660  ! -- dummy
661  class(GwtMwtType) :: this
662  integer(I4B), intent(in) :: ientry
663  integer(I4B), intent(inout) :: n1
664  integer(I4B), intent(inout) :: n2
665  real(DP), intent(inout), optional :: rrate
666  real(DP), intent(inout), optional :: rhsval
667  real(DP), intent(inout), optional :: hcofval
668  ! -- local
669  real(DP) :: qbnd
670  real(DP) :: ctmp
671  !
672  n1 = this%flowbudptr%budterm(this%idxbudrtmv)%id1(ientry)
673  n2 = this%flowbudptr%budterm(this%idxbudrtmv)%id2(ientry)
674  qbnd = this%flowbudptr%budterm(this%idxbudrtmv)%flow(ientry)
675  ctmp = this%xnewpak(n1)
676  if (present(rrate)) rrate = ctmp * qbnd
677  if (present(rhsval)) rhsval = dzero
678  if (present(hcofval)) hcofval = qbnd

◆ mwt_set_stressperiod()

subroutine gwtmwtmodule::mwt_set_stressperiod ( class(gwtmwttype), intent(inout)  this,
integer(i4b), intent(in)  itemno,
character(len=*), intent(in)  keyword,
logical, intent(inout)  found 
)

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

839  ! -- modules
841  ! -- dummy
842  class(GwtMwtType), intent(inout) :: this
843  integer(I4B), intent(in) :: itemno
844  character(len=*), intent(in) :: keyword
845  logical, intent(inout) :: found
846  ! -- local
847  character(len=LINELENGTH) :: text
848  integer(I4B) :: ierr
849  integer(I4B) :: jj
850  real(DP), pointer :: bndElem => null()
851  ! -- formats
852  !
853  ! RATE <rate>
854  !
855  found = .true.
856  select case (keyword)
857  case ('RATE')
858  ierr = this%apt_check_valid(itemno)
859  if (ierr /= 0) then
860  goto 999
861  end if
862  call this%parser%GetString(text)
863  jj = 1
864  bndelem => this%concrate(itemno)
865  call read_value_or_time_series_adv(text, itemno, jj, bndelem, &
866  this%packName, 'BND', this%tsManager, &
867  this%iprpak, 'RATE')
868  case default
869  !
870  ! -- keyword not recognized so return to caller with found = .false.
871  found = .false.
872  end select
873  !
874 999 continue
subroutine, public read_value_or_time_series_adv(textInput, ii, jj, bndElem, pkgName, auxOrBnd, tsManager, iprpak, varName)
Call this subroutine from advanced packages to define timeseries link for a variable (varName).
Here is the call graph for this function:

◆ mwt_setup_budobj()

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

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

388  ! -- modules
389  use constantsmodule, only: lenbudtxt
390  ! -- dummy
391  class(GwtMwtType) :: this
392  integer(I4B), intent(inout) :: idx
393  ! -- local
394  integer(I4B) :: maxlist, naux
395  character(len=LENBUDTXT) :: text
396  !
397  ! --
398  text = ' RATE'
399  idx = idx + 1
400  maxlist = this%flowbudptr%budterm(this%idxbudrate)%maxlist
401  naux = 0
402  call this%budobj%budterm(idx)%initialize(text, &
403  this%name_model, &
404  this%packName, &
405  this%name_model, &
406  this%packName, &
407  maxlist, .false., .false., &
408  naux)
409  !
410  ! --
411  if (this%idxbudfwrt /= 0) then
412  text = ' FW-RATE'
413  idx = idx + 1
414  maxlist = this%flowbudptr%budterm(this%idxbudfwrt)%maxlist
415  naux = 0
416  call this%budobj%budterm(idx)%initialize(text, &
417  this%name_model, &
418  this%packName, &
419  this%name_model, &
420  this%packName, &
421  maxlist, .false., .false., &
422  naux)
423  end if
424  !
425  ! --
426  if (this%idxbudrtmv /= 0) then
427  text = ' RATE-TO-MVR'
428  idx = idx + 1
429  maxlist = this%flowbudptr%budterm(this%idxbudrtmv)%maxlist
430  naux = 0
431  call this%budobj%budterm(idx)%initialize(text, &
432  this%name_model, &
433  this%packName, &
434  this%name_model, &
435  this%packName, &
436  maxlist, .false., .false., &
437  naux)
438  end if
439  !
440  ! --
441  if (this%idxbudfrtm /= 0) then
442  text = ' FW-RATE-TO-MVR'
443  idx = idx + 1
444  maxlist = this%flowbudptr%budterm(this%idxbudfrtm)%maxlist
445  naux = 0
446  call this%budobj%budterm(idx)%initialize(text, &
447  this%name_model, &
448  this%packName, &
449  this%name_model, &
450  this%packName, &
451  maxlist, .false., .false., &
452  naux)
453  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 325 of file gwt-mwt.f90.

326  ! -- dummy
327  class(GwtMwtType) :: this
328  ! -- local
329  integer(I4B) :: j
330  integer(I4B) :: n1, n2
331  real(DP) :: rrate
332  !
333  ! -- add well pumping contribution
334  if (this%idxbudrate /= 0) then
335  do j = 1, this%flowbudptr%budterm(this%idxbudrate)%nlist
336  call this%mwt_rate_term(j, n1, n2, rrate)
337  this%dbuff(n1) = this%dbuff(n1) + rrate
338  end do
339  end if
340  !
341  ! -- add flowing well rate contribution
342  if (this%idxbudfwrt /= 0) then
343  do j = 1, this%flowbudptr%budterm(this%idxbudfwrt)%nlist
344  call this%mwt_fwrt_term(j, n1, n2, rrate)
345  this%dbuff(n1) = this%dbuff(n1) + rrate
346  end do
347  end if
348  !
349  ! -- add well pumping rate to mover contribution
350  if (this%idxbudrtmv /= 0) then
351  do j = 1, this%flowbudptr%budterm(this%idxbudrtmv)%nlist
352  call this%mwt_rtmv_term(j, n1, n2, rrate)
353  this%dbuff(n1) = this%dbuff(n1) + rrate
354  end do
355  end if
356  !
357  ! -- add flowing well rate to mover contribution
358  if (this%idxbudfrtm /= 0) then
359  do j = 1, this%flowbudptr%budterm(this%idxbudfrtm)%nlist
360  call this%mwt_frtm_term(j, n1, n2, rrate)
361  this%dbuff(n1) = this%dbuff(n1) + rrate
362  end do
363  end if

Variable Documentation

◆ flowtype

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

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

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

◆ ftype

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

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

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

◆ text

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

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

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