NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
makwmo.f
Go to the documentation of this file.
1C> @file
2C> @brief FORMS THE WMO HEADER FOR A GIVEN BULLETIN.
3C> @author Farley @date 1984-07-06
4
5C> Program history log:
6C> - Farley 1984-07-06
7C> - Ralph Jones 1994-10-10 Changes for cray.
8C> - Ralph Jones 1995-10-18 Add parameter KWBX to call.
9C> - Stephen Gilbert 1998-06-16 Changed argument list to pass in day and hour
10C> instead of the old O.N. 84 date word.
11C> - Stephen Gilbert 2003-03-28 Removed equivalences.
12C>
13C> @param[in] BULHED TTAAII bulletin header. FT10
14C> @param[in] IDAY Day of Month.
15C> @param[in] IHOUR Hour of Day.
16C> @param[in] KWBX 4 characters (KWBC to KWBQ)
17C> @param[out] HEADER Complete WMO header in ASCII.
18C>
19C> @author Farley @date 1984-07-06
20 SUBROUTINE makwmo (BULHED,IDAY,IHOUR,KWBX,HEADER)
21C
22 CHARACTER * 6 BULHED
23 CHARACTER * 1 HEADER (*)
24 CHARACTER * 1 WMOHDR (21)
25 CHARACTER * 4 KWBX
26 CHARACTER * 2 CTEMP
27C
28C--------------------------------------------------------------------
29C
30C$ 1. CREATE WMO HEADER.
31C
32C$ 1.1 CONVERT BULHED FROM EBCDIC TO ASCII.
33C
34C WRITE (6,FMT='('' MADE IT TO MAKWMO'')')
35C
36 DO i = 1,6
37 wmohdr(i) = bulhed(i:i)
38 END DO
39 wmohdr(7)=char(32) ! ASCII BLANK
40C
41C MOVE KWBX INTO WMO HEADER
42C
43 DO i = 1,4
44 wmohdr(i+7) = kwbx(i:i)
45 END DO
46 wmohdr(12)=char(32) ! ASCII BLANK
47C
48C$ 1.2 PICK OFF THE DAY OF MONTH (YY)
49C$ AND CONVERT TO ASCII.
50C
51 write(ctemp,fmt='(I2.2)') iday
52 wmohdr(13)=ctemp(1:1)
53 wmohdr(14)=ctemp(2:2)
54C
55C$ 1.3 PICK OFF THE HOUR(GG) AND CONVERT TO ASCII.
56C
57 write(ctemp,fmt='(I2.2)') ihour
58 wmohdr(15)=ctemp(1:1)
59 wmohdr(16)=ctemp(2:2)
60C
61C 1.4 FIL IN REST OF HEADER
62C
63 wmohdr(17)=char(48) ! ASCII "0"
64 wmohdr(18)=char(48) ! ASCII "0"
65 wmohdr(19)=char(13) ! ASCII CR = '\r'
66 wmohdr(20)=char(13) ! ASCII CR = '\r'
67 wmohdr(21)=char(10) ! ASCII LF = '\n'
68C
69C--------------------------------------------------------------------
70C
71C$ 2. MOVE WMOHDR TO OUTPUT FIELD.
72C
73 DO 200 i = 1,21
74 header(i) = wmohdr(i)
75 200 CONTINUE
76C
77 RETURN
78 END
subroutine makwmo(bulhed, iday, ihour, kwbx, header)
Program history log:
Definition makwmo.f:21