Skip to content

Commit

Permalink
fix(gwf3vsc8.f90): fix for the text header in the vsc package's binar…
Browse files Browse the repository at this point in the history
…y output file (#1344)

* fix(gwf3vsc8.f90): fix for the text header in the vsc package's binary output file

* forgot to uncomment matching \end{itemize} line
  • Loading branch information
emorway-usgs authored Sep 8, 2023
1 parent 12c8421 commit da532a5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
12 changes: 12 additions & 0 deletions autotest/test_gwf_vsc01.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,18 @@ def eval_results(sim):
+ ex[2]
+ ", but it is not."
)

# Ensure that binary output file is readable (has the correct header)
vsc_filerecord = "{}.vsc.bin".format(gwfname)
fname = os.path.join(sim.simpath, vsc_filerecord)
if os.path.isfile(fname):
vscobj = flopy.utils.HeadFile(fname, precision='double', text="VISCOSITY")
try:
data = vscobj.get_alldata()
print(data.shape)
data.shape == (500, 1, 10, 80)
except:
print("Binary viscosity output file was not read successfully")


# - No need to change any code below
Expand Down
8 changes: 4 additions & 4 deletions doc/ReleaseNotes/develop.tex
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
% \item xxx
%\end{itemize}

%\underline{STRESS PACKAGES}
%\begin{itemize}
% \item xxx
\underline{STRESS PACKAGES}
\begin{itemize}
\item The data header in the binary output file written by the viscosity (VSC) package was printing `` VISCOSI'' instead of `` VISCOSITY''. The viscosity package now prints the full `` VISCOSITY'' header in the binary output file.
% \item xxx
% \item xxx
%\end{itemize}
\end{itemize}

\underline{ADVANCED STRESS PACKAGES}
\begin{itemize}
Expand Down
2 changes: 1 addition & 1 deletion src/Model/GroundWaterFlow/gwf3vsc8.f90
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ subroutine vsc_ot_dv(this, idvfl)
if (this%ioutvisc /= 0) then
ibinun = this%ioutvisc
call this%dis%record_array(this%visc, this%iout, iprint, ibinun, &
' VISCOSITY', cdatafmp, nvaluesp, &
' VISCOSITY', cdatafmp, nvaluesp, &
nwidthp, editdesc, dinact)
end if
end if
Expand Down

0 comments on commit da532a5

Please sign in to comment.