Skip to content

Commit

Permalink
feat(transport): update develop with some general routines needed for…
Browse files Browse the repository at this point in the history
… transport (#339)

* feat(transport): update develop with some general routines needed for transport
* fix(mover): correct typo in error message
* closes #336
* refactor(disu): correct type in disu error message
* closes #635
  • Loading branch information
langevin-usgs authored Mar 10, 2020
1 parent 783ad3b commit ff705ce
Show file tree
Hide file tree
Showing 8 changed files with 707 additions and 41 deletions.
1 change: 1 addition & 0 deletions msvs/mf6.vfproj
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
<File RelativePath="..\src\Utilities\ArrayReaders.f90"/>
<File RelativePath="..\src\Utilities\BlockParser.f90"/>
<File RelativePath="..\src\Utilities\Budget.f90"/>
<File RelativePath="..\src\Utilities\BudgetFileReader.f90"/>
<File RelativePath="..\src\Utilities\BudgetObject.f90"/>
<File RelativePath="..\src\Utilities\BudgetTerm.f90"/>
<File RelativePath="..\src\Utilities\comarg.f90"/>
Expand Down
2 changes: 1 addition & 1 deletion src/Model/GroundWaterFlow/gwf3disu8.f90
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ subroutine read_dimensions(this)
write(this%iout,'(3x,a)') 'VERTICES AND CELL2D BLOCKS WILL ' // &
'BE READ BELOW. '
case default
write(errmsg,'(4x,a,a)')'****ERROR. UNKNOWN DIS DIMENSION: ', &
write(errmsg,'(4x,a,a)')'****ERROR. UNKNOWN DISU DIMENSION: ', &
trim(keyword)
call store_error(errmsg)
call this%parser%StoreErrorUnit()
Expand Down
68 changes: 35 additions & 33 deletions src/Model/GroundWaterFlow/gwf3maw8.f90
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ module MawModule
mem_deallocate
!
implicit none

public :: MawType

!
character(len=LENFTYPE) :: ftype = 'MAW'
character(len=LENPACKAGENAME) :: text = ' MAW'
Expand Down Expand Up @@ -3910,10 +3913,9 @@ subroutine maw_setup_budobj(this)
!
! -- Determine the number of maw budget terms. These are fixed for
! the simulation and cannot change.
! gwf rate [flowing_well] [storage] constant_flow [frommvr tomvr tomvrcf [tomvrfw]] [aux]
nbudterm = 3
! gwf rate [flowing_well] storage constant_flow [frommvr tomvr tomvrcf [tomvrfw]] [aux]
nbudterm = 4
if (this%iflowingwells > 0) nbudterm = nbudterm + 1
if (this%imawissopt /= 1) nbudterm = nbudterm + 1
if (this%imover == 1) then
nbudterm = nbudterm + 3
if (this%iflowingwells > 0) nbudterm = nbudterm + 1
Expand Down Expand Up @@ -3978,20 +3980,18 @@ subroutine maw_setup_budobj(this)
end if
!
! --
if (this%imawissopt /= 1) then
text = ' STORAGE'
idx = idx + 1
maxlist = this%nmawwells
naux = 1
auxtxt(1) = ' VOLUME'
call this%budobj%budterm(idx)%initialize(text, &
this%name_model, &
this%name, &
this%name_model, &
this%name_model, &
maxlist, .false., .true., &
naux, auxtxt)
end if
text = ' STORAGE'
idx = idx + 1
maxlist = this%nmawwells
naux = 1
auxtxt(1) = ' VOLUME'
call this%budobj%budterm(idx)%initialize(text, &
this%name_model, &
this%name, &
this%name_model, &
this%name_model, &
maxlist, .false., .true., &
naux, auxtxt)
!
! --
text = ' CONSTANT'
Expand Down Expand Up @@ -4023,7 +4023,7 @@ subroutine maw_setup_budobj(this)
naux)
!
! --
text = ' RATE TO-MVR'
text = ' RATE-TO-MVR'
idx = idx + 1
maxlist = this%nmawwells
naux = 0
Expand All @@ -4036,7 +4036,7 @@ subroutine maw_setup_budobj(this)
naux)
!
! -- constant-head flow to mover
text = ' CONSTANT TO-MVR'
text = ' CONSTANT-TO-MVR'
idx = idx + 1
maxlist = this%nmawwells
naux = 0
Expand All @@ -4052,7 +4052,7 @@ subroutine maw_setup_budobj(this)
if (this%iflowingwells > 0) then
!
! --
text = ' FW-RATE TO-MVR'
text = ' FW-RATE-TO-MVR'
idx = idx + 1
maxlist = this%nmawwells
naux = 0
Expand Down Expand Up @@ -4175,20 +4175,22 @@ subroutine maw_fill_budobj(this)
end if
!
! -- STORAGE (AND VOLUME AS AUX)
if (this%imawissopt /= 1) then
idx = idx + 1
call this%budobj%budterm(idx)%reset(this%nmawwells)
do n = 1, this%nmawwells
b = this%mawwells(n)%xsto - this%mawwells(n)%bot
if (b < DZERO) then
b = DZERO
end if
v = this%mawwells(n)%area * b
idx = idx + 1
call this%budobj%budterm(idx)%reset(this%nmawwells)
do n = 1, this%nmawwells
b = this%mawwells(n)%xsto - this%mawwells(n)%bot
if (b < DZERO) then
b = DZERO
end if
v = this%mawwells(n)%area * b
if (this%imawissopt /= 1) then
q = this%qsto(n)
this%qauxcbc(1) = v
call this%budobj%budterm(idx)%update_term(n, n, q, this%qauxcbc)
end do
end if
else
q = DZERO
end if
this%qauxcbc(1) = v
call this%budobj%budterm(idx)%update_term(n, n, q, this%qauxcbc)
end do
!
! -- CONSTANT FLOW
idx = idx + 1
Expand Down
2 changes: 1 addition & 1 deletion src/Model/ModelUtilities/Mover.f90
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ subroutine set(this, line, inunit, iout, mname, pakorigins, pakmovers)
! -- Set pointer to QFROMMVR array in the receiver boundary package
temp_ptr => pakmovers(ipakloc2)%qfrommvr
if(this%irch2 < 1 .or. this%irch2 > size(temp_ptr)) then
call store_error('ERROR. PROVIDER ID < 1 OR GREATER THAN PACKAGE SIZE ')
call store_error('ERROR. RECEIVER ID < 1 OR GREATER THAN PACKAGE SIZE ')
write(errmsg, '(4x,a,i0,a,i0)') 'RECEIVER ID = ', this%irch2, &
'; PACKAGE SIZE = ', size(temp_ptr)
call store_error(trim(errmsg))
Expand Down
Loading

0 comments on commit ff705ce

Please sign in to comment.