C C FUNCTIONS/SUBROUTINES: C C MODIFICATION HISTORY: C May-2022, Bernard Jackson (UCSD) C- subroutine read_centxy(cfilcxy,NOBS,XDIST,YDIST,PDIST,PED,BACKM) character cfilcxy*21 real PDIST (NOBS), ! The distance between the pole and Matthew's Center & BACKM (NOBS), ! Tne minimum background value for this image set near the image center & PED (NOBS) ! The pedestal for an unilluminated portion of the image real XDIST (NOBS), ! mean X center position of the rotated Pole & YDIST (NOBS) ! mean Y center position of the rotated Pole print*,' ' print*, ' Into read_centxy.f' do I=1,NOBS XDIST(I) = 0.0 XDIST(I) = 0.0 end do iprint = 0 open (13, file=cfilcxy,status='old',recl=120,access='sequential',form='formatted',iostat=iReadashi) if(iReadashi.ne.0) then print *, 'There are no ', cfilcxy,' files in this directory.' close(13) stop else print *, 'The file to read is', cfilcxy end if NL = 0 do I=1,NOBS read (13,'(I5,5F12.5)',iostat=iReadashi) II,XDIST(I),YDIST(I),PDIST(I),BACKM(I),PED(I) if(iReadashi.eq.0) then NL = NL + 1 else close(13) if(NL.ne.NOBS.and.I.eq.NOBS) then print *, ' ' print *, ' Reads not complete, number of ASHI observation values read in =',NL print *, ' Invalid values of XDIST and YDIST are set to 0.0' end if end if if(I.ge.100.and.I.le.110.and.iprint.eq.1) write (*,'(I5,5F12.5)') I,XDIST(I),YDIST(I),PDIST(I),BACKM(I),PED(I) end do close(13) print *, ' ' print *,' Reads complete, number of ASHI x y values read in =',NL print*, ' Out of read_centxy.f' return end