NCEPLIBS-w3emc  2.11.0
w3aq15.f
Go to the documentation of this file.
1 C> @file
2 C> @brief GMT time packer.
3 C> @author B. Struble @date 1983-12-12
4 
5 C>
6 C> @note Convert 32 or 64 bit binary time (GMT) into a 16 bit
7 C> string and store these 4 packed decimal numbers into bytes
8 C> 39 and 40 of the output array.
9 C>
10 C> Program history log:
11 C> - B. Struble 1983-12-12
12 C> - Ralph Jones 1984-07-06 Change to ibm assembler v 02.
13 C> - Ralph Jones 1995-10-16 Change to fortran for cray and 32 bit workstations.
14 C>
15 C> @param[in] ITIME Integer word containing time in binary.
16 C> @param[out] QDESCR Array containing transmission queue descriptor
17 C> Time will be placed in 39 and 40th byte of this array as 4 (4 bit) BCD.
18 C>
19 C>
20 C> @note The user can obtain the current time in GMT by invocking
21 C> the W3 library routine w3fq02 which fills an eight word array
22 C> with the current date and time. The 5th word from this array
23 C> contains the time which can be passed to w3aq15 as the
24 C> input parameter-itime.
25 C>
26 C> @author B. Struble @date 1983-12-12
27  SUBROUTINE w3aq15(ITIME, QDESCR)
28  INTEGER ITIME
29 C
30  CHARACTER * 80 QDESCR
31 C
32 C BYTES 39-40 HR/MIN TIME OF BULLETIN CREATION
33 C TWO BYTES AS 4 BIT BCD
34 C
35 C
36 C CONVERT INTO 4 BIT BCD
37 C
38  ka = itime / 1000
39  kb = mod(itime,1000) / 100
40  kc = mod(itime,100) / 10
41  kd = mod(itime,10)
42 C
43  qdescr(39:39) = char(ka * 16 + kb)
44  qdescr(40:40) = char(kc * 16 + kd)
45 C
46  RETURN
47  END
subroutine w3aq15(ITIME, QDESCR)
Definition: w3aq15.f:28