SUBROUTINE UTCYMD (UTC, YMD) C C ******************************************** C C$ INPUT: UTC(1) = YEAR C$ UTC(2) = DAY OF YEAR C$ UTC(3) = HOUR C$ UTC(4) = MINUTE C$ UTC(5) = SECOND C C$ OUTPUT: YMD(1) = YEAR C$ YMD(2) = MONTH C$ YMD(3) = DAY C$ YMD(4) = HOUR C$ YMD(5) = MINUTE C$ YMD(6) = SECOND C C ******************************************** C INTEGER UTC(5),YMD(6),LPYR C INTEGER DATE(13,2)/ 10,31,59,90,120,151,181,212,243,273,304,334,365, 20,31,60,91,121,152,182,213,244,274,305,335,366/ C C ******************************************** C IF (MOD(UTC(1),4).EQ.0) THEN C LEAP YEAR LPYR = 2 ELSE C REGULAR YEAR LPYR = 1 ENDIF IF (UTC(2).GE.1 .AND. UTC(2).LE.(DATE(13,LPYR))) THEN YMD(1) = UTC(1) YMD(2) = 0 DO UNTIL (UTC(2).LE.DATE((YMD(2)+1),LPYR)) YMD(2) = YMD(2) + 1 ENDUNTIL YMD(3) = UTC(2) - DATE(YMD(2),LPYR) YMD(4) = UTC(3) YMD(5) = UTC(4) YMD(6) = UTC(5) ELSE DO FOR J = 1,6 YMD(J) = 0 ENDFOR ENDIF RETURN ENDPROGRAM