1 FUNCTION IGETDATE
(MBAY
,IYR
,IMO
,IDY
,IHR
)
3 C$$$ SUBPROGRAM DOCUMENTATION BLOCK
6 C PRGMMR: ATOR ORG: NP12 DATE: 2005-11-29
8 C ABSTRACT: THIS FUNCTION UNPACKS AND RETURNS THE SECTION 1 DATE-TIME
9 C FROM THE BUFR MESSAGE STORED IN ARRAY MBAY. IT WILL WORK ON ANY
10 C MESSAGE ENCODED USING BUFR EDITION 2, 3 OR 4. THE START OF THE
11 C BUFR MESSAGE, (I.E. THE STRING "BUFR") MUST BE ALIGNED ON THE FIRST
14 C PROGRAM HISTORY LOG:
15 C 2005-11-29 J. ATOR -- ORIGINAL AUTHOR
17 C USAGE: IGETDATE (MBAY, IYR, IMO, IDY, IHR)
18 C INPUT ARGUMENT LIST:
19 C MBAY - INTEGER: *-WORD PACKED BINARY ARRAY CONTAINING
22 C OUTPUT ARGUMENT LIST:
23 C IYR - INTEGER: SECTION 1 YEAR (YYYY OR YY, DEPENDING ON
25 C IMO - INTEGER: SECTION 1 MONTH (MM)
26 C IDY - INTEGER: SECTION 1 DAY (DD)
27 C IHR - INTEGER: SECTION 1 HOUR (HH)
28 C IGETDATE - INTEGER: SECTION 1 DATE-TIME (YYYYMMDDHH OR YYMMDDHH,
29 C DEPENDING ON DATELEN() VALUE)
32 C THIS ROUTINE CALLS: IUPBS01
33 C THIS ROUTINE IS CALLED BY: CKTABA DATEBF DUMPBF
34 C Normally not called by application
35 C programs but it could be.
38 C LANGUAGE: FORTRAN 77
39 C MACHINE: PORTABLE TO ALL PLATFORMS
43 COMMON /DATELN
/ LENDAT
47 C-----------------------------------------------------------------------
48 C-----------------------------------------------------------------------
50 IYR
= IUPBS01
(MBAY
,'YEAR')
51 IMO
= IUPBS01
(MBAY
,'MNTH')
52 IDY
= IUPBS01
(MBAY
,'DAYS')
53 IHR
= IUPBS01
(MBAY
,'HOUR')
57 IGETDATE
= (IYR*1000000
) + (IMO*10000
) + (IDY*100
) + IHR