@@ -46,7 +46,7 @@ program read_out
46
46
allocatable :: sigma(:),cs(:),ztot(:)
47
47
allocatable :: outvar(:,:,:,:),out (:,:,:),icum(:,:,:),eta2(:,:),ztmp(:,:)
48
48
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(:)
50
50
allocatable :: ic3(:,:),isdel(:,:),isidenode(:,:),kbp(:),sigma_lcl(:,:)
51
51
integer , allocatable :: elside(:,:),idry_e(:),nne(:),indel(:,:),iviolator(:)
52
52
real * 8 ,allocatable :: timeout(:)
@@ -202,7 +202,7 @@ program read_out
202
202
if (ispec_max== 1 ) nrec3= max_array_size/ (2 * nvrt* last_dim)- 1
203
203
nrec3= min (nrec,max (nrec3,1 ))
204
204
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), &
206
206
&outvar(2 ,nvrt,last_dim,nrec3),eta2(np,nrec3),idry(np),ztmp(nvrt,np),timeout(nrec), &
207
207
&rviolator(ne),iviolator(ne))
208
208
outvar=- huge (1.0 ) ! test mem
@@ -224,6 +224,7 @@ program read_out
224
224
! ...
225
225
outvar=- 99 ! init.
226
226
ztmp=- 99
227
+ time_stat=- 99 ! time for max
227
228
if (iinitial== 1 ) then
228
229
print * ,' setting initial elev = -dp for all (dry and wet) nodes'
229
230
rstat2d(1 ,1 :np)=- dp ! for elev, min is -h
@@ -309,7 +310,10 @@ program read_out
309
310
do j= 1 ,i34(i)
310
311
nd= elnode(j,i)
311
312
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
313
317
enddo
314
318
endif
315
319
endif ! idry_e
@@ -390,7 +394,11 @@ program read_out
390
394
write (12 ,* )iday1,iday2
391
395
write (12 ,* )ne,np
392
396
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
394
402
enddo ! i
395
403
do i= 1 ,ne
396
404
write (12 ,* )i,i34(i),elnode(1 :i34(i),i)
0 commit comments