subroutine jlt i (ntd, m jday, o mo,nday) c c + + + PURPOSE + + + c Given the day of the year (Julian date) determine the month c and day of the month. c c + + + ARGUMENT DECLARATIONS + + + integer ntd,jday,mo,nday c c + + + ARGUMENT DEFINITIONS + + + c ntd - number of days in year (365; 366 if leap year and c iopt=3, 5, 6) c jday - Julian date; ie, day of the year. c mo - The current month (1=Jan, 2=Feb...). c nday - The day of the current month. c c + + + LOCAL VARIABLES + + + integer nn(12) integer kday, j, ndflag c c + + + LOCAL DEFINITIONS + + + c nn - Number of days in each month (non-leap year). c c + + + DATA INITIALIZATIONS + + + data nn/31,28,31,30,31,30,31,31,30,31,30,31/ c c + + + END SPECIFICATIONS + + + c c ---- Adjust for Leap Year. if(ntd.eq.366) then nn(2) = 29 else nn(2) = 28 endif kday = jday c c ---- Find the month. j = 0 10 continue j = j + 1 jday = jday -nn(j) ndflag = 0 if (jday.le.0) then nday = jday +nn(j) ndflag = 50 endif if(ndflag.eq.0 .and. j.lt.12) goto 10 c jday = kday mo = j c return end