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