37 character(len=LENFTYPE) ::
ftype =
'UZF'
38 character(len=LENPACKAGENAME) ::
text =
' UZF CELLS'
46 integer(I4B),
pointer :: iprwcont => null()
47 integer(I4B),
pointer :: iwcontout => null()
48 integer(I4B),
pointer :: ibudgetout => null()
49 integer(I4B),
pointer :: ibudcsv => null()
50 integer(I4B),
pointer :: ipakcsv => null()
53 integer(I4B),
pointer :: bditems => null()
54 integer(I4B),
pointer :: nbdtxt => null()
55 character(len=LENBUDTXT),
dimension(:),
pointer, &
56 contiguous :: bdtxt => null()
57 character(len=LENBOUNDNAME),
dimension(:),
pointer, &
58 contiguous :: uzfname => null()
67 integer(I4B),
pointer :: gwfiss => null()
68 real(dp),
dimension(:),
pointer,
contiguous :: gwfhcond => null()
71 integer(I4B),
pointer :: ntrail_input => null()
72 integer(I4B),
pointer :: nwavesets => null()
73 integer(I4B),
pointer :: nodes => null()
74 integer(I4B),
pointer :: readflag => null()
75 integer(I4B),
pointer :: ietflag => null()
76 integer(I4B),
pointer :: igwetflag => null()
77 integer(I4B),
pointer :: iseepflag => null()
78 integer(I4B),
pointer :: imaxcellcnt => null()
79 integer(I4B),
pointer :: iuzf2uzf => null()
81 integer(I4B),
dimension(:),
pointer,
contiguous :: igwfnode => null()
82 integer(I4B),
dimension(:),
pointer,
contiguous :: ia => null()
83 integer(I4B),
dimension(:),
pointer,
contiguous :: ja => null()
85 real(dp),
dimension(:),
pointer,
contiguous :: appliedinf => null()
86 real(dp),
dimension(:),
pointer,
contiguous :: rejinf => null()
87 real(dp),
dimension(:),
pointer,
contiguous :: rejinf0 => null()
88 real(dp),
dimension(:),
pointer,
contiguous :: rejinftomvr => null()
89 real(dp),
dimension(:),
pointer,
contiguous :: infiltration => null()
90 real(dp),
dimension(:),
pointer,
contiguous :: uzet => null()
91 real(dp),
dimension(:),
pointer,
contiguous :: gwd => null()
92 real(dp),
dimension(:),
pointer,
contiguous :: gwd0 => null()
93 real(dp),
dimension(:),
pointer,
contiguous :: gwdtomvr => null()
94 real(dp),
dimension(:),
pointer,
contiguous :: rch => null()
95 real(dp),
dimension(:),
pointer,
contiguous :: rch0 => null()
96 real(dp),
dimension(:),
pointer,
contiguous :: qsto => null()
97 real(dp),
dimension(:),
pointer,
contiguous :: wcnew => null()
98 real(dp),
dimension(:),
pointer,
contiguous :: wcold => null()
108 real(dp),
dimension(:),
pointer,
contiguous :: finf_input => null()
109 real(dp),
dimension(:),
pointer,
contiguous :: pet_input => null()
110 real(dp),
dimension(:),
pointer,
contiguous :: extdp_input => null()
111 real(dp),
dimension(:),
pointer,
contiguous :: extwc_input => null()
112 real(dp),
dimension(:),
pointer,
contiguous :: ha_input => null()
113 real(dp),
dimension(:),
pointer,
contiguous :: hroot_input => null()
114 real(dp),
dimension(:),
pointer,
contiguous :: rootact_input => null()
117 real(dp),
dimension(:, :),
pointer,
contiguous :: uauxvar => null()
120 integer(I4B),
pointer :: iconvchk => null()
123 real(dp),
dimension(:),
pointer,
contiguous :: deriv => null()
126 real(dp),
pointer :: totfluxtot => null()
127 integer(I4B),
pointer :: issflag => null()
128 integer(I4B),
pointer :: issflagold => null()
129 integer(I4B),
pointer :: istocb => null()
132 integer(I4B),
pointer :: cbcauxitems => null()
133 character(len=16),
dimension(:),
pointer,
contiguous :: cauxcbc => null()
134 real(dp),
dimension(:),
pointer,
contiguous :: qauxcbc => null()
167 procedure,
private :: uzf_source_packagedata
168 procedure,
private :: print_cell_properties
169 procedure,
private :: check_cell_area
172 procedure,
private :: uzf_setup_budobj
173 procedure,
private :: uzf_fill_budobj
179 module subroutine uzf_source_packagedata(this)
180 class(uzftype),
intent(inout) :: this
181 end subroutine uzf_source_packagedata
183 module subroutine print_cell_properties(this)
184 class(uzftype),
intent(inout) :: this
185 end subroutine print_cell_properties
187 module subroutine check_cell_area(this)
188 class(uzftype) :: this
189 end subroutine check_cell_area
191 module logical
function uzf_obs_supported(this)
192 class(uzftype) :: this
193 end function uzf_obs_supported
195 module subroutine uzf_df_obs(this)
196 class(uzftype) :: this
197 end subroutine uzf_df_obs
199 module subroutine uzf_rp_obs(this)
200 class(uzftype),
intent(inout) :: this
201 end subroutine uzf_rp_obs
203 module subroutine uzf_bd_obs(this)
204 class(uzftype) :: this
205 end subroutine uzf_bd_obs
207 module subroutine uzf_setup_budobj(this)
208 class(uzftype) :: this
209 end subroutine uzf_setup_budobj
211 module subroutine uzf_fill_budobj(this)
212 class(uzftype) :: this
213 end subroutine uzf_fill_budobj
221 subroutine uzf_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
226 class(
bndtype),
pointer :: packobj
227 integer(I4B),
intent(in) :: id
228 integer(I4B),
intent(in) :: ibcnum
229 integer(I4B),
intent(in) :: inunit
230 integer(I4B),
intent(in) ::
iout
231 character(len=*),
intent(in) :: namemodel
232 character(len=*),
intent(in) :: pakname
233 character(len=*),
intent(in) :: mempath
235 type(uzftype),
pointer :: uzfobj
242 call packobj%set_names(ibcnum, namemodel, pakname, ftype, mempath)
246 call uzfobj%uzf_allocate_scalars()
249 call packobj%pack_initialize()
251 packobj%inunit = inunit
254 packobj%ibcnum = ibcnum
259 end subroutine uzf_create
263 subroutine uzf_ar(this)
267 class(uzftype),
intent(inout) :: this
273 call this%obs%obs_ar()
276 call this%BndExtType%allocate_arrays()
284 if (this%inamedbound /= 0)
then
286 this%boundname(n) = this%uzfname(n)
291 call this%copy_boundname()
295 this%nodelist(n) = this%igwfnode(n)
296 node = this%igwfnode(n)
297 hgwf = this%xnew(node)
298 call this%uzfobj%sethead(n, hgwf)
302 if (this%imover /= 0)
then
303 allocate (this%pakmvrobj)
304 call this%pakmvrobj%ar(this%maxbound, this%maxbound, this%memoryPath)
306 end subroutine uzf_ar
310 subroutine uzf_allocate_arrays(this)
312 class(uzftype),
intent(inout) :: this
322 call mem_allocate(this%igwfnode, this%nodes,
'IGWFNODE', this%memoryPath)
323 call mem_allocate(this%appliedinf, this%nodes,
'APPLIEDINF', this%memoryPath)
324 call mem_allocate(this%rejinf, this%nodes,
'REJINF', this%memoryPath)
325 call mem_allocate(this%rejinf0, this%nodes,
'REJINF0', this%memoryPath)
326 call mem_allocate(this%rejinftomvr, this%nodes,
'REJINFTOMVR', &
328 call mem_allocate(this%infiltration, this%nodes,
'INFILTRATION', &
330 call mem_allocate(this%uzet, this%nodes,
'UZET', this%memoryPath)
331 call mem_allocate(this%gwd, this%nodes,
'GWD', this%memoryPath)
332 call mem_allocate(this%gwd0, this%nodes,
'GWD0', this%memoryPath)
333 call mem_allocate(this%gwdtomvr, this%nodes,
'GWDTOMVR', this%memoryPath)
334 call mem_allocate(this%rch, this%nodes,
'RCH', this%memoryPath)
335 call mem_allocate(this%rch0, this%nodes,
'RCH0', this%memoryPath)
336 call mem_allocate(this%qsto, this%nodes,
'QSTO', this%memoryPath)
337 call mem_allocate(this%deriv, this%nodes,
'DERIV', this%memoryPath)
340 call mem_allocate(this%ia, this%dis%nodes + 1,
'IA', this%memoryPath)
341 call mem_allocate(this%ja, this%nodes,
'JA', this%memoryPath)
344 call mem_setptr(this%finf_input,
'FINF', this%input_mempath)
345 call mem_setptr(this%pet_input,
'PET', this%input_mempath)
346 call mem_setptr(this%extdp_input,
'EXTDP', this%input_mempath)
347 call mem_setptr(this%extwc_input,
'EXTWC', this%input_mempath)
348 call mem_setptr(this%ha_input,
'HA', this%input_mempath)
349 call mem_setptr(this%hroot_input,
'HROOT', this%input_mempath)
350 call mem_setptr(this%rootact_input,
'ROOTACT', this%input_mempath)
351 call mem_setptr(this%uauxvar,
'AUXVAR', this%input_mempath)
355 this%appliedinf(n) =
dzero
356 this%rejinf(n) =
dzero
357 this%rejinf0(n) =
dzero
358 this%rejinftomvr(n) =
dzero
362 this%gwdtomvr(n) =
dzero
366 this%deriv(n) =
dzero
372 if (this%iauxmultcol > 0 .and. j == this%iauxmultcol)
then
373 this%uauxvar(j, n) =
done
375 this%uauxvar(j, n) =
dzero
379 do node = 1, this%dis%nodes + 1
384 allocate (this%bdtxt(this%nbdtxt))
385 this%bdtxt(1) =
' UZF-INF'
386 this%bdtxt(2) =
' UZF-GWRCH'
387 this%bdtxt(3) =
' UZF-GWD'
388 this%bdtxt(4) =
' UZF-GWET'
389 this%bdtxt(5) =
' UZF-GWD TO-MVR'
392 call mem_allocate(this%wcnew, this%nodes,
'WCNEW', this%memoryPath)
393 call mem_allocate(this%wcold, this%nodes,
'WCOLD', this%memoryPath)
395 this%wcnew(n) =
dzero
396 this%wcold(n) =
dzero
400 allocate (this%cauxcbc(this%cbcauxitems))
401 allocate (this%uzfname(this%nodes))
404 call mem_allocate(this%qauxcbc, this%cbcauxitems,
'QAUXCBC', this%memoryPath)
405 do n = 1, this%cbcauxitems
406 this%qauxcbc(n) =
dzero
408 end subroutine uzf_allocate_arrays
416 subroutine uzf_checkin_deprecated_names(this)
420 class(uzftype),
intent(inout) :: this
426 'FINF', this%input_mempath,
'6.8.2')
428 'PET', this%input_mempath,
'6.8.2')
430 'EXTDP', this%input_mempath,
'6.8.2')
432 this%memoryPath,
'EXTWC', this%input_mempath, &
435 'HA', this%input_mempath,
'6.8.2')
437 this%memoryPath,
'HROOT', this%input_mempath, &
440 this%memoryPath,
'ROOTACT', this%input_mempath, &
443 'AUXVAR', this%input_mempath,
'6.8.2')
447 this%memoryPath,
'NTRAIL_INPUT', &
448 this%memoryPath,
'6.9.0')
450 'NWAVESETS', this%memoryPath,
'6.9.0')
451 end subroutine uzf_checkin_deprecated_names
457 subroutine uzf_source_options(this)
462 class(uzftype),
intent(inout) :: this
465 integer(I4B),
pointer :: ikw => null()
466 character(len=LINELENGTH) :: fname
468 character(len=*),
parameter :: fmtet = &
469 "(4x, 'ET WILL BE SIMULATED WITHIN UZ AND GW ZONES, WITH LINEAR ', &
470 &'GWET IF OPTION NOT SPECIFIED OTHERWISE.')"
471 character(len=*),
parameter :: fmtgwetlin = &
472 &
"(4x, 'GROUNDWATER ET FUNCTION WILL BE LINEAR.')"
473 character(len=*),
parameter :: fmtgwetsquare = &
474 &
"(4x, 'GROUNDWATER ET FUNCTION WILL BE SQUARE WITH SMOOTHING.')"
475 character(len=*),
parameter :: fmtgwseepout = &
476 &
"(4x, 'GROUNDWATER DISCHARGE TO LAND SURFACE WILL BE SIMULATED.')"
477 character(len=*),
parameter :: fmtuzetwc = &
478 &
"(4x, 'UNSATURATED ET FUNCTION OF WATER CONTENT.')"
479 character(len=*),
parameter :: fmtuzetae = &
480 &
"(4x, 'UNSATURATED ET FUNCTION OF AIR ENTRY PRESSURE.')"
481 character(len=*),
parameter :: fmtuzfbin = &
482 "(4x, 'UZF ', 1x, a, 1x, ' WILL BE SAVED TO FILE: ', &
483 &a, /4x, 'OPENED ON UNIT: ', I0)"
487 call this%BndExtType%source_options()
489 write (this%iout,
'(1x,a)') &
490 'PROCESSING '//trim(adjustl(this%text))//
' OPTIONS'
493 call mem_set_value(fname,
'WCFILE', this%input_mempath, found%wcfile)
494 if (found%wcfile)
then
496 call openfile(this%iwcontout, this%iout, fname,
'DATA(BINARY)', &
498 write (this%iout, fmtuzfbin)
'WATER-CONTENT', trim(adjustl(fname)), &
503 call mem_set_value(fname,
'BUDGETFILE', this%input_mempath, found%budgetfile)
504 if (found%budgetfile)
then
505 call assign_iounit(this%ibudgetout, this%inunit,
"BUDGET fileout")
506 call openfile(this%ibudgetout, this%iout, fname,
'DATA(BINARY)', &
508 write (this%iout, fmtuzfbin)
'BUDGET', trim(adjustl(fname)), &
513 call mem_set_value(fname,
'BUDGETCSVFILE', this%input_mempath, &
515 if (found%budgetcsvfile)
then
516 call assign_iounit(this%ibudcsv, this%inunit,
"BUDGETCSV fileout")
517 call openfile(this%ibudcsv, this%iout, fname,
'CSV', filstat_opt=
'REPLACE')
518 write (this%iout, fmtuzfbin)
'BUDGET CSV', trim(adjustl(fname)), &
524 this%input_mempath, found%pkgconvfname)
525 if (found%pkgconvfname)
then
527 call openfile(this%ipakcsv, this%iout, fname,
'CSV', &
528 filstat_opt=
'REPLACE', mode_opt=
mnormal)
529 write (this%iout, fmtuzfbin)
'PACKAGE_CONVERGENCE', &
530 trim(adjustl(fname)), this%ipakcsv
535 call mem_set_value(ikw,
'SIMULATE_ET', this%input_mempath, found%simulate_et)
536 if (found%simulate_et)
then
539 write (this%iout, fmtet)
543 call mem_set_value(ikw,
'LINEAR_GWET', this%input_mempath, found%linear_gwet)
544 if (found%linear_gwet)
then
546 write (this%iout, fmtgwetlin)
550 call mem_set_value(ikw,
'SQUARE_GWET', this%input_mempath, found%square_gwet)
551 if (found%square_gwet)
then
553 write (this%iout, fmtgwetsquare)
557 call mem_set_value(ikw,
'SIMULATE_GWSEEP', this%input_mempath, &
558 found%simulate_gwseep)
559 if (found%simulate_gwseep)
then
561 write (this%iout, fmtgwseepout)
563 'USE DRN PACKAGE TO SIMULATE GROUNDWATER DISCHARGE TO LAND SURFACE '// &
570 call mem_set_value(ikw,
'UNSAT_ETWC', this%input_mempath, found%unsat_etwc)
571 if (found%unsat_etwc)
then
573 write (this%iout, fmtuzetwc)
577 call mem_set_value(ikw,
'UNSAT_ETAE', this%input_mempath, found%unsat_etae)
578 if (found%unsat_etae)
then
580 write (this%iout, fmtuzetae)
584 call mem_set_value(ikw,
'MOVER', this%input_mempath, found%mover)
585 if (found%mover)
then
590 call mem_set_value(ikw,
'ICONVCHK', this%input_mempath, found%iconvchk)
591 if (found%iconvchk)
then
593 write (this%iout,
'(4x,a)') &
594 'A FINAL CONVERGENCE CHECK OF THE CHANGE IN UZF RECHARGE '// &
600 write (this%iout,
'(1x,a)') &
601 'END OF '//trim(adjustl(this%text))//
' OPTIONS'
602 end subroutine uzf_source_options
608 subroutine uzf_source_dimensions(this)
612 class(uzftype),
intent(inout) :: this
618 this%ntrail_input = 0
621 write (this%iout,
'(/1x,a)') &
622 'PROCESSING '//trim(adjustl(this%text))//
' DIMENSIONS'
625 call mem_set_value(this%nodes,
'MAXBOUND', this%input_mempath, &
627 if (found%maxbound)
then
628 write (this%iout,
'(4x,a,i0)')
'NUZFCELLS = ', this%nodes
632 call mem_set_value(this%ntrail_input,
'NTRAILWAVES', this%input_mempath, &
634 if (found%ntrailwaves)
then
635 write (this%iout,
'(4x,a,i0)')
'NTRAILWAVES = ', this%ntrail_input
639 call mem_set_value(this%nwavesets,
'NWAVESETS', this%input_mempath, &
641 if (found%nwavesets)
then
642 write (this%iout,
'(4x,a,i0)')
'NTRAILSETS = ', this%nwavesets
645 write (this%iout,
'(1x,a)') &
646 'END OF '//trim(adjustl(this%text))//
' DIMENSIONS'
649 this%maxbound = this%maxbound + this%nodes
650 this%nbound = this%maxbound
653 if (this%nodes <= 0)
then
655 'NUZFCELLS (MAXBOUND) was not specified or was specified incorrectly.'
658 if (this%ntrail_input <= 1)
then
660 'NTRAILWAVES must be greater than 1. A value of 7 is recommended.'
663 if (this%nwavesets <= 0)
then
665 'NWAVESETS was not specified or was specified incorrectly.'
676 call this%define_listlabel()
679 call this%uzf_allocate_arrays()
682 call this%uzf_checkin_deprecated_names()
685 allocate (this%uzfobj)
686 call this%uzfobj%init(this%nodes, this%ntrail_input * this%nwavesets, &
690 call this%uzf_source_packagedata()
693 if (this%iprpak /= 0)
then
694 call this%print_cell_properties()
698 call this%uzf_setup_budobj()
699 end subroutine uzf_source_dimensions
703 subroutine uzf_rp(this)
708 class(uzftype),
intent(inout) :: this
710 integer(I4B),
pointer :: nlist => null()
711 integer(I4B),
dimension(:),
pointer,
contiguous :: ifno => null()
715 character(len=20) :: cellid
716 character(len=LINELENGTH) :: title
717 character(len=LINELENGTH) :: tag
718 integer(I4B) :: ntabrows
719 integer(I4B) :: ntabcols
722 character(len=*),
parameter :: fmtlsp = &
723 &
"(1X,/1X,'REUSING ',A,'S FROM LAST STRESS PERIOD')"
726 this%nbound = this%maxbound
729 this%issflag = this%gwfiss
732 if (this%iper ==
kper)
then
735 call mem_setptr(nlist,
'NBOUND', this%input_mempath)
736 call mem_setptr(ifno,
'IFNO', this%input_mempath)
739 if (this%iprpak /= 0)
then
742 if (this%ietflag /= 0)
then
743 ntabcols = ntabcols + 3
744 if (this%ietflag == 2)
then
745 ntabcols = ntabcols + 3
748 if (this%inamedbound == 1)
then
749 ntabcols = ntabcols + 1
751 title = trim(adjustl(this%text))//
' PACKAGE ('// &
752 trim(adjustl(this%packName))//
') DATA FOR PERIOD'
753 write (title,
'(a,1x,i6)') trim(adjustl(title)),
kper
754 call table_cr(this%inputtab, this%packName, title)
755 call this%inputtab%table_df(ntabrows, ntabcols, this%iout, &
758 call this%inputtab%initialize_column(tag, 10)
760 call this%inputtab%initialize_column(tag, 20, alignment=
tableft)
762 call this%inputtab%initialize_column(tag, 12)
763 if (this%ietflag /= 0)
then
765 call this%inputtab%initialize_column(tag, 12)
767 call this%inputtab%initialize_column(tag, 12)
769 call this%inputtab%initialize_column(tag, 12)
770 if (this%ietflag == 2)
then
772 call this%inputtab%initialize_column(tag, 12)
774 call this%inputtab%initialize_column(tag, 12)
776 call this%inputtab%initialize_column(tag, 12)
779 if (this%inamedbound == 1)
then
781 call this%inputtab%initialize_column(tag,
lenboundname, &
789 if (n < 1 .or. n > this%nodes)
then
790 tag = trim(adjustl(this%text))//
' PACKAGE ('// &
791 trim(adjustl(this%packName))//
') DATA FOR PERIOD'
792 write (tag,
'(a,1x,i0)') trim(adjustl(tag)),
kper
793 write (
errmsg,
'(a,a,i0,1x,a,i0,a)') &
794 trim(adjustl(tag)),
': UZFNO ', n, &
795 'must be greater than 0 and less than or equal to ', this%nodes,
'.'
805 if (this%iprpak /= 0)
then
806 node = this%igwfnode(n)
808 call this%dis%noder_to_string(node, cellid)
812 call this%inputtab%add_term(n)
813 call this%inputtab%add_term(cellid)
814 call this%inputtab%add_term(this%finf_input(n))
815 if (this%ietflag /= 0)
then
816 call this%inputtab%add_term(this%pet_input(n))
817 call this%inputtab%add_term(this%extdp_input(n))
818 call this%inputtab%add_term(this%extwc_input(n))
819 if (this%ietflag == 2)
then
820 call this%inputtab%add_term(this%ha_input(n))
821 call this%inputtab%add_term(this%hroot_input(n))
822 call this%inputtab%add_term(this%rootact_input(n))
825 if (this%inamedbound == 1)
then
826 call this%inputtab%add_term(this%boundname(n))
831 if (this%iprpak /= 0)
then
832 call this%inputtab%finalize_table()
840 write (this%iout, fmtlsp) trim(this%filtyp)
847 if ((this%issflag == 0 .AND.
kper == 1) .or. &
848 (
kper == 2 .AND. this%issflagold == 1))
then
850 call this%uzfobj%setwaves(n)
857 this%wcnew(n) = this%uzfobj%get_wcnew(n)
862 this%issflagold = this%issflag
863 end subroutine uzf_rp
867 subroutine uzf_ad(this)
871 class(uzftype) :: this
874 integer(I4B) :: ivertflag
876 real(DP) :: rval1, rval2, rval3
879 call this%BndExtType%bnd_ad()
888 if (this%naux > 0)
then
889 do n = 1, this%maxbound
890 do iaux = 1, this%naux
891 if (this%noupdateauxvar(iaux) /= 0) cycle
892 this%auxvar(iaux, n) = this%uauxvar(iaux, n)
902 this%wcold(n) = this%wcnew(n)
911 this%wcnew(n) = this%wcold(n)
917 call this%uzfobj%advance(n)
924 ivertflag = this%uzfobj%cell_below(n)
927 if (this%iauxmultcol > 0)
then
928 rval1 = this%uauxvar(this%iauxmultcol, n)
929 call this%uzfobj%setdatauzfarea(n, rval1)
933 rval1 = this%finf_input(n)
934 call this%uzfobj%setdatafinf(n, rval1)
937 rval1 = this%pet_input(n)
938 rval2 = this%extdp_input(n)
939 call this%uzfobj%setdataet(n, ivertflag, rval1, rval2)
942 rval1 = this%extwc_input(n)
943 call this%uzfobj%setdataetwc(n, ivertflag, rval1)
946 rval1 = this%ha_input(n)
947 rval2 = this%hroot_input(n)
948 rval3 = this%rootact_input(n)
949 call this%uzfobj%setdataetha(n, ivertflag, rval1, rval2, rval3)
953 if (this%iauxmultcol > 0)
then
954 call this%check_cell_area()
958 if (this%imover == 1)
then
959 call this%pakmvrobj%ad()
961 end subroutine uzf_ad
968 subroutine uzf_cf(this)
971 class(uzftype) :: this
976 if (this%nodes == 0)
return
980 do n = 1, this%maxbound
981 this%rejinf0(n) = this%rejinf(n)
982 this%rch0(n) = this%rch(n)
983 this%gwd0(n) = this%gwd(n)
985 end subroutine uzf_cf
989 subroutine uzf_fc(this, rhs, ia, idxglo, matrix_sln)
991 class(uzftype) :: this
992 real(DP),
dimension(:),
intent(inout) :: rhs
993 integer(I4B),
dimension(:),
intent(in) :: ia
994 integer(I4B),
dimension(:),
intent(in) :: idxglo
997 integer(I4B) :: n, node, ipos
1000 if (this%imover == 1)
then
1001 call this%pakmvrobj%fc()
1006 call this%uzf_solve(reset_state=.true.)
1009 do n = 1, this%nodes
1010 node = this%nodelist(n)
1011 rhs(node) = rhs(node) + this%rhs(n)
1013 call matrix_sln%add_value_pos(idxglo(ipos), this%hcof(n))
1015 end subroutine uzf_fc
1019 subroutine uzf_fn(this, rhs, ia, idxglo, matrix_sln)
1021 class(uzftype) :: this
1022 real(DP),
dimension(:),
intent(inout) :: rhs
1023 integer(I4B),
dimension(:),
intent(in) :: ia
1024 integer(I4B),
dimension(:),
intent(in) :: idxglo
1027 integer(I4B) :: n, node
1028 integer(I4B) :: ipos
1031 do n = 1, this%nodes
1032 node = this%nodelist(n)
1034 call matrix_sln%add_value_pos(idxglo(ipos), this%deriv(n))
1035 rhs(node) = rhs(node) + this%deriv(n) * this%xnew(node)
1037 end subroutine uzf_fn
1041 subroutine uzf_cc(this, innertot, kiter, iend, icnvgmod, cpak, ipak, dpak)
1045 class(uzftype),
intent(inout) :: this
1046 integer(I4B),
intent(in) :: innertot
1047 integer(I4B),
intent(in) :: kiter
1048 integer(I4B),
intent(in) :: icnvgmod
1049 integer(I4B),
intent(in) :: iend
1050 character(len=LENPAKLOC),
intent(inout) :: cpak
1051 integer(I4B),
intent(inout) :: ipak
1052 real(DP),
intent(inout) :: dpak
1054 character(len=LENPAKLOC) :: cloc
1055 character(len=LINELENGTH) :: tag
1056 integer(I4B) :: icheck
1057 integer(I4B) :: ipakfail
1058 integer(I4B) :: locdrejinfmax
1059 integer(I4B) :: locdrchmax
1060 integer(I4B) :: locdseepmax
1061 integer(I4B) :: locdqfrommvrmax
1062 integer(I4B) :: ntabrows
1063 integer(I4B) :: ntabcols
1067 real(DP) :: qtolfact
1069 real(DP) :: drejinfmax
1073 real(DP) :: dseepmax
1074 real(DP) :: dqfrommvr
1075 real(DP) :: dqfrommvrmax
1078 icheck = this%iconvchk
1087 dqfrommvrmax =
dzero
1091 if (this%ipakcsv == 0)
then
1092 if (icnvgmod == 0)
then
1098 if (.not.
associated(this%pakcsvtab))
then
1103 if (this%iseepflag == 1)
then
1104 ntabcols = ntabcols + 2
1106 if (this%imover == 1)
then
1107 ntabcols = ntabcols + 2
1111 call table_cr(this%pakcsvtab, this%packName,
'')
1112 call this%pakcsvtab%table_df(ntabrows, ntabcols, this%ipakcsv, &
1113 lineseparator=.false., separator=
',', &
1117 tag =
'total_inner_iterations'
1118 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
1120 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
1122 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
1124 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
1126 call this%pakcsvtab%initialize_column(tag, 10, alignment=
tableft)
1128 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
1129 tag =
'drejinfmax_loc'
1130 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
1132 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
1134 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
1135 if (this%iseepflag == 1)
then
1137 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
1138 tag =
'dseepmax_loc'
1139 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
1141 if (this%imover == 1)
then
1142 tag =
'dqfrommvrmax'
1143 call this%pakcsvtab%initialize_column(tag, 15, alignment=
tableft)
1144 tag =
'dqfrommvrmax_loc'
1145 call this%pakcsvtab%initialize_column(tag, 16, alignment=
tableft)
1151 if (icheck /= 0)
then
1152 final_check:
do n = 1, this%nodes
1155 qtolfact =
delt / this%uzfobj%uzfarea(n)
1158 drejinf = qtolfact * (this%rejinf0(n) - this%rejinf(n))
1161 drch = qtolfact * (this%rch0(n) - this%rch(n))
1165 if (this%iseepflag == 1)
then
1166 dseep = qtolfact * (this%gwd0(n) - this%gwd(n))
1171 if (this%imover == 1)
then
1172 q = this%pakmvrobj%get_qfrommvr(n)
1173 q0 = this%pakmvrobj%get_qfrommvr0(n)
1174 dqfrommvr = qtolfact * (q0 - q)
1179 drejinfmax = drejinf
1185 dqfrommvrmax = dqfrommvr
1188 if (abs(drejinf) > abs(drejinfmax))
then
1189 drejinfmax = drejinf
1192 if (abs(drch) > abs(drchmax))
then
1196 if (abs(dseep) > abs(dseepmax))
then
1200 if (abs(dqfrommvr) > abs(dqfrommvrmax))
then
1201 dqfrommvrmax = dqfrommvr
1208 if (abs(drejinfmax) > abs(dpak))
then
1209 ipak = locdrejinfmax
1211 write (cloc,
"(a,'-',a)") trim(this%packName),
'rejinf'
1214 if (abs(drchmax) > abs(dpak))
then
1217 write (cloc,
"(a,'-',a)") trim(this%packName),
'rech'
1220 if (this%iseepflag == 1)
then
1221 if (abs(dseepmax) > abs(dpak))
then
1224 write (cloc,
"(a,'-',a)") trim(this%packName),
'seep'
1228 if (this%imover == 1)
then
1229 if (abs(dqfrommvrmax) > abs(dpak))
then
1230 ipak = locdqfrommvrmax
1232 write (cloc,
"(a,'-',a)") trim(this%packName),
'qfrommvr'
1238 if (this%ipakcsv /= 0)
then
1241 call this%pakcsvtab%add_term(innertot)
1242 call this%pakcsvtab%add_term(
totim)
1243 call this%pakcsvtab%add_term(
kper)
1244 call this%pakcsvtab%add_term(
kstp)
1245 call this%pakcsvtab%add_term(kiter)
1246 call this%pakcsvtab%add_term(drejinfmax)
1247 call this%pakcsvtab%add_term(locdrejinfmax)
1248 call this%pakcsvtab%add_term(drchmax)
1249 call this%pakcsvtab%add_term(locdrchmax)
1250 if (this%iseepflag == 1)
then
1251 call this%pakcsvtab%add_term(dseepmax)
1252 call this%pakcsvtab%add_term(locdseepmax)
1254 if (this%imover == 1)
then
1255 call this%pakcsvtab%add_term(dqfrommvrmax)
1256 call this%pakcsvtab%add_term(locdqfrommvrmax)
1261 call this%pakcsvtab%finalize_table()
1265 end subroutine uzf_cc
1269 subroutine uzf_cq(this, x, flowja, iadv)
1275 class(uzftype),
intent(inout) :: this
1276 real(DP),
dimension(:),
intent(in) :: x
1277 real(DP),
dimension(:),
contiguous,
intent(inout) :: flowja
1278 integer(I4B),
optional,
intent(in) :: iadv
1281 integer(I4B) :: node
1288 character(len=*),
parameter :: fmttkk = &
1289 &
"(1X,/1X,A,' PERIOD ',I0,' STEP ',I0)"
1293 call this%uzf_solve(reset_state=.true.)
1297 call this%BndType%bnd_cq(x, flowja, iadv=1)
1300 do n = 1, this%nodes
1303 node = this%nodelist(n)
1306 if (this%ibound(node) < 1) cycle
1309 this%appliedinf(n) = this%uzfobj%finf_spec(n) * this%uzfobj%uzfarea(n)
1310 this%infiltration(n) = this%uzfobj%surf_infil(n) * this%uzfobj%uzfarea(n)
1313 qout = this%rejinf(n) + this%uzfobj%surf_seep(n)
1315 if (this%imover == 1)
then
1316 qtomvr = this%pakmvrobj%get_qtomvr(n)
1321 if (qout >
dzero)
then
1322 qfact = this%rejinf(n) / qout
1325 this%rejinftomvr(n) = qfact * qtomvr
1328 q = q - this%rejinftomvr(n)
1338 this%gwd(n) = this%uzfobj%surf_seep(n)
1340 if (qout >
dzero)
then
1341 qfact = this%gwd(n) / qout
1344 this%gwdtomvr(n) = qfact * qtomvr
1347 q = q - this%gwdtomvr(n)
1357 this%uzet(n) = this%uzfobj%et_uz(n) * this%uzfobj%uzfarea(n) /
delt
1364 call this%uzf_fill_budobj()
1365 end subroutine uzf_cq
1369 function get_storage_change(top, bot, carea, hold, hnew, wcold, wcnew, &
1370 thtr, delt, iss)
result(qsto)
1372 real(dp),
intent(in) :: top
1373 real(dp),
intent(in) :: bot
1374 real(dp),
intent(in) :: hold
1375 real(dp),
intent(in) :: hnew
1376 real(dp),
intent(in) :: wcold
1377 real(dp),
intent(in) :: wcnew
1378 real(dp),
intent(in) :: thtr
1379 real(dp),
intent(in) :: carea
1380 real(dp),
intent(in) :: delt
1388 thknew = top - max(bot, hnew)
1389 thkold = top - max(bot, hold)
1391 if (thknew > dzero)
then
1392 qsto = qsto + thknew * (wcnew - thtr)
1394 if (thkold > dzero)
then
1395 qsto = qsto - thkold * (wcold - thtr)
1397 qsto = qsto * carea / delt
1401 end function get_storage_change
1405 subroutine uzf_bd(this, model_budget)
1409 class(uzftype) :: this
1410 type(
budgettype),
intent(inout) :: model_budget
1413 integer(I4B) :: isuppress_output
1414 isuppress_output = 0
1418 call model_budget%addentry(ratin, ratout,
delt, this%bdtxt(2), &
1419 isuppress_output, this%packName)
1422 if (this%iseepflag == 1)
then
1424 call model_budget%addentry(ratin, ratout,
delt, this%bdtxt(3), &
1425 isuppress_output, this%packName)
1426 if (this%imover == 1)
then
1428 call model_budget%addentry(ratin, ratout,
delt, this%bdtxt(5), &
1429 isuppress_output, this%packName)
1434 if (this%igwetflag /= 0)
then
1436 call model_budget%addentry(ratin, ratout,
delt, this%bdtxt(4), &
1437 isuppress_output, this%packName)
1439 end subroutine uzf_bd
1443 subroutine uzf_ot_model_flows(this, icbcfl, ibudfl, icbcun, imap)
1448 class(uzftype) :: this
1449 integer(I4B),
intent(in) :: icbcfl
1450 integer(I4B),
intent(in) :: ibudfl
1451 integer(I4B),
intent(in) :: icbcun
1452 integer(I4B),
dimension(:),
optional,
intent(in) :: imap
1454 character(len=LINELENGTH) :: title
1455 integer(I4B) :: itxt
1459 title = trim(adjustl(this%bdtxt(itxt)))//
' PACKAGE ('// &
1460 trim(this%packName)//
') FLOW RATES'
1462 this%outputtab, this%nbound, this%nodelist, &
1463 this%rch, this%ibound, title, this%bdtxt(itxt), &
1464 this%ipakcb, this%dis, this%naux, &
1465 this%name_model, this%name_model, &
1466 this%name_model, this%packName, this%auxname, &
1467 this%auxvar, this%iout, this%inamedbound, &
1471 if (this%iseepflag == 1)
then
1473 title = trim(adjustl(this%bdtxt(itxt)))//
' PACKAGE ('// &
1474 trim(this%packName)//
') FLOW RATES'
1476 this%outputtab, this%nbound, this%nodelist, &
1477 -this%gwd, this%ibound, title, &
1478 this%bdtxt(itxt), this%ipakcb, this%dis, &
1479 this%naux, this%name_model, this%name_model, &
1480 this%name_model, this%packName, this%auxname, &
1481 this%auxvar, this%iout, this%inamedbound, &
1485 if (this%imover == 1)
then
1487 title = trim(adjustl(this%bdtxt(itxt)))//
' PACKAGE ('// &
1488 trim(this%packName)//
') FLOW RATES'
1490 this%outputtab, this%nbound, this%nodelist, &
1491 -this%gwdtomvr, this%ibound, title, &
1492 this%bdtxt(itxt), this%ipakcb, this%dis, &
1493 this%naux, this%name_model, this%name_model, &
1494 this%name_model, this%packName, &
1495 this%auxname, this%auxvar, this%iout, &
1496 this%inamedbound, this%boundname)
1501 if (this%igwetflag /= 0)
then
1503 title = trim(adjustl(this%bdtxt(itxt)))//
' PACKAGE ('// &
1504 trim(this%packName)//
') FLOW RATES'
1506 this%outputtab, this%nbound, this%nodelist, &
1507 -this%uzfobj%gwet, this%ibound, title, &
1508 this%bdtxt(itxt), this%ipakcb, this%dis, &
1509 this%naux, this%name_model, this%name_model, &
1510 this%name_model, this%packName, this%auxname, &
1511 this%auxvar, this%iout, this%inamedbound, &
1514 end subroutine uzf_ot_model_flows
1518 subroutine uzf_ot_package_flows(this, icbcfl, ibudfl)
1522 class(uzftype) :: this
1523 integer(I4B),
intent(in) :: icbcfl
1524 integer(I4B),
intent(in) :: ibudfl
1525 integer(I4B) :: ibinun
1529 if (this%ibudgetout /= 0)
then
1530 ibinun = this%ibudgetout
1532 if (icbcfl == 0) ibinun = 0
1533 if (ibinun > 0)
then
1534 call this%budobj%save_flows(this%dis, ibinun,
kstp,
kper,
delt, &
1539 if (ibudfl /= 0 .and. this%iprflow /= 0)
then
1540 call this%budobj%write_flowtable(this%dis,
kstp,
kper)
1542 end subroutine uzf_ot_package_flows
1546 subroutine uzf_ot_dv(this, idvsave, idvprint)
1551 class(uzftype) :: this
1552 integer(I4B),
intent(in) :: idvsave
1553 integer(I4B),
intent(in) :: idvprint
1555 integer(I4B) :: ibinun
1559 if (this%iwcontout /= 0)
then
1560 ibinun = this%iwcontout
1562 if (idvsave == 0) ibinun = 0
1565 if (ibinun > 0)
then
1567 totim, this%nodes, 1, 1, ibinun)
1569 end subroutine uzf_ot_dv
1573 subroutine uzf_ot_bdsummary(this, kstp, kper, iout, ibudfl)
1577 class(uzftype) :: this
1578 integer(I4B),
intent(in) :: kstp
1579 integer(I4B),
intent(in) :: kper
1580 integer(I4B),
intent(in) :: iout
1581 integer(I4B),
intent(in) :: ibudfl
1583 call this%budobj%write_budtable(kstp, kper, iout, ibudfl,
totim,
delt)
1584 end subroutine uzf_ot_bdsummary
1600 subroutine uzf_solve(this, reset_state)
1603 logical,
intent(in) :: reset_state
1605 class(uzftype) :: this
1607 integer(I4B) :: n, ivertflag
1608 integer(I4B) :: node, m, ierr
1609 real(DP) :: trhs1, thcof1, trhs2, thcof2
1610 real(DP) :: hgwf, uzderiv, derivgwet
1611 real(DP) :: qfrommvr
1614 real(DP) :: watabold
1618 do n = 1, this%nodes
1619 this%uzfobj%pet(n) = this%uzfobj%pet_max(n)
1623 do n = 1, this%nodes
1626 this%hcof(n) = dzero
1636 node = this%nodelist(n)
1637 ivertflag = this%uzfobj%cell_below(n)
1638 watabold = this%uzfobj%water_table_old(n)
1640 if (this%ibound(node) > 0)
then
1645 if (this%imover == 1)
then
1646 qfrommvr = this%pakmvrobj%get_qfrommvr(n)
1649 hgwf = this%xnew(node)
1653 call this%uzfobj%solve(ivertflag, n, &
1654 this%totfluxtot, this%ietflag, &
1655 this%issflag, this%iseepflag, hgwf, &
1657 reset_state=reset_state, &
1658 trhs=trhs1, thcof=thcof1, deriv=uzderiv, &
1664 errmsg =
'UZF variable NWAVESETS needs to be increased.'
1665 call store_error(errmsg, terminate=.true.)
1669 if (this%igwetflag > 0)
then
1670 call this%uzfobj%setgwpet(n)
1671 call this%uzfobj%simgwet(this%igwetflag, n, hgwf, trhs2, thcof2, &
1676 if (this%ietflag > 0)
then
1677 if (this%uzfobj%cell_below(n) > 0)
then
1678 call this%uzfobj%setbelowpet(n, ivertflag)
1683 this%deriv(n) = uzderiv + derivgwet
1687 this%rejinf(n) = this%uzfobj%finf_rej(n) * this%uzfobj%uzfarea(n)
1688 this%rch(n) = this%uzfobj%flux_to_wt(n) * this%uzfobj%uzfarea(n) /
delt
1689 this%gwd(n) = this%uzfobj%surf_seep(n)
1692 this%hcof(n) = thcof1 + thcof2
1693 this%rhs(n) = -trhs1 + trhs2
1696 if (this%imover == 1)
then
1697 qformvr = this%gwd(n) + this%rejinf(n)
1698 call this%pakmvrobj%accumulate_qformvr(n, qformvr)
1705 this%qsto(n) = get_storage_change(this%uzfobj%celtop(n), &
1706 this%uzfobj%celbot(n), &
1707 this%uzfobj%uzfarea(n), &
1709 this%uzfobj%water_table(n), &
1710 this%wcold(n), this%wcnew(n), &
1711 this%uzfobj%theta_res(n),
delt, &
1716 end subroutine uzf_solve
1721 subroutine define_listlabel(this)
1723 class(uzftype),
intent(inout) :: this
1726 this%listlabel = trim(this%filtyp)//
' NO.'
1727 if (this%dis%ndim == 3)
then
1728 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
1729 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'ROW'
1730 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'COL'
1731 elseif (this%dis%ndim == 2)
then
1732 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
1733 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'CELL2D'
1735 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'NODE'
1737 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'STRESS RATE'
1738 if (this%inamedbound == 1)
then
1739 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'BOUNDARY NAME'
1741 end subroutine define_listlabel
1749 subroutine uzf_allocate_scalars(this)
1753 class(uzftype) :: this
1756 call this%BndExtType%allocate_scalars()
1759 call mem_allocate(this%iprwcont,
'IPRWCONT', this%memoryPath)
1760 call mem_allocate(this%iwcontout,
'IWCONTOUT', this%memoryPath)
1761 call mem_allocate(this%ibudgetout,
'IBUDGETOUT', this%memoryPath)
1762 call mem_allocate(this%ibudcsv,
'IBUDCSV', this%memoryPath)
1763 call mem_allocate(this%ipakcsv,
'IPAKCSV', this%memoryPath)
1764 call mem_allocate(this%ntrail_input,
'NTRAIL_INPUT', this%memoryPath)
1765 call mem_allocate(this%nwavesets,
'NWAVESETS', this%memoryPath)
1766 call mem_allocate(this%nodes,
'NODES', this%memoryPath)
1767 call mem_allocate(this%istocb,
'ISTOCB', this%memoryPath)
1768 call mem_allocate(this%totfluxtot,
'TOTFLUXTOT', this%memoryPath)
1769 call mem_allocate(this%bditems,
'BDITEMS', this%memoryPath)
1770 call mem_allocate(this%nbdtxt,
'NBDTXT', this%memoryPath)
1771 call mem_allocate(this%issflag,
'ISSFLAG', this%memoryPath)
1772 call mem_allocate(this%issflagold,
'ISSFLAGOLD', this%memoryPath)
1773 call mem_allocate(this%readflag,
'READFLAG', this%memoryPath)
1774 call mem_allocate(this%iseepflag,
'ISEEPFLAG', this%memoryPath)
1775 call mem_allocate(this%imaxcellcnt,
'IMAXCELLCNT', this%memoryPath)
1776 call mem_allocate(this%ietflag,
'IETFLAG', this%memoryPath)
1777 call mem_allocate(this%igwetflag,
'IGWETFLAG', this%memoryPath)
1778 call mem_allocate(this%iuzf2uzf,
'IUZF2UZF', this%memoryPath)
1779 call mem_allocate(this%cbcauxitems,
'CBCAUXITEMS', this%memoryPath)
1781 call mem_allocate(this%iconvchk,
'ICONVCHK', this%memoryPath)
1797 this%imaxcellcnt = 0
1799 this%cbcauxitems = 1
1804 end subroutine uzf_allocate_scalars
1808 subroutine uzf_da(this)
1812 class(uzftype) :: this
1815 call this%uzfobj%dealloc()
1816 deallocate (this%uzfobj)
1817 nullify (this%uzfobj)
1819 call this%budobj%budgetobject_da()
1820 deallocate (this%budobj)
1821 nullify (this%budobj)
1824 deallocate (this%bdtxt)
1825 deallocate (this%cauxcbc)
1826 deallocate (this%uzfname)
1829 if (this%ipakcsv > 0)
then
1830 if (
associated(this%pakcsvtab))
then
1831 call this%pakcsvtab%table_da()
1832 deallocate (this%pakcsvtab)
1833 nullify (this%pakcsvtab)
1890 call this%BndExtType%bnd_da()
1891 end subroutine uzf_da
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_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_bd(this, model_budget)
Add package flows to model budget.
subroutine bnd_fc(this, rhs, ia, idxglo, matrix_sln)
Copy hcof and rhs terms into solution.
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, public save_print_model_flows(icbcfl, ibudfl, icbcun, iprflow, outputtab, nbound, nodelist, flow, ibound, title, text, ipakcb, dis, naux, textmodel, textpackage, dstmodel, dstpackage, auxname, auxvar, iout, inamedbound, boundname, imap)
Save and/or print flows for a package.
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 rate_accumulator(flow, rin, rout)
Rate accumulator subroutine.
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
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
real(dp), parameter dem1
real constant 1e-1
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 lenboundname
maximum length of a bound name
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 dem2
real constant 1e-2
integer(i4b), parameter lenbudtxt
maximum length of a budget component names
real(dp), parameter done
real constant 1
This module defines variable data types.
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.
This module contains the derived types ObserveType and ObsDataType.
This module contains the derived type ObsType.
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
integer(i4b) function, public count_errors()
Return number of errors.
subroutine, public deprecation_warning(cblock, cvar, cver, endmsg, iunit)
Store deprecation warning message.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
integer(i4b) ifailedstepretry
current retry for this time step
character(len=maxcharlen) warnmsg
warning message string
integer(i4b) iout
file unit number for simulation output
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
Unsaturated zone flow by the method of characteristics.
subroutine uzf_ar(this)
Allocate and Read.
subroutine uzf_fc(this, rhs, ia, idxglo, matrix_sln)
Copy rhs and hcof into solution rhs and amat.
subroutine uzf_ot_dv(this, idvsave, idvprint)
Save UZF-calculated values to binary file.
subroutine define_listlabel(this)
Define the list heading that is written to iout when PRINT_INPUT option is used.
subroutine uzf_da(this)
Deallocate objects.
subroutine uzf_checkin_deprecated_names(this)
Alias deprecated UZF variable names to their current storage.
subroutine uzf_cq(this, x, flowja, iadv)
Calculate flows.
subroutine uzf_allocate_arrays(this)
Allocate arrays used for uzf.
character(len=lenftype) ftype
subroutine uzf_ot_bdsummary(this, kstp, kper, iout, ibudfl)
Write UZF budget to listing file.
subroutine uzf_source_dimensions(this)
Source DIMENSIONS block from input context.
subroutine uzf_cf(this)
Formulate the HCOF and RHS terms.
subroutine uzf_fn(this, rhs, ia, idxglo, matrix_sln)
Fill newton terms.
subroutine uzf_ot_model_flows(this, icbcfl, ibudfl, icbcun, imap)
Write flows to binary file and/or print flows to budget.
subroutine uzf_bd(this, model_budget)
Add package ratin/ratout to model budget.
subroutine uzf_allocate_scalars(this)
Allocate scalar members.
subroutine uzf_rp(this)
Read stress data from input context.
subroutine uzf_cc(this, innertot, kiter, iend, icnvgmod, cpak, ipak, dpak)
Final convergence check for package.
subroutine, public uzf_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, mempath)
Create a New UZF Package and point packobj to the new package.
character(len=lenpackagename) text
subroutine uzf_ot_package_flows(this, icbcfl, ibudfl)
Output UZF package flow terms.
subroutine uzf_solve(this, reset_state)
Formulate the HCOF and RHS terms.
subroutine uzf_ad(this)
Advance UZF Package.
subroutine uzf_source_options(this)
Source OPTIONS block from input context.
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 ...