NCEPLIBS-bufr  12.0.1
msgupd.f File Reference

Write an uncompressed BUFR data subset. More...

Go to the source code of this file.

Functions/Subroutines

subroutine msgupd (LUNIT, LUN)
 This subroutine packs up the current subset within memory (array ibay in module moda_bitbuf) and then tries to add it to the BUFR message that is currently open within memory for LUNIT (array mbay in module moda_bitbuf). More...
 

Detailed Description

Write an uncompressed BUFR data subset.

Author
Woollen
Date
1994-01-06

Definition in file msgupd.f.

Function/Subroutine Documentation

◆ msgupd()

subroutine msgupd (   LUNIT,
  LUN 
)

This subroutine packs up the current subset within memory (array ibay in module moda_bitbuf) and then tries to add it to the BUFR message that is currently open within memory for LUNIT (array mbay in module moda_bitbuf).

If the subset will not fit into the currently open message, or if the subset byte count exceeds 65530 (sufficiently close to the 16-bit byte counter upper limit of 65535), then that message is flushed to LUNIT and a new one is created in order to hold the current subset. Any subset with byte count > 65530 will be written into its own one-subset message. if the current subset is larger than the maximum message length, then the subset is discarded and a diagnostic is printed.

Parameters
[in]LUNIT- integer: fortran logical unit number for BUFR file.
[in]LUN- integer: I/O stream index into internal memory arrays (associated with file connected to logical unit LUNIT).
Author
Woollen
Date
1994-01-06

Definition at line 23 of file msgupd.f.

References moda_h4wlc::chh4wlc, errwrt(), moda_bitbuf::ibay, moda_bitbuf::ibit, iupb(), moda_h4wlc::luh4wlc, moda_bitbuf::maxbyt, moda_bitbuf::mbay, moda_bitbuf::mbyt, msgini(), msgwrt(), mvb(), moda_h4wlc::nh4wlc, moda_msgcwd::nsub, pad(), pkb(), moda_h4wlc::sth4wlc, usrtpl(), and writlc().

Referenced by writsa(), and writsb().