NCEPLIBS-bufr  12.0.1
ifxy.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Convert an FXY value from its six character representation
3 C> to its WMO bit-wise representation.
4 C>
5 C> @author J. Woollen @date 1994-01-06
6 
7 C> Convert an FXY value from its 6 character
8 C> representation to its WMO bit-wise representation.
9 C>
10 C> Per the [official WMO BUFR regulations](@ref manual), an FXY value
11 C> can be represented as a bit-wise integer in 16 bits, ordered from
12 C> left (most significant) to right (least significant), and where the
13 C> F value occupies the first 2 bits, the X value occupies the next 6
14 C> bits, and the Y value occupies the last 8 bits.
15 C>
16 C> For example, if ADSC = '063022'
17 C>
18 C> F | X | Y
19 C> 0 | 63 | 22
20 C> 0 0 1 1 1 1 1 1 0 0 0 1 0 1 1 0
21 C>
22 C> then the corresponding ifxy
23 C>
24 C> = ( 2**13 + 2**12 + 2**11 + 2**10 + 2**9 + 2**8 +
25 C> 2**4 + 2**2 + 2**1 )
26 C>
27 C> = 16150
28 C>
29 C> @param[in] ADSC - character*6: FXY value.
30 C> @returns ifxy - integer: WMO bit-wise representation of FXY value.
31 C>
32 C> @author J. Woollen @date 1994-01-06
33  FUNCTION ifxy(ADSC)
34 
35  CHARACTER*6 adsc
36 
37 C----------------------------------------------------------------------
38 C----------------------------------------------------------------------
39 
40  READ(adsc,'(I1,I2,I3)') IF,ix,iy
41  ifxy = if*2**14 + ix*2**8 + iy
42  RETURN
43  END
function ifxy(ADSC)
Convert an FXY value from its 6 character representation to its WMO bit-wise representation.
Definition: ifxy.f:34