subroutine lmsset c c----------------------------------------------------------------------- c This routine prompts for the information necessary to calculate c the various start and stop times. c----------------------------------------------------------------------- c integer*4 icollect_times(4), idur, ied, iehms, iey, ih, im, inc, * irun_times(4), is, isd, ishms, isy c common /com_times/irun_times, icollect_times, idur, inc c c----------------------------------------------------------------------- c *** get the start and stop time for the entire run *** c----------------------------------------------------------------------- c 100 continue write (*, * '('' Enter run start and stop time (yy doy hhmmss): '', $)') read (*,*) isy, isd, ishms, iey, ied, iehms if (iey .eq. 0) iey = isy if (ied .eq. 0) ied = isd ih = ishms / 10000 im = (ishms - (ih * 10000)) / 100 is = (ishms - ih * 10000) - (im * 100) irun_times(1) = (isy * 1000) + isd irun_times(2) = ((ih * 3600) + (im * 60) + is) * 1000 irun_times(3) = (iey * 1000) + ied ih = iehms / 10000 im = (iehms - (ih * 10000)) / 100 is = (iehms - ih * 10000) - (im * 100) irun_times(4) = ((ih * 3600) + (im * 60) + is) * 1000 if (irun_times(3) .lt. irun_times(1)) then write (*,'('' ERROR: end time prior to start time.'')') go to 100 else if (irun_times(3) .eq. irun_times(1)) then if (irun_times(4) .le. irun_times(2)) then write (*,'('' ERROR: end time prior to start time.'')') go to 100 end if end if c c----------------------------------------------------------------------- c *** get the duration of each collection period *** c *** and the increment between each collection period *** c----------------------------------------------------------------------- c 200 continue write (*, '('' Enter duration and increment (seconds): '', $)') read (*,*) idur, inc if (idur .eq. 0) idur = 60 if (inc .eq. 0) inc = 60 idur = idur * 1000 inc = inc * 1000 if (idur .lt. 0) then write (*, '('' ERROR: duration must be > 0'')') go to 200 end if if (inc .lt. idur) then write (*, * '('' ERROR: incrument cannot be less then duration.'')') go to 200 end if c c----------------------------------------------------------------------- c *** calculate the collection start and stop time *** c c *** NOTE!! no check for year crossing *** c----------------------------------------------------------------------- c icollect_times(1) = irun_times(1) icollect_times(2) = irun_times(2) icollect_times(3) = irun_times(3) icollect_times(4) = irun_times(2) + idur if (icollect_times(4) .ge. 86400000) then icollect_times(4) = icollect_times(4) - 86400000 icollect_times(3) = icollect_times(3) + 1 end if c c----------------------------------------------------------------------- c----------------------------------------------------------------------- c return end