C------------------- program concat FORTRAN code ---------------------------------- C This FORTRAN program will take EO calculator data from the C eocalc.inp file C and place it in program concat implicit none integer*4 i,j,k integer*4 ind1, Ntot, Ndates integer*4 mjdmsw, yr,mo,da,ho,mi real*8 mjdlsw, dsec, t2cdcm(9) character*350 ldata C Initialize Ntot (total number of possible lines displayed) and C initialzie Ndates (total number of possible epochs displayed). Ntot = 50000 Ndates = 50000 open(unit=100,file='eocalc.inp',status='old') C open(unit=200,file='t2cdcm.out',status='unknown') open(unit=200,file='t2cdcm.out',status='unknown', . position='append') open(unit=210,file='pmdcm.out',status='unknown', . position='append') open(unit=220,file='gmstdcm.out',status='unknown', . position='append') open(unit=230,file='eedcm.out',status='unknown', . position='append') open(unit=240,file='nudcm.out',status='unknown', . position='append') open(unit=250,file='prdcm.out',status='unknown', . position='append') open(unit=260,file='bpndcm.out',status='unknown', . position='append') do i = 1,Ntot read(100,1000,end=2000)ldata print*,ldata ind1=index(ldata,'Terrestrial to Celestial (T2C) Direction') if (ind1 .ne. 0) then print*,'T2C found it',ind1 do j = 1, Ndates read(100,*,err=1500) mjdmsw,mjdlsw,yr,mo,da,ho,mi,dsec, . (t2cdcm(k),k=1,9) write(200,1150) mjdmsw,mjdlsw,yr,mo,da,ho,mi,dsec, . (t2cdcm(k),k=1,9) C write(200,*)'hello!' C Compute number of dates based on error received after last C read line. Ndates = j print*,'print Ndates = ',Ndates enddo endif 1500 continue ind1=index(ldata,'Polar Motion Direction') if (ind1 .ne. 0) then print*,'found it polar motion',ind1 do j = 1, Ndates read(100,*,err=1510) mjdmsw,mjdlsw,yr,mo,da,ho,mi,dsec, . (t2cdcm(k),k=1,9) write(210,1150), mjdmsw,mjdlsw,yr,mo,da,ho,mi,dsec, . (t2cdcm(k),k=1,9) enddo endif 1510 continue ind1=index(ldata,'GMST Direction') if (ind1 .ne. 0) then print*,'found it GMST',ind1 do j = 1, Ndates read(100,*,err=1520) mjdmsw,mjdlsw,yr,mo,da,ho,mi,dsec, . (t2cdcm(k),k=1,9) write(220,1150), mjdmsw,mjdlsw,yr,mo,da,ho,mi,dsec, . (t2cdcm(k),k=1,9) enddo endif 1520 continue ind1=index(ldata,'EE Direction') if (ind1 .ne. 0) then print*,'found it EE',ind1 do j = 1, Ndates read(100,*,err=1530) mjdmsw,mjdlsw,yr,mo,da,ho,mi,dsec, . (t2cdcm(k),k=1,9) write(230,1150), mjdmsw,mjdlsw,yr,mo,da,ho,mi,dsec, . (t2cdcm(k),k=1,9) enddo endif 1530 continue ind1=index(ldata,'Nutation Direction') if (ind1 .ne. 0) then print*,'found it Nutation',ind1 do j = 1, Ndates read(100,*,err=1540) mjdmsw,mjdlsw,yr,mo,da,ho,mi,dsec, . (t2cdcm(k),k=1,9) write(240,1150), mjdmsw,mjdlsw,yr,mo,da,ho,mi,dsec, . (t2cdcm(k),k=1,9) enddo endif 1540 continue ind1=index(ldata,'Precession Direction') if (ind1 .ne. 0) then print*,'found it Precession',ind1 do j = 1, Ndates read(100,*,err=1550) mjdmsw,mjdlsw,yr,mo,da,ho,mi,dsec, . (t2cdcm(k),k=1,9) write(250,1150), mjdmsw,mjdlsw,yr,mo,da,ho,mi,dsec, . (t2cdcm(k),k=1,9) enddo endif 1550 continue ind1=index(ldata,'Bias-Prec-Nutation Direction') if (ind1 .ne. 0) then print*,'found it BPN',ind1 do j = 1, Ndates read(100,*,err=1560) mjdmsw,mjdlsw,yr,mo,da,ho,mi,dsec, . (t2cdcm(k),k=1,9) write(260,1150), mjdmsw,mjdlsw,yr,mo,da,ho,mi,dsec, . (t2cdcm(k),k=1,9) enddo endif 1560 continue enddo 2000 continue close(unit=100) close(unit=200) close(unit=210) close(unit=220) close(unit=230) close(unit=240) close(unit=250) close(unit=260) 1000 format(a350) 1150 format(3x,i5,3x,1pe19.8,3x,i5,1x,i5,2x,i5,2(3x,i5),1x, 1pe20.9 . , 9(1x,1pe25.14)) end C------------------- End of program concat FORTRAN code ----------------------------------