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

4-byte date word unpacker and packer. More...

Go to the source code of this file.

Functions/Subroutines

subroutine w3ymdh4 (idate, iyear, month, iday, ihour, nn)
 Obtains the components of the nmc date word (ncep y2k compliant form), or given its components, forms an nmc type date word.
 

Detailed Description

4-byte date word unpacker and packer.

Author
K. F. Brill
Date
1998-07-29

Definition in file w3ymdh4.f.

Function/Subroutine Documentation

◆ w3ymdh4()

subroutine w3ymdh4 ( character, dimension(4)  idate,
  iyear,
  month,
  iday,
  ihour,
  nn 
)

Obtains the components of the nmc date word (ncep y2k compliant form), 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

Program History Log:

Date Programmer Comment
1998-07-29 K. F. Brill Initial.
1999-03-15 Gilbert Removed Call to W3FS11() and put its processing inline.

W3FS11 was deleted from the W3LIB.

Parameters
[in,out]IDATELeft 4 bytes of integer 64 bit word, or can be IDATE(4) or CHARACTER*4 IDATE.
[in,out]IYEARYear (4 digits or 2 digits for on84)
[in,out]MONTHMonth
[in,out]IDAYDay
[in,out]IHOURHour
[in]NNCode:
  • .eq. 0 pack iyear, month, iday, ihour into idate
  • .ne. 0 unpack idate into iyear, month, iday, ihour
Author
K. F. Brill
Date
1998-07-29

Definition at line 42 of file w3ymdh4.f.