Skip to content

Commit

Permalink
modify so gauge always written at starting time regardless of min_tim…
Browse files Browse the repository at this point in the history
…e_increment

Analogous to change in clawpack/geoclaw#636
  • Loading branch information
rjleveque committed Feb 11, 2025
1 parent 2d9d076 commit f800c56
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/2d/gauges_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ subroutine set_gauges(restart, num_eqn, num_aux, fname)
read(UNIT, *) gauges(i)%gauge_num, gauges(i)%x, gauges(i)%y, &
gauges(i)%t_start, gauges(i)%t_end
gauges(i)%buffer_index = 1
gauges(i)%last_time = gauges(i)%t_start
enddo

! Read in output formats
Expand All @@ -146,6 +145,13 @@ subroutine set_gauges(restart, num_eqn, num_aux, fname)
read(UNIT, *)
read(UNIT, *) (gauges(i)%gtype, i=1, num_gauges)

do i=1,num_gauges
! initialize last_time so that first gauge output will be
! at time gauges(i)%t_start regardless of min_time_increment:
gauges(i)%last_time = gauges(i)%t_start - 1.d0 &
- gauges(i)%min_time_increment
enddo

! Read in q fields
read(UNIT, *)
read(UNIT, *)
Expand Down

0 comments on commit f800c56

Please sign in to comment.