MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
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.
subroutine find_mwt_package (this)
 find corresponding mwt package
real(dp) function mwt_setting_value (this, itemno, key)
 Value for a package-specific PERIOD setting.
subroutine mwt_fc_expanded (this, rhs, ia, idxglo, matrix_sln)
 Add matrix terms related to MWT.
subroutine mwt_solve (this)
 Add terms specific to multi-aquifer wells to the explicit multi- aquifer well solute transport solve.
integer(i4b) function mwt_get_nbudterms (this)
 Function to return the number of budget terms just for this package.
subroutine mwt_setup_budobj (this, idx)
 Set up the budget object that stores all the mwt flows.
subroutine mwt_fill_budobj (this, idx, x, flowja, ccratin, ccratout)
 Copy flow terms into thisbudobj.
subroutine allocate_scalars (this)
 Allocate scalars specific to the streamflow mass transport (SFT) package.
subroutine mwt_allocate_arrays (this)
 Allocate arrays specific to the streamflow mass transport (SFT) package.
subroutine mwt_checkin_deprecated_names (this)
 Alias deprecated MWT variable names to their current storage.
subroutine mwt_da (this)
 Deallocate memory.
subroutine mwt_rate_term (this, ientry, n1, n2, rrate, rhsval, hcofval)
 Rate term associated with pumping (or injection).
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).
subroutine mwt_rtmv_term (this, ientry, n1, n2, rrate, rhsval, hcofval)
 Rate-to-mvr term associated with pumping (or injection).
subroutine mwt_frtm_term (this, ientry, n1, n2, rrate, rhsval, hcofval)
 Flowing well rate-to-mvr term (or injection).
subroutine mwt_df_obs (this)
 Observations.
subroutine mwt_rp_obs (this, obsrv, found)
 Process package specific obs.
subroutine mwt_bd_obs (this, obstypeid, jj, v, found)
 Calculate observation value and pass it back to APT.

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

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

◆ find_mwt_package()

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

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

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

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

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

838 ! -- dummy
839 class(GwtMwtType), intent(inout) :: this
840 character(len=*), intent(in) :: obstypeid
841 real(DP), intent(inout) :: v
842 integer(I4B), intent(in) :: jj
843 logical, intent(inout) :: found
844 ! -- local
845 integer(I4B) :: n1, n2
846 !
847 found = .true.
848 select case (obstypeid)
849 case ('RATE')
850 if (this%iboundpak(jj) /= 0) then
851 call this%mwt_rate_term(jj, n1, n2, v)
852 end if
853 case ('FW-RATE')
854 if (this%iboundpak(jj) /= 0 .and. this%idxbudfwrt > 0) then
855 call this%mwt_fwrt_term(jj, n1, n2, v)
856 end if
857 case ('RATE-TO-MVR')
858 if (this%iboundpak(jj) /= 0 .and. this%idxbudrtmv > 0) then
859 call this%mwt_rtmv_term(jj, n1, n2, v)
860 end if
861 case ('FW-RATE-TO-MVR')
862 if (this%iboundpak(jj) /= 0 .and. this%idxbudfrtm > 0) then
863 call this%mwt_frtm_term(jj, n1, n2, v)
864 end if
865 case default
866 found = .false.
867 end select

◆ mwt_checkin_deprecated_names()

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

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

591 ! -- modules
593 ! -- dummy
594 class(GwtMwtType), intent(inout) :: this
595 ! -- code
596 !
597 ! -- names common to all advanced transport packages
598 call this%TspAptType%apt_checkin_deprecated_names()
599 !
600 call mem_alias_deprecated(this%concrate, 'CONCRATE', this%memoryPath, &
601 'RATE', this%input_mempath, '6.8.2')
Previous variable names checked in as deprecated aliases.

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

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

◆ mwt_da()

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

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

607 ! -- modules
609 ! -- dummy
610 class(GwtMwtType) :: this
611 ! -- local
612 !
613 ! -- deallocate scalars
614 call mem_deallocate(this%idxbudrate)
615 call mem_deallocate(this%idxbudfwrt)
616 call mem_deallocate(this%idxbudrtmv)
617 call mem_deallocate(this%idxbudfrtm)
618 !
619 ! -- input-context-owned alias, not package-allocated
620 nullify (this%concrate)
621 !
622 ! -- deallocate scalars in TspAptType
623 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 748 of file gwt-mwt.f90.

749 ! -- modules
750 ! -- dummy
751 class(GwtMwtType) :: this
752 ! -- local
753 integer(I4B) :: indx
754 !
755 ! -- Store obs type and assign procedure pointer
756 ! for concentration observation type.
757 call this%obs%StoreObsType('concentration', .false., indx)
758 this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
759 !
760 ! -- flow-ja-face not supported for MWT
761 !call this%obs%StoreObsType('flow-ja-face', .true., indx)
762 !this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsID
763 !
764 ! -- Store obs type and assign procedure pointer
765 ! for from-mvr observation type.
766 call this%obs%StoreObsType('from-mvr', .true., indx)
767 this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
768 !
769 ! -- to-mvr not supported for mwt
770 !call this%obs%StoreObsType('to-mvr', .true., indx)
771 !this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsID
772 !
773 ! -- Store obs type and assign procedure pointer
774 ! for storage observation type.
775 call this%obs%StoreObsType('storage', .true., indx)
776 this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
777 !
778 ! -- Store obs type and assign procedure pointer
779 ! for constant observation type.
780 call this%obs%StoreObsType('constant', .true., indx)
781 this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
782 !
783 ! -- Store obs type and assign procedure pointer
784 ! for observation type: mwt
785 call this%obs%StoreObsType('mwt', .true., indx)
786 this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid12
787 !
788 ! -- Store obs type and assign procedure pointer
789 ! for rate observation type.
790 call this%obs%StoreObsType('rate', .true., indx)
791 this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
792 !
793 ! -- Store obs type and assign procedure pointer
794 ! for observation type.
795 call this%obs%StoreObsType('fw-rate', .true., indx)
796 this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
797 !
798 ! -- Store obs type and assign procedure pointer
799 ! for observation type.
800 call this%obs%StoreObsType('rate-to-mvr', .true., indx)
801 this%obs%obsData(indx)%ProcessIdPtr => apt_process_obsid
802 !
803 ! -- Store obs type and assign procedure pointer
804 ! for observation type.
805 call this%obs%StoreObsType('fw-rate-to-mvr', .true., indx)
806 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 285 of file gwt-mwt.f90.

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

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

