NCEPLIBS-bufr  12.0.1
setbmiss.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Define a customized placeholder value for "missing" data.
3 C>
4 C> @author J. Woollen @date 2012-09-15
5 
6 C> This subroutine allows the user to specify a customized value to
7 C> represent "missing" data when reading from or writing to BUFR files.
8 C>
9 C> This subroutine can be called at any time from within an
10 C> application program, and the value XMISS will then be treated as
11 C> "missing" when reading or writing BUFR data during all future
12 C> calls to any of the other BUFRLIB
13 C> [values-reading subroutines](@ref hierarchy) or
14 C> [values-writing subroutines](@ref hierarchy).
15 C> Otherwise, if this subroutine is never called, a default
16 C> placeholder value of 10E10_8 is used for "missing".
17 C>
18 C> Any data value can always be checked for equivalence to the
19 C> current "missing" value via a call to function ibfms(). See also
20 C> function getbmiss().
21 C>
22 C> @remarks
23 C> - The value XMISS is never actually encoded within a BUFR data
24 C> subset; rather, XMISS is a user-friendly placeholder value to
25 C> represent "missing" data values within the scope of the
26 C> application program. In any actual BUFR data subset, "missing"
27 C> values are always encoded as all bits set to 1, per WMO
28 C> regulations.
29 C>
30 C> @param[in] XMISS -- real*8: New placeholder value to represent
31 C> "missing" data
32 C>
33 C> @author J. Woollen @date 2012-09-15
34  RECURSIVE SUBROUTINE setbmiss(XMISS)
35 
36  USE modv_im8b
37  USE modv_bmiss
38 
39  real*8 xmiss
40 
41 C-----------------------------------------------------------------------
42 C-----------------------------------------------------------------------
43 
44 C Check for I8 integers.
45 
46  IF(im8b) THEN
47  im8b=.false.
48 
49  CALL setbmiss(xmiss)
50 
51  im8b=.true.
52  RETURN
53  ENDIF
54 
55  CALL openbf(0,'FIRST',0)
56 
57  bmiss = xmiss
58 
59  RETURN
60  END
This module declares and initializes the BMISS variable.
Definition: modules_vars.F90:9
real *8, public bmiss
Current placeholder value to represent "missing" data when reading from or writing to BUFR files; thi...
This module declares and initializes the IM8B variable.
logical, public im8b
Status indicator to keep track of whether all future calls to BUFRLIB subroutines and functions from ...
recursive subroutine openbf(LUNIT, IO, LUNDX)
Connects a new file to the NCEPLIBS-bufr software for input or output operations, or initializes the ...
Definition: openbf.f:124
recursive subroutine setbmiss(XMISS)
This subroutine allows the user to specify a customized value to represent "missing" data when readin...
Definition: setbmiss.f:35