diff --git a/astro/src/astro/astroState.F b/astro/src/astro/astroState.F index b72eca4..cc17a3e 100644 --- a/astro/src/astro/astroState.F +++ b/astro/src/astro/astroState.F @@ -11,6 +11,8 @@ subroutine astroState(njd,JD30,lat,lon,hgt,crc250,irc) ! character*1 c1 character*30 b30 + integer lenb + integer, external :: length real :: jd ! IAU, 0 Jan 2010, 0h TT integer, parameter :: nbodies=11 real :: pole(6,nbodies) ! R.A., Dec, omega, domega/dt (deg/day) , orbits (index), xmu = G * Mass @@ -94,6 +96,14 @@ subroutine astroState(njd,JD30,lat,lon,hgt,crc250,irc) return end if CALL DATE2JD(JD2000(tt),YY,MM,DD,HH,MI,SEC) +! clean up + write(b30,'(F6.3)') sec + call chop0(b30,6) + lenb=length(b30,6,6) + write(jd30(tt),'(I4.4,"-",I2.2,"-",I2.2,"T",'// + & 'I2.2,":",I2.2,":",A,"Z")') + & YY,MM,DD,HH,MI,b30(1:lenb) + end do ! ! get planetary angular vectors in MJD2000 diff --git a/astro/src/astro/event.F b/astro/src/astro/event.F index af75caf..6b2ddcf 100644 --- a/astro/src/astro/event.F +++ b/astro/src/astro/event.F @@ -99,6 +99,9 @@ subroutine event() mode=0 ! initial bdone=(ii.gt.lens) do while (.not. bdone) + if (s1000(ii:ii).eq.'%') then ! special character + s1000(ii:ii+2)=' ' + end if if (mode.eq.0) then if (s1000(ii:ii).eq.';'.or.s1000(ii:ii).eq.'&') then ii=ii+1 @@ -220,7 +223,7 @@ subroutine event() if (s1000(ii:ii).eq.'=') then ii=ii+1 istart=ii - else if (s1000(ii:ii).eq.';') then + else if (s1000(ii:ii).eq.';'.or.s1000(ii:ii).eq.'&') then if (bdeb) write(*,*) 'Found debug value: "'// & s1000(istart:istop)//'"',ii,mode read(s1000(istart:istop),*,iostat=irc) idebug @@ -239,7 +242,7 @@ subroutine event() if (s1000(ii:ii).eq.'=') then ii=ii+1 istart=ii - else if (s1000(ii:ii).eq.';') then ! we are done + else if (s1000(ii:ii).eq.';'.or.s1000(ii:ii).eq.'&') then ! we are done if (bdeb) write(*,*) 'Found start time: "'// & s1000(istart:istop)//'"',ii,mode read(s1000(istart:istop),*,iostat=irc) @@ -275,7 +278,7 @@ subroutine event() if (s1000(ii:ii).eq.'=') then ii=ii+1 istart=ii - else if (s1000(ii:ii).eq.';') then ! we are done + else if (s1000(ii:ii).eq.';'.or.s1000(ii:ii).eq.'&') then ! we are done if (bdeb) write(*,*) 'Found search code: "'// & s1000(istart:istop)//'"',ii,mode read(s1000(istart:istop),*,iostat=irc) searchCode @@ -295,7 +298,7 @@ subroutine event() if (s1000(ii:ii).eq.'=') then ii=ii+1 istart=ii - else if (s1000(ii:ii).eq.';') then ! we are done + else if (s1000(ii:ii).eq.';'.or.s1000(ii:ii).eq.'&') then ! we are done if (bdeb) write(*,*) 'Found stop time: "'// & s1000(istart:istop)//'"',ii,mode read(s1000(istart:istop),*,iostat=irc) @@ -330,7 +333,7 @@ subroutine event() if (s1000(ii:ii).eq.'=') then ii=ii+1 istart=ii - else if (s1000(ii:ii).eq.';') then + else if (s1000(ii:ii).eq.';'.or.s1000(ii:ii).eq.'&') then if (bdeb) write(*,*) 'Found event id: "'// & s1000(istart:istop)//'"',ii,mode read(s1000(istart:istop),*,iostat=irc) eventId @@ -375,7 +378,7 @@ subroutine event() if (s1000(ii:ii).eq.'=') then ii=ii+1 istart=ii - else if (s1000(ii:ii).eq.';') then ! we are done + else if (s1000(ii:ii).eq.';'.or.s1000(ii:ii).eq.'&') then ! we are done if (bdeb) write(*,*) 'Found value: "'// & s1000(istart:istop)//'"',ii,mode,nval read(s1000(istart:istop),*,iostat=irc) diff --git a/astro/src/astro/state.F b/astro/src/astro/state.F index 0311bce..0826bab 100644 --- a/astro/src/astro/state.F +++ b/astro/src/astro/state.F @@ -46,6 +46,9 @@ subroutine state() mode=0 ! initial bdone=(ii.gt.lens) do while (.not. bdone) + if (s1000(ii:ii).eq.'%') then ! special character + s1000(ii:ii+2)=' ' + end if if (mode.eq.0) then if (s1000(ii:ii).eq.';'.or.s1000(ii:ii).eq.'&') then ii=ii+1 @@ -80,7 +83,7 @@ subroutine state() if (s1000(ii:ii).eq.'=') then ii=ii+1 istart=ii - else if (s1000(ii:ii).eq.';') then ! we are done + else if (s1000(ii:ii).eq.';'.or.s1000(ii:ii).eq.'&') then ! we are done if (bdeb) write(*,*) 'Found lat: "'// & s1000(istart:istop)//'"',ii,mode,nval read(s1000(istart:istop),*,iostat=irc) @@ -98,7 +101,7 @@ subroutine state() if (s1000(ii:ii).eq.'=') then ii=ii+1 istart=ii - else if (s1000(ii:ii).eq.';') then ! we are done + else if (s1000(ii:ii).eq.';'.or.s1000(ii:ii).eq.'&') then ! we are done if (bdeb) write(*,*) 'Found lon: "'// & s1000(istart:istop)//'"',ii,mode,nval read(s1000(istart:istop),*,iostat=irc) @@ -116,7 +119,7 @@ subroutine state() if (s1000(ii:ii).eq.'=') then ii=ii+1 istart=ii - else if (s1000(ii:ii).eq.';') then ! we are done + else if (s1000(ii:ii).eq.';'.or.s1000(ii:ii).eq.'&') then ! we are done if (bdeb) write(*,*) 'Found hgt: "'// & s1000(istart:istop)//'"',ii,mode,nval read(s1000(istart:istop),*,iostat=irc) @@ -134,7 +137,7 @@ subroutine state() if (s1000(ii:ii).eq.'=') then ii=ii+1 istart=ii - else if (s1000(ii:ii).eq.';') then ! we are done + else if (s1000(ii:ii).eq.';'.or.s1000(ii:ii).eq.'&') then ! we are done if (bdeb) write(*,*) 'Found time: "'// & s1000(istart:istop)//'"',ii,mode njd=min(mjd,njd+1)