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