Skip to content

Commit

Permalink
fix(mf5to6): fix converter for multiple mnw2 wells (#256)
Browse files Browse the repository at this point in the history
* converter had multiple bugs for multiple MNW2 wells that spanned multiple model layers
* closes #185
* added history to converter document
  • Loading branch information
langevin-usgs authored Nov 12, 2019
1 parent 585940b commit c03c76c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
13 changes: 13 additions & 0 deletions doc/ConverterGuide/converter_mf5to6.tex
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,19 @@
\normalsize
\end{table}


% -------------------------------------------------
\section{History}
This section describes changes introduced into the MODFLOW 6 converter with each official release. These changes may substantially affect users.

\begin{itemize}
\item
\currentmodflowversion
\begin{itemize}
\item Fixed an issue in the conversion of MNW2 wells into the MODFLOW 6 format. The converter did not produce correct results when multiple MNW wells were present and when the wells spanned multiple model layers.
\end{itemize}
\end{itemize}

\REFSECTION
%\SECTION{References Cited}
\bibliography{../MODFLOW6References}
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 @@ -197,7 +197,7 @@ subroutine disu_init_mem(dis, name_model, iout, nodes, nja, &
end do
end if
!
! -- finialize connection data
! -- finalize connection data
call disext%con%con_finalize(iout, ihc, cl12, hwva, atemp)
disext%njas = disext%con%njas
!
Expand Down
4 changes: 4 additions & 0 deletions src/Model/ModelUtilities/Connections.f90
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,11 @@ subroutine read_from_block(this, name_model, nodes, nja, inunit, iout)
!
! -- verify all items were read
do n = 1, nname
!
! -- skip angledegx because it is not required
if(aname(n) == aname(6)) cycle
!
! -- error if not read
if(.not. lname(n)) then
write(ermsg,'(1x,a,a)') &
'ERROR. REQUIRED CONNECTIONDATA INPUT WAS NOT SPECIFIED: ', &
Expand Down
8 changes: 4 additions & 4 deletions utils/mf5to6/src/MawPackageWriter.f90
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,8 @@ subroutine WriteWellConnections(this)
else
! Intervals are specified in MNW2 input
! Get first and last interval for this well
firstint = nint(mnwnod(12, iw))
lastint = nint(mnwnod(13, iw))
firstint = nint(mnwnod(12, firstnode))
lastint = nint(mnwnod(13, lastnode))
nintvl = lastint - firstint + 1
! loop through intervals
do ii=firstint,lastint
Expand Down Expand Up @@ -510,8 +510,8 @@ subroutine WriteWellConnections(this)
do nn = firstnode,lastnode
! Get layer
il = nint(mnwnod(1, nn))
write(iu,30)iw, nn, il, ir, ic, scrn_top, scrn_bot, hk_skin, &
radius_skin
write(iu,30) iw, nn - firstnode + 1, il, ir, ic, scrn_top, &
scrn_bot, hk_skin, radius_skin
enddo
enddo
endif
Expand Down

0 comments on commit c03c76c

Please sign in to comment.