character*2 function getyawmode(time) common /YAWMODE_BLOCK/ yawmodes, ntyaws real*8 times(1000), ch2sec, tnow character*25 yawmodes(2, 1000), time integer ntyaws character*2 result logical first/.true./, error, trace external ch2sec parameter (trace = .false.) save times, first C if (trace) write(6,*) 'GETYAWMODE>', time if (first) then first = .false. i = 0 do while ( (i.lt.1000) .and. (yawmodes(1,i+1).ne.' ')) i = i+1 end do ntyaws = i do i = 1, ntyaws times(i) = ch2sec ( yawmodes(1,i), .true., error ) C if (Trace) write(6,*) 'GETYAWMODES> ', C & i, ' ',yawmodes(1,i), ' ',yawmodes(2,i),' ', C & times(i) end do end if C if (trace) write(6,*) 'GETYAWMODES> NTYAWS = ', ntyaws tnow = ch2sec ( time, .true., error ) C if (trace) write(6,*) 'TNOW = ', time, ' ',tnow i = 1 do while ( ( i.lt. ntyaws) .and. (tnow .gt. times(i+1))) C if (trace) write(6,*) i,' ',times(i) i = i+1 end do C if (trace) write(6,*) 'IUSE = ', i C if (Trace) write(6,*) 'TUSE = ', yawmodes(1,i) result = yawmodes(2, i) C if (Trace) write(6,*) 'YAWMODE = ', result getyawmode = result return end