! call j1980(m,d,yr,days) ! returns days since + including 1 jan 1980 (jan1 1980 = 1) ! up to given date (not necessarily today) subroutine j1980(m,d,yr,days) implicit none integer, intent(in):: m,d,yr integer, intent(out):: days integer jof days=365*(yr-1980)+(yr-1980+3)/4 !day +years +leaps till 2100 days=days-(yr-1901)/100 !subtract century (non leap) days=days+(yr-1601)/400 !restore quadcentury (are leap) call jdold(m,d,yr,jof) !day of old year days=days+jof return end subroutine j1980