1 !-----------------------------------------------------------------------
2 subroutine w3movdat
(rinc
,idat
,jdat
)
3 !$$$ SUBPROGRAM DOCUMENTATION BLOCK
5 ! SUBPROGRAM
: W3MOVDAT
RETURN A
DATE FROM A TIME INTERVAL AND
DATE
6 ! AUTHOR
: MARK IREDELL ORG
: WP23
DATE: 98-01-05
8 ! ABSTRACT
: THIS SUBPROGRAM RETURNS THE
DATE AND TIME THAT IS A GIVEN
9 ! NCEP RELATIVE TIME INTERVAL FROM AN NCEP ABSOLUTE
DATE AND TIME
.
10 ! THE OUTPUT IS IN THE NCEP ABSOLUTE
DATE AND TIME DATA STRUCTURE
.
12 ! PROGRAM HISTORY LOG
:
13 ! 98-01-05 MARK IREDELL
15 ! USAGE
: CALL W3MOVDAT
(RINC
,IDAT
,JDAT
)
18 ! RINC
REAL (5) NCEP RELATIVE TIME INTERVAL
19 ! (DAYS
, HOURS
, MINUTES
, SECONDS
, MILLISECONDS
)
20 ! IDAT
INTEGER (8) NCEP ABSOLUTE
DATE AND TIME
21 ! (YEAR
, MONTH
, DAY
, TIME ZONE
,
22 ! HOUR
, MINUTE
, SECOND
, MILLISECOND
)
25 ! JDAT
INTEGER (8) NCEP ABSOLUTE
DATE AND TIME
26 ! (YEAR
, MONTH
, DAY
, TIME ZONE
,
27 ! HOUR
, MINUTE
, SECOND
, MILLISECOND
)
28 ! (JDAT IS LATER THAN IDAT
IF TIME INTERVAL IS POSITIVE
.)
31 ! IW3JDN COMPUTE JULIAN DAY NUMBER
32 ! W3FS26 YEAR
, MONTH
, DAY FROM JULIAN DAY NUMBER
33 ! W3REDDAT REDUCE A TIME INTERVAL
TO A CANONICAL FORM
36 ! LANGUAGE
: FORTRAN
90
40 integer idat
(8),jdat
(8)
41 real rinc1
(5),rinc2
(5)
42 ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
43 ! add the interval
to the input time of day and put into reduced form
44 ! and
then compute new
date using julian day arithmetic
.
46 rinc1
(2:5)=rinc
(2:5)+idat
(5:8)
47 call w3reddat
(-1,rinc1
,rinc2
)
48 jldayn
=iw3jdn
(idat
(1),idat
(2),idat
(3))+nint
(rinc2
(1))
49 call w3fs26
(jldayn
,jdat
(1),jdat
(2),jdat
(3),jdow
,jdoy
)
51 jdat
(5:8)=nint
(rinc2
(2:5))
52 ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -