NCEPLIBS-bufr  11.7.0
 All Data Structures Files Functions Variables Pages
ufbinx.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine ufbinx (LUNIT, IMSG, ISUB, USR, I1, I2, IRET, STR)
 THIS SUBROUTINE EITHER OPENS A BUFR FILE CONNECTED TO LOGICAL UNIT LUNIT FOR INPUT OPERATIONS (IF IT IS NOT ALREADY OPENED AS SUCH), OR SAVES ITS POSITION AND REWINDS IT TO THE FIRST DATA MESSAGE (IF BUFR FILE ALREADY OPENED), THEN (VIA A CALL TO BUFR ARCHIVE LIBRARY SUBROUTINE UFBINT) READS SPECIFIED VALUES FROM INTERNAL SUBSET ARRAYS ASSOCIATED WITH A PARTICULAR SUBSET FROM A PARTICULAR BUFR MESSAGE IN A MESSAGE BUFFER. More...
 

Detailed Description

Author
WOOLLEN
Date
2003-11-04

Definition in file ufbinx.f.

Function/Subroutine Documentation

subroutine ufbinx (   LUNIT,
  IMSG,
  ISUB,
real*8, dimension(i1,i2)  USR,
  I1,
  I2,
  IRET,
character*(*)  STR 
)

THIS SUBROUTINE EITHER OPENS A BUFR FILE CONNECTED TO LOGICAL UNIT LUNIT FOR INPUT OPERATIONS (IF IT IS NOT ALREADY OPENED AS SUCH), OR SAVES ITS POSITION AND REWINDS IT TO THE FIRST DATA MESSAGE (IF BUFR FILE ALREADY OPENED), THEN (VIA A CALL TO BUFR ARCHIVE LIBRARY SUBROUTINE UFBINT) READS SPECIFIED VALUES FROM INTERNAL SUBSET ARRAYS ASSOCIATED WITH A PARTICULAR SUBSET FROM A PARTICULAR BUFR MESSAGE IN A MESSAGE BUFFER.

THE PARTICULAR SUBSET AND BUFR MESSAGE ARE BASED BASED ON THE SUBSET NUMBER IN THE MESSAGE AND THE MESSAGE NUMBER IN THE BUFR FILE. FINALLY, THIS SUBROUTINE EITHER CLOSES THE BUFR FILE IN LUNIT (IF IS WAS OPENED HERE) OR RESTORES IT TO ITS PREVIOUS READ/WRITE STATUS AND POSITION (IF IT WAS NOT OPENED HERE). SEE UFBINT FOR MORE INFORMATION ON THE READING OF VALUES OUT OF A BUFR MESSAGE SUBSET. NOTE: THE MESSAGE NUMBER HERE DOES NOT INCLUDE THE DICTIONARY MESSAGES AT THE BEGINNING OF THE FILE.

PROGRAM HISTORY LOG: 2003-11-04 J. WOOLLEN – ORIGINAL AUTHOR (WAS IN VERIFICATION VERSION BUT MAY HAVE BEEN IN THE PRODUCTION VERSION AT ONE TIME AND THEN REMOVED) 2003-11-04 D. KEYSER – UNIFIED/PORTABLE FOR WRF; ADDED DOCUMENTATION; OUTPUTS MORE COMPLETE DIAGNOSTIC INFO WHEN ROUTINE TERMINATES ABNORMALLY 2004-08-09 J. ATOR – MAXIMUM MESSAGE LENGTH INCREASED FROM 20,000 TO 50,000 BYTES 2009-03-23 J. ATOR – MODIFY LOGIC TO HANDLE BUFR TABLE MESSAGES ENCOUNTERED ANYWHERE IN THE FILE (AND NOT JUST AT THE BEGINNING!) 2012-09-15 J. WOOLLEN – MODIFIED FOR C/I/O/BUFR INTERFACE USE 'INX' ARGUMENT TO OPENBF 2014-12-10 J. ATOR – USE MODULES INSTEAD OF COMMON BLOCKS

USAGE: CALL UFBINX (LUNIT, IMSG, ISUB, USR, I1, I2, IRET, STR) INPUT ARGUMENT LIST: LUNIT - INTEGER: FORTRAN LOGICAL UNIT NUMBER FOR BUFR FILE IMSG - INTEGER: POINTER TO BUFR MESSAGE NUMBER TO READ IN BUFR FILE ISUB - INTEGER: POINTER TO SUBSET NUMBER TO READ IN BUFR MESSAGE I1 - INTEGER: LENGTH OF FIRST DIMENSION OF USR (MUST BE AT LEAST AS LARGE AS THE NUMBER OF BLANK-SEPARATED MNEMONICS IN STR) I2 - INTEGER: LENGTH OF SECOND DIMENSION OF USR STR - CHARACTER*(*): STRING OF BLANK-SEPARATED TABLE B MNEMONICS IN ONE-TO-ONE CORRESPONDENCE WITH FIRST DIMENSION OF USR {THIS CAN ALSO BE A SINGLE TABLE D (SEQUENCE) MNEMONIC WITH EITHER 8- OR 16-BIT DELAYED REPLICATION (SEE REMARKS 1 IN UFBINT DOCBLOCK)}

OUTPUT ARGUMENT LIST: USR - REAL*8: (I1,I2) STARTING ADDRESS OF DATA VALUES READ FROM DATA SUBSET IRET - INTEGER: NUMBER OF "LEVELS" OF DATA VALUES READ FROM DATA SUBSET (MUST BE NO LARGER THAN I2)

INPUT FILES: UNIT "LUNIT" - BUFR FILE

REMARKS: THIS ROUTINE CALLS: BORT CLOSBF OPENBF READMG READSB REWNBF STATUS UFBINT UPB THIS ROUTINE IS CALLED BY: None Normally called only by application programs.

Definition at line 71 of file ufbinx.f.

References bort(), closbf(), openbf(), readmg(), readsb(), rewnbf(), status(), ufbint(), and upb().