45 character(len=LENFTYPE) ::
ftype =
'MAW'
46 character(len=LENPACKAGENAME) ::
text =
' MAW'
60 real(dp),
dimension(:),
pointer,
contiguous :: strt => null()
61 integer(I4B),
dimension(:),
pointer :: strt_tslink => null()
63 integer(I4B),
pointer :: nbound => null()
64 integer(I4B),
dimension(:),
pointer,
contiguous :: ifno => null()
66 contiguous :: setting => null()
68 contiguous :: status => null()
69 integer(I4B),
dimension(:),
pointer,
contiguous :: period_icon => null()
71 contiguous :: connstatus => null()
72 real(dp),
dimension(:),
pointer,
contiguous :: period_bottom => null()
74 contiguous :: head_limit => null()
75 real(dp),
dimension(:),
pointer,
contiguous :: fwelev => null()
76 real(dp),
dimension(:),
pointer,
contiguous :: fwcond => null()
77 real(dp),
dimension(:),
pointer,
contiguous :: fwrlen => null()
78 real(dp),
dimension(:),
pointer,
contiguous :: minrate => null()
79 real(dp),
dimension(:),
pointer,
contiguous :: maxrate => null()
80 real(dp),
dimension(:),
pointer,
contiguous :: pump_elevation => null()
81 real(dp),
dimension(:),
pointer,
contiguous :: scaling_length => null()
83 contiguous :: auxname => null()
84 real(dp),
dimension(:),
pointer, &
85 contiguous :: auxval => null()
96 character(len=LENBUDTXT),
dimension(:),
pointer, &
97 contiguous :: cmawbudget => null()
98 character(len=LENAUXNAME),
dimension(:),
pointer, &
99 contiguous :: cauxcbc => null()
102 logical(LGP),
pointer :: correct_flow => null()
105 integer(I4B),
pointer :: iprhed => null()
106 integer(I4B),
pointer :: iheadout => null()
107 integer(I4B),
pointer :: ibudgetout => null()
108 integer(I4B),
pointer :: ibudcsv => null()
109 integer(I4B),
pointer :: cbcauxitems => null()
110 integer(I4B),
pointer :: iflowingwells => null()
111 integer(I4B),
pointer :: imawiss => null()
112 integer(I4B),
pointer :: imawissopt => null()
113 integer(I4B),
pointer :: nmawwells => null()
114 integer(I4B),
pointer :: check_attr => null()
115 integer(I4B),
pointer :: ishutoffcnt => null()
116 integer(I4B),
pointer :: ieffradopt => null()
117 integer(I4B),
pointer :: inonvert => null()
118 integer(I4B),
pointer :: ioutredflowcsv => null()
119 real(dp),
pointer :: satomega => null()
122 real(dp),
pointer :: theta => null()
123 real(dp),
pointer :: kappa => null()
126 character(len=8),
dimension(:),
pointer,
contiguous :: status => null()
127 integer(I4B),
dimension(:),
pointer,
contiguous :: ngwfnodes => null()
128 integer(I4B),
dimension(:),
pointer,
contiguous :: ieqn => null()
129 integer(I4B),
dimension(:),
pointer,
contiguous :: ishutoff => null()
130 integer(I4B),
dimension(:),
pointer,
contiguous :: ifwdischarge => null()
131 real(dp),
dimension(:),
pointer,
contiguous :: strt => null()
132 real(dp),
dimension(:),
pointer,
contiguous :: radius => null()
133 real(dp),
dimension(:),
pointer,
contiguous ::
area => null()
134 real(dp),
dimension(:),
pointer,
contiguous :: pumpelev => null()
135 real(dp),
dimension(:),
pointer,
contiguous :: bot => null()
136 real(dp),
dimension(:),
pointer,
contiguous :: ratesim => null()
137 real(dp),
dimension(:),
pointer,
contiguous :: qsim0 => null()
138 real(dp),
dimension(:),
pointer,
contiguous :: reduction_length => null()
139 real(dp),
dimension(:),
pointer,
contiguous :: fwelev => null()
140 real(dp),
dimension(:),
pointer,
contiguous :: fwcond => null()
141 real(dp),
dimension(:),
pointer,
contiguous :: fwrlen => null()
142 real(dp),
dimension(:),
pointer,
contiguous :: fwcondsim => null()
143 real(dp),
dimension(:),
pointer,
contiguous :: xsto => null()
144 real(dp),
dimension(:),
pointer,
contiguous :: xoldsto => null()
145 real(dp),
dimension(:),
pointer,
contiguous :: shutoffmin => null()
146 real(dp),
dimension(:),
pointer,
contiguous :: shutoffmax => null()
147 real(dp),
dimension(:),
pointer,
contiguous :: shutofflevel => null()
148 real(dp),
dimension(:),
pointer,
contiguous :: shutoffweight => null()
149 real(dp),
dimension(:),
pointer,
contiguous :: shutoffdq => null()
150 real(dp),
dimension(:),
pointer,
contiguous :: shutoffqold => null()
151 real(dp),
dimension(:),
pointer,
contiguous :: nurdxold => null()
152 real(dp),
dimension(:),
pointer,
contiguous :: nurweight => null()
153 character(len=LENBOUNDNAME),
dimension(:),
pointer, &
154 contiguous :: cmawname => null()
157 real(dp),
dimension(:),
pointer,
contiguous :: rate => null()
158 real(dp),
dimension(:),
pointer,
contiguous :: well_head => null()
163 logical(LGP),
dimension(:),
pointer,
contiguous :: well_head_set => null()
169 integer(I4B),
dimension(:),
pointer,
contiguous :: iaconn => null()
172 integer(I4B),
dimension(:),
pointer,
contiguous :: gwfnodes => null()
173 integer(I4B),
dimension(:),
pointer,
contiguous :: iboundconn => null()
174 real(dp),
dimension(:),
pointer,
contiguous :: sradius => null()
175 real(dp),
dimension(:),
pointer,
contiguous :: hk => null()
176 real(dp),
dimension(:),
pointer,
contiguous :: satcond => null()
177 real(dp),
dimension(:),
pointer,
contiguous :: simcond => null()
178 real(dp),
dimension(:),
pointer,
contiguous :: topscrn => null()
179 real(dp),
dimension(:),
pointer,
contiguous :: botscrn => null()
180 real(dp),
dimension(:),
pointer,
contiguous :: angle => null()
181 real(dp),
dimension(:),
pointer,
contiguous :: connlen => null()
182 real(dp),
dimension(:),
pointer,
contiguous :: usrtopscrn => null()
183 real(dp),
dimension(:),
pointer,
contiguous :: usrbotscrn => null()
186 integer(I4B),
dimension(:),
pointer,
contiguous :: imap => null()
189 real(dp),
dimension(:),
pointer,
contiguous :: qauxcbc => null()
190 real(dp),
dimension(:),
pointer,
contiguous :: dbuff => null()
191 real(dp),
dimension(:),
pointer,
contiguous :: qleak => null()
192 real(dp),
dimension(:),
pointer,
contiguous :: qout => null()
193 real(dp),
dimension(:),
pointer,
contiguous :: qfw => null()
194 real(dp),
dimension(:),
pointer,
contiguous :: qsto => null()
195 real(dp),
dimension(:),
pointer,
contiguous :: qconst => null()
198 integer(I4B),
pointer :: bditems => null()
205 integer(I4B),
pointer :: gwfiss => null()
206 real(dp),
dimension(:),
pointer,
contiguous :: gwfk11 => null()
207 real(dp),
dimension(:),
pointer,
contiguous :: gwfk22 => null()
208 integer(I4B),
pointer :: gwfik22 => null()
209 real(dp),
dimension(:),
pointer,
contiguous :: gwfsat => null()
212 integer(I4B),
dimension(:),
pointer,
contiguous :: idxlocnode => null()
213 integer(I4B),
dimension(:),
pointer,
contiguous :: idxdglo => null()
214 integer(I4B),
dimension(:),
pointer,
contiguous :: idxoffdglo => null()
215 integer(I4B),
dimension(:),
pointer,
contiguous :: idxsymdglo => null()
216 integer(I4B),
dimension(:),
pointer,
contiguous :: idxsymoffdglo => null()
217 integer(I4B),
dimension(:),
pointer,
contiguous :: iboundpak => null()
218 real(dp),
dimension(:),
pointer,
contiguous :: xnewpak => null()
219 real(dp),
dimension(:),
pointer,
contiguous :: xoldpak => null()
222 integer(I4B),
pointer :: idense
223 real(dp),
dimension(:, :),
pointer,
contiguous :: denseterms => null()
226 real(dp),
dimension(:, :),
pointer,
contiguous :: viscratios => null()
300 subroutine maw_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
303 class(
bndtype),
pointer :: packobj
304 integer(I4B),
intent(in) :: id
305 integer(I4B),
intent(in) :: ibcnum
306 integer(I4B),
intent(in) :: inunit
307 integer(I4B),
intent(in) ::
iout
308 character(len=*),
intent(in) :: namemodel
309 character(len=*),
intent(in) :: pakname
310 character(len=*),
intent(in) :: mempath
311 type(
mawtype),
pointer :: mawobj
318 call packobj%set_names(ibcnum, namemodel, pakname,
ftype, mempath)
322 call mawobj%maw_allocate_scalars()
325 call packobj%pack_initialize()
327 packobj%inunit = inunit
330 packobj%ibcnum = ibcnum
343 class(
mawtype),
intent(inout) :: this
346 call this%BndExtType%allocate_scalars()
349 call mem_allocate(this%correct_flow,
'CORRECT_FLOW', this%memoryPath)
350 call mem_allocate(this%iprhed,
'IPRHED', this%memoryPath)
351 call mem_allocate(this%iheadout,
'IHEADOUT', this%memoryPath)
352 call mem_allocate(this%ibudgetout,
'IBUDGETOUT', this%memoryPath)
353 call mem_allocate(this%ibudcsv,
'IBUDCSV', this%memoryPath)
354 call mem_allocate(this%iflowingwells,
'IFLOWINGWELLS', this%memoryPath)
355 call mem_allocate(this%imawiss,
'IMAWISS', this%memoryPath)
356 call mem_allocate(this%imawissopt,
'IMAWISSOPT', this%memoryPath)
357 call mem_allocate(this%nmawwells,
'NMAWWELLS', this%memoryPath)
358 call mem_allocate(this%check_attr,
'CHECK_ATTR', this%memoryPath)
359 call mem_allocate(this%ishutoffcnt,
'ISHUTOFFCNT', this%memoryPath)
360 call mem_allocate(this%ieffradopt,
'IEFFRADOPT', this%memoryPath)
361 call mem_allocate(this%inonvert,
'INONVERT', this%memoryPath)
362 call mem_allocate(this%ioutredflowcsv,
'IOUTREDFLOWCSV', this%memoryPath)
363 call mem_allocate(this%satomega,
'SATOMEGA', this%memoryPath)
364 call mem_allocate(this%bditems,
'BDITEMS', this%memoryPath)
367 call mem_allocate(this%cbcauxitems,
'CBCAUXITEMS', this%memoryPath)
368 call mem_allocate(this%idense,
'IDENSE', this%memoryPath)
371 this%correct_flow = .false.
377 this%iflowingwells = 0
382 this%ioutredflowcsv = 0
383 this%satomega =
dzero
398 class(
mawtype),
intent(inout) :: this
408 this%cmawbudget(1) =
' GWF'
409 this%cmawbudget(2) =
' RATE'
410 this%cmawbudget(3) =
' STORAGE'
411 this%cmawbudget(4) =
' CONSTANT'
412 this%cmawbudget(5) =
' FW-RATE'
413 this%cmawbudget(6) =
' FROM-MVR'
414 this%cmawbudget(7) =
' RATE-TO-MVR'
415 this%cmawbudget(8) =
' FW-RATE-TO-MVR'
420 call mem_allocate(this%status, 8, this%nmawwells,
'STATUS', this%memoryPath)
423 call mem_allocate(this%ngwfnodes, this%nmawwells,
'NGWFNODES', &
425 call mem_allocate(this%ieqn, this%nmawwells,
'IEQN', this%memoryPath)
426 call mem_allocate(this%ishutoff, this%nmawwells,
'ISHUTOFF', this%memoryPath)
427 call mem_allocate(this%ifwdischarge, this%nmawwells,
'IFWDISCHARGE', &
429 call mem_allocate(this%strt, this%nmawwells,
'STRT', this%memoryPath)
430 call mem_allocate(this%radius, this%nmawwells,
'RADIUS', this%memoryPath)
431 call mem_allocate(this%area, this%nmawwells,
'AREA', this%memoryPath)
432 call mem_allocate(this%pumpelev, this%nmawwells,
'PUMPELEV', this%memoryPath)
433 call mem_allocate(this%bot, this%nmawwells,
'BOT', this%memoryPath)
434 call mem_allocate(this%ratesim, this%nmawwells,
'RATESIM', this%memoryPath)
435 call mem_allocate(this%qsim0, this%nmawwells,
'QSIM0', this%memoryPath)
436 call mem_allocate(this%reduction_length, this%nmawwells,
'REDUCTION_LENGTH', &
438 call mem_allocate(this%fwelev, this%nmawwells,
'FWELEV', this%memoryPath)
439 call mem_allocate(this%fwcond, this%nmawwells,
'FWCONDS', this%memoryPath)
440 call mem_allocate(this%fwrlen, this%nmawwells,
'FWRLEN', this%memoryPath)
441 call mem_allocate(this%fwcondsim, this%nmawwells,
'FWCONDSIM', &
443 call mem_allocate(this%xsto, this%nmawwells,
'XSTO', this%memoryPath)
444 call mem_allocate(this%xoldsto, this%nmawwells,
'XOLDSTO', this%memoryPath)
445 call mem_allocate(this%shutoffmin, this%nmawwells,
'SHUTOFFMIN', &
447 call mem_allocate(this%shutoffmax, this%nmawwells,
'SHUTOFFMAX', &
449 call mem_allocate(this%shutofflevel, this%nmawwells,
'SHUTOFFLEVEL', &
451 call mem_allocate(this%shutoffweight, this%nmawwells,
'SHUTOFFWEIGHT', &
453 call mem_allocate(this%shutoffdq, this%nmawwells,
'SHUTOFFDQ', &
455 call mem_allocate(this%shutoffqold, this%nmawwells,
'SHUTOFFQOLD', &
457 call mem_allocate(this%nurdxold, this%nmawwells,
'NURDXOLD', &
459 call mem_allocate(this%nurweight, this%nmawwells,
'NURWEIGHT', &
464 call mem_setptr(this%rate,
'RATE', this%input_mempath)
465 call mem_setptr(this%well_head,
'WELL_HEAD', this%input_mempath)
466 call mem_allocate(this%well_head_set, this%nmawwells,
'WELL_HEAD_SET', &
468 this%well_head_set = .false.
471 if (this%iheadout > 0)
then
472 call mem_allocate(this%dbuff, this%nmawwells,
'DBUFF', this%memoryPath)
474 call mem_allocate(this%dbuff, 0,
'DBUFF', this%memoryPath)
478 call mem_allocate(this%iaconn, this%nmawwells + 1,
'IACONN', this%memoryPath)
481 call mem_allocate(this%imap, this%MAXBOUND,
'IMAP', this%memoryPath)
484 call mem_allocate(this%gwfnodes, this%maxbound,
'GWFNODES', this%memoryPath)
485 call mem_allocate(this%iboundconn, this%maxbound,
'IBOUNDCONN', &
487 call mem_allocate(this%sradius, this%maxbound,
'SRADIUS', this%memoryPath)
488 call mem_allocate(this%hk, this%maxbound,
'HK', this%memoryPath)
489 call mem_allocate(this%satcond, this%maxbound,
'SATCOND', this%memoryPath)
490 call mem_allocate(this%simcond, this%maxbound,
'SIMCOND', this%memoryPath)
491 call mem_allocate(this%topscrn, this%maxbound,
'TOPSCRN', this%memoryPath)
492 call mem_allocate(this%botscrn, this%maxbound,
'BOTSCRN', this%memoryPath)
493 call mem_allocate(this%angle, this%maxbound,
'ANGLE', this%memoryPath)
494 call mem_allocate(this%connlen, this%maxbound,
'CONNLEN', this%memoryPath)
495 call mem_allocate(this%usrtopscrn, this%maxbound,
'USRTOPSCRN', &
497 call mem_allocate(this%usrbotscrn, this%maxbound,
'USRBOTSCRN', &
501 call mem_allocate(this%qleak, this%maxbound,
'QLEAK', this%memoryPath)
504 do n = 1, this%nmawwells
505 this%status(n) =
'ACTIVE'
506 this%ngwfnodes(n) = 0
509 this%ifwdischarge(n) = 0
511 this%radius(n) =
dep20
513 this%pumpelev(n) =
dep20
515 this%ratesim(n) =
dzero
516 this%qsim0(n) =
dzero
517 this%reduction_length(n) =
dep20
518 this%fwelev(n) =
dzero
519 this%fwcond(n) =
dzero
520 this%fwrlen(n) =
dzero
521 this%fwcondsim(n) =
dzero
523 this%xoldsto(n) =
dzero
524 this%shutoffmin(n) =
dzero
525 this%shutoffmax(n) =
dzero
526 this%shutofflevel(n) =
dep20
527 this%shutoffweight(n) =
done
528 this%shutoffdq(n) =
done
529 this%shutoffqold(n) =
done
530 this%nurdxold(n) =
dzero
531 this%nurweight(n) =
done
535 this%well_head(n) =
dzero
538 if (this%iheadout > 0)
then
539 this%dbuff(n) =
dzero
544 do n = 1, this%nmawwells + 1
553 call mem_allocate(this%qauxcbc, this%cbcauxitems,
'QAUXCBC', this%memoryPath)
554 do j = 1, this%cbcauxitems
555 this%qauxcbc(j) =
dzero
559 if (this%iflowingwells /= 0)
then
560 call mem_allocate(this%qfw, this%nmawwells,
'QFW', this%memoryPath)
564 call mem_allocate(this%qout, this%nmawwells,
'QOUT', this%memoryPath)
565 call mem_allocate(this%qsto, this%nmawwells,
'QSTO', this%memoryPath)
566 call mem_allocate(this%qconst, this%nmawwells,
'QCONST', this%memoryPath)
569 do n = 1, this%nmawwells
570 if (this%iflowingwells > 0)
then
574 this%qconst(n) =
dzero
578 do j = 1, this%maxbound
581 this%iboundconn(j) = 1
582 this%sradius(j) =
dzero
584 this%satcond(j) =
dzero
585 this%simcond(j) =
dzero
586 this%topscrn(j) =
dzero
587 this%botscrn(j) =
dzero
588 this%angle(j) =
dzero
589 this%connlen(j) =
dzero
590 this%usrtopscrn(j) =
dzero
591 this%usrbotscrn(j) =
dzero
592 this%qleak(j) =
dzero
596 call mem_allocate(this%denseterms, 3, 0,
'DENSETERMS', this%memoryPath)
599 call mem_allocate(this%viscratios, 2, 0,
'VISCRATIOS', this%memoryPath)
608 class(
mawtype),
intent(inout) :: this
612 call this%BndExtType%allocate_arrays()
615 call this%BndExtType%allocate_featureauxvar()
630 class(
mawtype),
intent(inout) :: this
632 real(DP),
dimension(:, :),
pointer,
contiguous :: aux => null()
633 integer(I4B) :: isize
637 'RATE', this%input_mempath,
'6.8.2')
639 'WELL_HEAD', this%input_mempath,
'6.8.2')
644 call get_isize(
'AUX', this%input_mempath, isize)
646 call mem_setptr(aux,
'AUX', this%input_mempath)
648 'AUX', this%input_mempath,
'6.8.2')
656 class(
mawtype),
intent(inout) :: this
659 integer(I4B) :: isize
660 character(len=LINELENGTH) :: fname
662 character(len=*),
parameter :: fmtflowingwells = &
663 &
"(4x, 'FLOWING WELLS WILL BE SIMULATED.')"
664 character(len=*),
parameter :: fmtshutdown = &
665 &
"(4x, 'SHUTDOWN ', a, ' VALUE (',g15.7,') SPECIFIED.')"
666 character(len=*),
parameter :: fmtnostoragewells = &
667 &
"(4x, 'WELL STORAGE WILL NOT BE SIMULATED.')"
668 character(len=*),
parameter :: fmtmawbin = &
669 "(4x, 'MAW ', 1x, a, 1x, ' WILL BE SAVED TO FILE: ', a, /4x, &
670 &'OPENED ON UNIT: ', I0)"
674 call this%BndExtType%source_options()
676 write (this%iout,
'(1x,a)') &
677 'PROCESSING '//trim(adjustl(this%text))//
' OPTIONS'
680 call get_isize(
'PRINT_HEAD', this%input_mempath, isize)
683 write (this%iout,
'(4x,a)') &
684 trim(adjustl(this%text))//
' heads will be printed to listing file.'
688 call mem_set_value(fname,
'HEADFILE', this%input_mempath, found%headfile)
689 if (found%headfile)
then
690 call assign_iounit(this%iheadout, this%inunit,
"HEAD fileout")
691 call openfile(this%iheadout, this%iout, fname,
'DATA(BINARY)', &
693 write (this%iout, fmtmawbin)
'HEAD', trim(adjustl(fname)), this%iheadout
697 call mem_set_value(fname,
'BUDGETFILE', this%input_mempath, found%budgetfile)
698 if (found%budgetfile)
then
699 call assign_iounit(this%ibudgetout, this%inunit,
"BUDGET fileout")
700 call openfile(this%ibudgetout, this%iout, fname,
'DATA(BINARY)', &
702 write (this%iout, fmtmawbin)
'BUDGET', trim(adjustl(fname)), this%ibudgetout
706 call mem_set_value(fname,
'BUDGETCSVFILE', this%input_mempath, &
708 if (found%budgetcsvfile)
then
709 call assign_iounit(this%ibudcsv, this%inunit,
"BUDGETCSV fileout")
710 call openfile(this%ibudcsv, this%iout, fname,
'CSV', filstat_opt=
'REPLACE')
711 write (this%iout, fmtmawbin) &
712 'BUDGET CSV', trim(adjustl(fname)), this%ibudcsv
716 call get_isize(
'NO_WELL_STORAGE', this%input_mempath, isize)
719 write (this%iout, fmtnostoragewells)
723 call get_isize(
'FLOW_CORRECTION', this%input_mempath, isize)
725 this%correct_flow = .true.
726 write (this%iout,
'(4x,a,/,4x,a)') &
727 'MAW-GWF FLOW CORRECTIONS WILL BE APPLIED WHEN MAW HEADS ARE BELOW', &
728 'OR GWF HEADS IN CONNECTED CELLS ARE BELOW THE CELL BOTTOM.'
732 call get_isize(
'FLOWING_WELLS', this%input_mempath, isize)
734 this%iflowingwells = 1
735 write (this%iout, fmtflowingwells)
739 call mem_set_value(this%theta,
'SHUTDOWN_THETA', this%input_mempath, &
740 found%shutdown_theta)
741 if (found%shutdown_theta)
then
742 write (this%iout, fmtshutdown)
'THETA', this%theta
746 call mem_set_value(this%kappa,
'SHUTDOWN_KAPPA', this%input_mempath, &
747 found%shutdown_kappa)
748 if (found%shutdown_kappa)
then
749 write (this%iout, fmtshutdown)
'KAPPA', this%kappa
753 call mem_set_value(fname,
'MFRCSVFILE', this%input_mempath, found%mfrcsvfile)
754 if (found%mfrcsvfile)
then
755 call this%maw_redflow_csv_init(fname)
759 call get_isize(
'MOVER', this%input_mempath, isize)
762 write (this%iout,
'(4x,A)')
'MOVER OPTION ENABLED'
766 call get_isize(
'IEFFRADOPT', this%input_mempath, isize)
769 write (this%iout,
'(4x,a)') &
770 'EFFECTIVE RADIUS FOR STRUCTURED GRIDS WILL BE CALCULATED &
771 &USING PEACEMAN 1983'
775 call get_isize(
'INONVERT', this%input_mempath, isize)
778 write (this%iout,
'(4x,a)') &
779 'NON-VERTICAL (SLANTED) WELL CONNECTIONS ENABLED'
782 write (this%iout,
'(1x,a)')
'END OF '//trim(adjustl(this%text))//
' OPTIONS'
789 class(
mawtype),
intent(inout) :: this
797 write (this%iout,
'(/1x,a)') &
798 'PROCESSING '//trim(adjustl(this%text))//
' DIMENSIONS'
801 call mem_set_value(this%nmawwells,
'MAXBOUND', this%input_mempath, &
802 found%maxbound, release=.false.)
803 if (found%maxbound)
then
804 write (this%iout,
'(4x,a,i0)')
'NMAWWELLS = ', this%nmawwells
807 write (this%iout,
'(1x,a)') &
808 'END OF '//trim(adjustl(this%text))//
' DIMENSIONS'
810 if (this%nmawwells < 0)
then
812 'NMAWWELLS was not specified or was specified incorrectly.'
818 this%npakeq = this%nmawwells
821 call this%maw_source_packagedata()
824 call this%maw_source_connectiondata()
827 call this%maw_source_angledata()
830 call this%maw_checkin_deprecated_names()
833 call this%define_listlabel()
836 call this%maw_setup_budobj()
839 call this%maw_setup_tableobj()
849 character(len=*),
intent(in) :: mempath
850 integer(I4B),
intent(in) :: naux
851 call mem_setptr(this%nbound,
'NBOUND', mempath)
852 call mem_setptr(this%ifno,
'IFNO', mempath)
853 call mem_setptr(this%setting,
'SETTING', mempath)
854 call mem_setptr(this%status,
'STATUS', mempath)
855 call mem_setptr(this%period_icon,
'PERIOD_ICON', mempath)
856 call mem_setptr(this%connstatus,
'CONNSTATUS', mempath)
857 call mem_setptr(this%period_bottom,
'PERIOD_BOTTOM', mempath)
858 call mem_setptr(this%head_limit,
'HEAD_LIMIT', mempath)
859 call mem_setptr(this%fwelev,
'FWELEV', mempath)
860 call mem_setptr(this%fwcond,
'FWCOND', mempath)
861 call mem_setptr(this%fwrlen,
'FWRLEN', mempath)
862 call mem_setptr(this%minrate,
'MINRATE', mempath)
863 call mem_setptr(this%maxrate,
'MAXRATE', mempath)
864 call mem_setptr(this%pump_elevation,
'PUMP_ELEVATION', mempath)
865 call mem_setptr(this%scaling_length,
'SCALING_LENGTH', mempath)
867 call mem_setptr(this%auxname,
'AUXNAME', mempath)
868 call mem_setptr(this%auxval,
'AUXVAL', mempath)
877 nullify (this%strt_tslink)
878 nullify (this%nbound)
880 nullify (this%setting)
881 nullify (this%status)
882 nullify (this%period_icon)
883 nullify (this%connstatus)
884 nullify (this%period_bottom)
885 nullify (this%head_limit)
886 nullify (this%fwelev)
887 nullify (this%fwcond)
888 nullify (this%fwrlen)
889 nullify (this%minrate)
890 nullify (this%maxrate)
891 nullify (this%pump_elevation)
892 nullify (this%scaling_length)
893 nullify (this%auxname)
894 nullify (this%auxval)
901 class(
mawtype),
intent(inout) :: this
903 integer(I4B) :: n, jj, idx, imaw
904 character(len=9) :: cno9
905 character(len=LINELENGTH) :: keyword
907 integer(I4B),
dimension(:),
pointer,
contiguous :: ifno => null()
908 real(DP),
dimension(:),
pointer,
contiguous :: radius => null()
909 real(DP),
dimension(:),
pointer,
contiguous :: bottom => null()
911 contiguous :: condeqn => null()
912 integer(I4B),
dimension(:),
pointer,
contiguous :: ngwfnodes => null()
914 contiguous :: boundname => null()
915 integer(I4B),
dimension(:, :),
pointer,
contiguous :: tslink => null()
917 contiguous :: tslinkvars => null()
918 integer(I4B),
allocatable :: nboundchk(:)
920 character(len=*),
parameter :: fmthdbot = &
921 "('well head (', G0, ') must be greater than or equal to the &
922 &BOTTOM_ELEVATION (', G0, ').')"
924 write (this%iout,
'(/1x,a)') &
925 'PROCESSING '//trim(adjustl(this%text))//
' PACKAGEDATA'
928 call mem_setptr(ifno,
'PACKAGEDATA_IFNO', this%input_mempath)
929 call mem_setptr(radius,
'RADIUS', this%input_mempath)
930 call mem_setptr(bottom,
'BOTTOM', this%input_mempath)
931 call mem_setptr(this%input%strt,
'STRT', this%input_mempath)
932 call mem_setptr(tslink,
'TSLINK_PD', this%input_mempath)
933 call mem_setptr(tslinkvars,
'TSLINKVARS_PD', this%input_mempath)
934 do n = 1,
size(tslinkvars)
935 if (tslinkvars(n) ==
'STRT') this%input%strt_tslink => tslink(n, :)
937 if (.not.
associated(this%input%strt_tslink))
then
938 call store_error(
'Time series links for STRT not found in input.')
941 call mem_setptr(condeqn,
'CONDEQN', this%input_mempath)
942 call mem_setptr(ngwfnodes,
'NGWFNODES', this%input_mempath)
943 if (this%inamedbound /= 0)
then
944 call mem_setptr(boundname,
'BOUNDNAME', this%input_mempath)
949 this%maxbound = sum(ngwfnodes)
950 write (this%iout,
'(//4x,a,i7)')
'MAXBOUND = ', this%maxbound
951 call this%maw_allocate_well_conn_arrays()
954 allocate (nboundchk(this%nmawwells))
956 do n = 1, this%nmawwells
957 imaw = this%validate_ifno(ifno(n), this%nmawwells, nboundchk, &
958 'IMAW',
'PACKAGEDATA')
963 if (rval <=
dzero)
then
964 write (
errmsg,
'(a,1x,i0,1x,a)') &
965 'Radius for well', imaw,
'must be greater than zero.'
968 this%radius(imaw) = rval
969 this%area(imaw) =
dpi * rval**
dtwo
972 this%bot(imaw) = bottom(n)
976 select case (trim(keyword))
983 write (
warnmsg,
'(a,a,a,a,a,a)') &
984 "CONDEQN in '", trim(this%packName),
"' should be ", &
985 "corrected from '", trim(keyword),
"' to 'THIEM'."
994 write (
errmsg,
'(a,1x,i0,1x,a)') &
995 'CONDEQN for well', imaw, &
996 "must be 'CUMULATIVE', 'THIEM', 'MEAN', or 'SKIN'."
1002 if (ngwfnodes(n) < 1)
then
1003 write (
errmsg,
'(a,1x,i0,1x,a)') &
1004 'NGWFNODES for well', imaw,
'must be greater than zero.'
1007 this%ngwfnodes(imaw) = ngwfnodes(n)
1010 this%well_head(imaw) = this%input%strt(n)
1011 this%strt(imaw) = this%input%strt(n)
1012 if (this%strt(imaw) < this%bot(imaw))
then
1013 write (keyword, fmthdbot) this%strt(imaw), this%bot(imaw)
1014 call this%maw_set_attribute_error(imaw,
'STRT', trim(keyword))
1018 write (cno9,
'(i9.9)') imaw
1019 this%cmawname(imaw) =
'MAWWELL'//cno9
1020 if (this%inamedbound /= 0)
then
1022 if (trim(
text) /=
'')
then
1023 this%cmawname(imaw) = trim(
text)
1029 call this%report_ifno_coverage(nboundchk, this%nmawwells,
'well', &
1031 deallocate (nboundchk)
1033 write (this%iout,
'(1x,a)') &
1034 'END OF '//trim(adjustl(this%text))//
' PACKAGEDATA'
1043 do n = 1, this%nmawwells
1044 do jj = 1, this%ngwfnodes(n)
1048 this%iaconn(n + 1) = idx + 1
1064 class(
mawtype),
intent(inout) :: this
1066 integer(I4B) :: n, nconn, imaw, iconn, ipos, jpos, j, jj
1067 integer(I4B) :: nn, nn2
1068 integer(I4B) :: ireset_scrntop, ireset_scrnbot, ireset_wellbot
1069 real(DP) :: rval, topnn, botnn, botw
1070 character(len=LINELENGTH) :: cellid_str
1071 character(len=30) :: nodestr
1072 integer(I4B),
dimension(:),
pointer,
contiguous :: ifno => null()
1073 integer(I4B),
dimension(:),
pointer,
contiguous :: icon => null()
1074 integer(I4B),
dimension(:, :),
pointer,
contiguous :: cellid => null()
1075 real(DP),
dimension(:),
pointer,
contiguous :: scrn_top => null()
1076 real(DP),
dimension(:),
pointer,
contiguous :: scrn_bot => null()
1077 real(DP),
dimension(:),
pointer,
contiguous :: hk_skin => null()
1078 real(DP),
dimension(:),
pointer,
contiguous :: radius_skin => null()
1079 integer(I4B),
allocatable :: iachk(:)
1080 integer(I4B),
allocatable :: nboundchk(:)
1086 write (this%iout,
'(/1x,a)') &
1087 'PROCESSING '//trim(adjustl(this%text))//
' CONNECTIONDATA'
1090 call mem_setptr(ifno,
'CONNDATA_IFNO', this%input_mempath)
1091 call mem_setptr(icon,
'ICON', this%input_mempath)
1092 call mem_setptr(cellid,
'CELLID', this%input_mempath)
1093 call mem_setptr(scrn_top,
'SCRN_TOP', this%input_mempath)
1094 call mem_setptr(scrn_bot,
'SCRN_BOT', this%input_mempath)
1095 call mem_setptr(hk_skin,
'HK_SKIN', this%input_mempath)
1096 call mem_setptr(radius_skin,
'RADIUS_SKIN', this%input_mempath)
1101 allocate (iachk(this%nmawwells + 1))
1103 do n = 1, this%nmawwells
1104 iachk(n + 1) = iachk(n) + this%ngwfnodes(n)
1106 allocate (nboundchk(this%maxbound))
1114 if (imaw < 1 .or. imaw > this%nmawwells)
then
1115 write (
errmsg,
'(a,1x,i0,a)') &
1116 'IMAW must be greater than 0 and less than or equal to ', &
1121 if (iconn < 1 .or. iconn > this%ngwfnodes(imaw))
then
1122 write (
errmsg,
'(a,1x,i0,1x,a,1x,i0,a)') &
1123 'JCONN for well ', imaw, &
1124 'must be greater than 1 and less than or equal to ', &
1125 this%ngwfnodes(imaw),
'.'
1130 ipos = iachk(imaw) + iconn - 1
1131 nboundchk(ipos) = nboundchk(ipos) + 1
1133 jpos = this%get_jpos(imaw, iconn)
1136 write (cellid_str,
'(10(i0,1x))') cellid(1:this%dis%ndim, n)
1137 nn = this%dis%noder_from_cellid(cellid_str, this%inunit, this%iout)
1138 topnn = this%dis%top(nn)
1139 botnn = this%dis%bot(nn)
1140 botw = this%bot(imaw)
1143 this%gwfnodes(jpos) = nn
1146 this%usrtopscrn(jpos) = scrn_top(n)
1148 if (this%ieqn(imaw) /= 4)
then
1151 if (rval > topnn)
then
1152 ireset_scrntop = ireset_scrntop + 1
1156 this%topscrn(jpos) = rval
1159 this%usrbotscrn(jpos) = scrn_bot(n)
1161 if (this%ieqn(imaw) /= 4)
then
1164 if (rval < botnn)
then
1165 ireset_scrnbot = ireset_scrnbot + 1
1169 this%botscrn(jpos) = rval
1173 if (rval < botw)
then
1174 if (this%ieqn(imaw) /= 4)
then
1175 ireset_wellbot = ireset_wellbot + 1
1177 this%bot(imaw) = rval
1179 write (
errmsg,
'(a,1x,i0,1x,a,1x,i0,1x,a,g0,a,g0,a)') &
1180 'Screen bottom for maw well', imaw,
'connection', j,
'(', &
1181 this%botscrn(jpos),
') is less than the well bottom (', &
1182 this%bot(imaw),
').'
1189 if (this%ieqn(imaw) == 0)
then
1190 this%satcond(jpos) = rval
1191 else if (this%ieqn(imaw) == 2 .OR. this%ieqn(imaw) == 3 .OR. &
1192 this%ieqn(imaw) == 4)
then
1193 this%hk(jpos) = rval
1197 rval = radius_skin(n)
1198 if (this%ieqn(imaw) == 2 .OR. this%ieqn(imaw) == 3 .OR. &
1199 this%ieqn(imaw) == 4)
then
1200 this%sradius(jpos) = rval
1201 if (this%sradius(jpos) <= this%radius(imaw))
then
1202 write (
errmsg,
'(a,1x,i0,1x,a,1x,i0,1x,a,g0,a,g0,a)') &
1203 'Screen radius for maw well', imaw,
'connection', j,
'(', &
1204 this%sradius(jpos), &
1205 ') is less than or equal to the well radius (', &
1206 this%radius(imaw),
').'
1212 write (this%iout,
'(1x,a)') &
1213 'END OF '//trim(adjustl(this%text))//
' CONNECTIONDATA'
1217 do n = 1, this%nmawwells
1218 do j = 1, this%ngwfnodes(n)
1220 if (nboundchk(ipos) == 0)
then
1221 write (
errmsg,
'(a,1x,i0,1x,a,1x,i0,a)') &
1222 'No data specified for maw well', n,
'connection', j,
'.'
1224 else if (nboundchk(ipos) > 1)
then
1225 write (
errmsg,
'(a,1x,i0,1x,a,1x,i0,1x,a,1x,i0,1x,a)') &
1226 'Data for maw well', n,
'connection', j, &
1227 'specified', nboundchk(ipos),
'times.'
1235 do n = 1, this%nmawwells
1236 if (this%ieqn(n) /= 4)
then
1237 do j = 1, this%ngwfnodes(n)
1238 nn = this%get_gwfnode(n, j)
1239 do jj = 1, this%ngwfnodes(n)
1241 nn2 = this%get_gwfnode(n, jj)
1243 call this%dis%noder_to_string(nn, nodestr)
1244 write (
errmsg,
'(a,1x,i0,1x,a,1x,i0,3(1x,a))') &
1245 'Only one connection can be specified for maw well', &
1246 n,
'connection', j,
'to gwf cell', trim(adjustl(nodestr)), &
1247 'unless the mean condeqn is specified.'
1257 deallocate (nboundchk)
1260 if (ireset_scrntop > 0)
then
1261 write (
warnmsg,
'(a,1x,a,1x,a,1x,i0,1x,a)') &
1262 'The screen tops in multi-aquifer well package', trim(this%packName), &
1263 'were reset to the top of the connected cell', ireset_scrntop,
'times.'
1266 if (ireset_scrnbot > 0)
then
1267 write (
warnmsg,
'(a,1x,a,1x,a,1x,i0,1x,a)') &
1268 'The screen bottoms in multi-aquifer well package', trim(this%packName), &
1269 'were reset to the bottom of the connected cell', ireset_scrnbot, &
1273 if (ireset_wellbot > 0)
then
1274 write (
warnmsg,
'(a,1x,a,1x,a,1x,i0,1x,a)') &
1275 'The well bottoms in multi-aquifer well package', trim(this%packName), &
1276 'were reset to the bottom of the connected cell', ireset_wellbot, &
1302 class(
mawtype),
intent(inout) :: this
1304 integer(I4B) :: n, imaw, iconn, jpos, ichk, nangle, node
1305 real(DP) :: angle, dz, omega, lw, topexp
1308 character(len=LINELENGTH) :: cndmsg
1309 character(len=LINELENGTH) :: extmsg
1310 logical(LGP) :: estimated
1311 integer(I4B),
dimension(:),
pointer,
contiguous :: angledata_ifno => null()
1312 integer(I4B),
dimension(:),
pointer,
contiguous :: angledata_icon => null()
1313 real(DP),
dimension(:),
pointer,
contiguous :: angle_arr => null()
1314 real(DP),
dimension(:),
pointer,
contiguous :: connlen_arr => null()
1315 integer(I4B),
allocatable :: iachk(:)
1316 integer(I4B),
allocatable :: nboundchk(:)
1317 real(DP),
parameter :: coszero =
dem6
1318 real(DP),
parameter :: dninety = 9.0d1
1320 call get_isize(
'ANGLEDATA_IFNO', this%input_mempath, nangle)
1322 if (nangle > 0)
then
1324 if (this%inonvert == 0)
then
1325 call store_error(
'An ANGLEDATA block was specified but the '// &
1326 'NON_VERTICAL_WELLS option was not specified in the '// &
1331 call mem_setptr(angledata_ifno,
'ANGLEDATA_IFNO', this%input_mempath)
1332 call mem_setptr(angledata_icon,
'ANGLEDATA_ICON', this%input_mempath)
1333 call mem_setptr(angle_arr,
'ANGLE', this%input_mempath)
1334 call mem_setptr(connlen_arr,
'CONNLEN', this%input_mempath)
1336 allocate (iachk(this%nmawwells + 1))
1338 do n = 1, this%nmawwells
1339 iachk(n + 1) = iachk(n) + this%ngwfnodes(n)
1341 allocate (nboundchk(this%maxbound))
1344 write (this%iout,
'(/1x,a)')
'PROCESSING '//trim(adjustl(this%text))// &
1348 imaw = angledata_ifno(n)
1349 if (imaw < 1 .or. imaw > this%nmawwells)
then
1350 write (
errmsg,
'(a,1x,i0,a)') &
1351 'IFNO must be greater than 0 and less than or equal to ', &
1357 iconn = angledata_icon(n)
1358 if (iconn < 1 .or. iconn > this%ngwfnodes(imaw))
then
1359 write (
errmsg,
'(a,1x,i0,1x,a,1x,i0,a)') &
1360 'ICON for well ', imaw, &
1361 'must be greater than 0 and less than or equal to ', &
1362 this%ngwfnodes(imaw),
'.'
1366 jpos = this%get_jpos(imaw, iconn)
1368 ichk = iachk(imaw) + iconn - 1
1369 nboundchk(ichk) = nboundchk(ichk) + 1
1370 if (nboundchk(ichk) > 1)
then
1371 write (
errmsg,
'(a,1x,i0,1x,a,1x,i0,1x,a)') &
1372 'ANGLEDATA for maw well', imaw,
'connection', iconn, &
1373 'is specified more than once.'
1377 angle = angle_arr(n)
1378 this%angle(jpos) = angle
1379 if (connlen_arr(n) /=
dnodata)
then
1380 this%connlen(jpos) = max(connlen_arr(n),
dzero)
1383 if (angle <
dzero .or. angle > dninety)
then
1384 write (
errmsg,
'(a,1x,i0,1x,a,1x,i0,1x,a,g0,a)') &
1385 'ANGLE for maw well', imaw,
'connection', iconn,
'(', angle, &
1386 ') must be greater than or equal to 0.0 and less than or '// &
1387 'equal to 90.0 degrees.'
1392 node = this%get_gwfnode(imaw, iconn)
1400 if (this%ieqn(imaw) == 0)
then
1401 this%topscrn(jpos) = min(this%usrtopscrn(jpos), this%dis%top(node))
1402 this%botscrn(jpos) = max(this%usrbotscrn(jpos), this%dis%bot(node))
1405 dz = this%topscrn(jpos) - this%botscrn(jpos)
1406 if (dz <=
dzero)
then
1407 write (
errmsg,
'(a,1x,i0,1x,a,1x,i0,1x,a)') &
1408 'The screen top must be greater than the screen bottom for maw '// &
1409 'well', imaw,
'connection', iconn,
'listed in the ANGLEDATA block.'
1419 if (this%connlen(jpos) >
dzero)
then
1420 lw = this%connlen(jpos)
1421 else if (cos(omega) > coszero)
then
1433 if (this%ieqn(imaw) /= 0)
then
1434 if (cos(omega) <= coszero .and. this%connlen(jpos) <=
dzero)
then
1435 write (
errmsg,
'(a,1x,i0,1x,a,1x,i0,1x,a)') &
1436 'A connection length must be specified for the (near) '// &
1437 'horizontal maw well', imaw,
'connection', iconn, &
1438 'listed in the ANGLEDATA block.'
1442 if (lw <=
dzero)
then
1443 write (
errmsg,
'(a,1x,i0,1x,a,1x,i0,1x,a,g0,a)') &
1444 'The calculated in-cell screen length for maw well', imaw, &
1445 'connection', iconn,
'(', lw, &
1446 ') is not greater than zero. Specify a connection length in '// &
1447 'the ANGLEDATA block.'
1455 if (lw >
dzero)
then
1456 hlen = lw * sin(omega)
1457 extent = this%maw_cell_extent(node, estimated)
1458 if (hlen > extent)
then
1463 extmsg =
'estimated maximum horizontal extent'
1465 extmsg =
'maximum horizontal extent'
1471 if (this%ieqn(imaw) == 0)
then
1472 cndmsg =
'The specified saturated conductance is applied to a '// &
1473 'screen that is longer than the cell.'
1475 cndmsg =
'The calculated saturated conductance is '// &
1476 'correspondingly too large.'
1478 write (
warnmsg,
'(a,1x,i0,1x,a,1x,i0,1x,a,g0,a,g0,a)') &
1479 'The horizontal distance spanned by maw well', imaw, &
1480 'connection', iconn,
'(', hlen, &
1481 ') is greater than the '//trim(extmsg)//
' of the '// &
1482 'connected cell (', extent, &
1483 '), so the screen extends beyond the cell it is connected '// &
1484 'to. '//trim(cndmsg)//
' Reduce ANGLE or CONN_LENGTH, or '// &
1485 'specify a separate connection to each cell the connection '// &
1494 if (cos(omega) <= coszero .and. &
1495 this%ieqn(imaw) /= 4 .and. this%ieqn(imaw) /= 0)
then
1496 write (
warnmsg,
'(a,1x,i0,1x,a,1x,i0,1x,a)') &
1497 'The (near) horizontal maw well', imaw,
'connection', iconn, &
1498 'uses a radial conductance equation (THIEM, SKIN, or '// &
1499 'CUMULATIVE). The calculated conductance is an approximation '// &
1500 'for horizontal connections; the MEAN conductance equation is '// &
1501 'recommended for horizontal connections.'
1505 if (cos(omega) <= coszero .and. &
1506 (this%ieqn(imaw) == 4 .or. this%ieqn(imaw) == 0))
then
1507 topexp = this%botscrn(jpos) +
dtwo * this%radius(imaw)
1508 if (
is_close(this%topscrn(jpos), topexp))
then
1509 this%topscrn(jpos) = topexp
1511 write (
warnmsg,
'(a,1x,i0,1x,a,1x,i0,1x,a,g0,a)') &
1512 'The vertical screen extent (SCRN_TOP - SCRN_BOT) for the '// &
1513 '(near) horizontal maw well', imaw,
'connection', iconn, &
1514 'is not equal to the well diameter (2 * RADIUS = ', &
1515 dtwo * this%radius(imaw), &
1516 '). The vertical screen extent is used to determine the '// &
1517 'saturation of a connection and should equal the well '// &
1518 'diameter for a horizontal connection.'
1524 write (this%iout,
'(1x,a)') &
1525 'END OF '//trim(adjustl(this%text))//
' ANGLEDATA'
1528 deallocate (nboundchk)
1535 if (this%inonvert /= 0)
then
1537 'The NON_VERTICAL_WELLS option was specified but an ANGLEDATA '// &
1538 'block was not found. All multi-aquifer well connections will be '// &
1539 'treated as vertical.'
1555 real(dp),
intent(in) :: dz
1556 real(dp),
intent(in) :: radius
1557 real(dp),
intent(in) :: omega
1561 lw = (dz - dtwo * radius * sin(omega)) / cos(omega)
1574 class(
mawtype),
intent(inout) :: this
1575 integer(I4B),
intent(in) :: node
1576 logical(LGP),
intent(out) :: estimated
1580 real(dp),
allocatable,
dimension(:, :) :: polyverts
1581 integer(I4B) :: nverts
1586 select case (this%dis%get_dis_enum())
1588 nverts = this%dis%get_npolyverts(node)
1591 estimated = nverts == 0
1593 extent = sqrt(
dtwo * this%dis%area(node))
1595 call this%dis%get_polyverts(node, polyverts)
1597 deallocate (polyverts)
1614 class(
mawtype),
intent(inout) :: this
1615 integer(I4B),
intent(in) :: i
1616 integer(I4B),
intent(in) :: jpos
1626 if (this%angle(jpos) ==
dzero .and. this%connlen(jpos) <=
dzero)
then
1631 dz = this%topscrn(jpos) - this%botscrn(jpos)
1632 if (dz <=
dzero)
then
1638 if (this%connlen(jpos) >
dzero)
then
1639 lw = this%connlen(jpos)
1641 omega = this%angle(jpos) *
dpio180
1655 class(
mawtype),
intent(inout) :: this
1657 character(len=LINELENGTH) :: title
1658 character(len=LINELENGTH) :: text
1659 integer(I4B) :: ntabcols
1663 integer(I4B) :: jpos
1664 integer(I4B) :: inode
1668 character(len=10),
dimension(0:4) :: ccond
1669 character(len=30) :: nodestr
1671 data ccond(0)/
'SPECIFIED '/
1672 data ccond(1)/
'THIEM '/
1673 data ccond(2)/
'SKIN '/
1674 data ccond(3)/
'CUMULATIVE'/
1675 data ccond(4)/
'MEAN '/
1677 character(len=*),
parameter :: fmtwelln = &
1678 "(1X,//43X,'MULTI-AQUIFER WELL DATA'&
1680 &/1X,7(A10,1X),A16)"
1681 character(len=*),
parameter :: fmtwelld = &
1682 &
"(1X,I10,1X,4(G10.3,1X),I10,1X,A10,1X,A16)"
1683 character(len=*),
parameter :: fmtline = &
1685 character(len=*),
parameter :: fmtwellcn = &
1686 "(1X,//37X,'MULTI-AQUIFER WELL CONNECTION DATA'&
1688 &/1X,2(A10,1X),A20,7(A10,1X))"
1689 character(len=*),
parameter :: fmtwellcd = &
1690 &
"(1X,2(I10,1X),A20,1X,2(G10.3,1X),2(A10,1X),3(G10.3,1X))"
1693 do n = 1, this%nmawwells
1694 this%xnewpak(n) = this%strt(n)
1695 this%xsto(n) = this%strt(n)
1699 do n = 1, this%nmawwells
1700 select case (this%status(n))
1702 this%iboundpak(n) = -1
1704 this%iboundpak(n) = 0
1706 this%iboundpak(n) = 1
1711 if (this%inamedbound /= 0)
then
1713 do n = 1, this%nmawwells
1714 do j = 1, this%ngwfnodes(n)
1716 this%boundname(idx) = this%cmawname(n)
1721 do n = 1, this%nmawwells
1722 this%cmawname(n) =
''
1727 call this%copy_boundname()
1737 call this%maw_check_attributes()
1740 do n = 1, this%nmawwells
1744 do j = 1, this%ngwfnodes(n)
1745 if (this%ieqn(n) /= 0)
then
1746 inode = this%get_gwfnode(n, j)
1747 call this%maw_calculate_satcond(n, j, inode)
1754 if (this%iprpak /= 0)
then
1756 if (this%inamedbound /= 0)
then
1757 ntabcols = ntabcols + 1
1759 title = trim(adjustl(this%text))//
' PACKAGE ('// &
1760 trim(adjustl(this%packName))//
') STATIC WELL DATA'
1761 call table_cr(this%inputtab, this%packName, title)
1762 call this%inputtab%table_df(this%nmawwells, ntabcols, this%iout)
1764 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
1766 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
1768 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
1769 text =
'WELL BOTTOM'
1770 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
1771 text =
'STARTING HEAD'
1772 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
1773 text =
'NUMBER OF GWF NODES'
1774 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
1775 text =
'CONDUCT. EQUATION'
1776 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
1777 if (this%inamedbound /= 0)
then
1779 call this%inputtab%initialize_column(text, 20, alignment=
tableft)
1781 do n = 1, this%nmawwells
1782 call this%inputtab%add_term(n)
1783 call this%inputtab%add_term(this%radius(n))
1784 call this%inputtab%add_term(this%area(n))
1785 call this%inputtab%add_term(this%bot(n))
1786 call this%inputtab%add_term(this%strt(n))
1787 call this%inputtab%add_term(this%ngwfnodes(n))
1788 call this%inputtab%add_term(ccond(this%ieqn(n)))
1789 if (this%inamedbound /= 0)
then
1790 call this%inputtab%add_term(this%cmawname(n))
1796 if (this%iprpak /= 0)
then
1798 if (this%inonvert /= 0)
then
1799 ntabcols = ntabcols + 1
1801 title = trim(adjustl(this%text))//
' PACKAGE ('// &
1802 trim(adjustl(this%packName))//
') STATIC WELL CONNECTION DATA'
1803 call table_cr(this%inputtab, this%packName, title)
1804 call this%inputtab%table_df(this%maxbound, ntabcols, this%iout)
1806 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
1807 text =
'WELL CONNECTION'
1808 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
1810 call this%inputtab%initialize_column(text, 20, alignment=
tableft)
1811 text =
'TOP OF SCREEN'
1812 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
1813 text =
'BOTTOM OF SCREEN'
1814 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
1815 text =
'SKIN RADIUS'
1816 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
1818 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
1820 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
1822 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
1823 text =
'SATURATED WELL CONDUCT.'
1824 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
1825 if (this%inonvert /= 0)
then
1826 text =
'ANGLE (DEG)'
1827 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
1831 do n = 1, this%nmawwells
1832 do j = 1, this%ngwfnodes(n)
1833 call this%inputtab%add_term(n)
1834 call this%inputtab%add_term(j)
1835 jpos = this%get_jpos(n, j)
1836 nn = this%get_gwfnode(n, j)
1837 call this%dis%noder_to_string(nn, nodestr)
1838 call this%inputtab%add_term(nodestr)
1839 call this%inputtab%add_term(this%topscrn(jpos))
1840 call this%inputtab%add_term(this%botscrn(jpos))
1841 if (this%ieqn(n) == 2 .or. &
1842 this%ieqn(n) == 3 .or. &
1843 this%ieqn(n) == 4)
then
1844 call this%inputtab%add_term(this%sradius(jpos))
1845 call this%inputtab%add_term(this%hk(jpos))
1847 call this%inputtab%add_term(
' ')
1848 call this%inputtab%add_term(
' ')
1850 if (this%ieqn(n) == 1 .or. &
1851 this%ieqn(n) == 2 .or. &
1852 this%ieqn(n) == 3)
then
1853 k11 = this%gwfk11(nn)
1854 if (this%gwfik22 == 0)
then
1855 k22 = this%gwfk11(nn)
1857 k22 = this%gwfk22(nn)
1859 call this%inputtab%add_term(k11)
1860 call this%inputtab%add_term(k22)
1862 call this%inputtab%add_term(
' ')
1863 call this%inputtab%add_term(
' ')
1865 call this%inputtab%add_term(this%satcond(jpos))
1866 if (this%inonvert /= 0)
then
1867 call this%inputtab%add_term(this%angle(jpos))
1874 this%gwfk11 => null()
1875 this%gwfk22 => null()
1876 this%gwfik22 => null()
1877 this%gwfsat => null()
1890 class(
mawtype),
intent(inout) :: this
1891 integer(I4B),
intent(in) :: imaw
1892 character(len=*),
intent(in) :: keyword
1893 character(len=*),
intent(in) :: msg
1897 if (len(msg) == 0)
then
1898 write (
errmsg,
'(a,1x,a,1x,i0,1x,a)') &
1899 keyword,
' for MAW well', imaw,
'has already been set.'
1901 write (
errmsg,
'(a,1x,a,1x,i0,1x,a)') &
1902 keyword,
' for MAW well', imaw, msg
1914 class(
mawtype),
intent(inout) :: this
1915 integer(I4B),
intent(in) :: n
1916 integer(I4B),
intent(in) :: imaw
1917 character(len=*),
intent(in) :: setting
1919 select case (trim(setting))
1921 this%well_head_set(imaw) = .true.
1922 this%xnewpak(imaw) = this%well_head(imaw)
1931 class(
mawtype),
intent(inout) :: this
1933 character(len=LINELENGTH) :: cgwfnode
1937 integer(I4B) :: jpos
1941 do n = 1, this%nmawwells
1942 if (this%ngwfnodes(n) < 1)
then
1943 call this%maw_set_attribute_error(n,
'NGWFNODES',
'must be greater '// &
1946 if (this%radius(n) == dep20)
then
1947 call this%maw_set_attribute_error(n,
'RADIUS',
'has not been specified.')
1949 if (this%shutoffmin(n) > dzero)
then
1950 if (this%shutoffmin(n) >= this%shutoffmax(n))
then
1951 call this%maw_set_attribute_error(n,
'SHUT_OFF',
'shutoffmax must '// &
1952 'be greater than shutoffmin.')
1955 do j = 1, this%ngwfnodes(n)
1958 jpos = this%get_jpos(n, j)
1961 write (cgwfnode,
'(a,i0,a)')
'gwfnode(', j,
')'
1964 if (this%botscrn(jpos) >= this%topscrn(jpos))
then
1965 call this%maw_set_attribute_error(n,
'SCREEN_TOP',
'screen bottom '// &
1966 'must be less than screen top. '// &
1971 if (this%ieqn(n) == 2 .OR. this%ieqn(n) == 3 .OR. &
1972 this%ieqn(n) == 4)
then
1973 if (this%hk(jpos) <= dzero)
then
1974 call this%maw_set_attribute_error(n,
'HK_SKIN',
'skin hyraulic '// &
1975 'conductivity must be greater '// &
1976 'than zero. '//trim(cgwfnode))
1978 else if (this%ieqn(n) == 0)
then
1981 if (this%satcond(jpos) < dzero)
then
1982 call this%maw_set_attribute_error(n,
'HK_SKIN', &
1983 'skin hyraulic conductivity '// &
1984 'must be greater than or '// &
1985 'equal to zero when using '// &
1986 'SPECIFIED condeqn. '// &
2002 class(
mawtype),
intent(inout) :: this
2003 integer(I4B),
intent(in) :: moffset
2009 integer(I4B) :: jglo
2010 integer(I4B) :: nglo
2014 do n = 1, this%nmawwells
2015 nglo = moffset + this%dis%nodes + this%ioffset + n
2016 call sparse%addconnection(nglo, nglo, 1)
2017 do j = 1, this%ngwfnodes(n)
2018 jj = this%get_gwfnode(n, j)
2020 call sparse%addconnection(nglo, jglo, 1)
2021 call sparse%addconnection(jglo, nglo, 1)
2033 class(
mawtype),
intent(inout) :: this
2034 integer(I4B),
intent(in) :: moffset
2040 integer(I4B) :: iglo
2041 integer(I4B) :: jglo
2042 integer(I4B) :: ipos
2046 call mem_allocate(this%idxlocnode, this%nmawwells,
'IDXLOCNODE', &
2048 call mem_allocate(this%idxdglo, this%maxbound,
'IDXDGLO', this%memoryPath)
2049 call mem_allocate(this%idxoffdglo, this%maxbound,
'IDXOFFDGLO', &
2051 call mem_allocate(this%idxsymdglo, this%maxbound,
'IDXSYMDGLO', &
2053 call mem_allocate(this%idxsymoffdglo, this%maxbound,
'IDXSYMOFFDGLO', &
2061 do n = 1, this%nmawwells
2062 iglo = moffset + this%dis%nodes + this%ioffset + n
2063 this%idxlocnode(n) = this%dis%nodes + this%ioffset + n
2064 do ii = 1, this%ngwfnodes(n)
2065 j = this%get_gwfnode(n, ii)
2067 this%idxdglo(ipos) = matrix_sln%get_position_diag(iglo)
2068 this%idxoffdglo(ipos) = matrix_sln%get_position(iglo, jglo)
2074 do n = 1, this%nmawwells
2075 do ii = 1, this%ngwfnodes(n)
2076 iglo = this%get_gwfnode(n, ii) + moffset
2077 jglo = moffset + this%dis%nodes + this%ioffset + n
2078 this%idxsymdglo(ipos) = matrix_sln%get_position_diag(iglo)
2079 this%idxsymoffdglo(ipos) = matrix_sln%get_position(iglo, jglo)
2091 class(
mawtype),
intent(inout) :: this
2095 call this%obs%obs_ar()
2098 if (this%inewton > 0)
then
2099 this%satomega = dem6
2103 call this%maw_allocate_arrays()
2106 call this%read_initial_attr()
2109 call this%input%init(this%input_mempath, this%naux)
2112 if (this%imover /= 0)
then
2113 allocate (this%pakmvrobj)
2114 call this%pakmvrobj%ar(this%nmawwells, this%nmawwells, this%memoryPath)
2129 class(
mawtype),
intent(inout) :: this
2131 character(len=LINELENGTH) :: title
2132 character(len=LINELENGTH) :: text
2133 character(len=LINELENGTH) :: csteady
2134 character(len=LINELENGTH) :: str
2135 real(DP) :: auxvaldbl
2136 character(len=LENVARNAME) :: setting
2137 character(len=LINELENGTH) :: cstr
2138 character(len=LINELENGTH) :: errmsgr
2139 integer(I4B) :: node
2141 integer(I4B) :: ntabcols
2142 integer(I4B) :: ntabrows
2143 integer(I4B) :: imaw
2144 integer(I4B) :: ibnd
2146 integer(I4B) :: jpos
2148 integer(I4B) :: nactive
2149 integer(I4B) :: icon
2150 integer(I4B),
dimension(:),
allocatable :: ibotset
2151 integer(I4B),
dimension(:),
allocatable :: iheadset
2152 integer(I4B),
dimension(:),
allocatable :: ilimset
2153 integer(I4B) :: istat
2154 integer(I4B) :: iheadlimit_warning
2156 character(len=*),
parameter :: fmtlsp = &
2157 &
"(1X,/1X,'REUSING ',A,'S FROM LAST STRESS PERIOD')"
2158 character(len=*),
parameter :: fmthdbot = &
2159 &
"('well head (',G0,') must be >= BOTTOM_ELEVATION (',G0, ').')"
2162 iheadlimit_warning = 0
2165 this%imawiss = this%gwfiss
2168 if (this%imawissopt == 1)
then
2173 this%nbound = this%maxbound
2176 if (this%iper ==
kper)
then
2179 if (this%iprpak /= 0)
then
2180 title = trim(adjustl(this%text))//
' PACKAGE ('// &
2181 trim(adjustl(this%packName))//
') DATA FOR PERIOD'
2182 write (title,
'(a,1x,i6)') trim(adjustl(title)),
kper
2183 call table_cr(this%inputtab, this%packName, title)
2184 call this%inputtab%table_df(1, 5, this%iout,
finalize=.false.)
2186 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
2188 call this%inputtab%initialize_column(text, 20, alignment=
tableft)
2190 write (text,
'(a,1x,i6)')
'VALUE', jj
2191 call this%inputtab%initialize_column(text, 15, alignment=
tabcenter)
2199 allocate (ibotset(this%nmawwells))
2200 allocate (iheadset(this%nmawwells))
2201 allocate (ilimset(this%nmawwells))
2202 do imaw = 1, this%nmawwells
2208 do n = 1, this%input%nbound
2209 imaw = this%input%ifno(n)
2210 if (imaw < 1 .or. imaw > this%nmawwells)
then
2211 write (
errmsg,
'(2(a,1x),i0,a)') &
2212 'IMAW must be greater than 0 and', &
2213 'less than or equal to ', this%nmawwells,
'.'
2219 setting = this%input%setting(n)
2222 if (trim(setting) ==
'STATUS')
then
2223 str = this%input%status(n)
2224 this%status(imaw) = str(1:8)
2225 select case (trim(str))
2227 this%iboundpak(imaw) = -1
2229 this%iboundpak(imaw) = 0
2231 this%iboundpak(imaw) = 1
2234 'Unknown '//trim(this%text)//
" maw status keyword: '", &
2241 if (trim(setting) ==
'CONN_STATUS')
then
2242 icon = this%input%period_icon(n)
2243 str = this%input%connstatus(n)
2244 if (icon < 1 .or. icon > this%ngwfnodes(imaw))
then
2245 write (
errmsg,
'(2(a,1x),i0,1x,a,1x,i0,a)') &
2246 'ICON must be greater than 0 and', &
2247 'less than or equal to ', this%ngwfnodes(imaw), &
2248 'for maw well', imaw,
'.'
2251 jpos = this%get_jpos(imaw, icon)
2252 select case (trim(str))
2254 this%iboundconn(jpos) = 0
2256 this%iboundconn(jpos) = 1
2259 'Unknown '//trim(this%text)//
" maw connection status "// &
2260 "keyword: '", trim(str)//
"'."
2267 if (trim(setting) ==
'PERIOD_BOTTOM')
then
2268 this%bot(imaw) = this%input%period_bottom(n)
2273 call this%maw_set_period_value(n, imaw, setting)
2276 if (trim(setting) ==
'WELL_HEAD')
then
2281 if (trim(setting) ==
'HEAD_LIMIT')
then
2282 str = this%input%head_limit(n)
2283 if (trim(str) ==
'OFF')
then
2284 this%shutofflevel(imaw) =
dep20
2286 read (str, *, iostat=istat, iomsg=errmsgr) &
2287 this%shutofflevel(imaw)
2288 if (istat /= 0)
then
2289 errmsg =
'Could not read HEAD_LIMIT value. '//trim(errmsgr)
2297 if (trim(setting) ==
'FLOWING_WELL')
then
2298 this%fwelev(imaw) = this%input%fwelev(n)
2299 this%fwcond(imaw) = this%input%fwcond(n)
2300 this%fwrlen(imaw) = this%input%fwrlen(n)
2301 if (this%iflowingwells == 0)
then
2302 this%iflowingwells = -1
2303 text =
'Flowing well data is specified in the '// &
2304 trim(this%packName)//
' package but FLOWING_WELL was'// &
2305 ' not specified in the OPTIONS block.'
2311 if (trim(setting) ==
'SHUT_OFF')
then
2312 this%shutoffmin(imaw) = this%input%minrate(n)
2313 this%shutoffmax(imaw) = this%input%maxrate(n)
2317 if (trim(setting) ==
'RATE_SCALING')
then
2318 this%pumpelev(imaw) = this%input%pump_elevation(n)
2319 this%reduction_length(imaw) = this%input%scaling_length(n)
2320 if (this%reduction_length(imaw) <
dzero)
then
2321 call this%maw_set_attribute_error(imaw,
'RATE_SCALING', &
2322 &
'must be greater than or equal to 0.')
2328 if (this%naux > 0)
then
2329 if (trim(setting) ==
'PERIOD_AUXILIARY')
then
2330 str = this%input%auxname(n)
2331 auxvaldbl = this%input%auxval(n)
2336 if (this%iprpak /= 0)
then
2337 call this%inputtab%add_term(imaw)
2338 if (trim(setting) ==
'PERIOD_AUXILIARY')
then
2339 call this%inputtab%add_term(
'AUXILIARY')
2341 call this%inputtab%add_term(trim(setting))
2343 select case (trim(setting))
2345 call this%inputtab%add_term(trim(str))
2346 call this%inputtab%add_term(
' ')
2347 call this%inputtab%add_term(
' ')
2348 case (
'CONN_STATUS')
2349 call this%inputtab%add_term(icon)
2350 call this%inputtab%add_term(trim(str))
2351 call this%inputtab%add_term(
' ')
2352 case (
'PERIOD_BOTTOM')
2353 call this%inputtab%add_term(this%bot(imaw))
2354 call this%inputtab%add_term(
' ')
2355 call this%inputtab%add_term(
' ')
2357 call this%inputtab%add_term(this%rate(imaw))
2358 call this%inputtab%add_term(
' ')
2359 call this%inputtab%add_term(
' ')
2361 call this%inputtab%add_term(this%well_head(imaw))
2362 call this%inputtab%add_term(
' ')
2363 call this%inputtab%add_term(
' ')
2365 call this%inputtab%add_term(trim(str))
2366 call this%inputtab%add_term(
' ')
2367 call this%inputtab%add_term(
' ')
2368 case (
'FLOWING_WELL')
2369 call this%inputtab%add_term(this%fwelev(imaw))
2370 call this%inputtab%add_term(this%fwcond(imaw))
2371 call this%inputtab%add_term(this%fwrlen(imaw))
2373 call this%inputtab%add_term(this%shutoffmin(imaw))
2374 call this%inputtab%add_term(this%shutoffmax(imaw))
2375 call this%inputtab%add_term(
' ')
2376 case (
'RATE_SCALING')
2377 call this%inputtab%add_term(this%pumpelev(imaw))
2378 call this%inputtab%add_term(this%reduction_length(imaw))
2379 call this%inputtab%add_term(
' ')
2380 case (
'PERIOD_AUXILIARY')
2381 call this%inputtab%add_term(trim(str))
2382 call this%inputtab%add_term(auxvaldbl)
2383 call this%inputtab%add_term(
' ')
2385 call this%inputtab%add_term(
' ')
2386 call this%inputtab%add_term(
' ')
2387 call this%inputtab%add_term(
' ')
2391 if (this%iprpak /= 0)
then
2392 call this%inputtab%finalize_table()
2399 do imaw = 1, this%nmawwells
2400 if (ibotset(imaw) /= 0 .and. this%iboundpak(imaw) > 0)
then
2401 if (this%bot(imaw) > this%xnewpak(imaw))
then
2402 write (cstr, fmthdbot) this%xnewpak(imaw), this%bot(imaw)
2403 call this%maw_set_attribute_error(imaw,
'BOTTOM', trim(cstr))
2406 do jj = 1, this%ngwfnodes(imaw)
2407 jpos = this%get_jpos(imaw, jj)
2408 if (this%iboundconn(jpos) == 0) cycle
2409 if (this%bot(imaw) > this%botscrn(jpos))
then
2410 write (
errmsg,
'(a,g0,a,1x,i0,1x,a,1x,i0,1x,a,g0,a)') &
2411 'BOTTOM (', this%bot(imaw),
') for maw well', imaw, &
2412 'is above the screen bottom of active connection', jj,
'(', &
2413 this%botscrn(jpos),
').'
2418 if (iheadset(imaw) /= 0 .or. this%iboundpak(imaw) < 0)
then
2419 if (this%well_head(imaw) < this%bot(imaw))
then
2420 write (cstr, fmthdbot) this%well_head(imaw), this%bot(imaw)
2421 call this%maw_set_attribute_error(imaw,
'WELL HEAD', trim(cstr))
2424 if (ibotset(imaw) /= 0 .or. ilimset(imaw) /= 0)
then
2425 if (this%shutofflevel(imaw) <= this%bot(imaw))
then
2426 iheadlimit_warning = iheadlimit_warning + 1
2430 deallocate (ibotset)
2431 deallocate (iheadset)
2432 deallocate (ilimset)
2436 do imaw = 1, this%nmawwells
2438 do jj = 1, this%ngwfnodes(imaw)
2439 jpos = this%get_jpos(imaw, jj)
2440 if (this%iboundconn(jpos) /= 0) nactive = nactive + 1
2442 if (nactive == 0)
then
2443 write (
errmsg,
'(a,1x,i0,1x,a)') &
2444 'Every connection of maw well', imaw,
'is inactive. Use '// &
2445 'STATUS INACTIVE to deactivate all connections of a well.'
2452 write (this%iout, fmtlsp) trim(this%filtyp)
2456 if (iheadlimit_warning > 0)
then
2457 write (
warnmsg,
'(a,a,a,1x,a,1x,a)') &
2458 "HEAD_LIMIT in '", trim(this%packName),
"' was below the well bottom", &
2459 "for one or more multi-aquifer well(s). This may result in", &
2460 "convergence failures for some models."
2470 if (this%check_attr /= 0)
then
2471 call this%maw_check_attributes()
2474 if (this%iprpak == 1)
then
2475 if (this%imawiss /= 0)
then
2476 csteady =
'STEADY-STATE '
2478 csteady =
'TRANSIENT '
2482 title = trim(adjustl(this%text))//
' PACKAGE ('// &
2483 trim(adjustl(this%packName))//
') '//trim(adjustl(csteady))// &
2484 ' RATE DATA FOR PERIOD'
2485 write (title,
'(a,1x,i6)') trim(adjustl(title)),
kper
2487 call table_cr(this%inputtab, this%packName, title)
2488 call this%inputtab%table_df(this%nmawwells, ntabcols, this%iout)
2490 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
2492 call this%inputtab%initialize_column(text, 12, alignment=
tabcenter)
2494 call this%inputtab%initialize_column(text, 12, alignment=
tabcenter)
2495 text =
'SPECIFIED HEAD'
2496 call this%inputtab%initialize_column(text, 12, alignment=
tabcenter)
2497 text =
'PUMP ELEVATION'
2498 call this%inputtab%initialize_column(text, 12, alignment=
tabcenter)
2499 text =
'REDUCTION LENGTH'
2500 call this%inputtab%initialize_column(text, 12, alignment=
tabcenter)
2501 do n = 1, this%nmawwells
2502 call this%inputtab%add_term(n)
2503 call this%inputtab%add_term(this%status(n))
2504 call this%inputtab%add_term(this%rate(n))
2505 if (this%iboundpak(n) < 0)
then
2506 call this%inputtab%add_term(this%well_head(n))
2508 call this%inputtab%add_term(
' ')
2510 call this%inputtab%add_term(this%pumpelev(n))
2511 if (this%reduction_length(n) /=
dep20)
then
2512 call this%inputtab%add_term(this%reduction_length(n))
2514 call this%inputtab%add_term(
' ')
2519 if (this%iflowingwells > 0)
then
2522 title = trim(adjustl(this%text))//
' PACKAGE ('// &
2523 trim(adjustl(this%packName))//
') '//trim(adjustl(csteady))// &
2524 ' FLOWING WELL DATA FOR PERIOD'
2525 write (title,
'(a,1x,i6)') trim(adjustl(title)),
kper
2528 do n = 1, this%nmawwells
2529 if (this%fwcond(n) >
dzero)
then
2530 ntabrows = ntabrows + 1
2533 if (ntabrows > 0)
then
2534 call table_cr(this%inputtab, this%packName, title)
2535 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
2537 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
2539 call this%inputtab%initialize_column(text, 12, alignment=
tabcenter)
2541 call this%inputtab%initialize_column(text, 12, alignment=
tabcenter)
2542 text =
'REDUCTION LENGTH'
2543 call this%inputtab%initialize_column(text, 12, alignment=
tabcenter)
2544 do n = 1, this%nmawwells
2545 if (this%fwcond(n) >
dzero)
then
2546 call this%inputtab%add_term(n)
2547 call this%inputtab%add_term(this%fwelev(n))
2548 call this%inputtab%add_term(this%fwcond(n))
2549 call this%inputtab%add_term(this%fwrlen(n))
2556 title = trim(adjustl(this%text))//
' PACKAGE ('// &
2557 trim(adjustl(this%packName))//
') '//trim(adjustl(csteady))// &
2558 ' WELL SHUTOFF DATA FOR PERIOD'
2559 write (title,
'(a,1x,i6)') trim(adjustl(title)),
kper
2562 do n = 1, this%nmawwells
2563 if (this%shutofflevel(n) /=
dep20)
then
2564 ntabrows = ntabrows + 1
2567 if (ntabrows > 0)
then
2568 call table_cr(this%inputtab, this%packName, title)
2569 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
2571 call this%inputtab%initialize_column(text, 10, alignment=
tabcenter)
2573 call this%inputtab%initialize_column(text, 12, alignment=
tabcenter)
2575 call this%inputtab%initialize_column(text, 12, alignment=
tabcenter)
2577 call this%inputtab%initialize_column(text, 12, alignment=
tabcenter)
2578 do n = 1, this%nmawwells
2579 if (this%shutofflevel(n) /=
dep20)
then
2580 call this%inputtab%add_term(n)
2581 call this%inputtab%add_term(this%shutofflevel(n))
2582 call this%inputtab%add_term(this%shutoffmin(n))
2583 call this%inputtab%add_term(this%shutoffmax(n))
2592 do n = 1, this%nmawwells
2593 do j = 1, this%ngwfnodes(n)
2594 jpos = this%get_jpos(n, j)
2595 node = this%get_gwfnode(n, j)
2596 this%nodelist(ibnd) = node
2597 this%bound(1, ibnd) = this%xnewpak(n)
2598 this%bound(2, ibnd) = this%satcond(jpos)
2599 this%bound(3, ibnd) = this%botscrn(jpos)
2600 if (this%iboundpak(n) > 0)
then
2601 this%bound(4, ibnd) = this%rate(n)
2603 this%bound(4, ibnd) =
dzero
2622 integer(I4B) :: ibnd
2623 integer(I4B) :: imaw
2624 character(len=LENVARNAME) :: setting
2628 call this%BndExtType%bnd_ad()
2631 if (this%ts_active .and. this%input%nbound > 0)
then
2632 do n = 1, this%input%nbound
2633 imaw = this%input%ifno(n)
2634 if (imaw < 1 .or. imaw > this%nmawwells) cycle
2635 setting = this%input%setting(n)
2636 call this%maw_set_period_value(n, imaw, setting)
2641 if (this%naux > 0)
then
2643 do n = 1, this%nmawwells
2644 do j = 1, this%ngwfnodes(n)
2645 do jj = 1, this%naux
2646 if (this%noupdateauxvar(jj) /= 0) cycle
2647 this%auxvar(jj, ibnd) = this%featureauxvar(jj, n)
2656 do i = 1, this%nmawwells
2657 n = this%pkg_ifno(i)
2658 this%xoldpak(n) = this%xnewpak(n)
2659 this%xoldsto(n) = this%xsto(n)
2660 if (this%iboundpak(n) < 0)
then
2661 if (.not. this%well_head_set(n) .and. &
2662 this%input%strt_tslink(i) /= 0)
then
2663 this%well_head(n) = this%input%strt(i)
2665 this%xnewpak(n) = this%well_head(n)
2671 this%nurdxold(n) =
dzero
2672 this%nurweight(n) =
done
2677 if (
kper == 1 .and.
kstp == 1)
then
2678 do n = 1, this%nmawwells
2679 if (this%fwcond(n) >
dzero)
then
2680 if (this%xoldsto(n) > this%fwelev(n))
then
2681 this%xoldsto(n) = this%fwelev(n)
2688 this%ishutoffcnt = 0
2691 if (this%imover == 1)
then
2692 call this%pakmvrobj%ad()
2706 call this%maw_cfupdate()
2711 subroutine maw_fc(this, rhs, ia, idxglo, matrix_sln)
2716 real(DP),
dimension(:),
intent(inout) :: rhs
2717 integer(I4B),
dimension(:),
intent(in) :: ia
2718 integer(I4B),
dimension(:),
intent(in) :: idxglo
2724 integer(I4B) :: iloc
2725 integer(I4B) :: isymloc
2726 integer(I4B) :: igwfnode
2727 integer(I4B) :: iposd
2728 integer(I4B) :: iposoffd
2729 integer(I4B) :: isymnode
2730 integer(I4B) :: ipossymd
2731 integer(I4B) :: ipossymoffd
2732 integer(I4B) :: jpos
2733 integer(I4B) :: icflow
2752 if (this%imover == 1)
then
2753 call this%pakmvrobj%fc()
2758 do n = 1, this%nmawwells
2759 iloc = this%idxlocnode(n)
2763 this%qsim0(n) = this%ratesim(n)
2766 if (this%iboundpak(n) < 0)
then
2767 this%xnewpak(n) = this%well_head(n)
2769 hmaw = this%xnewpak(n)
2772 if (this%iboundpak(n) == 0)
then
2773 this%ratesim(n) = dzero
2775 call this%maw_calculate_wellq(n, hmaw, rate)
2776 this%ratesim(n) = rate
2777 rhs(iloc) = rhs(iloc) - rate
2780 iposd = this%idxdglo(idx)
2785 if (this%iflowingwells > 0)
then
2786 if (this%fwcond(n) > dzero)
then
2788 tp = bt + this%fwrlen(n)
2790 cfw = scale * this%fwcond(n)
2791 this%ifwdischarge(n) = 0
2792 if (cfw > dzero)
then
2793 this%ifwdischarge(n) = 1
2796 this%fwcondsim(n) = cfw
2797 call matrix_sln%add_value_pos(iposd, -cfw)
2798 rhs(iloc) = rhs(iloc) - cfw * bt
2799 ratefw = cfw * (bt - hmaw)
2804 if (this%imawiss /= 1)
then
2805 if (this%ifwdischarge(n) /= 1)
then
2812 tled = this%area(n) /
delt
2815 ssold =
squadratic0sp(this%xoldsto(n), this%bot(n), this%satomega)
2816 call matrix_sln%add_value_pos(iposd, -tled * sd)
2817 rhs(iloc) = rhs(iloc) - tled * (sd * hmaw - ss + ssold)
2819 cterm = this%xoldsto(n) - this%fwelev(n)
2820 rhs(iloc) = rhs(iloc) - (this%area(n) * cterm /
delt)
2826 if (this%imover == 1)
then
2827 rhs(iloc) = rhs(iloc) - this%pakmvrobj%get_qfrommvr(n)
2831 call this%pakmvrobj%accumulate_qformvr(n, -rate)
2835 call this%pakmvrobj%accumulate_qformvr(n, -ratefw)
2841 do j = 1, this%ngwfnodes(n)
2842 jpos = this%get_jpos(n, j)
2843 if (this%iboundpak(n) /= 0 .and. this%iboundconn(jpos) /= 0)
then
2844 igwfnode = this%get_gwfnode(n, j)
2845 hgwf = this%xnew(igwfnode)
2848 call this%maw_calculate_conn_terms(n, j, icflow, cmaw, cterm, term, &
2850 this%simcond(jpos) = cmaw
2853 iposd = this%idxdglo(idx)
2854 iposoffd = this%idxoffdglo(idx)
2855 call matrix_sln%add_value_pos(iposd, -term)
2856 call matrix_sln%set_value_pos(iposoffd, term)
2859 rhs(iloc) = rhs(iloc) - cterm
2862 isymnode = this%get_gwfnode(n, j)
2863 isymloc = ia(isymnode)
2864 ipossymd = this%idxsymdglo(idx)
2865 ipossymoffd = this%idxsymoffdglo(idx)
2866 call matrix_sln%add_value_pos(ipossymd, -term)
2867 call matrix_sln%set_value_pos(ipossymoffd, term)
2870 rhs(isymnode) = rhs(isymnode) + cterm
2881 subroutine maw_fn(this, rhs, ia, idxglo, matrix_sln)
2884 real(DP),
dimension(:),
intent(inout) :: rhs
2885 integer(I4B),
dimension(:),
intent(in) :: ia
2886 integer(I4B),
dimension(:),
intent(in) :: idxglo
2892 integer(I4B) :: iloc
2893 integer(I4B) :: isymloc
2894 integer(I4B) :: igwfnode
2895 integer(I4B) :: iposd
2896 integer(I4B) :: iposoffd
2897 integer(I4B) :: isymnode
2898 integer(I4B) :: ipossymd
2899 integer(I4B) :: ipossymoffd
2900 integer(I4B) :: jpos
2901 integer(I4B) :: icflow
2922 do n = 1, this%nmawwells
2923 iloc = this%idxlocnode(n)
2924 hmaw = this%xnewpak(n)
2927 if (this%iboundpak(n) /= 0)
then
2928 iposd = this%idxdglo(idx)
2931 rate = this%ratesim(n)
2934 call this%maw_calculate_wellq(n, hmaw + dem4, rate2)
2935 drterm = (rate2 - rate) / dem4
2938 call matrix_sln%add_value_pos(iposd, drterm)
2939 rhs(iloc) = rhs(iloc) + drterm * hmaw
2942 if (this%iflowingwells > 0)
then
2943 if (this%fwcond(n) > dzero)
then
2945 tp = bt + this%fwrlen(n)
2947 cfw = scale * this%fwcond(n)
2948 this%ifwdischarge(n) = 0
2949 if (cfw > dzero)
then
2950 this%ifwdischarge(n) = 1
2952 this%fwcondsim(n) = cfw
2953 rate = cfw * (bt - hmaw)
2959 drterm = -(cfw + this%fwcond(n) * derv * (hmaw - bt))
2962 call matrix_sln%add_value_pos(iposd, &
2963 -this%fwcond(n) * derv * (hmaw - bt))
2964 rhs(iloc) = rhs(iloc) - rterm + drterm * hmaw
2971 do j = 1, this%ngwfnodes(n)
2972 jpos = this%get_jpos(n, j)
2973 if (this%iboundpak(n) /= 0 .and. this%iboundconn(jpos) /= 0)
then
2974 igwfnode = this%get_gwfnode(n, j)
2975 hgwf = this%xnew(igwfnode)
2978 iposd = this%idxdglo(idx)
2979 iposoffd = this%idxoffdglo(idx)
2982 isymnode = this%get_gwfnode(n, j)
2983 isymloc = ia(isymnode)
2984 ipossymd = this%idxsymdglo(idx)
2985 ipossymoffd = this%idxsymoffdglo(idx)
2988 call this%maw_calculate_conn_terms(n, j, icflow, cmaw, cterm, term, &
2992 if (hmaw > hgwf)
then
2993 if (icflow /= 0)
then
2994 rhsterm = term2 * hgwf + term * hmaw
2995 rhs(iloc) = rhs(iloc) + rhsterm
2996 rhs(isymnode) = rhs(isymnode) - rhsterm
2997 if (this%iboundpak(n) > 0)
then
2998 call matrix_sln%add_value_pos(iposd, term)
2999 call matrix_sln%add_value_pos(iposoffd, term2)
3001 call matrix_sln%add_value_pos(ipossymd, -term2)
3002 call matrix_sln%add_value_pos(ipossymoffd, -term)
3004 rhs(iloc) = rhs(iloc) + term * hmaw
3005 rhs(isymnode) = rhs(isymnode) - term * hmaw
3006 call matrix_sln%add_value_pos(iposd, term)
3007 if (this%ibound(igwfnode) > 0)
then
3008 call matrix_sln%add_value_pos(ipossymoffd, -term)
3014 if (icflow /= 0)
then
3015 rhsterm = term2 * hmaw + term * hgwf
3016 rhs(iloc) = rhs(iloc) + rhsterm
3017 rhs(isymnode) = rhs(isymnode) - rhsterm
3018 if (this%iboundpak(n) > 0)
then
3019 call matrix_sln%add_value_pos(iposd, term2)
3020 call matrix_sln%add_value_pos(iposoffd, term)
3022 call matrix_sln%add_value_pos(ipossymd, -term)
3023 call matrix_sln%add_value_pos(ipossymoffd, -term2)
3025 rhs(iloc) = rhs(iloc) + term * hgwf
3026 rhs(isymnode) = rhs(isymnode) - term * hgwf
3027 if (this%iboundpak(n) > 0)
then
3028 call matrix_sln%add_value_pos(iposoffd, term)
3030 call matrix_sln%add_value_pos(ipossymd, -term)
3053 subroutine maw_nur(this, neqpak, x, xtemp, dx, inewtonur, dxmax, locmax)
3055 class(
mawtype),
intent(inout) :: this
3056 integer(I4B),
intent(in) :: neqpak
3057 real(DP),
dimension(neqpak),
intent(inout) :: x
3058 real(DP),
dimension(neqpak),
intent(in) :: xtemp
3059 real(DP),
dimension(neqpak),
intent(inout) :: dx
3060 integer(I4B),
intent(inout) :: inewtonur
3061 real(DP),
intent(inout) :: dxmax
3062 integer(I4B),
intent(inout) :: locmax
3071 real(DP),
parameter :: damptheta = dp7
3072 real(DP),
parameter :: damptol = dhalf
3073 real(DP),
parameter :: weightmin = dem2
3074 real(DP),
parameter :: recover = 0.2_dp
3077 do n = 1, this%nmawwells
3078 if (this%iboundpak(n) < 1) cycle
3082 dxprop = x(n) - xtemp(n)
3090 weight =
maw_damp_weight(dxprop, this%nurdxold(n), this%nurweight(n), &
3091 damptheta, damptol, weightmin, recover)
3092 this%nurweight(n) = weight
3095 if (weight < done)
then
3097 xx = xtemp(n) + weight * dxprop
3099 if (abs(dxx) > abs(dxmax))
then
3104 dx(n) = weight * dxprop
3109 if (x(n) < botw)
then
3111 xx = xtemp(n) * (done - dp9) + botw * dp9
3113 if (abs(dxx) > abs(dxmax))
then
3125 this%nurdxold(n) = x(n) - xtemp(n)
3138 weightmin, recover)
result(new_weight)
3140 real(dp),
intent(in) :: dxprop
3141 real(dp),
intent(in) :: dxold
3142 real(dp),
intent(in) :: weight
3143 real(dp),
intent(in) :: damptheta
3144 real(dp),
intent(in) :: damptol
3145 real(dp),
intent(in) :: weightmin
3146 real(dp),
intent(in) :: recover
3148 real(dp) :: new_weight
3150 if (dxprop * dxold < dzero .and. abs(dxprop) > damptol * abs(dxold))
then
3151 new_weight = max(damptheta * weight, weightmin)
3153 new_weight = min(weight + recover, done)
3168 subroutine maw_cc(this, innertot, kiter, iend, icnvgmod, cpak, ipak, dpak)
3172 class(
mawtype),
intent(inout) :: this
3173 integer(I4B),
intent(in) :: innertot
3174 integer(I4B),
intent(in) :: kiter
3175 integer(I4B),
intent(in) :: iend
3176 integer(I4B),
intent(in) :: icnvgmod
3177 character(len=LENPAKLOC),
intent(inout) :: cpak
3178 integer(I4B),
intent(inout) :: ipak
3179 real(DP),
intent(inout) :: dpak
3183 integer(I4B) :: jpos
3184 integer(I4B) :: igwfnode
3185 integer(I4B) :: locdpak
3194 real(DP) :: qtolfact
3197 character(len=LENPAKLOC) :: cloc
3199 real(DP),
parameter :: qtol = 1.001_dp
3201 character(len=*),
parameter :: fmtwarn = &
3202 "('MAW well ', a, ' requests an extraction rate (', g0.5, &
3203 &') larger than the maximum rate (', g0.5, ') the aquifer can supply &
3204 &with the well head at its bottom. This may be preventing convergence. &
3205 &Consider reducing the requested rate, applying or widening RATE_SCALING, &
3206 &or reviewing the connection conductance (e.g. aquifer K).')"
3216 do n = 1, this%nmawwells
3217 if (this%iboundpak(n) < 1) cycle
3218 if (this%nurweight(n) >= done) cycle
3219 if (this%area(n) > dzero)
then
3220 qtolfact =
delt / this%area(n)
3231 dq = (this%qsim0(n) - this%ratesim(n)) * qtolfact
3232 if (abs(dq) > abs(dpakmax))
then
3237 if (locdpak > 0 .and. abs(dpakmax) > abs(dpak))
then
3240 write (cloc,
"(a,'-',a)") trim(this%packName),
'rate'
3246 if (iend == 0)
return
3247 if (icnvgmod /= 0)
return
3250 do n = 1, this%nmawwells
3251 if (this%iboundpak(n) < 1) cycle
3252 if (this%rate(n) >= dzero) cycle
3258 do j = 1, this%ngwfnodes(n)
3259 jpos = this%get_jpos(n, j)
3260 if (this%iboundconn(jpos) == 0) cycle
3261 igwfnode = this%get_gwfnode(n, j)
3262 hgwf = this%xnew(igwfnode)
3263 bmaw = this%botscrn(jpos)
3264 hv = max(botw, bmaw)
3269 call this%maw_calculate_saturation(n, j, igwfnode, sat, hv)
3270 cmaw = this%satcond(jpos) * sat
3275 qmax = qmax + cmaw * max(hgwf - hv, dzero)
3279 qreq = -this%rate(n)
3280 if (qmax >= dzero .and. qreq > qtol * qmax)
then
3281 write (cloc,
'(a, a, a, a, i0, a, i0, a)') trim(this%name_model),
'-(', &
3282 trim(this%filtyp),
'_', this%ibcnum,
'-', n,
')'
3283 write (
warnmsg, fmtwarn) trim(cloc), qreq, qmax
3297 class(
mawtype),
intent(inout) :: this
3298 real(DP),
dimension(:),
intent(in) :: x
3299 real(DP),
dimension(:),
contiguous,
intent(inout) :: flowja
3300 integer(I4B),
optional,
intent(in) :: iadv
3308 integer(I4B) :: ibnd
3316 call this%maw_cfupdate()
3320 call this%BndType%bnd_cq(x, flowja, iadv=1)
3323 do n = 1, this%nmawwells
3324 this%qout(n) =
dzero
3325 this%qsto(n) =
dzero
3326 if (this%iflowingwells > 0)
then
3329 if (this%iboundpak(n) == 0)
then
3334 hmaw = this%xnewpak(n)
3338 rrate = this%ratesim(n)
3341 if (rrate <
dzero)
then
3342 this%qout(n) = rrate
3346 if (this%iflowingwells > 0)
then
3347 if (this%fwcond(n) >
dzero)
then
3348 cfw = this%fwcondsim(n)
3352 if (this%ifwdischarge(n) == 1)
then
3353 this%xsto(n) = this%fwelev(n)
3355 rrate = cfw * (this%fwelev(n) - hmaw)
3359 this%qout(n) = this%qout(n) + rrate
3369 if (this%imawiss /= 1)
then
3370 if (this%iflowingwells > 0 .and. this%ifwdischarge(n) == 1)
then
3371 rrate = -this%area(n) * (this%xsto(n) - this%xoldsto(n)) /
delt
3374 ssold =
squadratic0sp(this%xoldsto(n), this%bot(n), this%satomega)
3375 rrate = -this%area(n) * (ss - ssold) /
delt
3377 this%qsto(n) = rrate
3383 do n = 1, this%nmawwells
3384 hmaw = this%xnewpak(n)
3385 this%qconst(n) =
dzero
3386 do j = 1, this%ngwfnodes(n)
3387 rrate = -this%simvals(ibnd)
3388 this%qleak(ibnd) = rrate
3389 if (this%iboundpak(n) < 0)
then
3390 this%qconst(n) = this%qconst(n) - rrate
3393 if (-rrate <
dzero)
then
3394 this%qout(n) = this%qout(n) - rrate
3403 if (this%iboundpak(n) < 0)
then
3406 this%qconst(n) = this%qconst(n) - this%ratesim(n)
3409 if (this%iflowingwells > 0)
then
3410 this%qconst(n) = this%qconst(n) - this%qfw(n)
3414 if (this%imawiss /= 1)
then
3415 this%qconst(n) = this%qconst(n) - this%qsto(n)
3421 call this%maw_fill_budobj()
3429 integer(I4B),
intent(in) :: icbcfl
3430 integer(I4B),
intent(in) :: ibudfl
3431 integer(I4B),
intent(in) :: icbcun
3432 integer(I4B),
dimension(:),
optional,
intent(in) :: imap
3435 call this%BndType%bnd_ot_model_flows(icbcfl, ibudfl, icbcun, this%imap)
3443 integer(I4B),
intent(in) :: icbcfl
3444 integer(I4B),
intent(in) :: ibudfl
3445 integer(I4B) :: ibinun
3449 if (this%ibudgetout /= 0)
then
3450 ibinun = this%ibudgetout
3452 if (icbcfl == 0) ibinun = 0
3453 if (ibinun > 0)
then
3454 call this%budobj%save_flows(this%dis, ibinun,
kstp,
kper,
delt, &
3459 if (ibudfl /= 0 .and. this%iprflow /= 0)
then
3460 call this%budobj%write_flowtable(this%dis,
kstp,
kper)
3471 integer(I4B),
intent(in) :: idvsave
3472 integer(I4B),
intent(in) :: idvprint
3473 integer(I4B) :: ibinun
3480 if (this%iheadout /= 0)
then
3481 ibinun = this%iheadout
3483 if (idvsave == 0) ibinun = 0
3486 if (ibinun > 0)
then
3487 do n = 1, this%nmawwells
3490 if (this%iboundpak(n) == 0)
then
3492 else if (d <=
dzero)
then
3497 call ulasav(this%dbuff,
' HEAD', &
3499 this%nmawwells, 1, 1, ibinun)
3503 if (idvprint /= 0 .and. this%iprhed /= 0)
then
3506 call this%headtab%set_kstpkper(
kstp,
kper)
3509 do n = 1, this%nmawwells
3510 if (this%inamedbound == 1)
then
3511 call this%headtab%add_term(this%cmawname(n))
3513 call this%headtab%add_term(n)
3514 call this%headtab%add_term(this%xnewpak(n))
3526 integer(I4B),
intent(in) :: kstp
3527 integer(I4B),
intent(in) :: kper
3528 integer(I4B),
intent(in) :: iout
3529 integer(I4B),
intent(in) :: ibudfl
3531 call this%budobj%write_budtable(kstp, kper, iout, ibudfl,
totim,
delt)
3544 call this%budobj%budgetobject_da()
3545 deallocate (this%budobj)
3546 nullify (this%budobj)
3549 if (this%iprhed > 0)
then
3550 call this%headtab%table_da()
3551 deallocate (this%headtab)
3552 nullify (this%headtab)
3556 call mem_deallocate(this%cmawbudget,
'CMAWBUDGET', this%memoryPath)
3590 nullify (this%well_head)
3653 nullify (this%gwfiss)
3656 call this%input%destroy()
3659 call this%BndExtType%bnd_da()
3666 class(
mawtype),
intent(inout) :: this
3669 this%listlabel = trim(this%filtyp)//
' NO.'
3670 if (this%dis%ndim == 3)
then
3671 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
3672 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'ROW'
3673 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'COL'
3674 elseif (this%dis%ndim == 2)
then
3675 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
3676 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'CELL2D'
3678 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'NODE'
3680 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'STRESS RATE'
3681 if (this%inamedbound == 1)
then
3682 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'BOUNDARY NAME'
3694 integer(I4B),
pointer :: neq
3695 integer(I4B),
dimension(:),
pointer,
contiguous :: ibound
3696 real(DP),
dimension(:),
pointer,
contiguous :: xnew
3697 real(DP),
dimension(:),
pointer,
contiguous :: xold
3698 real(DP),
dimension(:),
pointer,
contiguous :: flowja
3701 integer(I4B) :: istart, iend
3704 call this%BndType%set_pointers(neq, ibound, xnew, xold, flowja)
3709 istart = this%dis%nodes + this%ioffset + 1
3710 iend = istart + this%nmawwells - 1
3711 this%iboundpak => this%ibound(istart:iend)
3712 this%xnewpak => this%xnew(istart:iend)
3713 call mem_checkin(this%xnewpak,
'HEAD', this%memoryPath,
'X', &
3714 this%memoryPathModel)
3715 call mem_allocate(this%xoldpak, this%nmawwells,
'XOLDPAK', this%memoryPath)
3718 do n = 1, this%nmawwells
3719 this%xnewpak(n) = dep20
3743 integer(I4B) :: indx
3747 call this%obs%StoreObsType(
'head', .false., indx)
3752 call this%obs%StoreObsType(
'from-mvr', .false., indx)
3757 call this%obs%StoreObsType(
'maw', .true., indx)
3762 call this%obs%StoreObsType(
'rate', .true., indx)
3767 call this%obs%StoreObsType(
'rate-to-mvr', .true., indx)
3772 call this%obs%StoreObsType(
'fw-rate', .true., indx)
3777 call this%obs%StoreObsType(
'fw-to-mvr', .true., indx)
3782 call this%obs%StoreObsType(
'storage', .true., indx)
3787 call this%obs%StoreObsType(
'constant', .true., indx)
3792 call this%obs%StoreObsType(
'conductance', .true., indx)
3797 call this%obs%StoreObsType(
'fw-conductance', .true., indx)
3813 integer(I4B) :: jpos
3821 if (this%obs%npakobs > 0)
then
3822 call this%obs%obs_bd_clear()
3823 do i = 1, this%obs%npakobs
3824 obsrv => this%obs%pakobs(i)%obsrv
3825 do j = 1, obsrv%indxbnds_count
3827 jj = obsrv%indxbnds(j)
3828 select case (obsrv%ObsTypeId)
3830 if (this%iboundpak(jj) /= 0)
then
3831 v = this%xnewpak(jj)
3834 if (this%iboundpak(jj) /= 0)
then
3835 if (this%imover == 1)
then
3836 v = this%pakmvrobj%get_qfrommvr(jj)
3842 nn = jj - this%iaconn(n) + 1
3843 jpos = this%get_jpos(n, nn)
3844 if (this%iboundpak(n) /= 0 .and. this%iboundconn(jpos) /= 0)
then
3848 if (this%iboundpak(jj) /= 0)
then
3849 v = this%ratesim(jj)
3850 if (v < dzero .and. this%qout(jj) < dzero)
then
3851 qfact = v / this%qout(jj)
3852 if (this%imover == 1)
then
3853 v = v + this%pakmvrobj%get_qtomvr(jj) * qfact
3857 case (
'RATE-TO-MVR')
3858 if (this%iboundpak(jj) /= 0)
then
3859 if (this%imover == 1)
then
3860 v = this%ratesim(jj)
3862 if (v < dzero .and. this%qout(jj) < dzero)
then
3863 qfact = v / this%qout(jj)
3865 v = this%pakmvrobj%get_qtomvr(jj) * qfact
3872 if (this%iboundpak(jj) /= 0 .and. this%iflowingwells > 0)
then
3873 hmaw = this%xnewpak(jj)
3874 cmaw = this%fwcondsim(jj)
3875 v = cmaw * (this%fwelev(jj) - hmaw)
3876 if (v < dzero .and. this%qout(jj) < dzero)
then
3877 qfact = v / this%qout(jj)
3878 if (this%imover == 1)
then
3879 v = v + this%pakmvrobj%get_qtomvr(jj) * qfact
3884 if (this%iboundpak(jj) /= 0 .and. this%iflowingwells > 0)
then
3885 if (this%imover == 1)
then
3886 hmaw = this%xnewpak(jj)
3887 cmaw = this%fwcondsim(jj)
3888 v = cmaw * (this%fwelev(jj) - hmaw)
3890 if (v < dzero .and. this%qout(jj) < dzero)
then
3891 qfact = v / this%qout(jj)
3893 v = this%pakmvrobj%get_qtomvr(jj) * qfact
3900 if (this%iboundpak(jj) /= 0 .and. this%imawissopt /= 1)
then
3904 if (this%iboundpak(jj) /= 0)
then
3907 case (
'CONDUCTANCE')
3909 nn = jj - this%iaconn(n) + 1
3910 jpos = this%get_jpos(n, nn)
3911 if (this%iboundpak(n) /= 0 .and. this%iboundconn(jpos) /= 0)
then
3912 v = this%simcond(jpos)
3914 case (
'FW-CONDUCTANCE')
3915 if (this%iboundpak(jj) /= 0)
then
3916 v = this%fwcondsim(jj)
3919 errmsg =
'Unrecognized observation type: '//trim(obsrv%ObsTypeId)
3922 call this%obs%SaveOneSimval(obsrv, v)
3927 if (count_errors() > 0)
then
3928 call store_error_filename(this%input_fname)
3933 if (this%ioutredflowcsv > 0)
then
3934 call this%maw_redflow_csv_write()
3946 class(
mawtype),
intent(inout) :: this
3953 character(len=LENBOUNDNAME) :: bname
395710
format(
'Boundary "', a,
'" for observation "', a, &
3958 '" is invalid in package "', a,
'"')
3961 do i = 1, this%obs%npakobs
3962 obsrv => this%obs%pakobs(i)%obsrv
3965 nn1 = obsrv%NodeNumber
3966 if (nn1 == namedboundflag)
then
3967 bname = obsrv%FeatureName
3968 if (bname /=
'')
then
3973 if (obsrv%ObsTypeId ==
'MAW' .or. &
3974 obsrv%ObsTypeId ==
'CONDUCTANCE')
then
3975 if (this%inamedbound /= 0)
then
3976 do j = 1, this%nmawwells
3977 do jj = this%iaconn(j), this%iaconn(j + 1) - 1
3978 if (this%boundname(jj) == bname)
then
3980 call obsrv%AddObsIndex(jj)
3986 do j = 1, this%nmawwells
3987 if (this%cmawname(j) == bname)
then
3989 call obsrv%AddObsIndex(j)
3993 if (.not. jfound)
then
3995 trim(bname), trim(obsrv%Name), trim(this%packName)
4000 if (obsrv%indxbnds_count == 0)
then
4001 if (obsrv%ObsTypeId ==
'MAW' .or. &
4002 obsrv%ObsTypeId ==
'CONDUCTANCE')
then
4003 nn2 = obsrv%NodeNumber2
4004 if (nn1 < 1 .or. nn1 > this%nmawwells)
then
4005 write (
errmsg,
'(5a,i0,a,i0,a)') &
4006 'Observation ', trim(obsrv%Name),
' of type ', &
4007 trim(adjustl(obsrv%ObsTypeId)), &
4008 ' was assigned multi-aquifer well ', nn1, &
4009 '. Multi-aquifer well must be >= 1 and <= ', &
4012 else if (nn2 < 1 .or. nn2 > this%ngwfnodes(nn1))
then
4013 write (
errmsg,
'(5a,i0,a,i0,a,i0,a)') &
4014 'Observation ', trim(obsrv%Name),
' of type ', &
4015 trim(adjustl(obsrv%ObsTypeId)), &
4016 ' was assigned connection ', nn2, &
4017 ' of multi-aquifer well ', nn1, &
4018 '. Connection must be >= 1 and <= ', &
4019 this%ngwfnodes(nn1),
'.'
4022 j = this%iaconn(nn1) + nn2 - 1
4023 call obsrv%AddObsIndex(j)
4026 call obsrv%AddObsIndex(nn1)
4029 errmsg =
'Programming error in maw_rp_obs'
4036 if (obsrv%ObsTypeId ==
'HEAD')
then
4037 if (obsrv%indxbnds_count > 1)
then
4038 write (
errmsg,
'(a,3(1x,a))') &
4039 trim(adjustl(obsrv%ObsTypeId)), &
4040 'for observation', trim(adjustl(obsrv%Name)), &
4041 'must be assigned to a multi-aquifer well with a unique boundname.'
4047 if (obsrv%ObsTypeId ==
'MAW' .or. &
4048 obsrv%ObsTypeId ==
'CONDUCTANCE')
then
4049 do j = 1, obsrv%indxbnds_count
4050 nn1 = obsrv%indxbnds(j)
4051 if (nn1 < 1 .or. nn1 > this%maxbound)
then
4052 write (
errmsg,
'(3(a,1x),i0,1x,a,i0,a)') &
4053 trim(adjustl(obsrv%ObsTypeId)), &
4054 'multi-aquifer well connection number must be greater than 0', &
4055 'and less than or equal to', this%maxbound, &
4056 '(specified value is ', nn1,
').'
4061 do j = 1, obsrv%indxbnds_count
4062 nn1 = obsrv%indxbnds(j)
4063 if (nn1 < 1 .or. nn1 > this%nmawwells)
then
4064 write (
errmsg,
'(3(a,1x),i0,1x,a,i0,a)') &
4065 trim(adjustl(obsrv%ObsTypeId)), &
4066 'multi-aquifer well must be greater than 0 ', &
4067 'and less than or equal to', this%nmawwells, &
4068 '(specified value is ', nn1,
').'
4076 if (count_errors() > 0)
then
4077 call store_error_filename(this%input_fname)
4093 integer(I4B),
intent(in) :: inunitobs
4094 integer(I4B),
intent(in) :: iout
4096 integer(I4B) :: nn1, nn2
4097 integer(I4B) :: icol, istart, istop
4098 character(len=LINELENGTH) :: string
4099 character(len=LENBOUNDNAME) :: bndname
4102 string = obsrv%IDstring
4108 call extract_idnum_or_bndname(string, icol, istart, istop, nn1, bndname)
4109 if (nn1 == namedboundflag)
then
4110 obsrv%FeatureName = bndname
4112 if (obsrv%ObsTypeId ==
'MAW' .or. &
4113 obsrv%ObsTypeId ==
'CONDUCTANCE')
then
4114 call extract_idnum_or_bndname(string, icol, istart, istop, nn2, bndname)
4115 if (len_trim(bndname) < 1 .and. nn2 < 0)
then
4116 write (
errmsg,
'(a,1x,a,a,1x,a,1x,a)') &
4117 'For observation type', trim(adjustl(obsrv%ObsTypeId)), &
4118 ', ID given as an integer and not as boundname,', &
4119 'but ID2 (icon) is missing. Either change ID to valid', &
4120 'boundname or supply valid entry for ID2.'
4123 if (nn2 == namedboundflag)
then
4124 obsrv%FeatureName = bndname
4128 obsrv%NodeNumber2 = nn2
4133 obsrv%NodeNumber = nn1
4143 class(
mawtype),
intent(inout) :: this
4144 character(len=*),
intent(in) :: fname
4146 character(len=*),
parameter :: fmtredflowcsv = &
4147 "(4x, 'MAW REDUCED FLOW INFORMATION WILL BE SAVED TO FILE: ', a, /4x, &
4148 &'OPENED ON UNIT: ', I0)"
4150 this%ioutredflowcsv = getunit()
4151 call openfile(this%ioutredflowcsv, this%iout, fname,
'CSV', &
4152 filstat_opt=
'REPLACE')
4153 write (this%iout, fmtredflowcsv) trim(adjustl(fname)), &
4155 write (this%ioutredflowcsv,
'(a)') &
4156 'time,period,step,MAWnumber,rate-requested,rate-actual,maw-reduction'
4165 class(
mawtype),
intent(inout) :: this
4172 do n = 1, this%nmawwells
4175 if (this%status(n) .ne.
'ACTIVE')
then
4178 v = this%rate(n) - this%ratesim(n)
4179 if (abs(v) > dem9)
then
4180 write (this%ioutredflowcsv,
'(*(G0,:,","))') &
4191 class(
mawtype),
intent(inout) :: this
4192 integer(I4B),
intent(in) :: i
4193 integer(I4B),
intent(in) :: j
4194 integer(I4B),
intent(in) :: node
4196 integer(I4B) :: iTcontrastErr
4197 integer(I4B) :: jpos
4201 real(DP) :: sqrtk11k22
4209 real(DP) :: Tcontrast
4234 jpos = this%get_jpos(i, j)
4237 k11 = this%gwfk11(node)
4238 if (this%gwfik22 == 0)
then
4239 k22 = this%gwfk11(node)
4241 k22 = this%gwfk22(node)
4243 sqrtk11k22 = sqrt(k11 * k22)
4246 gwftop = this%dis%top(node)
4247 gwfbot = this%dis%bot(node)
4248 tthka = gwftop - gwfbot
4249 gwfsat = this%gwfsat(node)
4253 topw = this%topscrn(jpos)
4254 botw = this%botscrn(jpos)
4258 if (gwftop == topw .and. gwfbot == botw)
then
4259 if (this%icelltype(node) == 0)
then
4260 tthkw = tthkw * gwfsat
4261 tthka = tthka * gwfsat
4266 t2pi = dtwopi * tthka * sqrtk11k22
4269 if (this%dis%ndim == 3 .and. this%ieffradopt /= 0)
then
4272 dx = sqrt(this%dis%area(node))
4274 yx4 = (tyy / txx)**dquarter
4275 xy4 = (txx / tyy)**dquarter
4276 eradius = 0.28_dp * ((yx4 * dx)**dtwo + &
4277 (xy4 * dy)**dtwo)**dhalf / (yx4 + xy4)
4279 area = this%dis%area(node)
4280 eradius = sqrt(area / (deight * dpi))
4285 if (this%ieqn(i) == 1 .or. this%ieqn(i) == 3)
then
4286 lc1 = log(eradius / this%radius(i)) / t2pi
4290 if (this%ieqn(i) == 2 .or. this%ieqn(i) == 3)
then
4292 if (tthkw * hks > dzero)
then
4293 tcontrast = (sqrtk11k22 * tthka) / (hks * tthkw)
4294 skin = (tcontrast - done) * log(this%sradius(jpos) / this%radius(i))
4301 if (tcontrast <= 1 .and. this%ieqn(i) == 2)
then
4303 write (
errmsg,
'(a,g0,a,1x,i0,1x,a,1x,i0,a,4(1x,a))') &
4304 'Invalid calculated transmissivity contrast (', tcontrast, &
4305 ') for maw well', i,
'connection', j,
'.',
'This happens when the', &
4306 'skin transmissivity equals or exceeds the aquifer transmissivity.', &
4307 'Consider decreasing HK_SKIN for the connection or using the', &
4308 'CUMULATIVE or MEAN conductance equations.'
4317 if (this%ieqn(i) == 4)
then
4319 ravg = dhalf * (this%radius(i) + this%sradius(jpos))
4320 slen = this%sradius(jpos) - this%radius(i)
4321 pavg = dtwopi * ravg
4322 c = hks * pavg * tthkw / slen
4327 if (this%ieqn(i) < 4)
then
4328 if (lc1 + lc2 /= dzero)
then
4329 c = done / (lc1 + lc2)
4337 if (c < dzero .and. itcontrasterr == 0)
then
4338 write (
errmsg,
'(a,g0,a,1x,i0,1x,a,1x,i0,a,4(1x,a))') &
4339 'Invalid calculated negative conductance (', c, &
4340 ') for maw well', i,
'connection', j,
'.',
'this happens when the', &
4341 'skin transmissivity equals or exceeds the aquifer transmissivity.', &
4342 'consider decreasing hk_skin for the connection or using the', &
4343 'mean conductance equation.'
4350 if (this%inonvert /= 0)
then
4351 c = c * this%maw_calc_lcorr(i, jpos)
4355 this%satcond(jpos) = c
4362 class(
mawtype),
intent(inout) :: this
4363 integer(I4B),
intent(in) :: n
4364 integer(I4B),
intent(in) :: j
4365 integer(I4B),
intent(in) :: node
4366 real(DP),
intent(inout) :: sat
4367 real(DP),
intent(in),
optional :: hwell_in
4369 integer(I4B) :: jpos
4380 if (this%icelltype(node) /= 0)
then
4383 hwell = this%xnewpak(n)
4384 if (
present(hwell_in))
then
4389 jpos = this%get_jpos(n, j)
4392 topw = this%topscrn(jpos)
4393 botw = this%botscrn(jpos)
4396 if (this%inewton /= 1)
then
4397 h_temp = this%xnew(node)
4398 if (h_temp < botw)
then
4401 if (hwell < botw)
then
4404 h_temp = dhalf * (h_temp + hwell)
4406 h_temp = this%xnew(node)
4407 if (hwell > h_temp)
then
4410 if (h_temp < botw)
then
4437 integer(I4B),
intent(in) :: n
4438 integer(I4B),
intent(in) :: j
4439 integer(I4B),
intent(inout) :: icflow
4440 real(DP),
intent(inout) :: cmaw
4441 real(DP),
intent(inout) :: cterm
4442 real(DP),
intent(inout) :: term
4443 real(DP),
intent(inout) :: flow
4444 real(DP),
intent(inout),
optional :: term2
4446 logical(LGP) :: correct_flow
4447 integer(I4B) :: inewton
4448 integer(I4B) :: jpos
4449 integer(I4B) :: igwfnode
4460 real(DP) :: dhbarterm
4461 real(DP) :: vscratio
4467 if (
present(term2))
then
4474 jpos = this%get_jpos(n, j)
4475 igwfnode = this%get_gwfnode(n, j)
4476 hgwf = this%xnew(igwfnode)
4477 hmaw = this%xnewpak(n)
4478 tmaw = this%topscrn(jpos)
4479 bmaw = this%botscrn(jpos)
4482 if (this%ivsc == 1)
then
4485 vscratio = this%viscratios(1, n)
4487 vscratio = this%viscratios(2, n)
4492 call this%maw_calculate_saturation(n, j, igwfnode, sat)
4493 cmaw = this%satcond(jpos) * vscratio * sat
4496 if (inewton == 1)
then
4500 if (hgwf > hups)
then
4508 if (this%icelltype(igwfnode) /= 0)
then
4518 if (this%correct_flow)
then
4521 en = max(bmaw, this%dis%bot(igwfnode))
4522 correct_flow = .false.
4524 correct_flow = .true.
4526 if (hgwf < en .and. this%icelltype(igwfnode) /= 0)
then
4527 correct_flow = .true.
4532 if (correct_flow)
then
4534 hdowns = min(hmaw, hgwf)
4536 if (hgwf > hmaw)
then
4537 cterm = cmaw * (hmaw - hbar)
4539 cterm = cmaw * (hbar - hgwf)
4544 if (inewton /= 0)
then
4547 if (hmaw > hgwf)
then
4549 term = drterm * this%satcond(jpos) * vscratio * (hbar - hmaw)
4551 term2 = cmaw * (dhbarterm - done)
4556 term = -drterm * this%satcond(jpos) * vscratio * (hgwf - hbar)
4558 term2 = cmaw * (done - dhbarterm)
4564 if (inewton /= 0)
then
4565 term = drterm * this%satcond(jpos) * vscratio * (hgwf - hmaw)
4571 if (inewton == 0)
then
4572 flow = term * (hgwf - hmaw) + cterm
4576 if (this%idense /= 0 .and. inewton == 0)
then
4577 call this%maw_calculate_density_exchange(jpos, hmaw, hgwf, cmaw, &
4578 bmaw, flow, term, cterm)
4587 integer(I4B),
intent(in) :: n
4588 real(DP),
intent(in) :: hmaw
4589 real(DP),
intent(inout) :: q
4606 if (rate < dzero)
then
4611 if (this%shutofflevel(n) /= dep20)
then
4612 call this%maw_calculate_qpot(n, q)
4613 if (q < dzero) q = dzero
4614 if (q > -rate) q = -rate
4616 if (this%ishutoffcnt == 1)
then
4617 this%shutoffweight(n) = done
4618 this%shutoffdq(n) = dzero
4619 this%shutoffqold(n) = q
4622 dq = q - this%shutoffqold(n)
4623 weight = this%shutoffweight(n)
4626 if (this%shutoffdq(n) * dq < dzero)
then
4627 weight = this%theta * this%shutoffweight(n)
4631 weight = this%shutoffweight(n) + this%kappa
4633 if (weight > done) weight = done
4635 q = this%shutoffqold(n) + weight * dq
4637 this%shutoffqold(n) = q
4638 this%shutoffdq(n) = dq
4639 this%shutoffweight(n) = weight
4643 if (this%shutoffmin(n) > dzero)
then
4644 if (hmaw < this%shutofflevel(n))
then
4648 if (this%ishutoff(n) /= 0)
then
4655 if (q < this%shutoffmin(n))
then
4656 if (this%ishutoffcnt > 2)
then
4657 this%ishutoff(n) = 1
4668 if (q > this%shutoffmax(n))
then
4669 if (this%ishutoffcnt <= 2)
then
4670 this%ishutoff(n) = 0
4673 if (this%ishutoff(n) /= 0)
then
4679 if (q /= dzero) q = -q
4688 if (this%reduction_length(n) /= dep20)
then
4689 bt = this%pumpelev(n)
4690 tp = bt + this%reduction_length(n)
4700 if (this%shutofflevel(n) /= dep20)
then
4701 call this%maw_calculate_qpot(n, q)
4703 if (q < dzero) q = dzero
4704 if (q > rate) q = rate
4706 if (this%ishutoffcnt == 1)
then
4707 this%shutoffweight(n) = done
4708 this%shutoffdq(n) = dzero
4709 this%shutoffqold(n) = q
4712 dq = q - this%shutoffqold(n)
4713 weight = this%shutoffweight(n)
4716 if (this%shutoffdq(n) * dq < dzero)
then
4717 weight = this%theta * this%shutoffweight(n)
4721 weight = this%shutoffweight(n) + this%kappa
4723 if (weight > done) weight = done
4725 q = this%shutoffqold(n) + weight * dq
4727 this%shutoffqold(n) = q
4728 this%shutoffdq(n) = dq
4729 this%shutoffweight(n) = weight
4737 if (this%reduction_length(n) /= dep20)
then
4738 bt = this%pumpelev(n)
4739 tp = bt + this%reduction_length(n)
4752 class(
mawtype),
intent(inout) :: this
4753 integer(I4B),
intent(in) :: n
4754 real(DP),
intent(inout) :: qnet
4757 integer(I4B) :: jpos
4758 integer(I4B) :: igwfnode
4770 real(DP) :: vscratio
4776 h_temp = this%shutofflevel(n)
4779 if (this%ivsc == 1)
then
4782 vscratio = this%viscratios(1, n)
4784 vscratio = this%viscratios(2, n)
4789 if (this%iflowingwells > 0)
then
4790 if (this%fwcond(n) > dzero)
then
4792 tp = bt + this%fwrlen(n)
4794 cfw = scale * this%fwcond(n) * this%viscratios(2, n)
4795 this%ifwdischarge(n) = 0
4796 if (cfw > dzero)
then
4797 this%ifwdischarge(n) = 1
4800 qnet = qnet + cfw * (bt - h_temp)
4805 if (this%imawiss /= 1)
then
4806 if (this%ifwdischarge(n) /= 1)
then
4807 hdterm = this%xoldsto(n) - h_temp
4809 hdterm = this%xoldsto(n) - this%fwelev(n)
4811 qnet = qnet - (this%area(n) * hdterm /
delt)
4815 do j = 1, this%ngwfnodes(n)
4816 jpos = this%get_jpos(n, j)
4817 if (this%iboundconn(jpos) == 0) cycle
4818 igwfnode = this%get_gwfnode(n, j)
4819 call this%maw_calculate_saturation(n, j, igwfnode, sat)
4820 cmaw = this%satcond(jpos) * vscratio * sat
4821 hgwf = this%xnew(igwfnode)
4822 bmaw = this%botscrn(jpos)
4827 if (hgwf < bmaw)
then
4830 qnet = qnet + cmaw * (hgwf - hv)
4842 integer(I4B) :: jpos
4843 integer(I4B) :: icflow
4844 integer(I4B) :: ibnd
4852 if (this%nbound .eq. 0)
return
4855 this%ishutoffcnt = this%ishutoffcnt + 1
4859 do n = 1, this%nmawwells
4860 hmaw = this%xnewpak(n)
4861 do j = 1, this%ngwfnodes(n)
4862 jpos = this%get_jpos(n, j)
4863 this%hcof(ibnd) = dzero
4864 this%rhs(ibnd) = dzero
4870 if (this%iboundpak(n) == 0 .or. this%iboundconn(jpos) == 0)
then
4875 call this%maw_calculate_conn_terms(n, j, icflow, cmaw, cterm, &
4878 this%simcond(jpos) = cmaw
4879 this%bound(2, ibnd) = cmaw
4880 this%hcof(ibnd) = -term
4881 this%rhs(ibnd) = -term * hmaw + cterm
4899 integer(I4B) :: nbudterm
4900 integer(I4B) :: n, j, n2
4902 integer(I4B) :: maxlist, naux
4904 character(len=LENBUDTXT) :: text
4905 character(len=LENBUDTXT),
dimension(1) :: auxtxt
4911 if (this%iflowingwells > 0)
then
4912 nbudterm = nbudterm + 1
4914 if (this%imover == 1)
then
4915 nbudterm = nbudterm + 3
4916 if (this%iflowingwells > 0)
then
4917 nbudterm = nbudterm + 1
4920 if (this%naux > 0) nbudterm = nbudterm + 1
4924 call this%budobj%budgetobject_df(this%nmawwells, nbudterm, 0, 0, &
4925 ibudcsv=this%ibudcsv)
4933 maxlist = this%maxbound
4935 auxtxt(1) =
' FLOW-AREA'
4936 call this%budobj%budterm(idx)%initialize(text, &
4941 maxlist, .false., .true., &
4943 call this%budobj%budterm(idx)%reset(this%maxbound)
4945 do n = 1, this%nmawwells
4946 do j = 1, this%ngwfnodes(n)
4947 n2 = this%get_gwfnode(n, j)
4948 call this%budobj%budterm(idx)%update_term(n, n2, q)
4955 maxlist = this%nmawwells
4957 call this%budobj%budterm(idx)%initialize(text, &
4962 maxlist, .false., .false., &
4966 if (this%iflowingwells > 0)
then
4969 maxlist = this%nmawwells
4971 call this%budobj%budterm(idx)%initialize(text, &
4976 maxlist, .false., .false., &
4983 maxlist = this%nmawwells
4985 auxtxt(1) =
' VOLUME'
4986 call this%budobj%budterm(idx)%initialize(text, &
4991 maxlist, .false., .true., &
4997 maxlist = this%nmawwells
4999 call this%budobj%budterm(idx)%initialize(text, &
5004 maxlist, .false., .false., &
5008 if (this%imover == 1)
then
5013 maxlist = this%nmawwells
5015 call this%budobj%budterm(idx)%initialize(text, &
5020 maxlist, .false., .false., &
5024 text =
' RATE-TO-MVR'
5026 maxlist = this%nmawwells
5028 call this%budobj%budterm(idx)%initialize(text, &
5033 maxlist, .false., .false., &
5037 text =
' CONSTANT-TO-MVR'
5039 maxlist = this%nmawwells
5041 call this%budobj%budterm(idx)%initialize(text, &
5046 maxlist, .false., .false., &
5050 if (this%iflowingwells > 0)
then
5053 text =
' FW-RATE-TO-MVR'
5055 maxlist = this%nmawwells
5057 call this%budobj%budterm(idx)%initialize(text, &
5062 maxlist, .false., .false., &
5074 maxlist = this%maxbound
5075 call this%budobj%budterm(idx)%initialize(text, &
5080 maxlist, .false., .false., &
5085 if (this%iprflow /= 0)
then
5086 call this%budobj%flowtable_df(this%iout)
5100 integer(I4B) :: naux
5104 integer(I4B) :: jpos
5106 integer(I4B) :: ibnd
5122 call this%budobj%budterm(idx)%reset(this%maxbound)
5124 do n = 1, this%nmawwells
5125 do j = 1, this%ngwfnodes(n)
5126 jpos = this%get_jpos(n, j)
5127 n2 = this%get_gwfnode(n, j)
5131 if (this%iboundpak(n) == 0 .or. this%iboundconn(jpos) == 0)
then
5132 this%qauxcbc(1) = dzero
5134 tmaw = this%topscrn(jpos)
5135 bmaw = this%botscrn(jpos)
5136 call this%maw_calculate_saturation(n, j, n2, sat)
5137 this%qauxcbc(1) = dtwo * dpi * this%radius(n) * sat * (tmaw - bmaw)
5139 q = this%qleak(ibnd)
5140 call this%budobj%budterm(idx)%update_term(n, n2, q, this%qauxcbc)
5147 call this%budobj%budterm(idx)%reset(this%nmawwells)
5148 do n = 1, this%nmawwells
5152 if (this%imover == 1 .and. q < dzero)
then
5154 if (this%qout(n) < dzero)
then
5155 qfact = q / this%qout(n)
5157 q = q + qfact * this%pakmvrobj%get_qtomvr(n)
5159 call this%budobj%budterm(idx)%update_term(n, n, q)
5163 if (this%iflowingwells > 0)
then
5165 call this%budobj%budterm(idx)%reset(this%nmawwells)
5166 do n = 1, this%nmawwells
5168 if (this%imover == 1)
then
5172 if (this%qout(n) < dzero)
then
5173 qfact = q / this%qout(n)
5175 q = q + qfact * this%pakmvrobj%get_qtomvr(n)
5177 call this%budobj%budterm(idx)%update_term(n, n, q)
5183 call this%budobj%budterm(idx)%reset(this%nmawwells)
5184 do n = 1, this%nmawwells
5185 b = this%xsto(n) - this%bot(n)
5189 v = this%area(n) * b
5190 if (this%imawissopt /= 1)
then
5196 call this%budobj%budterm(idx)%update_term(n, n, q, this%qauxcbc)
5201 call this%budobj%budterm(idx)%reset(this%nmawwells)
5202 do n = 1, this%nmawwells
5206 if (this%imover == 1 .and. q < dzero)
then
5208 if (this%qout(n) < dzero)
then
5209 qfact = q / this%qout(n)
5211 q = q + qfact * this%pakmvrobj%get_qtomvr(n)
5213 call this%budobj%budterm(idx)%update_term(n, n, q)
5217 if (this%imover == 1)
then
5221 call this%budobj%budterm(idx)%reset(this%nmawwells)
5222 do n = 1, this%nmawwells
5223 if (this%iboundpak(n) == 0)
then
5226 q = this%pakmvrobj%get_qfrommvr(n)
5228 call this%budobj%budterm(idx)%update_term(n, n, q)
5233 call this%budobj%budterm(idx)%reset(this%nmawwells)
5234 do n = 1, this%nmawwells
5235 q = this%pakmvrobj%get_qtomvr(n)
5238 q2 = this%ratesim(n)
5241 if (q2 < dzero)
then
5242 qfact = q2 / this%qout(n)
5248 call this%budobj%budterm(idx)%update_term(n, n, q)
5253 call this%budobj%budterm(idx)%reset(this%nmawwells)
5254 do n = 1, this%nmawwells
5255 q = this%pakmvrobj%get_qtomvr(n)
5260 if (q2 < dzero)
then
5261 qfact = q2 / this%qout(n)
5267 call this%budobj%budterm(idx)%update_term(n, n, q)
5271 if (this%iflowingwells > 0)
then
5273 call this%budobj%budterm(idx)%reset(this%nmawwells)
5274 do n = 1, this%nmawwells
5275 q = this%pakmvrobj%get_qtomvr(n)
5278 q2 = this%ratesim(n)
5282 if (this%qout(n) < dzero)
then
5283 qfact = this%qfw(n) / this%qout(n)
5287 call this%budobj%budterm(idx)%update_term(n, n, q)
5297 call this%budobj%budterm(idx)%reset(this%nmawwells)
5298 do n = 1, this%nmawwells
5300 call this%budobj%budterm(idx)%update_term(n, n, q, this%auxvar(:, n))
5305 call this%budobj%accumulate_terms()
5319 integer(I4B) :: nterms
5320 character(len=LINELENGTH) :: title
5321 character(len=LINELENGTH) :: text
5324 if (this%iprhed > 0)
then
5328 if (this%inamedbound == 1) nterms = nterms + 1
5331 title = trim(adjustl(this%text))//
' PACKAGE ('// &
5332 trim(adjustl(this%packName))//
') HEADS FOR EACH CONTROL VOLUME'
5335 call table_cr(this%headtab, this%packName, title)
5336 call this%headtab%table_df(this%nmawwells, nterms, this%iout, &
5340 if (this%inamedbound == 1)
then
5342 call this%headtab%initialize_column(text, 20, alignment=
tableft)
5347 call this%headtab%initialize_column(text, 10, alignment=
tabcenter)
5351 call this%headtab%initialize_column(text, 12, alignment=
tabcenter)
5359 integer(I4B) :: jpos
5362 integer(I4B),
intent(in) :: n
5363 integer(I4B),
intent(in) :: j
5367 jpos = this%iaconn(n) + j - 1
5374 integer(I4B) :: igwfnode
5377 integer(I4B),
intent(in) :: n
5378 integer(I4B),
intent(in) :: j
5380 integer(I4B) :: jpos
5383 jpos = this%get_jpos(n, j)
5384 igwfnode = this%gwfnodes(jpos)
5391 class(
mawtype),
intent(inout) :: this
5393 integer(I4B) :: i, j
5398 call mem_reallocate(this%denseterms, 3, this%MAXBOUND,
'DENSETERMS', &
5400 do i = 1, this%maxbound
5402 this%denseterms(j, i) = dzero
5405 write (this%iout,
'(/1x,a)')
'DENSITY TERMS HAVE BEEN ACTIVATED FOR MAW &
5406 &PACKAGE: '//trim(adjustl(this%packName))
5417 class(
mawtype),
intent(inout) :: this
5424 call mem_reallocate(this%viscratios, 2, this%MAXBOUND,
'VISCRATIOS', &
5426 do i = 1, this%maxbound
5428 this%viscratios(j, i) = done
5431 write (this%iout,
'(/1x,a)')
'VISCOSITY HAS BEEN ACTIVATED FOR MAW &
5432 &PACKAGE: '//trim(adjustl(this%packName))
5458 bmaw, flow, hcofterm, rhsterm)
5460 class(
mawtype),
intent(inout) :: this
5461 integer(I4B),
intent(in) :: iconn
5462 real(DP),
intent(in) :: hmaw
5463 real(DP),
intent(in) :: hgwf
5464 real(DP),
intent(in) :: cond
5465 real(DP),
intent(in) :: bmaw
5466 real(DP),
intent(inout) :: flow
5467 real(DP),
intent(inout) :: hcofterm
5468 real(DP),
intent(inout) :: rhsterm
5472 real(DP) :: rdensemaw
5473 real(DP) :: rdensegwf
5474 real(DP) :: rdenseavg
5479 rdensemaw = this%denseterms(1, iconn)
5480 rdensegwf = this%denseterms(2, iconn)
5481 if (rdensegwf == dzero)
return
5484 if (hmaw > bmaw .and. hgwf > bmaw)
then
5487 rdenseavg = dhalf * (rdensemaw + rdensegwf)
5490 t = cond * (rdenseavg - done) * (hgwf - hmaw)
5491 rhsterm = rhsterm + t
5495 havg = dhalf * (hgwf + hmaw)
5496 elevavg = this%denseterms(3, iconn)
5497 t = cond * (havg - elevavg) * (rdensegwf - rdensemaw)
5498 rhsterm = rhsterm + t
5500 else if (hmaw > bmaw)
then
5503 t = (rdensemaw - done) * rhsterm
5504 rhsterm = rhsterm + t
5506 else if (hgwf > bmaw)
then
5509 t = (rdensegwf - done) * rhsterm
5510 rhsterm = rhsterm + t
This module contains the extended boundary package.
subroutine source_dimensions(this)
Source package dimensions from input context.
subroutine source_options(this)
Source package options from input context.
This module contains the base boundary package.
logical(lgp) function bnd_obs_supported(this)
Determine if observations are supported.
subroutine bnd_ar(this)
Allocate and read method for boundary package.
subroutine bnd_rp(this)
Allocate and read method for package.
subroutine bnd_ot_dv(this, idvsave, idvprint)
Output advanced package dependent-variable terms.
subroutine bnd_nur(this, neqpak, x, xtemp, dx, inewtonur, dxmax, locmax)
Apply Newton-Raphson under-relaxation for package.
subroutine bnd_ot_package_flows(this, icbcfl, ibudfl)
Output advanced package flow terms.
subroutine bnd_ot_model_flows(this, icbcfl, ibudfl, icbcun, imap)
Output package flow terms.
subroutine bnd_cc(this, innertot, kiter, iend, icnvgmod, cpak, ipak, dpak)
Convergence check for package.
subroutine bnd_bd_obs(this)
Save observations for the package.
subroutine bnd_da(this)
Deallocate package memory.
subroutine bnd_mc(this, moffset, matrix_sln)
Map boundary package connection to matrix.
subroutine bnd_fc(this, rhs, ia, idxglo, matrix_sln)
Copy hcof and rhs terms into solution.
subroutine bnd_ac(this, moffset, sparse)
Add boundary package connection to matrix.
subroutine bnd_ot_bdsummary(this, kstp, kper, iout, ibudfl)
Output advanced package budget summary.
subroutine bnd_df_obs(this)
Define the observation types available in the package.
subroutine set_pointers(this, neq, ibound, xnew, xold, flowja)
Set pointers to model variables.
subroutine bnd_rp_obs(this)
Read and prepare observations for a package.
subroutine bnd_cf(this)
Formulate the package hcof and rhs terms.
subroutine bnd_fn(this, rhs, ia, idxglo, matrix_sln)
Add Newton-Raphson terms for package into solution.
subroutine bnd_ad(this)
Advance the boundary package.
subroutine bnd_cq(this, x, flowja, iadv)
Calculate advanced package flows.
This module contains the BudgetModule.
subroutine, public budgetobject_cr(this, name)
Create a new budget object.
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
real(dp), parameter dhdry
real dry cell constant
@ tabcenter
centered table column
@ tabright
right justified table column
@ tableft
left justified table column
@ mnormal
normal output mode
@ tabucstring
upper case string table data
@ tabstring
string table data
@ tabinteger
integer table data
integer(i4b), parameter lenpackagename
maximum length of the package name
real(dp), parameter dp9
real constant 9/10
real(dp), parameter deight
real constant 8
integer(i4b), parameter namedboundflag
named bound flag
real(dp), parameter dnodata
real no data constant
real(dp), parameter dhnoflo
real no flow constant
real(dp), parameter dhundred
real constant 100
integer(i4b), parameter lenpakloc
maximum length of a package location
@ disu
DISV6 discretization.
@ dis
DIS6 discretization.
@ disv
DISU6 discretization.
real(dp), parameter dtwopi
real constant
real(dp), parameter dep20
real constant 1e20
integer(i4b), parameter lenvarname
maximum length of a variable name
real(dp), parameter dhalf
real constant 1/2
integer(i4b), parameter lenftype
maximum length of a package type (DIS, WEL, OC, etc.)
integer(i4b), parameter lenauxname
maximum length of a aux variable
real(dp), parameter dpi
real constant
integer(i4b), parameter lenboundname
maximum length of a bound name
real(dp), parameter dpio180
real constant
real(dp), parameter dem4
real constant 1e-4
real(dp), parameter dem6
real constant 1e-6
real(dp), parameter dzero
real constant zero
integer(i4b), parameter maxcharlen
maximum length of char string
real(dp), parameter dp7
real constant 7/10
real(dp), parameter dem9
real constant 1e-9
real(dp), parameter dem2
real constant 1e-2
real(dp), parameter dtwo
real constant 2
integer(i4b), parameter lenbudtxt
maximum length of a budget component names
real(dp), parameter dquarter
real constant 1/3
real(dp), parameter done
real constant 1
integer(i4b) function, public get_node(ilay, irow, icol, nlay, nrow, ncol)
Get node number, given layer, row, and column indices for a structured grid. If any argument is inval...
real(dp) function, public area(xv, yv, cw)
Calculate polygon area, with vertices given in CW or CCW order.
pure real(dp) function, public polygon_extent(xv, yv)
Calculate the maximum distance between two polygon vertices.
This module defines variable data types.
pure logical function, public is_close(a, b, rtol, atol, symmetric)
Check if a real value is approximately equal to another.
subroutine maw_fill_budobj(this)
Copy flow terms into thisbudobj.
subroutine maw_source_dimensions(this)
Source DIMENSIONS block from input context.
subroutine maw_rp(this)
Read and Prepare.
subroutine maw_set_period_value(this, n, imaw, setting)
Apply a PERIOD setting value to well imaw.
subroutine maw_cc(this, innertot, kiter, iend, icnvgmod, cpak, ipak, dpak)
Extra convergence check for the MAW package.
integer(i4b) function get_gwfnode(this, n, j)
Get the gwfnode for connection.
subroutine maw_cf(this)
Formulate the HCOF and RHS terms.
subroutine maw_ot_bdsummary(this, kstp, kper, iout, ibudfl)
Write MAW budget to listing file.
subroutine maw_activate_viscosity(this)
Activate viscosity terms.
subroutine maw_read_initial_attr(this)
Read the initial parameters for this package.
subroutine maw_bd_obs(this)
Calculate observations this time step and call ObsTypeSaveOneSimval for each MawType observation.
subroutine maw_ar(this)
Allocate and Read.
subroutine maw_set_attribute_error(this, imaw, keyword, msg)
Issue a parameter error for mawweslls(imaw).
subroutine maw_ad(this)
Add package connection to matrix.
subroutine maw_calculate_conn_terms(this, n, j, icflow, cmaw, cterm, term, flow, term2)
Calculate matrix terms for a multi-aquifer well connection. Terms for fc and fn methods are calculate...
pure real(dp) function, public maw_screen_length(dz, radius, omega)
In-cell screen length of a non-vertical well connection.
subroutine maw_calculate_density_exchange(this, iconn, hmaw, hgwf, cond, bmaw, flow, hcofterm, rhsterm)
Calculate the groundwater-maw density exchange terms.
subroutine maw_calculate_wellq(this, n, hmaw, q)
Calculate well pumping rate based on constraints.
subroutine maw_source_connectiondata(this)
Source CONNECTIONDATA block from input context.
subroutine maw_rp_obs(this)
Process each observation.
character(len=lenpackagename) text
subroutine maw_allocate_scalars(this)
Allocate scalar members.
subroutine maw_source_angledata(this)
Source ANGLEDATA block from input context for non-vertical MAW connections.
subroutine maw_calculate_saturation(this, n, j, node, sat, hwell_in)
Calculate the saturation between the aquifer maw well_head.
subroutine maw_calculate_qpot(this, n, qnet)
Calculate groundwater inflow to a maw well.
subroutine maw_ot_model_flows(this, icbcfl, ibudfl, icbcun, imap)
Write flows to binary file and/or print flows to budget.
subroutine maw_set_pointers(this, neq, ibound, xnew, xold, flowja)
Set pointers to model arrays and variables so that a package has has access to these things.
subroutine maw_activate_density(this)
Activate density terms.
integer(i4b) function get_jpos(this, n, j)
Get position of value in connection data.
subroutine maw_fn(this, rhs, ia, idxglo, matrix_sln)
Fill newton terms.
subroutine maw_ot_package_flows(this, icbcfl, ibudfl)
Output MAW package flow terms.
subroutine maw_allocate_well_conn_arrays(this)
Allocate well arrays.
subroutine maw_source_options(this)
Source OPTIONS block from input context.
logical function maw_obs_supported(this)
Return true because MAW package supports observations.
pure real(dp) function, public maw_damp_weight(dxprop, dxold, weight, damptheta, damptol, weightmin, recover)
Update the oscillation-damping weight for a single MAW well head.
subroutine maw_allocate_arrays(this)
Allocate arrays.
subroutine maw_input_destroy(this)
Nullify all MawInputType pointers.
subroutine, public maw_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, mempath)
Create a New Multi-Aquifer Well (MAW) Package.
subroutine maw_cfupdate(this)
Update MAW satcond and package rhs and hcof.
subroutine maw_redflow_csv_write(this)
MAW reduced flows only when & where they occur.
subroutine maw_redflow_csv_init(this, fname)
Initialize the auto flow reduce csv output file.
subroutine maw_input_init(this, mempath, naux)
Bind MawInputType pointers to input context arrays.
real(dp) function maw_calc_lcorr(this, i, jpos)
Calculate the length correction factor for a multi-aquifer well connection.
subroutine maw_source_packagedata(this)
Source PACKAGEDATA block from input context.
subroutine maw_mc(this, moffset, matrix_sln)
Map package connection to matrix.
subroutine maw_nur(this, neqpak, x, xtemp, dx, inewtonur, dxmax, locmax)
Apply Newton under-relaxation to the MAW Package well heads.
subroutine maw_check_attributes(this)
Issue parameter errors for mawwells(imaw).
subroutine maw_ac(this, moffset, sparse)
Add package connection to matrix.
subroutine maw_ot_dv(this, idvsave, idvprint)
Save maw-calculated values to binary file.
subroutine maw_fc(this, rhs, ia, idxglo, matrix_sln)
Copy rhs and hcof into solution rhs and amat.
real(dp) function maw_cell_extent(this, node, estimated)
Maximum horizontal extent of a cell.
character(len=lenftype) ftype
subroutine maw_checkin_deprecated_names(this)
Alias deprecated MAW variable names to their current storage.
subroutine define_listlabel(this)
Define the list heading that is written to iout when PRINT_INPUT option is used.
subroutine maw_setup_budobj(this)
Set up the budget object that stores all the maw flows The terms listed here must correspond in numbe...
subroutine maw_cq(this, x, flowja, iadv)
Calculate flows.
subroutine maw_df_obs(this)
Store observation type supported by MAW package.
subroutine maw_calculate_satcond(this, i, j, node)
Calculate the appropriate saturated conductance to use based on aquifer and multi-aquifer well charac...
subroutine maw_da(this)
Deallocate memory.
subroutine maw_process_obsid(obsrv, dis, inunitobs, iout)
This procedure is pointed to by ObsDataTypeProcesssIdPtr. It processes the ID string of an observatio...
subroutine maw_setup_tableobj(this)
Set up the table object that is used to write the maw head data.
Previous variable names checked in as deprecated aliases.
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
subroutine, public memorystore_release(varname, memory_path)
Release a single variable from the memory store.
subroutine, public get_isize(name, mem_path, isize)
Get the number of elements for this variable.
This module contains the derived types ObserveType and ObsDataType.
This module contains the derived type ObsType.
This module contains simulation methods.
subroutine, public store_warning(msg, substring)
Store warning message.
subroutine, public store_error(msg, terminate)
Store an error message.
integer(i4b) function, public count_errors()
Return number of errors.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
character(len=maxcharlen) warnmsg
warning message string
integer(i4b) iout
file unit number for simulation output
real(dp) function squadraticsaturation(top, bot, x, eps)
sQuadraticSaturation
real(dp) function squadraticsaturationderivative(top, bot, x, eps)
Derivative of the quadratic saturation function.
real(dp) function sqsaturationderivative(top, bot, x, c1, c2)
sQSaturationDerivative
real(dp) function squadratic0spderivative(x, xi, tomega)
sQuadratic0spDerivative
real(dp) function sqsaturation(top, bot, x, c1, c2)
sQSaturation
real(dp) function squadratic0sp(x, xi, tomega)
sQuadratic0sp
This module contains the SourceCommonModule.
logical(lgp) function, public filein_fname(filename, tagname, input_mempath, input_fname)
enforce and set a single input filename provided via FILEIN keyword
subroutine finalize(this)
subroutine, public table_cr(this, name, title)
real(dp), pointer, public pertim
time relative to start of stress period
real(dp), pointer, public totim
time relative to start of simulation
integer(i4b), pointer, public kstp
current time step number
integer(i4b), pointer, public kper
current stress period number
real(dp), pointer, public delt
length of the current time step
Derived type for the Budget object.
This class is used to store a single deferred-length character string. It was designed to work in an ...