Skip to content

Commit 657b2b9

Browse files
mjrenomjreno
and
mjreno
authored
fix(idm): reset auxvar 2d arrray in array input loader each period (#1548)
* reset auxvar 2d arrray in array input loader each period * cleanup * update the release notes --------- Co-authored-by: mjreno <[email protected]>
1 parent 3bda561 commit 657b2b9

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

doc/ReleaseNotes/develop.tex

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
\begin{itemize}
2323
\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.
2424
\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.
25+
\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.
2526
% \item xxx
2627
% \item xxx
2728
\end{itemize}

src/Utilities/Idm/mf6blockfile/StressGridInput.f90

+9-7
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,7 @@ subroutine ingrid_reset(this)
234234
use InputDefinitionModule, only: InputParamDefinitionType
235235
use DefinitionSelectModule, only: get_param_definition_type
236236
class(StressGridInputType), intent(inout) :: this !< StressGridInputType
237-
type(InputParamDefinitionType), pointer :: idt
238-
integer(I4B) :: n
237+
integer(I4B) :: n, m
239238
!
240239
if (this%tas_active /= 0) then
241240
!
@@ -249,19 +248,22 @@ subroutine ingrid_reset(this)
249248
this%mf6_input%mempath, this%sourcename)
250249
end if
251250
!
252-
! -- reset input context memory for parameters
253251
do n = 1, this%nparam
254252
if (this%param_reads(n)%invar /= 0) then
255-
!
256-
! -- set definition
257-
idt => this%mf6_input%param_dfns(this%idt_idxs(n))
258253
!
259254
! -- reset read state
260255
this%param_reads(n)%invar = 0
261-
256+
!
262257
end if
263258
end do
264259
!
260+
! -- explicitly reset auxvar array each period
261+
do m = 1, this%bndctx%ncpl
262+
do n = 1, this%bndctx%naux
263+
this%bndctx%auxvar(n, m) = DZERO
264+
end do
265+
end do
266+
!
265267
! -- return
266268
return
267269
end subroutine ingrid_reset

0 commit comments

Comments
 (0)