Printer image icon. Send To Printer
NCEP Home > NCO Home > Systems Integration Branch > Decoders > BUFRLIB > Change History
Printer image icon. Printer Friendly Version

NCEP BUFRLIB Change History

##############################################################################

          Changes to BUFR Archive Library, Version 10.2.3

1) Subroutine RDUSDX was modified to prevent a segfault when trying to read
DX dictionary information from an empty file.

##############################################################################

          Changes to BUFR Archive Library, Version 10.2.2

1) Subroutine OPENBF was modified to fix a bug which caused a segfault in
certain cases when appending to a BUFR file using the embedded C-language I/O.

2) Subroutines READLC and WRITLC were modified to allow the input mnemonic
string to be up to 14 characters when it contains a '#' condition code.

##############################################################################

          Changes to BUFR Archive Library, Version 10.2.1

1) A bug was fixed in the embedded C-language I/O to account for the
difference in index numbering between Fortran and C arrays.

##############################################################################

          Changes to BUFR Archive Library, Version 10.2.0

1) The makebufrlib.sh script was modified to streamline the endianness check
and make it more portable.

2) Subroutine WRTREE was modified to ensure that "missing" character strings
are properly encoded with all bits set to 1.

3) A new function ICBFMS was added which tests whether decoded character
strings are "missing" by checking if all of the equivalent bits are set to 1.
This was done because, on certain platforms, the BUFRLIB REAL*8 "missing" value
BMISS is not always equivalent to all bits set to 1 when viewed as a character
string, and thus the existing BUFRLIB function IBFMS did not always work
properly in such cases.  However, users can continue to use the existing IBFMS
function in application programs, because the new ICBFMS function has now been
incorporated internally within the logic of many BUFRLIB subroutines, in
addition to also being available for direct calling by application programs.

4) Subroutines READMG and READERME were modified to prevent the BUFRLIB from
internally adjusting to DX (dictionary) table messages when Section 3 decoding
is being used.  Otherwise, contention can occur between the table information
in the DX messages and the table information specified within the Section 3
descriptors.  From now on, whenever Section 3 decoding is used (as specified
by setting IO="SEC3" when opening a file via OPENBF), the BUFRLIB will now
treat any DX (dictionary) table message the same as any other message and
decode the actual data (i.e. table) values according to Section 3.

5) Subroutine OPENBF was modified to allow a new option for input call
argument IO.  If this argument is set to 'INUL', then the BUFRLIB will behave
the same as when IO='IN', except that it will never try to actually read
anything from the file attached to input call argument LUNIT.  This can be
useful for some special cases, such as when the user plans to pass input
messages to the BUFRLIB using subsequent calls to subroutine READERME.

6) A new subroutine GETTAGPR was added which returns the mnemonic corresponding
to a parent sequence in a subset definition, given the mnemonic corresponding
to a child descriptor within that sequence.  This can be useful in certain
application codes, especially when Section 3 decoding is being used.

7) A new function GETVALNB was added which searches for a specified mnemonic
in a subset definition, then searches forward or backward from that point for
a different mnemonic and returns the associated value.  This can be useful in
certain application codes, especially when Section 3 decoding is being used.

8) Functionality was added to improve the portability of reading and writing
BUFR messages across different platforms.  All calls to existing FORTRAN
subroutines which read or write BUFR messages from disk (e.g. READMG, UFBMEM,
UFBTAB, WRITSB, WRCMPS, COPYMG, etc.) now use embedded C-language I/O to
perform these tasks.  Among other things, this means that any BUFR file can
now be read regardless of whether it has been pre-blocked with FORTRAN
control words using the cwordsh utility.  For writing BUFR files, a new
subroutine SETBLOCK was added which allows users to specify whether output
BUFR messages are to be unblocked (which is the new default), big-endian
blocked, or little-endian blocked.

9) A new subroutine SETBMISS was added which allows users to specify a custom
"missing" value for writing to and reading from BUFR files, rather than using
the BUFRLIB default "missing" value of 10E10.  A corresponding function
GETBMISS was also added which returns the current "missing" value in use.
##############################################################################

          Changes to BUFR Archive Library, Version 10.1.0

1) Subroutine UFDUMP was modified to fix a bug when checking for the "missing"
value in long character strings (i.e. longer than 8 bytes).

2) A new subroutine UFBMEX was added for use with certain application
programs.  UFBMEX functions similarly to UFBMEM, but has an additional return
argument containing an array of message types corresponding to the array of
messages that were read into internal memory.

