C+ C NAME: C Read_tsh.f C PURPOSE: C Read time series header to determine source elongation C CATEGORY: C I/O C CALLING SEQUENCE: C call Read_tsh(cfile1,src,elong,iRead_tsh) C C INPUTS: C Read_tsh: C file character The STELab time series file C C OUTPUTS: C specval real the input spectral frequencies C power real the input spectral power C Nspec integer the number of input powers C iRead_tsh integer if 0 the file has been read C C MODIFICATION HISTORY: C October-2013, Bernard Jackson (UCSD) C- subroutine read_tsh(cfile1,src,elong,iRead_tsh) character cfile1*26 ! The source time series file character src*8 ! Source name C print *, 'Inside read_tsh ',cfile1 open (iU, file=cFile1,status='old',recl=315,access='sequential',form='formatted',iostat=iRead_tsh) if(iRead_tsh.ne.0) then print *, 'No time series file of this name exists in the directory', cfile1 close(iU) return ! No file exists end if print *, ' ' write (*,'(A26)') cFile1 read (iU,'(1X,A8,180X,F6.1)',iostat=iRead_tsh) src,elong if(iRead_tsh.eq.0) then print *, ' ' write(*,'(3A,F10.3)') ' Source = ',src,' Elongation =', elong else print *, 'Could not read source header information' close(iU) return end if close(iU) C return end