subroutine read_in_trajectory use CalcData, only: nmcyc use real_time_data, only: tauCache, alphaCache implicit none integer :: i, iunit, eof real(dp) :: x, y logical :: checkTraj character(*), parameter :: this_routine = "read_in_trajectory" call get_unique_filename('tauContour', .false., .false., 0, trajFile) iunit = get_free_unit() inquire (file=trajFile, exist=checkTraj) if (.not. checkTraj) call stop_all(this_routine, "No tauContour file detected.") ! We first need to read in the number of cycles open(iunit, file=trajFile, status='old') nmcyc = 0 ! check the number of lines do read(iunit, *, iostat=eof) x, y if (eof /= 0) exit nmcyc = nmcyc + 1 end do close(iunit) call read_from_contour_file(iunit) end subroutine read_in_trajectory