! call oldj80day(dayof,iy,j80) ! supply julian day and year; returns j80 = days since jan 1 1980 subroutine oldj80day(ij,iy,j80) integer, intent(in):: ij,iy integer, intent(out):: j80 integer leapad leapad=(iy-1977)/4 !add day AFTER each leap year j80=(iy-1980)*365+leapad+ij !days since 1980 j80=j80-(iy-1901)/100 !subtract century (non leap) j80=j80+(iy-1601)/400 !restore quadcentury (are leap) return end