Advance the budget file reader by reading the next chunk of information for the current time step and stress period.
469 class(FlowModelInterfaceType) :: this
474 integer(I4B) :: nu, nr
475 integer(I4B) :: ip, i
478 character(len=*),
parameter :: fmtkstpkper = &
479 "(1x,/1x,'FMI READING BUDGET TERMS &
480 &FOR KSTP ', i0, ' KPER ', i0)"
481 character(len=*),
parameter :: fmtbudkstpkper = &
482 "(1x,/1x, 'FMI SETTING BUDGET TERMS &
483 &FOR KSTP ', i0, ' AND KPER ', &
484 &i0, ' TO BUDGET FILE TERMS FROM &
485 &KSTP ', i0, ' AND KPER ', i0)"
493 if (this%bfr%kstp == 1)
then
494 if (this%bfr%kpernext ==
kper + 1)
then
496 else if (this%bfr%endoffile)
then
499 else if (this%bfr%endoffile)
then
500 write (errmsg,
'(4x,a)')
'REACHED END OF GWF BUDGET &
501 &FILE BEFORE READING SUFFICIENT BUDGET INFORMATION FOR THIS &
503 call store_error(errmsg)
504 call store_error_unit(this%iubud)
512 write (this%iout, fmtkstpkper)
kstp,
kper
517 do n = 1, this%bfr%nbudterms
518 call this%bfr%read_record(success, this%iout)
519 if (.not. success)
then
520 write (errmsg,
'(4x,a)')
'GWF BUDGET READ NOT SUCCESSFUL'
521 call store_error(errmsg)
522 call store_error_unit(this%iubud)
526 if (
kper /= this%bfr%kper)
then
527 write (errmsg,
'(4x,a)')
'PERIOD NUMBER IN BUDGET FILE &
528 &DOES NOT MATCH PERIOD NUMBER IN TRANSPORT MODEL. IF THERE &
529 &IS MORE THAN ONE TIME STEP IN THE BUDGET FILE FOR A GIVEN &
530 &STRESS PERIOD, BUDGET FILE TIME STEPS MUST MATCH GWT MODEL &
531 &TIME STEPS ONE-FOR-ONE IN THAT STRESS PERIOD.'
532 call store_error(errmsg)
533 call store_error_unit(this%iubud)
537 if (this%bfr%kstp > 1 .and. (
kstp /= this%bfr%kstp))
then
538 write (errmsg,
'(4x,a)')
'TIME STEP NUMBER IN BUDGET FILE &
539 &DOES NOT MATCH TIME STEP NUMBER IN TRANSPORT MODEL. IF THERE &
540 &IS MORE THAN ONE TIME STEP IN THE BUDGET FILE FOR A GIVEN STRESS &
541 &PERIOD, BUDGET FILE TIME STEPS MUST MATCH GWT MODEL TIME STEPS &
542 &ONE-FOR-ONE IN THAT STRESS PERIOD.'
543 call store_error(errmsg)
544 call store_error_unit(this%iubud)
549 select case (trim(adjustl(this%bfr%budtxt)))
550 case (
'FLOW-JA-FACE')
554 do ipos = 1,
size(this%bfr%flowja)
555 this%gwfflowja(ipos) = this%bfr%flowja(ipos)
558 do i = 1, this%bfr%nlist
559 nu = this%bfr%nodesrc(i)
560 nr = this%dis%get_nodenumber(nu, 0)
562 this%gwfspdis(1, nr) = this%bfr%auxvar(1, i)
563 this%gwfspdis(2, nr) = this%bfr%auxvar(2, i)
564 this%gwfspdis(3, nr) = this%bfr%auxvar(3, i)
567 do i = 1, this%bfr%nlist
568 nu = this%bfr%nodesrc(i)
569 nr = this%dis%get_nodenumber(nu, 0)
571 this%gwfsat(nr) = this%bfr%auxvar(1, i)
574 do nu = 1, this%dis%nodesuser
575 nr = this%dis%get_nodenumber(nu, 0)
577 this%gwfstrgss(nr) = this%bfr%flow(nu)
580 do nu = 1, this%dis%nodesuser
581 nr = this%dis%get_nodenumber(nu, 0)
583 this%gwfstrgsy(nr) = this%bfr%flow(nu)
586 call this%gwfpackages(ip)%copy_values( &
591 do i = 1, this%gwfpackages(ip)%nbound
592 nu = this%gwfpackages(ip)%nodelist(i)
593 nr = this%dis%get_nodenumber(nu, 0)
594 this%gwfpackages(ip)%nodelist(i) = nr
602 write (this%iout, fmtbudkstpkper)
kstp,
kper, this%bfr%kstp, this%bfr%kper
605 this%iflowsupdated = 0
integer(i4b), pointer, public kstp
current time step number
integer(i4b), pointer, public kper
current stress period number