722 ! -- dummy
723 class(GwtMwtType) :: this
724 integer(I4B), intent(in) :: ientry
725 integer(I4B), intent(inout) :: n1
726 integer(I4B), intent(inout) :: n2
727 real(DP), intent(inout), optional :: rrate
728 real(DP), intent(inout), optional :: rhsval
729 real(DP), intent(inout), optional :: hcofval
730 ! -- local
731 real(DP) :: qbnd
732 real(DP) :: ctmp
733 !
734 n1 = this%flowbudptr%budterm(this%idxbudfrtm)%id1(ientry)
735 n2 = this%flowbudptr%budterm(this%idxbudfrtm)%id2(ientry)
736 qbnd = this%flowbudptr%budterm(this%idxbudfrtm)%flow(ientry)
737 ctmp = this%xnewpak(n1)
738 if (present(rrate)) rrate = ctmp * qbnd
739 if (present(rhsval)) rhsval = dzero
740 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 664 of file gwt-mwt.f90.

666 ! -- dummy
667 class(GwtMwtType) :: this
668 integer(I4B), intent(in) :: ientry
669 integer(I4B), intent(inout) :: n1
670 integer(I4B), intent(inout) :: n2
671 real(DP), intent(inout), optional :: rrate
672 real(DP), intent(inout), optional :: rhsval
673 real(DP), intent(inout), optional :: hcofval
674 ! -- local
675 real(DP) :: qbnd
676 real(DP) :: ctmp
677 !
678 n1 = this%flowbudptr%budterm(this%idxbudfwrt)%id1(ientry)
679 n2 = this%flowbudptr%budterm(this%idxbudfwrt)%id2(ientry)
680 qbnd = this%flowbudptr%budterm(this%idxbudfwrt)%flow(ientry)
681 ctmp = this%xnewpak(n1)
682 if (present(rrate)) rrate = ctmp * qbnd
683 if (present(rhsval)) rhsval = dzero
684 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 394 of file gwt-mwt.f90.

395 ! -- modules
396 ! -- dummy
397 class(GwtMwtType) :: this
398 ! -- Return
399 integer(I4B) :: nbudterms
400 ! -- local
401 !
402 ! -- Number of budget terms is 4
403 nbudterms = 1
404 if (this%idxbudfwrt /= 0) nbudterms = nbudterms + 1
405 if (this%idxbudrtmv /= 0) nbudterms = nbudterms + 1
406 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 628 of file gwt-mwt.f90.

630 ! -- dummy
631 class(GwtMwtType) :: this
632 integer(I4B), intent(in) :: ientry
633 integer(I4B), intent(inout) :: n1
634 integer(I4B), intent(inout) :: n2
635 real(DP), intent(inout), optional :: rrate
636 real(DP), intent(inout), optional :: rhsval
637 real(DP), intent(inout), optional :: hcofval
638 ! -- local
639 real(DP) :: qbnd
640 real(DP) :: ctmp
641 real(DP) :: h, r
642 !
643 n1 = this%flowbudptr%budterm(this%idxbudrate)%id1(ientry)
644 n2 = this%flowbudptr%budterm(this%idxbudrate)%id2(ientry)
645 ! -- note that qbnd is negative for extracting well
646 qbnd = this%flowbudptr%budterm(this%idxbudrate)%flow(ientry)
647 if (qbnd < dzero) then
648 ctmp = this%xnewpak(n1)
649 h = qbnd
650 r = dzero
651 else
652 ctmp = this%concrate(n1)
653 h = dzero
654 r = -qbnd * ctmp
655 end if
656 if (present(rrate)) rrate = qbnd * ctmp
657 if (present(rhsval)) rhsval = r
658 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 813 of file gwt-mwt.f90.

814 ! -- dummy
815 class(GwtMwtType), intent(inout) :: this !< package class
816 type(ObserveType), intent(inout) :: obsrv !< observation object
817 logical, intent(inout) :: found !< indicate whether observation was found
818 ! -- local
819 !
820 found = .true.
821 select case (obsrv%ObsTypeId)
822 case ('RATE')
823 call this%rp_obs_byfeature(obsrv)
824 case ('FW-RATE')
825 call this%rp_obs_byfeature(obsrv)
826 case ('RATE-TO-MVR')
827 call this%rp_obs_byfeature(obsrv)
828 case ('FW-RATE-TO-MVR')
829 call this%rp_obs_byfeature(obsrv)
830 case default
831 found = .false.
832 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 692 of file gwt-mwt.f90.

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

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

◆ mwt_setup_budobj()

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

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

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

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

Variable Documentation

◆ flowtype

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

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

◆ ftype

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

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

◆ text

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

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