23 character(len=LENPACKAGENAME) :: text =
''
24 logical,
pointer :: flows_from_file => null()
25 type(
listtype),
pointer :: gwfbndlist => null()
26 integer(I4B),
pointer :: iflowsupdated => null()
27 integer(I4B),
dimension(:),
pointer,
contiguous :: ibound => null()
28 real(dp),
dimension(:),
pointer,
contiguous :: gwfflowja => null()
29 real(dp),
dimension(:, :),
pointer,
contiguous :: gwfspdis => null()
30 real(dp),
dimension(:),
pointer,
contiguous :: gwfhead => null()
31 real(dp),
dimension(:),
pointer,
contiguous :: gwfsat => null()
32 integer(I4B),
dimension(:),
pointer,
contiguous :: ibdgwfsat0 => null()
33 integer(I4B),
pointer :: idryinactive => null()
34 real(dp),
dimension(:),
pointer,
contiguous :: gwfstrgss => null()
35 real(dp),
dimension(:),
pointer,
contiguous :: gwfstrgsy => null()
36 integer(I4B),
pointer :: igwfstrgss => null()
37 integer(I4B),
pointer :: igwfstrgsy => null()
38 integer(I4B),
pointer :: iubud => null()
39 integer(I4B),
pointer :: iuhds => null()
40 integer(I4B),
pointer :: iumvr => null()
41 integer(I4B),
pointer :: iugrb => null()
42 integer(I4B),
pointer :: nflowpack => null()
43 integer(I4B),
dimension(:),
pointer,
contiguous :: igwfmvrterm => null()
49 character(len=16),
dimension(:),
allocatable :: flowpacknamearray
50 character(len=LENVARNAME) :: depvartype =
''
79 subroutine fmi_df(this, dis, idryinactive)
85 integer(I4B),
intent(in) :: idryinactive
87 character(len=*),
parameter :: fmtfmi = &
88 "(1x,/1x,'FMI -- FLOW MODEL INTERFACE, VERSION 2, 8/17/2023', &
89 &' INPUT READ FROM UNIT ', i0, //)"
90 character(len=*),
parameter :: fmtfmi0 = &
91 "(1x,/1x,'FMI -- FLOW MODEL INTERFACE,'&
92 &' VERSION 2, 8/17/2023')"
95 if (this%iout > 0)
then
96 if (this%inunit /= 0)
then
97 write (this%iout, fmtfmi) this%inunit
99 write (this%iout, fmtfmi0)
100 if (this%flows_from_file)
then
101 write (this%iout,
'(a)')
' FLOWS ARE ASSUMED TO BE ZERO.'
103 write (this%iout,
'(a)')
' FLOWS PROVIDED BY A GWF MODEL IN THIS &
113 if (this%inunit /= 0)
then
114 call this%read_options()
118 if (this%inunit /= 0 .and. this%flows_from_file)
then
119 call this%read_packagedata()
120 call this%initialize_gwfterms_from_bfr()
124 if (.not. this%flows_from_file)
then
125 call this%initialize_gwfterms_from_gwfbndlist()
131 this%idryinactive = idryinactive
141 integer(I4B),
dimension(:),
pointer,
contiguous :: ibound
144 this%ibound => ibound
147 call this%allocate_arrays(this%dis%nodes)
160 call this%deallocate_gwfpackages()
163 deallocate (this%gwfpackages)
164 deallocate (this%flowpacknamearray)
168 if (this%flows_from_file)
then
192 call this%NumericalPackageType%da()
205 call this%NumericalPackageType%allocate_scalars()
208 call mem_allocate(this%flows_from_file,
'FLOWS_FROM_FILE', this%memoryPath)
209 call mem_allocate(this%iflowsupdated,
'IFLOWSUPDATED', this%memoryPath)
210 call mem_allocate(this%igwfstrgss,
'IGWFSTRGSS', this%memoryPath)
211 call mem_allocate(this%igwfstrgsy,
'IGWFSTRGSY', this%memoryPath)
216 call mem_allocate(this%nflowpack,
'NFLOWPACK', this%memoryPath)
217 call mem_allocate(this%idryinactive,
"IDRYINACTIVE", this%memoryPath)
221 this%flows_from_file = .true.
222 this%iflowsupdated = 1
230 this%idryinactive = 1
241 integer(I4B),
intent(in) :: nodes
247 call mem_allocate(this%ibdgwfsat0, nodes,
'IBDGWFSAT0', this%memoryPath)
249 this%ibdgwfsat0(n) = 1
254 if (this%flows_from_file)
then
256 'GWFFLOWJA', this%memoryPath)
257 call mem_allocate(this%gwfsat, nodes,
'GWFSAT', this%memoryPath)
258 call mem_allocate(this%gwfhead, nodes,
'GWFHEAD', this%memoryPath)
259 call mem_allocate(this%gwfspdis, 3, nodes,
'GWFSPDIS', this%memoryPath)
261 this%gwfsat(n) = done
262 this%gwfhead(n) =
dzero
263 this%gwfspdis(:, n) =
dzero
265 do n = 1,
size(this%gwfflowja)
266 this%gwfflowja(n) =
dzero
270 if (this%igwfstrgss == 0)
then
271 call mem_allocate(this%gwfstrgss, 1,
'GWFSTRGSS', this%memoryPath)
273 call mem_allocate(this%gwfstrgss, nodes,
'GWFSTRGSS', this%memoryPath)
275 if (this%igwfstrgsy == 0)
then
276 call mem_allocate(this%gwfstrgsy, 1,
'GWFSTRGSY', this%memoryPath)
278 call mem_allocate(this%gwfstrgsy, nodes,
'GWFSTRGSY', this%memoryPath)
280 do n = 1,
size(this%gwfstrgss)
281 this%gwfstrgss(n) =
dzero
283 do n = 1,
size(this%gwfstrgsy)
284 this%gwfstrgsy(n) =
dzero
289 if (this%inunit == 0)
call this%allocate_gwfpackages(this%nflowpack)
303 character(len=LINELENGTH) :: keyword
305 logical :: isfound, endOfBlock
308 call this%parser%GetBlock(
'OPTIONS', isfound, ierr, blockrequired=.false., &
309 supportopenclose=.true.)
313 write (this%iout,
'(1x,a)')
'PROCESSING FMI OPTIONS'
315 call this%parser%GetNextLine(endofblock)
317 call this%parser%GetStringCaps(keyword)
318 select case (keyword)
322 write (
errmsg,
'(a,3(1x,a))') &
323 'UNKNOWN', trim(adjustl(this%text)),
'OPTION:', trim(keyword)
325 call this%parser%StoreErrorUnit()
328 write (this%iout,
'(1x,a)')
'END OF FMI OPTIONS'
349 character(len=LINELENGTH) :: keyword, fname
351 integer(I4B) :: inunit
353 integer(I4B) :: user_nodes
354 logical :: isfound, endOfBlock
355 logical :: blockrequired
357 integer(I4B),
allocatable :: idomain1d(:), idomain2d(:, :), idomain3d(:, :, :)
359 character(len=*),
parameter :: fmtdiserr = &
360 "('Error in ',a,': Models do not have the same discretization. &
361 &GWF model has ', i0, ' user nodes, this model has ', i0, '. &
362 &Ensure discretization packages, including IDOMAIN, are identical.')"
363 character(len=*),
parameter :: fmtidomerr = &
364 "('Error in ',a,': models do not have the same discretization. &
365 &Models have different IDOMAIN arrays. &
366 &Ensure discretization packages, including IDOMAIN, are identical.')"
370 blockrequired = .true.
373 call this%parser%GetBlock(
'PACKAGEDATA', isfound, ierr, &
374 blockrequired=blockrequired, &
375 supportopenclose=.true.)
379 write (this%iout,
'(1x,a)')
'PROCESSING FMI PACKAGEDATA'
381 call this%parser%GetNextLine(endofblock)
383 call this%parser%GetStringCaps(keyword)
384 select case (keyword)
386 call this%parser%GetStringCaps(keyword)
387 if (keyword /=
'FILEIN')
then
388 call store_error(
'GWFBUDGET KEYWORD MUST BE FOLLOWED BY '// &
389 '"FILEIN" then by filename.')
390 call this%parser%StoreErrorUnit()
392 call this%parser%GetString(fname)
394 inquire (file=trim(fname), exist=exist)
395 if (.not. exist)
then
396 call store_error(
'Could not find file '//trim(fname))
397 call this%parser%StoreErrorUnit()
399 call openfile(inunit, this%iout, fname,
'DATA(BINARY)',
form, &
402 call this%initialize_bfr()
404 call this%parser%GetStringCaps(keyword)
405 if (keyword /=
'FILEIN')
then
406 call store_error(
'GWFHEAD KEYWORD MUST BE FOLLOWED BY '// &
407 '"FILEIN" then by filename.')
408 call this%parser%StoreErrorUnit()
410 call this%parser%GetString(fname)
411 inquire (file=trim(fname), exist=exist)
412 if (.not. exist)
then
413 call store_error(
'Could not find file '//trim(fname))
414 call this%parser%StoreErrorUnit()
417 call openfile(inunit, this%iout, fname,
'DATA(BINARY)',
form, &
420 call this%initialize_hfr()
422 call this%parser%GetStringCaps(keyword)
423 if (keyword /=
'FILEIN')
then
424 call store_error(
'GWFMOVER KEYWORD MUST BE FOLLOWED BY '// &
425 '"FILEIN" then by filename.')
426 call this%parser%StoreErrorUnit()
428 call this%parser%GetString(fname)
430 call openfile(inunit, this%iout, fname,
'DATA(BINARY)',
form, &
435 call this%mvrbudobj%fill_from_bfr(this%dis, this%iout)
437 call this%parser%GetStringCaps(keyword)
438 if (keyword /=
'FILEIN')
then
439 call store_error(
'GWFGRID KEYWORD MUST BE FOLLOWED BY '// &
440 '"FILEIN" then by filename.')
441 call this%parser%StoreErrorUnit()
443 call this%parser%GetString(fname)
445 call openfile(inunit, this%iout, fname,
'DATA(BINARY)', &
448 call this%gfr%initialize(this%iugrb)
451 select case (this%gfr%grid_type)
453 select type (dis => this%dis)
455 user_nodes = this%gfr%read_int(
"NCELLS")
456 if (user_nodes /= this%dis%nodesuser)
then
457 write (
errmsg, fmtdiserr) &
458 trim(this%text), user_nodes, this%dis%nodesuser
461 idomain1d = this%gfr%read_int_1d(
"IDOMAIN")
462 idomain3d = reshape(idomain1d, [ &
463 this%gfr%read_int(
"NCOL"), &
464 this%gfr%read_int(
"NROW"), &
465 this%gfr%read_int(
"NLAY") &
467 if (.not. all(dis%idomain == idomain3d))
then
468 write (
errmsg, fmtidomerr) trim(this%text)
473 select type (dis => this%dis)
475 user_nodes = this%gfr%read_int(
"NCELLS")
476 if (user_nodes /= this%dis%nodesuser)
then
477 write (
errmsg, fmtdiserr) &
478 trim(this%text), user_nodes, this%dis%nodesuser
481 idomain1d = this%gfr%read_int_1d(
"IDOMAIN")
482 idomain2d = reshape(idomain1d, [ &
483 this%gfr%read_int(
"NCPL"), &
484 this%gfr%read_int(
"NLAY") &
486 if (.not. all(dis%idomain == idomain2d))
then
487 write (
errmsg, fmtidomerr) trim(this%text)
492 select type (dis => this%dis)
494 user_nodes = this%gfr%read_int(
"NODES")
495 if (user_nodes /= this%dis%nodesuser)
then
496 write (
errmsg, fmtdiserr) &
497 trim(this%text), user_nodes, this%dis%nodesuser
500 idomain1d = this%gfr%read_int_1d(
"IDOMAIN")
501 if (.not. all(dis%idomain == idomain1d))
then
502 write (
errmsg, fmtidomerr) trim(this%text)
507 select type (dis => this%dis)
509 user_nodes = this%gfr%read_int(
"NCELLS")
510 if (user_nodes /= this%dis%nodesuser)
then
511 write (
errmsg, fmtdiserr) &
512 trim(this%text), user_nodes, this%dis%nodesuser
515 idomain1d = this%gfr%read_int_1d(
"IDOMAIN")
516 idomain2d = reshape(idomain1d, [ &
517 this%gfr%read_int(
"NCOL"), &
518 this%gfr%read_int(
"NROW") &
520 if (.not. all(dis%idomain == idomain2d))
then
521 write (
errmsg, fmtidomerr) trim(this%text)
526 select type (dis => this%dis)
528 user_nodes = this%gfr%read_int(
"NODES")
529 if (user_nodes /= this%dis%nodesuser)
then
530 write (
errmsg, fmtdiserr) &
531 trim(this%text), user_nodes, this%dis%nodesuser
534 idomain1d = this%gfr%read_int_1d(
"IDOMAIN")
535 if (.not. all(dis%idomain == idomain1d))
then
536 write (
errmsg, fmtidomerr) trim(this%text)
541 select type (dis => this%dis)
543 user_nodes = this%gfr%read_int(
"NCELLS")
544 if (user_nodes /= this%dis%nodesuser)
then
545 write (
errmsg, fmtdiserr) &
546 trim(this%text), user_nodes, this%dis%nodesuser
549 idomain1d = this%gfr%read_int_1d(
"IDOMAIN")
550 if (.not. all(dis%idomain == idomain1d))
then
551 write (
errmsg, fmtidomerr) trim(this%text)
557 if (
allocated(idomain3d))
deallocate (idomain3d)
558 if (
allocated(idomain2d))
deallocate (idomain2d)
559 if (
allocated(idomain1d))
deallocate (idomain1d)
561 call this%gfr%finalize()
563 write (
errmsg,
'(a,3(1x,a))') &
564 'UNKNOWN', trim(adjustl(this%text)),
'PACKAGEDATA:', trim(keyword)
568 write (this%iout,
'(1x,a)')
'END OF FMI PACKAGEDATA'
575 integer(I4B) :: ncrbud
576 call this%bfr%initialize(this%iubud, this%iout, ncrbud)
595 integer(I4B) :: nu, nr
596 integer(I4B) :: ip, i
599 character(len=*),
parameter :: fmtkstpkper = &
600 "(1x,/1x,'FMI READING BUDGET TERMS &
601 &FOR KSTP ', i0, ' KPER ', i0)"
602 character(len=*),
parameter :: fmtbudkstpkper = &
603 "(1x,/1x, 'FMI SETTING BUDGET TERMS &
604 &FOR KSTP ', i0, ' AND KPER ', &
605 &i0, ' TO BUDGET FILE TERMS FROM &
606 &KSTP ', i0, ' AND KPER ', i0)"
614 if (this%bfr%kstp == 1)
then
615 if (this%bfr%kpernext ==
kper + 1)
then
617 else if (this%bfr%endoffile)
then
620 else if (this%bfr%endoffile)
then
621 write (
errmsg,
'(4x,a)')
'REACHED END OF GWF BUDGET &
622 &FILE BEFORE READING SUFFICIENT BUDGET INFORMATION FOR THIS &
633 write (this%iout, fmtkstpkper)
kstp,
kper
638 do n = 1, this%bfr%nbudterms
639 call this%bfr%read_record(success, this%iout)
640 if (.not. success)
then
641 write (
errmsg,
'(4x,a)')
'GWF BUDGET READ NOT SUCCESSFUL'
647 if (
kper /= this%bfr%kper)
then
648 write (
errmsg,
'(4x,a)')
'PERIOD NUMBER IN BUDGET FILE &
649 &DOES NOT MATCH PERIOD NUMBER IN TRANSPORT MODEL. IF THERE &
650 &IS MORE THAN ONE TIME STEP IN THE BUDGET FILE FOR A GIVEN &
651 &STRESS PERIOD, BUDGET FILE TIME STEPS MUST MATCH GWT MODEL &
652 &TIME STEPS ONE-FOR-ONE IN THAT STRESS PERIOD.'
658 if (this%bfr%kstp > 1 .and. (
kstp /= this%bfr%kstp))
then
659 write (
errmsg,
'(4x,a)')
'TIME STEP NUMBER IN BUDGET FILE &
660 &DOES NOT MATCH TIME STEP NUMBER IN TRANSPORT MODEL. IF THERE &
661 &IS MORE THAN ONE TIME STEP IN THE BUDGET FILE FOR A GIVEN STRESS &
662 &PERIOD, BUDGET FILE TIME STEPS MUST MATCH GWT MODEL TIME STEPS &
663 &ONE-FOR-ONE IN THAT STRESS PERIOD.'
670 select case (trim(adjustl(this%bfr%budtxt)))
671 case (
'FLOW-JA-FACE')
675 do ipos = 1,
size(this%bfr%flowja)
676 this%gwfflowja(ipos) = this%bfr%flowja(ipos)
679 do i = 1, this%bfr%nlist
680 nu = this%bfr%nodesrc(i)
681 nr = this%dis%get_nodenumber(nu, 0)
683 this%gwfspdis(1, nr) = this%bfr%auxvar(1, i)
684 this%gwfspdis(2, nr) = this%bfr%auxvar(2, i)
685 this%gwfspdis(3, nr) = this%bfr%auxvar(3, i)
688 do i = 1, this%bfr%nlist
689 nu = this%bfr%nodesrc(i)
690 nr = this%dis%get_nodenumber(nu, 0)
692 this%gwfsat(nr) = this%bfr%auxvar(1, i)
695 do nu = 1, this%dis%nodesuser
696 nr = this%dis%get_nodenumber(nu, 0)
698 this%gwfstrgss(nr) = this%bfr%flow(nu)
701 do nu = 1, this%dis%nodesuser
702 nr = this%dis%get_nodenumber(nu, 0)
704 this%gwfstrgsy(nr) = this%bfr%flow(nu)
707 call this%gwfpackages(ip)%copy_values( &
712 do i = 1, this%gwfpackages(ip)%nbound
713 nu = this%gwfpackages(ip)%nodelist(i)
714 nr = this%dis%get_nodenumber(nu, 0)
715 this%gwfpackages(ip)%nodelist(i) = nr
723 write (this%iout, fmtbudkstpkper)
kstp,
kper, this%bfr%kstp, this%bfr%kper
726 this%iflowsupdated = 0
733 call this%bfr%finalize()
739 call this%hfr%initialize(this%iuhds, this%iout)
749 integer(I4B) :: nu, nr, i, ilay
754 character(len=*),
parameter :: fmtkstpkper = &
755 "(1x,/1x,'FMI READING HEAD FOR &
756 &KSTP ', i0, ' KPER ', i0)"
757 character(len=*),
parameter :: fmthdskstpkper = &
758 "(1x,/1x, 'FMI SETTING HEAD FOR KSTP ', i0, ' AND KPER ', &
759 &i0, ' TO BINARY FILE HEADS FROM KSTP ', i0, ' AND KPER ', i0)"
767 if (this%hfr%kstp == 1)
then
768 if (this%hfr%kpernext ==
kper + 1)
then
770 else if (this%hfr%endoffile)
then
773 else if (this%hfr%endoffile)
then
774 write (
errmsg,
'(4x,a)')
'REACHED END OF GWF HEAD &
775 &FILE BEFORE READING SUFFICIENT HEAD INFORMATION FOR THIS &
786 write (this%iout, fmtkstpkper)
kstp,
kper
789 do ilay = 1, this%hfr%nlay
792 call this%hfr%read_record(success, this%iout)
793 if (.not. success)
then
794 write (
errmsg,
'(4x,a)')
'GWF HEAD READ NOT SUCCESSFUL'
800 if (
kper /= this%hfr%kper)
then
801 write (
errmsg,
'(4x,a)')
'PERIOD NUMBER IN HEAD FILE &
802 &DOES NOT MATCH PERIOD NUMBER IN TRANSPORT MODEL. IF THERE &
803 &IS MORE THAN ONE TIME STEP IN THE HEAD FILE FOR A GIVEN STRESS &
804 &PERIOD, HEAD FILE TIME STEPS MUST MATCH GWT MODEL TIME STEPS &
805 &ONE-FOR-ONE IN THAT STRESS PERIOD.'
811 if (this%hfr%kstp > 1 .and. (
kstp /= this%hfr%kstp))
then
812 write (
errmsg,
'(4x,a)')
'TIME STEP NUMBER IN HEAD FILE &
813 &DOES NOT MATCH TIME STEP NUMBER IN TRANSPORT MODEL. IF THERE &
814 &IS MORE THAN ONE TIME STEP IN THE HEAD FILE FOR A GIVEN STRESS &
815 &PERIOD, HEAD FILE TIME STEPS MUST MATCH GWT MODEL TIME STEPS &
816 &ONE-FOR-ONE IN THAT STRESS PERIOD.'
823 ncpl =
size(this%hfr%head)
825 nu = (ilay - 1) * ncpl + i
826 nr = this%dis%get_nodenumber(nu, 0)
827 val = this%hfr%head(i)
828 if (nr > 0) this%gwfhead(nr) = val
832 write (this%iout, fmthdskstpkper)
kstp,
kper, this%hfr%kstp, this%hfr%kper
854 integer(I4B) :: nflowpack
855 integer(I4B) :: i, ip
857 logical :: found_flowja
858 logical :: found_dataspdis
859 logical :: found_datasat
860 logical :: found_stoss
861 logical :: found_stosy
862 integer(I4B),
dimension(:),
allocatable :: imap
865 allocate (imap(this%bfr%nbudterms))
868 found_flowja = .false.
869 found_dataspdis = .false.
870 found_datasat = .false.
871 found_stoss = .false.
872 found_stosy = .false.
873 do i = 1, this%bfr%nbudterms
874 select case (trim(adjustl(this%bfr%budtxtarray(i))))
875 case (
'FLOW-JA-FACE')
876 found_flowja = .true.
878 found_dataspdis = .true.
880 found_datasat = .true.
888 nflowpack = nflowpack + 1
894 call this%allocate_gwfpackages(nflowpack)
899 do i = 1, this%bfr%nbudterms
900 if (imap(i) == 0) cycle
901 call this%gwfpackages(ip)%set_name(this%bfr%dstpackagenamearray(i), &
902 this%bfr%budtxtarray(i))
903 naux = this%bfr%nauxarray(i)
904 call this%gwfpackages(ip)%set_auxname(naux, this%bfr%auxtxtarray(1:naux, i))
912 if (imap(i) == 1)
then
913 this%flowpacknamearray(ip) = this%bfr%dstpackagenamearray(i)
919 if (.not. found_dataspdis)
then
920 write (
errmsg,
'(4x,a)')
'SPECIFIC DISCHARGE NOT FOUND IN &
921 &BUDGET FILE. SAVE_SPECIFIC_DISCHARGE AND &
922 &SAVE_FLOWS MUST BE ACTIVATED IN THE NPF PACKAGE.'
925 if (.not. found_datasat)
then
926 write (
errmsg,
'(4x,a)')
'SATURATION NOT FOUND IN &
927 &BUDGET FILE. SAVE_SATURATION AND &
928 &SAVE_FLOWS MUST BE ACTIVATED IN THE NPF PACKAGE.'
931 if (.not. found_flowja)
then
932 write (
errmsg,
'(4x,a)')
'FLOWJA NOT FOUND IN &
933 &BUDGET FILE. SAVE_FLOWS MUST &
934 &BE ACTIVATED IN THE NPF PACKAGE.'
938 call this%parser%StoreErrorUnit()
949 integer(I4B) :: ngwfpack
950 integer(I4B) :: ngwfterms
952 integer(I4B) :: imover
953 integer(I4B) :: ntomvr
954 integer(I4B) :: iterm
955 character(len=LENPACKAGENAME) :: budtxt
956 class(
bndtype),
pointer :: packobj => null()
959 ngwfpack = this%gwfbndlist%Count()
967 imover = packobj%imover
968 if (packobj%isadvpak /= 0) imover = 0
969 if (imover /= 0)
then
976 ngwfterms = ngwfpack + ntomvr
977 call this%allocate_gwfpackages(ngwfterms)
985 budtxt = adjustl(packobj%text)
986 call this%gwfpackages(iterm)%set_name(packobj%packName, budtxt)
987 this%flowpacknamearray(iterm) = packobj%packName
992 imover = packobj%imover
993 if (packobj%isadvpak /= 0) imover = 0
994 if (imover /= 0)
then
995 budtxt = trim(adjustl(packobj%text))//
'-TO-MVR'
996 call this%gwfpackages(iterm)%set_name(packobj%packName, budtxt)
997 this%flowpacknamearray(iterm) = packobj%packName
998 this%igwfmvrterm(iterm) = 1
1016 integer(I4B),
intent(in) :: ngwfterms
1019 character(len=LENMEMPATH) :: memPath
1022 allocate (this%gwfpackages(ngwfterms))
1023 allocate (this%flowpacknamearray(ngwfterms))
1026 call mem_allocate(this%igwfmvrterm, ngwfterms,
'IGWFMVRTERM', this%memoryPath)
1029 this%nflowpack = ngwfterms
1030 do n = 1, this%nflowpack
1031 this%igwfmvrterm(n) = 0
1032 this%flowpacknamearray(n) =
''
1036 write (mempath,
'(a, i0)') trim(this%memoryPath)//
'-FT', n
1037 call this%gwfpackages(n)%initialize(mempath)
1046 do n = 1, this%nflowpack
1047 call this%gwfpackages(n)%da()
1055 character(len=*),
intent(in) :: name
1056 integer(I4B),
intent(inout) :: idx
1062 do ip = 1,
size(this%flowpacknamearray)
1063 if (this%flowpacknamearray(ip) == name)
then
1069 call store_error(
'Error in get_package_index. Could not find '//name, &
This module contains the base boundary package.
class(bndtype) function, pointer, public getbndfromlist(list, idx)
Get boundary from package list.
subroutine, public budgetobject_cr_bfr(this, name, ibinun, iout, colconv1, colconv2)
Create a new budget object from a binary flow file.
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
integer(i4b), parameter lenpackagename
maximum length of the package name
integer(i4b), parameter lenvarname
maximum length of a variable name
real(dp), parameter dhalf
real constant 1/2
real(dp), parameter dem6
real constant 1e-6
real(dp), parameter dzero
real constant zero
integer(i4b), parameter lenbudtxt
maximum length of a budget component names
integer(i4b), parameter lenmempath
maximum length of the memory path
real(dp), parameter done
real constant 1
subroutine allocate_scalars(this)
Allocate scalars.
subroutine fmi_ar(this, ibound)
Allocate the package.
subroutine allocate_gwfpackages(this, ngwfterms)
Allocate budget packages.
subroutine deallocate_gwfpackages(this)
Deallocate memory in the gwfpackages array.
subroutine read_options(this)
Read options from input file.
subroutine finalize_hfr(this)
Finalize the head file reader.
subroutine fmi_df(this, dis, idryinactive)
Define the flow model interface.
subroutine get_package_index(this, name, idx)
Find the package index for the package with the given name.
subroutine advance_bfr(this)
Advance the budget file reader.
subroutine initialize_gwfterms_from_gwfbndlist(this)
Initialize gwf terms from a GWF exchange.
subroutine initialize_hfr(this)
Initialize the head file reader.
subroutine fmi_da(this)
Deallocate variables.
subroutine read_packagedata(this)
Read packagedata block from input file.
subroutine advance_hfr(this)
Advance the head file reader.
subroutine initialize_gwfterms_from_bfr(this)
Initialize gwf terms from budget file.
subroutine finalize_bfr(this)
Finalize the budget file reader.
subroutine allocate_arrays(this, nodes)
Allocate arrays.
subroutine initialize_bfr(this)
Initialize the budget file reader.
This module defines variable data types.
This module contains the base numerical package type.
This module contains the PackageBudgetModule Module.
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 store_error_unit(iunit, terminate)
Store the file unit number.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
integer(i4b), pointer, public kstp
current time step number
integer(i4b), pointer, public kper
current stress period number
Structured grid discretization.
Structured grid discretization.
Unstructured grid discretization.
Vertex grid discretization.
Vertex grid discretization.
A generic heterogeneous doubly-linked list.
Derived type for storing flows.