! subroutine jdold(m,d,yr,jof) ! BEWARE all args are int*4 (unlike VMS julold, which did same job int*2) ! convert month, day, year, to day of that year eg jan 1 = 1 subroutine jdold(m,d,yr,jof) implicit none integer, intent(in):: m,d,yr integer, intent(out):: jof integer i,molen(12) data molen /31,28,31,30,31,30,31,31,30,31,30,31/ molen(2)=28 !Non leap February if(mod(yr,4).eq.0) then molen(2)=29 !normal leap if(mod(yr,100).eq.0) molen(2)=28 !normal not century if(mod(yr,400).eq.0) molen(2)=29 !quadcentury leap endif jof=d !Day of last month do i=1,m-1 ; jof=jof+molen(i) !Add preceeding months enddo return end subroutine jdold