Skip to content

Commit f446048

Browse files
committed
added max timing also for old output format
1 parent 302907a commit f446048

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/Utility/Post-Processing-Fortran/read_output8_allnodes.f90

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ program read_out
4646
allocatable :: sigma(:),cs(:),ztot(:)
4747
allocatable :: outvar(:,:,:,:),out(:,:,:),icum(:,:,:),eta2(:,:),ztmp(:,:)
4848
allocatable :: xcj(:),ycj(:),dps(:),kbs(:),xctr(:),yctr(:),dpe(:),kbe(:)
49-
allocatable :: zs(:,:),ze(:,:),idry(:),outs(:,:,:),oute(:,:,:),rstat2d(:,:),rviolator(:)
49+
allocatable :: zs(:,:),ze(:,:),idry(:),outs(:,:,:),oute(:,:,:),rstat2d(:,:),rviolator(:),time_stat(:)
5050
allocatable :: ic3(:,:),isdel(:,:),isidenode(:,:),kbp(:),sigma_lcl(:,:)
5151
integer, allocatable :: elside(:,:),idry_e(:),nne(:),indel(:,:),iviolator(:)
5252
real*8,allocatable :: timeout(:)
@@ -202,7 +202,7 @@ program read_out
202202
if(ispec_max==1) nrec3=max_array_size/(2*nvrt*last_dim)-1
203203
nrec3=min(nrec,max(nrec3,1))
204204

205-
allocate(idry_e(ne),rstat2d(3,ne),ztot(nvrt),sigma(nvrt),sigma_lcl(nvrt,np),kbp(np), &
205+
allocate(idry_e(ne),rstat2d(3,ne),time_stat(np),ztot(nvrt),sigma(nvrt),sigma_lcl(nvrt,np),kbp(np), &
206206
&outvar(2,nvrt,last_dim,nrec3),eta2(np,nrec3),idry(np),ztmp(nvrt,np),timeout(nrec), &
207207
&rviolator(ne),iviolator(ne))
208208
outvar=-huge(1.0) !test mem
@@ -224,6 +224,7 @@ program read_out
224224
!...
225225
outvar=-99 !init.
226226
ztmp=-99
227+
time_stat=-99 !time for max
227228
if(iinitial==1) then
228229
print*,'setting initial elev = -dp for all (dry and wet) nodes'
229230
rstat2d(1,1:np)=-dp !for elev, min is -h
@@ -309,7 +310,10 @@ program read_out
309310
do j=1,i34(i)
310311
nd=elnode(j,i)
311312
tmp=outvar(1,1,nd,irec)
312-
if(tmp+dp(nd)>0) rstat2d(2,nd)=max(rstat2d(2,nd),tmp)
313+
if(tmp+dp(nd)>0.and.rstat2d(2,nd)<tmp) then
314+
rstat2d(2,nd)=tmp
315+
time_stat(nd)=timeout(irec_real)/86400
316+
endif
313317
enddo
314318
endif
315319
endif !idry_e
@@ -390,7 +394,11 @@ program read_out
390394
write(12,*)iday1,iday2
391395
write(12,*)ne,np
392396
do i=1,np
393-
write(12,*)i,x(i),y(i),rstat2d(k,i)
397+
if(k==2) then !max
398+
write(12,*)i,x(i),y(i),rstat2d(k,i),time_stat(i)
399+
else
400+
write(12,*)i,x(i),y(i),rstat2d(k,i)
401+
endif
394402
enddo !i
395403
do i=1,ne
396404
write(12,*)i,i34(i),elnode(1:i34(i),i)

0 commit comments

Comments
 (0)