W3REDDAT
The W3REDDAT routine reduces an NCEP relative time interval
into one of seven canonical forms, depending on thei
input it value.
First reduced format type (IT=-1):
RINC(1) is an arbitrary integer.
RINC(2) is an integer between 00 and 23, inclusive.
RINC(3) is an integer between 00 and 59, inclusive.
RINC(4) is an integer between 00 and 59, inclusive.
RINC(5) is an integer between 000 and 999, inclusive.
If RINC(1) is negative, then the time interval is negative.
Second reduced format type (IT=0):
If the time interval is not negative, then the format is:
RINC(1) is zero or a positive integer.
RINC(2) is an integer between 00 and 23, inclusive.
RINC(3) is an integer between 00 and 59, inclusive.
RINC(4) is an integer between 00 and 59, inclusive.
RINC(5) is an integer between 000 and 999, inclusive.
Otherwise if the time interval is negative, then the format is:
RINC(1) is zero or a negative integer.
RINC(2) is an integer between 00 and -23, inclusive.
RINC(3) is an integer between 00 and -59, inclusive.
RINC(4) is an integer between 00 and -59, inclusive.
RINC(5) is an integer between 000 and -999, inclusive.
Days format type (IT=1):
RINC(1) is arbitrary.
RINC(2) is zero.
RINC(3) is zero.
RINC(4) is zero.
RINC(5) is zero.
Hours format type (IT=2):
RINC(1) is zero.
RINC(2) is arbitrary.
RINC(3) is zero.
RINC(4) is zero.
RINC(5) is zero.
(This format should not express time intervals longer than 300 years.)
Minutes format type (IT=3):
RINC(1) is zero.
RINC(2) is zero.
RINC(3) is arbitrary.
RINC(4) is zero.
RINC(5) is zero.
(This format should not express time intervals longer than five years.)
Seconds format type (IT=4):
RINC(1) is zero.
RINC(2) is zero.
RINC(3) is zero.
RINC(4) is arbitrary.
RINC(5) is zero.
(This format should not express time intervals longer than one month.)
Milliseconds format type (IT=5):
RINC(1) is zero.
RINC(2) is zero.
RINC(3) is zero.
RINC(4) is zero.
RINC(5) is arbitrary.
(This format should not express time intervals longer than one hour.)
USAGE: CALL W3REDDAT(IT,RINC,DINC)
Input variables:
IT INTEGER RELATIVE TIME INTERVAL FORMAT TYPE
(-1 FOR FIRST REDUCED TYPE (HOURS ALWAYS POSITIVE),
0 FOR SECOND REDUCED TYPE (HOURS CAN BE NEGATIVE),
1 FOR DAYS ONLY, 2 FOR HOURS ONLY, 3 FOR MINUTES ONLY,
4 FOR SECONDS ONLY, 5 FOR MILLISECONDS ONLY)
RINC REAL (5) NCEP RELATIVE TIME INTERVAL
(DAYS, HOURS, MINUTES, SECONDS, MILLISECONDS)
Output variables:
DINC REAL (5) NCEP RELATIVE TIME INTERVAL
(DAYS, HOURS, MINUTES, SECONDS, MILLISECONDS)
W3lib.tar |
Library contains Fortran 90 decoder/encoder
routines for GRIB edition 1. (Fortran90)
Date posted: 2/22/2007 |