! PREJUL SUBROUTINE TIME C.LIB.TIME SBP 98.02.24 ! call prejul(jd,iy,del) ! find julian date for today +del (del usually negative) subroutine prejul(jd,iy,del) implicit none integer :: jd,iy,del call julian(iy,jd) !returns int*4 yyyy and day of year jd=jd+del !shift it 1 continue if(jd.lt.1) then !back up a year iy=iy-1 jd=365+jd !not leap if(mod(iy,4).eq.0) jd=jd+1 !leap if(mod(iy,100).eq.0) jd=jd-1 !not leap if(mod(iy,400).eq.0) jd=jd+1 !leap endif if(jd.lt.1) goto 1 return end