3) Subroutines ADDATE, IUPBS1, IUPVS1, LJUST, LSTRPC, LSTRPS, SUBUPD, POSAPN
and PARSEQ, which had been marked as obsolete within a previous version of
BUFRLIB, have now been deleted.

4) Several global parameters were increased in "bufrlib.PRM".
Specifically, MAXTBA (the maximum number of Table A entries for a BUFR file)
was increased from 120 to 150, and MXDXTS (the maximum number of dictionary
tables that can be stored for use with BUFR messages in internal memory) was
increased from 10 to 200.

5) Subroutine CONWIN was modified to fix a bug and remove an obsolete call
argument.

6) Subroutine WRCMPS was modified to fix a bug involving embedded tables
within a file of compressed BUFR messages.

7) Documentation was improved in many subroutines throughout the library.

8) Support has been added for the 2-03-YYY "change reference values" operator.

9) Subroutine USRTPL was modified to fix a bug that was incorrectly using
parameter MAXJL instead of parameter MAXSS when checking for overflow of an
internal template array.

10) Subroutine WRDXTB was modified to prevent it from trying to store more
than 255 Table A, Table B or Table D descriptors in a single DX dictionary
message.  The maximum value was set to 255 since regular 8-bit delayed
replication is used to store descriptor information in these messages.

11) Subroutine TABSUB was modified to correctly generate the jump/link table
for subsets where a Table C operator immediately follows a Table D sequence.
##############################################################################

          Changes to BUFR Archive Library, Version 10.0.1

1) Subroutine REWNBF was modified to fix a bug which skipped the first data
message after a file rewind.
##############################################################################

          Changes to BUFR Archive Library, Version 10.0.0

1) Subroutines PKVS1, OVRBS1, NMBYT, READIBM, IREADIBM, READFT, IREADFT and
MOVA2I, which had been marked as obsolete within a previous version of
BUFRLIB, have now been deleted.

2) A new global parameter MAXSS was defined for use as the maximum number of
data values that can be read from or written into a single data subset by the
BUFRLIB software.  Previously, the separate global parameter MAXJL was used
to define this limit.  MAXJL will now be used solely to define the maximum
number of internal jump/link table entries.

3) The size of a string declaration was increased within subroutine RDUSDX.

4) Subroutine READLC was modified to enable the extraction of "long" (i.e.
greater than 8 bytes) character strings from compressed messages.  In
addition, it is now possible to access all occurrences of such a string
from within a given data subset, via the use of the new mnemonic condition
character '#'.  Previously, READLC could only ever access the first
occurrence of any "long" character string from within a data subset.

5) Subroutine WRITLC was modified to allow the writing of "long" (i.e.
greater than 8 bytes) character strings within compressed messages.  In
addition, it is now possible to write all occurrences of such a string into
a given data subset, via the use of the new mnemonic condition character '#'.
Previously, WRITLC could only ever locate and write the first occurrence of
any "long" character string within a data subset.

6) Subroutine UFDUMP was modified to label each output level for sequences
where the replication count is greater than 1.  In addition, it will now
output all occurrences of "long" (i.e. greater than 8 bytes) character
strings from within a given data subset.

7) Subroutine RDCMPS was modified to fix a bug which could cause the overflow
of internal arrays when working with long character strings (i.e. longer
than 8 bytes).

8) Subroutine NVNWIN was modified to fix a bug which could cause the overflow
of an internal array during initialization on certain operating systems.

9) A new subroutine BVERS was added as a resource for managing and reporting
library version numbers.

10) The fuzziness threshold in function IBFMS was increased for improved
accuracy when testing for the BUFRLIB "missing" value.

11) A new subroutine IUPBS3 was added which unpacks specified values from
Section 3, including subset counts and compression indicators.  The same
logic had been repeated within numerous existing subroutines throughout
BUFRLIB and has now been consolidated into this single subroutine that can
itself be called from wherever it is needed.

12) Subroutines READERME, RDMSGW and RDMSGB were modified to prevent the
overflow of an internal array for extremely large BUFR messages.

13) Subroutine UPDS3 was modified to pass in a new input argument containing
the dimensioned size of the output array, in order to prevent the subroutine
from possibly overflowing the array.

14) Subroutine WRITSA was modified to pass in a new input argument containing
the dimensioned size of the output array, in order to prevent the subroutine
from possibly overflowing the array.

15) A new capability was added to BUFRLIB to enable the decoding of a BUFR
message according to its data description section (Section 3).  This is
activated by setting IO="SEC3" when opening the file via subroutine OPENBF.
Master tables containing all possible BUFR descriptors are also required, and
these may be specified via a call to new subroutine MTINFO or by using default
values specified within subroutine BFRINI.  If the default values are used,
then FORTRAN logical unit numbers 98 and 99 will be allocated by the BUFRLIB
for opening and reading the master tables.  This new capability allows BUFR
messages to be decoded without pre-defined DX dictionary files.

