Skip to content

Commit 87257a0

Browse files
committed
skip writing of flow-ja-face when only one reach
1 parent b4f94a4 commit 87257a0

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

src/Utilities/BudgetTerm.f90

+20-18
Original file line numberDiff line numberDiff line change
@@ -205,24 +205,26 @@ subroutine save_flows(this, dis, ibinun, kstp, kper, delt, pertim, totim, &
205205
end do
206206
!
207207
! -- Write the header
208-
call ubdsv06(kstp, kper, this%flowtype, &
209-
this%text1id1, this%text2id1, &
210-
this%text1id2, this%text2id2, &
211-
ibinun, this%naux, this%auxtxt, &
212-
nlist, 1, 1, nlist, &
213-
iout, delt, pertim, totim)
214-
!
215-
! -- Write each entry
216-
do i = 1, this%nlist
217-
q = this%flow(i)
218-
n1 = this%id1(i)
219-
n2 = this%id2(i)
220-
if (n1 <= 0 .or. n2 <= 0) cycle
221-
call dis%record_mf6_list_entry(ibinun, n1, n2, q, &
222-
this%naux, this%auxvar(:, i), &
223-
olconv=this%olconv1, &
224-
olconv2=this%olconv2)
225-
end do
208+
if (nlist > 0) then
209+
call ubdsv06(kstp, kper, this%flowtype, &
210+
this%text1id1, this%text2id1, &
211+
this%text1id2, this%text2id2, &
212+
ibinun, this%naux, this%auxtxt, &
213+
nlist, 1, 1, nlist, &
214+
iout, delt, pertim, totim)
215+
!
216+
! -- Write each entry
217+
do i = 1, this%nlist
218+
q = this%flow(i)
219+
n1 = this%id1(i)
220+
n2 = this%id2(i)
221+
if (n1 <= 0 .or. n2 <= 0) cycle
222+
call dis%record_mf6_list_entry(ibinun, n1, n2, q, &
223+
this%naux, this%auxvar(:, i), &
224+
olconv=this%olconv1, &
225+
olconv2=this%olconv2)
226+
end do
227+
end if
226228
!
227229
end subroutine save_flows
228230

0 commit comments

Comments
 (0)