NCEPLIBS-bufr  11.7.0
 All Data Structures Files Functions Variables Pages
ufbqcp.f
Go to the documentation of this file.
1 C> @file
2 C> @author WOOLLEN @date 1994-01-06
3 
4 C> THIS SUBROUTINE READS IN A FXY DESCRIPTOR ENTRY (Y) FOR A
5 C> SEQUENCE DESCRIPTOR (F=3) WITH TABLE D CATEGORY 63 (X=63) WHEN THE
6 C> DESCRIPTOR IS KNOWN TO BE IN THE BUFR TABLE IN LOGICAL UNIT LUNIT,
7 C> AND RETURNS THE MNEMONIC ASSOCIATED WITH IT. THIS ROUTINE WILL NOT
8 C> WORK FOR ANY OTHER TYPE OF DESCRIPTOR OR ANY OTHER SEQUENCE
9 C> DESCRIPTOR TABLE D CATEGORY. LUNIT MUST ALREADY BE OPENED FOR
10 C> INPUT OR OUTPUT VIA A CALL TO BUFR ARCHIVE LIBRARY SUBROUTINE
11 C> OPENBF. THIS ROUTINE IS ESPECIALLY USEFUL WHEN THE CALLING PROGRAM
12 C> IS READING "EVENTS" FROM AN INPUT BUFR FILE IN LUNIT (USUALLY THE
13 C> "PREPBUFR" FILE) SINCE THE DESCRIPTOR ENTRY (Y) HERE DEFINES THE
14 C> EVENT PROGRAM CODE. THUS, THE CALLING PROGRAM CAN OBTAIN THE
15 C> MNEMONIC NAME ASSOCIATED WITH AN EVENT PROGRAM CODE.
16 C>
17 C> PROGRAM HISTORY LOG:
18 C> 1994-01-06 J. WOOLLEN -- ORIGINAL AUTHOR
19 C> 1998-07-08 J. WOOLLEN -- REPLACED CALL TO CRAY LIBRARY ROUTINE
20 C> "ABORT" WITH CALL TO NEW INTERNAL BUFRLIB
21 C> ROUTINE "BORT"
22 C> 2003-11-04 S. BENDER -- ADDED REMARKS/BUFRLIB ROUTINE
23 C> INTERDEPENDENCIES
24 C> 2003-11-04 D. KEYSER -- UNIFIED/PORTABLE FOR WRF; ADDED
25 C> DOCUMENTATION (INCLUDING HISTORY); OUTPUTS
26 C> MORE COMPLETE DIAGNOSTIC INFO WHEN ROUTINE
27 C> TERMINATES ABNORMALLY
28 C>
29 C> USAGE: CALL UFBQCP (LUNIT, QCP, NEMO)
30 C> INPUT ARGUMENT LIST:
31 C> LUNIT - INTEGER: FORTRAN LOGICAL UNIT NUMBER FOR BUFR FILE
32 C> (ASSOCIATED BUFR TABLE MAY BE INTERNAL OR EXTERNAL)
33 C> QCP - REAL: SEQUENCE DESCRIPTOR ENTRY (I.E., EVENT PROGRAM
34 C> CODE) (Y IN FXY DESCRIPTOR)
35 C>
36 C> OUTPUT ARGUMENT LIST:
37 C> NEMO - CHARACTER*(*): MNEMONIC IN BUFR TABLE ASSOCIATED WITH
38 C> SEQUENCE DESCRIPTOR FXY WHERE F=3 AND X=63 AND
39 C> Y=INT(QCP)
40 C>
41 C> REMARKS:
42 C> THIS SUBROUTINE IS THE INVERSE OF BUFR ARCHIVE LIBRARY ROUTINE
43 C> UFBQCD.
44 C>
45 C> THIS ROUTINE CALLS: BORT IFXY NUMTAB STATUS
46 C> THIS ROUTINE IS CALLED BY: None
47 C> Normally called only by application
48 C> programs.
49 C>
50  SUBROUTINE ufbqcp(LUNIT,QCP,NEMO)
51 
52 
53 
54  CHARACTER*(*) nemo
55  CHARACTER*1 tab
56 
57 C-----------------------------------------------------------------------
58 C-----------------------------------------------------------------------
59 
60  CALL status(lunit,lun,il,im)
61  IF(il.EQ.0) goto 900
62 
63  idn = ifxy('363000')+ifix(qcp)
64 c .... get NEMO from IDN
65  CALL numtab(lun,idn,nemo,tab,iret)
66 
67 C EXITS
68 C -----
69 
70  RETURN
71 900 CALL bort('BUFRLIB: UFBQCP - BUFR FILE IS CLOSED, IT MUST BE'//
72  . ' OPEN')
73  END
subroutine numtab(LUN, IDN, NEMO, TAB, IRET)
This subroutine returns information about a descriptor from the internal DX BUFR tables, based on the bit-wise representation of the FXY value associated with that descriptor.
Definition: numtab.f:58
function ifxy(ADSC)
This function converts an FXY value from its 6 character representation to its bit-wise (integer) rep...
Definition: ifxy.f:42
subroutine ufbqcp(LUNIT, QCP, NEMO)
THIS SUBROUTINE READS IN A FXY DESCRIPTOR ENTRY (Y) FOR A SEQUENCE DESCRIPTOR (F=3) WITH TABLE D CATE...
Definition: ufbqcp.f:50
subroutine status(LUNIT, LUN, IL, IM)
This subroutine checks whether a specified Fortran logical unit number is currently connected to the ...
Definition: status.f:55
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
Definition: bort.f:22