NCEPLIBS-bufr  12.0.0
ufbmem.f File Reference

Connect a new file to the NCEPLIBS-bufr software, and read the entire file contents into internal arrays. More...

Go to the source code of this file.

Functions/Subroutines

recursive subroutine ufbmem (LUNIT, INEW, IRET, IUNIT)
 This subroutine connects a new file to the NCEPLIBS-bufr software for input operations, then reads the entire file contents into internal arrays so that any of the individual BUFR messages can later be accessed from memory, instead of having to read them one at a time sequentially from the file. More...
 

Detailed Description

Connect a new file to the NCEPLIBS-bufr software, and read the entire file contents into internal arrays.

Author
J. Woollen
Date
1994-01-06

Definition in file ufbmem.f.

Function/Subroutine Documentation

◆ ufbmem()

recursive subroutine ufbmem (   LUNIT,
  INEW,
  IRET,
  IUNIT 
)

This subroutine connects a new file to the NCEPLIBS-bufr software for input operations, then reads the entire file contents into internal arrays so that any of the individual BUFR messages can later be accessed from memory, instead of having to read them one at a time sequentially from the file.

Any embedded DX BUFR tables contained within the file are also read and processed into separate internal arrays for later use.

Logical unit number LUNIT must already be associated with an actual filename on the local system, typically via a Fortran "OPEN" statement.

When INEW = 0, the output value IUNIT will be set equal to the input value LUNIT. Otherwise, the output value IUNIT will be set to the value of LUNIT that was input when this subroutine was previously called with INEW = 0, and the system file connected to LUNIT will be closed via an internal call to subroutine closbf() before exiting this subroutine. In either case, IUNIT can now be used to access all BUFR messages that were read and stored by all previous calls to this subroutine.

Parameters
[in]LUNIT– integer: Fortran logical unit number for BUFR file
[in]INEW– integer: Processing option
  • 0 = Initialize the internal arrays, then read all BUFR messages from LUNIT into internal arrays
  • Otherwise, read all BUFR messages from LUNIT and append them to the existing messages within the internal arrays
[out]IRET– integer: Number of BUFR messages that were read from LUNIT and stored into internal arrays
[out]IUNIT– integer: File status
  • 0 = LUNIT was empty, so no messages were read
  • Otherwise, the Fortran logical unit number to use for later access to any of the messages from the internal arrays
Author
J. Woollen
Date
1994-01-06

Definition at line 47 of file ufbmem.f.

References bort(), closbf(), cpdxmm(), errwrt(), idxmsg(), modv_im8b::im8b, moda_msgmem::ldxm, moda_msgmem::ldxts, modv_maxmem::maxmem, modv_maxmsg::maxmsg, moda_mgwa::mgwa, moda_msgmem::mlast, moda_msgmem::msgp, moda_msgmem::msgs, moda_msgmem::munit, moda_msgmem::ndxm, moda_msgmem::ndxts, nmwrd(), openbf(), rdmsgw(), status(), x48(), and x84().