ungrib build
[WPS.git] / ungrib / src / ngl / w3 / w3doxdat.f
blobb36ad7c293c475667cad2b954827049e6a67a531
1 !-----------------------------------------------------------------------
2 subroutine w3doxdat(idat,jdow,jdoy,jday)
3 !$$$ SUBPROGRAM DOCUMENTATION BLOCK
5 ! SUBPROGRAM: W3DOXDAT RETURN WEEK DAY, YEAR DAY, AND JULIAN DAY
6 ! AUTHOR: MARK IREDELL ORG: WP23 DATE: 98-01-05
8 ! ABSTRACT: THIS SUBPROGRAM RETURNS THE INTEGER DAY OF WEEK, THE DAY
9 ! OF YEAR, AND JULIAN DAY GIVEN AN NCEP ABSOLUTE DATE AND TIME.
11 ! PROGRAM HISTORY LOG:
12 ! 98-01-05 MARK IREDELL
14 ! USAGE: CALL W3DOXDAT(IDAT,JDOW,JDOY,JDAY)
16 ! INPUT VARIABLES:
17 ! IDAT INTEGER (8) NCEP ABSOLUTE DATE AND TIME
18 ! (YEAR, MONTH, DAY, TIME ZONE,
19 ! HOUR, MINUTE, SECOND, MILLISECOND)
21 ! OUTPUT VARIABLES:
22 ! JDOW INTEGER DAY OF WEEK (1-7, WHERE 1 IS SUNDAY)
23 ! JDOY INTEGER DAY OF YEAR (1-366, WHERE 1 IS JANUARY 1)
24 ! JDAY INTEGER JULIAN DAY (DAY NUMBER FROM JAN. 1,4713 B.C.)
26 ! SUBPROGRAMS CALLED:
27 ! IW3JDN COMPUTE JULIAN DAY NUMBER
28 ! W3FS26 YEAR, MONTH, DAY FROM JULIAN DAY NUMBER
30 ! ATTRIBUTES:
31 ! LANGUAGE: FORTRAN 90
33 !$$$
34 integer idat(8)
35 ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
36 ! get julian day and then get day of week and day of year
37 jday=iw3jdn(idat(1),idat(2),idat(3))
38 call w3fs26(jday,jy,jm,jd,jdow,jdoy)
39 ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
40 end