NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3reddat.f File Reference

Reduce a time interval to a canonical form. More...

Go to the source code of this file.

Functions/Subroutines

subroutine w3reddat (it, rinc, dinc)
 This subprogram reduces an ncep relative time interval into one of seven canonical forms, depending on the input it value.
 

Detailed Description

Reduce a time interval to a canonical form.

Author
Mark Iredell
Date
1998-01-05

Definition in file w3reddat.f.

Function/Subroutine Documentation

◆ w3reddat()

subroutine w3reddat (   it,
real, dimension(5)  rinc,
real, dimension(5)  dinc 
)

This subprogram reduces an ncep relative time interval into one of seven canonical forms, depending on the 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.)

Program History Log:

Date Programmer Comment
1998-01-05 Mark Iredell Initial.
Parameters
[in]ITRelative 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)
[in]RINCNCEP relative time interval (days, hours, minutes, seconds, milliseconds)
[out]DINCNCEP relative time interval (days, hours, minutes, seconds, milliseconds)
Author
Mark Iredell
Date
1998-01-05

Definition at line 85 of file w3reddat.f.