Skip to content

Commit

Permalink
fix(idm): reset auxvar 2d arrray in array input loader each period (#…
Browse files Browse the repository at this point in the history
…1548)

* reset auxvar 2d arrray in array input loader each period

* cleanup

* update the release notes

---------

Co-authored-by: mjreno <mreno@IGSAAA071L00066.gs.doi.net>
  • Loading branch information
mjreno and mjreno authored Jan 11, 2024
1 parent 3bda561 commit 657b2b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions doc/ReleaseNotes/develop.tex
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
\begin{itemize}
\item Improve error message if the size of data read from a binary array file is inconsistent with READARRAY control line and variable description keywords.
\item The area calculation for cells in the DISV package was inaccurate for some cases with very large cell vertex coordinates. The area calculation was improved by using transformed cell vertex coordinates prior to making the area calculation.
\item Auxiliary variables in RCH and EVT Array-Based input packages corrected to reset to zero when otherwise not specified in period input data and the auxiliary parameter is not controlled by a time-series.
% \item xxx
% \item xxx
\end{itemize}
Expand Down
16 changes: 9 additions & 7 deletions src/Utilities/Idm/mf6blockfile/StressGridInput.f90
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,7 @@ subroutine ingrid_reset(this)
use InputDefinitionModule, only: InputParamDefinitionType
use DefinitionSelectModule, only: get_param_definition_type
class(StressGridInputType), intent(inout) :: this !< StressGridInputType
type(InputParamDefinitionType), pointer :: idt
integer(I4B) :: n
integer(I4B) :: n, m
!
if (this%tas_active /= 0) then
!
Expand All @@ -249,19 +248,22 @@ subroutine ingrid_reset(this)
this%mf6_input%mempath, this%sourcename)
end if
!
! -- reset input context memory for parameters
do n = 1, this%nparam
if (this%param_reads(n)%invar /= 0) then
!
! -- set definition
idt => this%mf6_input%param_dfns(this%idt_idxs(n))
!
! -- reset read state
this%param_reads(n)%invar = 0

!
end if
end do
!
! -- explicitly reset auxvar array each period
do m = 1, this%bndctx%ncpl
do n = 1, this%bndctx%naux
this%bndctx%auxvar(n, m) = DZERO
end do
end do
!
! -- return
return
end subroutine ingrid_reset
Expand Down

0 comments on commit 657b2b9

Please sign in to comment.