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

Read the next data subset from a BUFR message. More...

Go to the source code of this file.

Functions/Subroutines

subroutine readsb (LUNIT, IRET)
 This subroutine reads the next data subset from a BUFR message into internal arrays. More...
 

Detailed Description

Read the next data subset from a BUFR message.

Definition in file readsb.f.

Function/Subroutine Documentation

subroutine readsb (   LUNIT,
  IRET 
)

This subroutine reads the next data subset from a BUFR message into internal arrays.

Author
J. Woollen
Date
1994-01-06
Parameters
[in]LUNIT– integer: Fortran logical unit number for BUFR file
[out]IRET– integer: return code
  • 0 = new BUFR data subset was successfully read into internal arrays
  • -1 = there are no more BUFR data subsets in the BUFR message

Logical unit LUNIT should have already been opened for input operations via a previous call to subroutine openbf(), and a BUFR message should have already been read into internal arrays via a previous call to one of the message-reading subroutines.

Whenever this subroutine returns with IRET = 0, this indicates that a new BUFR data subset (i.e. report) was successfully read into internal arrays within the BUFRLIB software, and from where it can then be easily manipulated or further parsed via calls to any of the values-reading subroutines. Otherwise, if the subroutine returns with IRET = -1, then this indicates that there are no more data subsets available within the current message, and therefore that a new call needs to be made to one of the message-reading subroutines in order to read in the next message from logical unit LUNIT.

Program history log:

Date Programmer Comments
1994-01-06 J. Woollen Original author
1998-07-08 J. Woollen Replaced call to Cray library routine "ABORT" with call to new internal routine bort()
1999-11-18 J. Woollen The number of BUFR files which can be opened at one time increased from 10 to 32
2000-09-19 J. Woollen Added call to new routine rdcmps() allowing subsets to also be decoded from compressed BUFR messages; maximum length increased from 10,000 to 20,000 bytes
2002-05-14 J. Woollen Corrected error relating to certain foreign file types; removed old Cray compiler directives
2003-11-04 S. Bender Added remarks and routine interdependencies
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
2014-12-10 J. Ator Use modules instead of COMMON blocks

Definition at line 47 of file readsb.f.

References bort(), rdcmps(), rdtree(), status(), and upb().

Referenced by copysb(), ireadsb(), rdmems(), rdmgsb(), readns(), ufbinx(), and ufbpos().