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