Advance the budget file reader by reading the next chunk of information for the current time step and stress period.
448 class(FlowModelInterfaceType) :: this
453 integer(I4B) :: nu, nr
454 integer(I4B) :: ip, i
457 character(len=*),
parameter :: fmtkstpkper = &
458 "(1x,/1x,'FMI READING BUDGET TERMS &
459 &FOR KSTP ', i0, ' KPER ', i0)"
460 character(len=*),
parameter :: fmtbudkstpkper = &
461 "(1x,/1x, 'FMI SETTING BUDGET TERMS &
462 &FOR KSTP ', i0, ' AND KPER ', &
463 &i0, ' TO BUDGET FILE TERMS FROM &
464 &KSTP ', i0, ' AND KPER ', i0)"
472 if (this%bfr%kstp == 1)
then
473 if (this%bfr%kpernext ==
kper + 1)
then
475 else if (this%bfr%endoffile)
then
478 else if (this%bfr%endoffile)
then
479 write (errmsg,
'(4x,a)')
'REACHED END OF GWF BUDGET &
480 &FILE BEFORE READING SUFFICIENT BUDGET INFORMATION FOR THIS &
482 call store_error(errmsg)
483 call store_error_unit(this%iubud)
491 write (this%iout, fmtkstpkper)
kstp,
kper
496 do n = 1, this%bfr%nbudterms
497 call this%bfr%read_record(success, this%iout)
498 if (.not. success)
then
499 write (errmsg,
'(4x,a)')
'GWF BUDGET READ NOT SUCCESSFUL'
500 call store_error(errmsg)
501 call store_error_unit(this%iubud)
505 if (
kper /= this%bfr%kper)
then
506 write (errmsg,
'(4x,a)')
'PERIOD NUMBER IN BUDGET FILE &
507 &DOES NOT MATCH PERIOD NUMBER IN TRANSPORT MODEL. IF THERE &
508 &IS MORE THAN ONE TIME STEP IN THE BUDGET FILE FOR A GIVEN &
509 &STRESS PERIOD, BUDGET FILE TIME STEPS MUST MATCH GWT MODEL &
510 &TIME STEPS ONE-FOR-ONE IN THAT STRESS PERIOD.'
511 call store_error(errmsg)
512 call store_error_unit(this%iubud)
516 if (this%bfr%kstp > 1 .and. (
kstp /= this%bfr%kstp))
then
517 write (errmsg,
'(4x,a)')
'TIME STEP NUMBER IN BUDGET FILE &
518 &DOES NOT MATCH TIME STEP NUMBER IN TRANSPORT MODEL. IF THERE &
519 &IS MORE THAN ONE TIME STEP IN THE BUDGET FILE FOR A GIVEN STRESS &
520 &PERIOD, BUDGET FILE TIME STEPS MUST MATCH GWT MODEL TIME STEPS &
521 &ONE-FOR-ONE IN THAT STRESS PERIOD.'
522 call store_error(errmsg)
523 call store_error_unit(this%iubud)
528 select case (trim(adjustl(this%bfr%budtxt)))
529 case (
'FLOW-JA-FACE')
533 do ipos = 1,
size(this%bfr%flowja)
534 this%gwfflowja(ipos) = this%bfr%flowja(ipos)
537 do i = 1, this%bfr%nlist
538 nu = this%bfr%nodesrc(i)
539 nr = this%dis%get_nodenumber(nu, 0)
541 this%gwfspdis(1, nr) = this%bfr%auxvar(1, i)
542 this%gwfspdis(2, nr) = this%bfr%auxvar(2, i)
543 this%gwfspdis(3, nr) = this%bfr%auxvar(3, i)
546 do i = 1, this%bfr%nlist
547 nu = this%bfr%nodesrc(i)
548 nr = this%dis%get_nodenumber(nu, 0)
550 this%gwfsat(nr) = this%bfr%auxvar(1, i)
553 do nu = 1, this%dis%nodesuser
554 nr = this%dis%get_nodenumber(nu, 0)
556 this%gwfstrgss(nr) = this%bfr%flow(nu)
559 do nu = 1, this%dis%nodesuser
560 nr = this%dis%get_nodenumber(nu, 0)
562 this%gwfstrgsy(nr) = this%bfr%flow(nu)
565 call this%gwfpackages(ip)%copy_values( &
570 do i = 1, this%gwfpackages(ip)%nbound
571 nu = this%gwfpackages(ip)%nodelist(i)
572 nr = this%dis%get_nodenumber(nu, 0)
573 this%gwfpackages(ip)%nodelist(i) = nr
581 write (this%iout, fmtbudkstpkper)
kstp,
kper, this%bfr%kstp, this%bfr%kper
584 this%iflowsupdated = 0
integer(i4b), pointer, public kstp
current time step number
integer(i4b), pointer, public kper
current stress period number