Skip to content

Commit

Permalink
refactor(transport): updated with develop
Browse files Browse the repository at this point in the history
* fix(ci): fix to pre-commit when working on a fork

* fix(update_flopy): there is a new flopy.dfn file that cannot be removed (#112)

* refactor(tests): to work with recent flopy changes (#113)

* refactor(tests): to work with recent flopy changes

* fix(test_gwf_utl02): added the time series filename due to possible bug in flopy

* fix(disvdfn): corrected top shape to (ncpl) (#115)

* refactor(test000_setup.py): cleaning up the build process using new pymake functionality (#117)

* fix(dis/disv):  terminate with error if all IDOMAIN values less than or equal to zero (#124)

* fix(dis/disv):  terminate with error if all IDOMAIN values less than or equal to zero

* couple fixes to get tests running with new flopy code

* refactor(make-release): refactor updates to version numbers (#126)

* test(test000_setup): fallback for when os.path.relpath throws (#45)

Happens on Windows only. It is only used for logging, so no functional change.

* test(idomain): add zero idomain autotest (#129)

* fix(mover): added better error trapping for mover entries (#131)

* fix(mover): added better error trapping for mover entries

* more refactoring to eliminate use of memory manager in the mover object

* added characters to error message line length in memory manager

* Added mover test with a variety of mover options active

* some final cleanups on this mover patch

closes #130 

This required some fairly substantial refactoring of the mover object.  Instead of looking up information in the memory manager, the mover object is now passed packagemover objects, which should be much more efficient.

* test(returncodes): add mf6 return codes and command args autotest (#132)

Add mf6 return codes and command args autotest. Update return codes to
use select case.

* feat(ims): Add no_ptc_option FIRST and ALL to no_ptc options keyword (#134)

Add no_ptc_option FIRST and ALL to no_ptc options keyword. Add autotest
(test_gwf_noptc01.py) to test new option against simulation with PTC.

* docs(gwf.tex): minor fix (#135)

* ci(z01/z02): minor change to look for examples with .git extension (#136)

* fix(z02): correcting mistake from last commit (#139)

* ci(slack): add slack notifications

* fix(auxiliary): corrected advanced package auxiliary variables (#146)

* fix(auxiliary): corrected inconsistencies and bugs advanced package aux variables

Added a new test to make sure the aux variables are being carried correctly into the binary budget files.

* More on the auxiliary fix

* Another fix to get MAW right

* fix(ims): Allow for optional nonlinear and linear block (#147)

* ci(travis): Add simple test of Newton-Raphson with known solution (#149)

* fix(oc): error message causing runtime error (#152)

Close #151

* Update gwf-dis.dfn

Corrected a dfn typo as first reported here: https://github.com/modflowpy/flopy/pull/574/files

* fix(mkdist): error output problem in the make distribution script (#162)

Close #154

* docs(disu.dfn): small typo fix

* fix(evt): fixed error in evapotranspiration rate calculation (#169)

Closes #168

* refact(sync dfns): Disu dfn synced with flopy. (#188)

* refactor(sfr): move SfrDataType members into flat arrays (#194)

* refactor(sfr): converted the first 12 entries of SfrDataType to flat arrays

* refactor(sfr): ustrf flattening

* refactor(sfr): ftotnd flattening

* refactor(sfr): usflow flattening

* refactor(sfr): dsflow flattening

* refactor(sfr): depth flattening

* refactor(sfr): stage and gwflow flattening

* refactor(sfr): simevap flattening

* refactor(sfr): simrunoff flattening

* refactor(sfr): stage0 flattening

* refactor(sfr): flattening usflow0

* refactor(sfr): ndiv flattening

*  refactor(gwf): cleaning up call statements and arguments(#202)

* refactor(gnc): removed mention of iasln as it was not used and named wrong

* refactor(gwf): cleaning up model%ia/ja confusion in gwf

* refactor(gwf): cleaning up call statements and arguments

* refactor(xt3d): minor comment cleanup

This is in preparation to be able to mask a primary connection between two model cells so that an interface model can be used to connect two models
  • Loading branch information
langevin-usgs committed Sep 30, 2019
1 parent e5fe203 commit 0e9e448
Show file tree
Hide file tree
Showing 10 changed files with 169 additions and 189 deletions.
18 changes: 9 additions & 9 deletions autotest/test000_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def getmfexes(pth='.', version='', pltfrm=None):
assets = {p: url + p for p in ['mac.zip', 'linux.zip',
'win32.zip', 'win64.zip']}
download_url = assets[zipname]
pymake.download_and_unzip(download_url, pth, verify=False)
pymake.download_and_unzip(download_url, pth)

return

Expand Down Expand Up @@ -232,12 +232,12 @@ def test_build_zonebudget():


if __name__ == "__main__":
#test_create_dirs()
#getmfexes(pth=mfexe_pth, version=download_version)
#test_build_modflow()
#test_build_mfnwt()
#test_build_usg()
#test_build_lgr()
test_create_dirs()
test_getmfexes()
test_build_modflow()
test_build_mfnwt()
test_build_usg()
test_build_lgr()
test_build_modflow6()
#test_build_mf5to6()
#test_build_zonebudget()
test_build_mf5to6()
test_build_zonebudget()
8 changes: 3 additions & 5 deletions src/Exchange/GhostNode.f90
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ subroutine gnc_mc(this, iasln, jasln)
return
end subroutine gnc_mc

subroutine gnc_fmsav(this, kiter, iasln, amatsln)
subroutine gnc_fmsav(this, kiter, amatsln)
! ******************************************************************************
! gnc_fmsav -- Store the n-m Picard conductance in cond prior to the Newton
! terms being added.
Expand All @@ -320,7 +320,6 @@ subroutine gnc_fmsav(this, kiter, iasln, amatsln)
! -- dummy
class(GhostNodeType) :: this
integer(I4B), intent(in) :: kiter
integer(I4B), dimension(:), intent(in) :: iasln
real(DP), dimension(:), intent(inout) :: amatsln
! -- local
integer(I4B) :: ignc, ipos
Expand All @@ -343,7 +342,7 @@ subroutine gnc_fmsav(this, kiter, iasln, amatsln)
return
end subroutine gnc_fmsav

subroutine gnc_fc(this, kiter, iasln, amatsln)
subroutine gnc_fc(this, kiter, amatsln)
! ******************************************************************************
! gnc_fc -- Fill matrix terms
! Subroutine: (1) Add the GNC terms to the solution amat or model rhs depending
Expand All @@ -357,7 +356,6 @@ subroutine gnc_fc(this, kiter, iasln, amatsln)
! -- dummy
class(GhostNodeType) :: this
integer(I4B), intent(in) :: kiter
integer(I4B), dimension(:), intent(in) :: iasln
real(DP), dimension(:), intent(inout) :: amatsln
! -- local
integer(I4B) :: ignc, j, noden, nodem, ipos, jidx, iposjn, iposjm
Expand All @@ -366,7 +364,7 @@ subroutine gnc_fc(this, kiter, iasln, amatsln)
!
! -- If this is a single model gnc (not an exchange across models), then
! pull conductances out of amatsln and store them in this%cond
if(this%smgnc) call this%gnc_fmsav(kiter, iasln, amatsln)
if(this%smgnc) call this%gnc_fmsav(kiter, amatsln)
!
! -- Add gnc terms to rhs or to amat depending on whether gnc is implicit
! or explicit
Expand Down
2 changes: 1 addition & 1 deletion src/Exchange/GwfGwfExchange.f90
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ subroutine gwf_gwf_fc(this, kiter, iasln, amatsln, inwtflag)
!
! -- Fill the gnc terms in the solution matrix
if(this%ingnc > 0) then
call this%gnc%gnc_fc(kiter, iasln, amatsln)
call this%gnc%gnc_fc(kiter, amatsln)
endif
!
! -- Call mvr fc routine
Expand Down
51 changes: 22 additions & 29 deletions src/Model/GroundWaterFlow/gwf3.f90
Original file line number Diff line number Diff line change
Expand Up @@ -321,18 +321,19 @@ subroutine gwf_df(this)
!
! -- Define packages and utility objects
call this%dis%dis_df()
call this%npf%npf_df(this%xt3d, this%ingnc)
call this%npf%npf_df(this%dis, this%xt3d, this%ingnc)
call this%oc%oc_df()
call this%budget%budget_df(niunit, 'VOLUME', 'L**3')
if(this%ingnc > 0) call this%gnc%gnc_df(this)
!
! -- Assign or point model members to dis members
! this%neq will be incremented if packages add additional unknowns
this%neq = this%dis%nodes
this%nja = this%dis%nja
this%ia => this%dis%con%ia
this%ja => this%dis%con%ja
!
! -- Allocate model arrays, now that neq and nja are assigned
! -- Allocate model arrays, now that neq and nja are known
call this%allocate_arrays()
!
! -- Define packages and assign iout for time series managers
Expand Down Expand Up @@ -365,12 +366,11 @@ subroutine gwf_ac(this, sparse)
integer(I4B) :: ip
! ------------------------------------------------------------------------------
!
! -- Add the internal connections of this model to sparse
! -- Add the primary grid connections of this model to sparse
call this%dis%dis_ac(this%moffset, sparse)
!
! -- Add any additional connections that NPF may need
if(this%innpf > 0) call this%npf%npf_ac(this%moffset, sparse, &
this%dis%nodes, this%ia, this%ja)
if(this%innpf > 0) call this%npf%npf_ac(this%moffset, sparse)
!
! -- Add any package connections
do ip = 1, this%bndlist%Count()
Expand Down Expand Up @@ -407,8 +407,7 @@ subroutine gwf_mc(this, iasln, jasln)
call this%dis%dis_mc(this%moffset, this%idxglo, iasln, jasln)
!
! -- Map any additional connections that NPF may need
if(this%innpf > 0) call this%npf%npf_mc(this%moffset, this%dis%nodes, &
this%ia, this%ja, iasln, jasln)
if(this%innpf > 0) call this%npf%npf_mc(this%moffset, iasln, jasln)
!
! -- Map any package connections
do ip=1,this%bndlist%Count()
Expand Down Expand Up @@ -442,8 +441,7 @@ subroutine gwf_ar(this)
!
! -- Allocate and read modules attached to model
if(this%inic > 0) call this%ic%ic_ar(this%x)
if(this%innpf > 0) call this%npf%npf_ar(this%dis, this%ic, &
this%ibound, this%x)
if(this%innpf > 0) call this%npf%npf_ar(this%ic, this%ibound, this%x)
if(this%inbuy > 0) call this%buy%buy_ar(this%dis, this%npf, this%ibound)
if(this%inhfb > 0) call this%hfb%hfb_ar(this%ibound, this%xt3d, this%dis)
if(this%insto > 0) call this%sto%sto_ar(this%dis, this%ibound)
Expand Down Expand Up @@ -604,19 +602,16 @@ subroutine gwf_fc(this, kiter, amatsln, njasln, inwtflag)
endif
!
! -- Fill standard conductance terms
if(this%innpf > 0) call this%npf%npf_fc(kiter, this%dis%nodes, &
this%nja, njasln, amatsln, &
this%idxglo, this%rhs, this%x)
if(this%innpf > 0) call this%npf%npf_fc(kiter, njasln, amatsln, &
this%idxglo, this%rhs, this%x)
if(this%inbuy > 0) call this%buy%buy_fc(kiter, njasln, amatsln, &
this%idxglo, this%rhs, this%x)
if(this%inhfb > 0) call this%hfb%hfb_fc(kiter, this%dis%nodes, &
this%nja, njasln, amatsln, &
this%idxglo, this%rhs, this%x)
if(this%ingnc > 0) call this%gnc%gnc_fc(kiter, this%ia, amatsln)
if(this%inhfb > 0) call this%hfb%hfb_fc(kiter, njasln, amatsln, &
this%idxglo, this%rhs, this%x)
if(this%ingnc > 0) call this%gnc%gnc_fc(kiter, amatsln)
if(this%insto > 0) then
call this%sto%sto_fc(kiter, this%dis%nodes, this%xold, &
this%x, this%nja, njasln, &
amatsln, this%idxglo, this%rhs)
call this%sto%sto_fc(kiter, this%xold, this%x, njasln, amatsln, &
this%idxglo, this%rhs)
end if
if(this%inmvr > 0) call this%mvr%mvr_fc()
do ip = 1, this%bndlist%Count()
Expand All @@ -627,8 +622,8 @@ subroutine gwf_fc(this, kiter, amatsln, njasln, inwtflag)
!--Fill newton terms
if(this%innpf > 0) then
if(inwt /= 0) then
call this%npf%npf_fn(kiter, this%dis%nodes, this%nja, njasln, &
amatsln, this%idxglo, this%rhs, this%x)
call this%npf%npf_fn(kiter, njasln, amatsln, this%idxglo, this%rhs, &
this%x)
endif
endif
!
Expand All @@ -645,8 +640,8 @@ subroutine gwf_fc(this, kiter, amatsln, njasln, inwtflag)
! -- Fill newton terms for storage
if(this%insto > 0) then
if (inwtsto /= 0) then
call this%sto%sto_fn(kiter, this%dis%nodes, this%xold, this%x, &
this%nja, njasln, amatsln, this%idxglo, this%rhs)
call this%sto%sto_fn(kiter, this%xold, this%x, njasln, amatsln, &
this%idxglo, this%rhs)
end if
end if
!
Expand Down Expand Up @@ -913,11 +908,9 @@ subroutine gwf_cq(this, icnvg, isuppress_output)
do i = 1, this%nja
this%flowja(i) = DZERO
enddo
if(this%innpf > 0) call this%npf%npf_flowja(this%neq, this%nja, this%x, &
this%flowja)
if(this%innpf > 0) call this%npf%npf_flowja(this%x, this%flowja)
if(this%inbuy > 0) call this%buy%buy_flowja(this%x, this%flowja)
if(this%inhfb > 0) call this%hfb%hfb_flowja(this%neq, this%nja, this%x, &
this%flowja)
if(this%inhfb > 0) call this%hfb%hfb_flowja(this%x, this%flowja)
if(this%ingnc > 0) call this%gnc%flowja(this%flowja)
!
! -- Return
Expand Down Expand Up @@ -976,7 +969,7 @@ subroutine gwf_bd(this, icnvg, isuppress_output)
!
! -- Node Property Flow
if(this%innpf > 0) then
call this%npf%npf_bdadj(this%nja, this%flowja, icbcfl, icbcun)
call this%npf%npf_bdadj(this%flowja, icbcfl, icbcun)
endif
!
! -- Clear obs
Expand Down Expand Up @@ -1041,7 +1034,7 @@ subroutine gwf_ot(this)
if(ibudfl /= 0) then
!
! -- NPF output
if(this%innpf > 0) call this%npf%npf_ot(this%neq, this%nja, this%flowja)
if(this%innpf > 0) call this%npf%npf_ot(this%flowja)
!
! -- GNC output
if(this%ingnc > 0) &
Expand Down
23 changes: 11 additions & 12 deletions src/Model/GroundWaterFlow/gwf3hfb8.f90
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ subroutine hfb_rp(this)
return
end subroutine hfb_rp

subroutine hfb_fc(this, kiter, nodes, nja, njasln, amat, idxglo, rhs, hnew)
subroutine hfb_fc(this, kiter, njasln, amat, idxglo, rhs, hnew)
! ******************************************************************************
! hfb_fc -- Fill amatsln for the following conditions:
! 1. Not Newton, and
Expand All @@ -212,14 +212,13 @@ subroutine hfb_fc(this, kiter, nodes, nja, njasln, amat, idxglo, rhs, hnew)
! -- dummy
class(GwfHfbType) :: this
integer(I4B) :: kiter
integer(I4B),intent(in) :: nodes
integer(I4B),intent(in) :: nja
integer(I4B),intent(in) :: njasln
real(DP),dimension(njasln),intent(inout) :: amat
integer(I4B),intent(in),dimension(nja) :: idxglo
real(DP),intent(inout),dimension(nodes) :: rhs
real(DP),intent(inout),dimension(nodes) :: hnew
integer(I4B),intent(in),dimension(:) :: idxglo
real(DP),intent(inout),dimension(:) :: rhs
real(DP),intent(inout),dimension(:) :: hnew
! -- local
integer(I4B) :: nodes, nja
integer(I4B) :: ihfb, n, m
integer(I4B) :: ipos
integer(I4B) :: idiag, isymcon
Expand All @@ -229,6 +228,8 @@ subroutine hfb_fc(this, kiter, nodes, nja, njasln, amat, idxglo, rhs, hnew)
real(DP) :: topn, topm, botn, botm
! ------------------------------------------------------------------------------
!
nodes = this%dis%nodes
nja = this%dis%con%nja
if (associated(this%xt3d%ixt3d)) then
ixt3d = this%xt3d%ixt3d
else
Expand Down Expand Up @@ -335,7 +336,7 @@ subroutine hfb_fc(this, kiter, nodes, nja, njasln, amat, idxglo, rhs, hnew)
return
end subroutine hfb_fc

subroutine hfb_flowja(this, nodes, nja, hnew, flowja)
subroutine hfb_flowja(this, hnew, flowja)
! ******************************************************************************
! hfb_flowja -- flowja will automatically include the effects of the hfb
! for confined and newton cases when xt3d is not used. This method
Expand All @@ -348,10 +349,8 @@ subroutine hfb_flowja(this, nodes, nja, hnew, flowja)
use ConstantsModule, only: DHALF, DZERO
! -- dummy
class(GwfHfbType) :: this
integer(I4B),intent(in) :: nodes
integer(I4B),intent(in) :: nja
real(DP),intent(inout),dimension(nodes) :: hnew
real(DP),intent(inout),dimension(nja) :: flowja
real(DP),intent(inout),dimension(:) :: hnew
real(DP),intent(inout),dimension(:) :: flowja
! -- local
integer(I4B) :: ihfb, n, m
integer(I4B) :: ipos
Expand Down Expand Up @@ -405,7 +404,7 @@ subroutine hfb_flowja(this, nodes, nja, hnew, flowja)
condhfb = this%hydchr(ihfb)
endif
! -- Make hfb corrections for xt3d
call this%xt3d%xt3d_flowjahfb(nodes, n, m, nja, hnew, flowja, condhfb)
call this%xt3d%xt3d_flowjahfb(n, m, hnew, flowja, condhfb)
end do
!
else
Expand Down
Loading

0 comments on commit 0e9e448

Please sign in to comment.