Skip to content

Commit a2e36b8

Browse files
committed
make index dynamic
1 parent 6b765c7 commit a2e36b8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/2d/shallow/fgout_module.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,12 @@ subroutine set_fgout(rest,num_eqn,fname)
225225
write(6,*) '+++ nqout = ',fg%nqout
226226

227227
! Allocate new fixed grid data arrays at early, late time:
228-
! dimension (10,:,:) to work for either GeoClaw or D-Claw
228+
! dimension (fg%time_index,:,:) to work for either GeoClaw or D-Claw
229229

230-
allocate(fg%early(10, fg%mx,fg%my))
230+
allocate(fg%early(fg%time_index, fg%mx,fg%my))
231231
fg%early = nan()
232232

233-
allocate(fg%late(10, fg%mx,fg%my))
233+
allocate(fg%late(fg%time_index, fg%mx,fg%my))
234234
fg%late = nan()
235235

236236
enddo
@@ -445,7 +445,7 @@ subroutine fgout_write(fgrid,out_time,out_index)
445445

446446
! Other locals
447447
integer :: i,j,m,iq,k,jq,num_eqn
448-
real(kind=8) :: t0,tf,tau, qaug(10)
448+
real(kind=8) :: t0,tf,tau, qaug(fgrid%time_index)
449449
real(kind=8), allocatable :: qeta(:,:,:)
450450
real(kind=4), allocatable :: qeta4(:,:,:)
451451
real(kind=8) :: h_early,h_late,topo_early,topo_late

0 commit comments

Comments
 (0)