diff options
Diffstat (limited to 'src/AHFinder_dis.F')
-rw-r--r-- | src/AHFinder_dis.F | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/AHFinder_dis.F b/src/AHFinder_dis.F index 894271c..c18b0f8 100644 --- a/src/AHFinder_dis.F +++ b/src/AHFinder_dis.F @@ -40,7 +40,8 @@ CCTK_REAL, allocatable, dimension(:) :: xa,ya,za CCTK_REAL, allocatable, dimension(:) :: txx,tyy,tzz,txy,txz,tyz - character*200 disf + character(len=200) :: disf + logical disf_exists ! ************************** @@ -571,22 +572,16 @@ 100 continue - disf = filestr(1:nfile) // "/ahf_d12" // ".tl" - if (myproc.eq.0) then - - if (ahf_ncall.eq.1) then - open(1,file=disf,form='formatted',status='replace') - write(1,"(A18)") '" Horizon distance' + inquire(file=disf, exist=disf_exists) + if (disf_exists) then + open(1,file=disf,form='formatted',status='old', position='append') else - open(1,file=disf,form='formatted',status='old', - . position='append') + open(1,file=disf,form='formatted',status='replace') + write(1,"(A18)") '" Horizon distance' end if - write(1,"(2ES14.6)") cctk_time,d12 - close(1) - end if |