NCEPLIBS-bufr  12.0.0
ufbqcp.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Get the Table D mnemonic associated with an event program
3 C> code from an NCEP prepbufr file.
4 C>
5 C> @author J. Woollen @date 1994-01-06
6 
7 C> Get the Table D mnemonic associated with an event program
8 C> code from an NCEP prepbufr file.
9 C>
10 C> Given an event program code, which is equivalent to the Y value
11 C> of a category 63 Table D descriptor from an NCEP
12 C> prepbufr file, this subroutine returns the corresponding
13 C> mnemonic.
14 C>
15 C> Logical unit LUNIT should have already been opened via a previous
16 C> call to subroutine openbf().
17 C>
18 C> This subroutine is the logical inverse of subroutine ufbqcd().
19 C>
20 C> @param[in] LUNIT - integer: Fortran logical unit number for
21 C> NCEP prepbufr file.
22 C> @param[in] IQCP - integer: Y value of a category 63 (i.e. X=63)
23 C> Table D descriptor.
24 C> @param[out] NEMO - character*(*): Mnemonic associated with IQCP.
25 C>
26 C> @author J. Woollen @date 1994-01-06
27  RECURSIVE SUBROUTINE ufbqcp(LUNIT,IQCP,NEMO)
28 
29  USE modv_im8b
30 
31  CHARACTER*(*) nemo
32  CHARACTER*1 tab
33 
34 C-----------------------------------------------------------------------
35 C-----------------------------------------------------------------------
36 
37 C CHECK FOR I8 INTEGERS
38 C ---------------------
39 
40  IF(im8b) THEN
41  im8b=.false.
42 
43  CALL x84(lunit,my_lunit,1)
44  CALL x84(iqcp,my_iqcp,1)
45  CALL ufbqcp(my_lunit,my_iqcp,nemo)
46 
47  im8b=.true.
48  RETURN
49  ENDIF
50 
51  CALL status(lunit,lun,il,im)
52  IF(il.EQ.0) GOTO 900
53 
54  idn = ifxy('363000')+iqcp
55 c .... get NEMO from IDN
56  CALL numtab(lun,idn,nemo,tab,iret)
57 
58 C EXITS
59 C -----
60 
61  RETURN
62 900 CALL bort('BUFRLIB: UFBQCP - BUFR FILE IS CLOSED, IT MUST BE'//
63  . ' OPEN')
64  END
subroutine bort(STR)
Log one error message and abort application program.
Definition: bort.f:18
function ifxy(ADSC)
Convert an FXY value from its 6 character representation to its WMO bit-wise representation.
Definition: ifxy.f:34
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 ...
subroutine numtab(LUN, IDN, NEMO, TAB, IRET)
Get information about a descriptor, based on the WMO bit-wise representation of an FXY value.
Definition: numtab.f:42
recursive subroutine status(LUNIT, LUN, IL, IM)
Check whether a specified Fortran logical unit number is currently connected to the NCEPLIBS-bufr sof...
Definition: status.f:36
recursive subroutine ufbqcp(LUNIT, IQCP, NEMO)
Get the Table D mnemonic associated with an event program code from an NCEP prepbufr file.
Definition: ufbqcp.f:28
subroutine x84(IIN8, IOUT4, NVAL)
Encode one or more 8-byte integer values as 4-byte integer values.
Definition: x84.F:19