W3YMDH4
The W3YMDH4 routine obtains the components of the NMC date
word, or given its components, forms an NMC type date
word. The packing is done using base 32.
If the first byte of IDATE is less than 101, then the old
Office Note 84 packing is assumed. A four-digit year is
always returned. To pack the "old" way, pass in a 2-digit
year.
This program will work for the years ranging from A.D. 101
through 79359.
On unpacking, years less than or equal to 100 are returned
as follows:
0-50 2000--2050
51-100 1951--2000
USAGE: CALL W3YMDH4 (IDATE, IYEAR, MONTH, IDAY, IHOUR, NN)
Input variables:
IDATE LEFT 4 BYTES OF INTEGER 64 BIT WORD, OR CAN BE
CHARACTER*1 IDATE(4) OR CHARACTER*4 IDATE.
IYEAR INTEGER YEAR (4 DIGITS or 2 DIGITS for ON84)
MONTH INTEGER MONTH
IDAY INTEGER DAY
IHOUR INTEGER HOUR
NN INTEGER CODE:
.EQ. 0 PACK IYEAR, MONTH, IDAY, IHOUR INTO IDATE
.NE. 0 UNPACK IDATE INTO IYEAR, MONTH, IDAY, IHOUR
Output variables:
IDATE LEFT 4 BYTES OF INTEGER 64 BIT WORD, OR CAN BE
CHARACTER*1 IDATE(4) OR CHARACTER*4 IDATE.
IYEAR INTEGER YEAR (4 DIGITS)
MONTH INTEGER MONTH
IDAY INTEGER DAY
IHOUR INTEGER HOUR
W3lib.tar |
Library contains Fortran 90 decoder/encoder
routines for GRIB edition 1. (Fortran90)
Date posted: 2/22/2007 |