integer*2 function julold(mon,nday,iy) implicit none ! JULOLD FUNCTION TIME C.LIB.TIME SBP 92.05.09 !tpl jd= julold(mon,nday,iy) !Integer*2 day of year for supplied date ! Return julian date of supplied mon,day,year (as integer*2 value) integer*2 :: iy,mon,nday integer*2 :: monlen(12)=[31,28,31,30,31,30,31,31,30,31,30,31] integer*2 :: i ! ----------------end_declare--------------------------- monlen(2)=28 !correct if prev call used leap if(mod(iy,4).eq.0) then monlen(2)=29 if(mod(iy,100).eq.0) monlen(2)=28 !l if(mod(iy,400).eq.0) monlen(2)=29 !leap year 2000,2400... endif julold=nday !day of month do i=1,mon-1 if(i.lt.mon) julold=julold+monlen(i) enddo return end function julold