16) Subroutine READMM was re-written to directly call subroutine RDMEMM
instead of duplicating all of the code logic in RDMEMM.

17) Subroutine UPB was re-written to directly call subroutine UPBB instead of
duplicating all of the code logic in UPBB.

18) Subroutine POSAPN has been marked as obsolete (for future removal from
BUFRLIB).  The same functionality can now be obtained via the use of
subroutine POSAPX.

19) Subroutine WRCMPS was modified to fix a bug involving the writing of
compressed subsets which contain delayed replication.  In certain situations,
the values of two internal variables were not being properly saved between
successive calls to the subroutine.

20) Changes were made so that the BUFRLIB will automatically read and adjust
to any DX table (dictionary) messages internal to a file.  Previously, the
software would only ever process such messages at the beginning of a file,
so that all subsequent data messages in that file were required to conform
to these initial dictionary messages, and any subsequent dictionary messages
in the file were simply ignored.  Now, any subsequent dictionary messages
will cause the BUFRLIB to adjust its internal processing tables and treat all
subsequent data messages as conforming to these new dictionary messages, up
through the end of the file or until yet another set of dictionary messages
is encountered.  These changes affect all BUFRLIB subroutines which read BUFR
messages from a file, including READMG, IREADMG, READMM, IREADMM, RDMEMM,
READNS and IREADNS.

21) Subroutine ADDATE has been marked as obsolete (for future removal from
BUFRLIB) since it is no longer called by any BUFRLIB routines.  The same
functionality can now be obtained via the use of subroutine W3MOVDAT in the
NCEP W3 library.

22) Subroutine SUBUPD has been marked as obsolete (for future removal from
BUFRLIB) since it is no longer called by any BUFRLIB routines and is almost
an exact replica of subroutine MSGUPD.  The same functionality can now be
obtained via the use of subroutine MSGUPD.

23) A new logical function MSGFULL was added which determines whether there is
enough room to store the current data subset within the current BUFR message
for output.  The same logic had been repeated within numerous existing
subroutines throughout BUFRLIB and has now been consolidated into this single
subroutine that can itself be called from wherever it is needed.

24) A new capability was added to BUFRLIB to allow it to append a tank receipt
time to Section 1 within all future BUFR messages written to output by
subroutines WRITSB, COPYMG or equivalent.  The tank receipt time is a local
extension to Section 1; however, its inclusion in a message is still fully
compliant with the WMO BUFR regulations.  This new capability is activated via
an initial call to new subroutine STRCPT, specifying the time to be appended
to Section 1 within all future BUFR messages written to output.  This same
information can then be read back from an input BUFR message via a call to new
subroutine RTRCPT.

25) Subroutine NUMTAB was re-written to directly call subroutine NUMTBD
instead of duplicating all of the code logic in NUMTBD.

26) Subroutine NEMTBA was re-written to directly call subroutine NEMTBAX
instead of duplicating all of the code logic in NEMTBAX.

27) Documentation was improved within numerous subroutines throughout BUFRLIB,
including the addition of docblocks where none previously existed.

28) The default BUFR master table version number was changed from "12" to "13"
within subroutines CMSGINI, DXMINI and MSGINI.

29) A new capability was added to allow BUFRLIB print diagnostics and other
runtime messages to be redirected somewhere other than the default FORTRAN
logical unit #6 (i.e. standard output).  This is enabled within an application
program by supplying an in-line version of subroutine ERRWRT to override the
new default version of this subroutine provided within the BUFRLIB.  The
default version will continue to write to standard output when included within
a compilation.

30) Subroutines CMSGINI, STNDRD and MSGWRT were modified to remove a logical
error which assumed that any message whose data section (Section 4) was
compressed was also fully standard.  In reality, the use of compression only
implies that the data section is fully standard and does not necessarily imply
that the data description section (Section 3) is also fully standard.  BUFRLIB
will now address the standardization of Section 3 solely within subroutine
STNDRD, independent of whether or not the data in Section 4 are compressed.

31) Functions LSTRPC and LSTRPS have been marked as obsolete (for future removal
from BUFRLIB).  The same functionality can now be obtained via the use of
function LSTJPB.

32) Subroutine UFBTAB was modified to fix a bug involving the unpacking of
character strings which are identical within each subset of a single
compressed BUFR message.