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 11.0.0

1) A new subroutine RTRCPTB was added which works just like subroutine RTRCPT,
except that it operates on a BUFR message passed directly to it by a call
argument, rather than on the last BUFR message that was indirectly read during
the previous call to subroutine READMG, READMM, READERME or equivalent.
Subroutine RTRCPT was correspondingly modified to now directly call RTRCPTB,
to avoid maintaining the same program logic within two different subroutines.

2) The maximum number of delayed replication factors that can be passed in as
input to subroutine DRFINI was increased from 100 to 200.

3) Subroutine UFBSEQ was modified to fix a bug involving nesting of delayed
replication sequences.  The subroutine would fail to store data properly in
cases where the inner-nested sequence was not present (i.e. zero replications)
within the first replication of the outer sequence.

4) The makebufrlib.sh build script was modified to automatically extract the
version number for the current build from the source of subroutine BVERS.
Previously this information had been hardcoded in multiple lines of the script.

5) The default directory location of the BUFR master tables in subroutine BFRINI
was changed from "/nwprod/fix" to "/nwprod/decoders/decod_shared/fix".

6) A new subroutine NEMSPECS was added which returns the scale factor, reference
value and bit width corresponding to a specified occurrence of a given mnemonic
within a subset definition, including accounting for any Table C operators such
as 2-01-YYY, 2-02-YYY, 2-03-YYY, 2-07-YYY, 2-08-YYY, etc. which may be in effect
for that particular occurrence of the mnemonic.

7) A new subroutine NEMDEFS was added which returns the element definition and
units associated with a given mnemonic.

8) Global parameter MXIMB was removed from the BUFRLIB, and the corresponding
logic within subroutine MVB was simplified to mitigate the need for it.

9) Subroutines MSGUPD, CPYUPD and COPYSB were modified to ensure that any subset
larger than 65530 bytes is written to its own message in the output stream. This
ensures that the subset byte count indicator, which is an NCEP local descriptor
packed into 16 bits prior to each subset in a message, will not need to be
relied upon in order to locate any subsequent subsets within the same message.

10) Global parameter MAXSS (the maximum number of data values that can be read
from or written into a subset by the BUFRLIB software) was increased from
80000 to 120000.

11) Subroutine RDMSGB, which was rendered obsolete with the addition of the
embedded C-language I/O upgrade in version 10.2.0, has been removed.

12) A logical call argument was added to subroutine UPC to let the calling
subprogram specify whether null characters should be converted to blanks.
Previously, all null characters were converted to blanks by default.

13) New versions of all of the normal builds of BUFRLIB have been added which
allow certain array sizes to be specified by the user at run time, with the
corresponding arrays dynamically allocated at run time rather than statically
allocated at compile time.  The new builds contain the suffix "_DA" and can
be used by application programs which need flexibility in defining size limits
for certain outlier BUFR datasets.  The size limits that can be modified are
defined within new subroutine ISETPRM, which must itself be called prior to the
first call to subroutine OPENBF for each new size limit that is to be modified
from its default value.  The corresponding arrays are then dynamically allocated
during the subsequent first call to OPENBF.  As part of this enhancement,
numerous subprograms within BUFRLIB have been rewritten to share memory using
FORTRAN modules rather than common blocks, and new conditional compilation flags
have been incorporated into these subprograms as well as to the makebufrlib.sh
build script.  This allows the same source code and build script to be used for
both dynamic allocation and static allocation builds.  Note that application
programs which don't have a need to redefine any default array size limits
may continue to use the existing static allocation builds for maximum runtime
efficiency.

14) A new subroutine PKX was added which works just like subroutine PKB, except
that it properly handles cases where the input value NBITS is greater than the
number of bits in a machine word.

15) Support was added for the processing of 2-2X, 2-3X and 2-4X non-marker
operators when reading or writing BUFR messages, including when these operators
are included in sequences within a BUFR DX table.

16) Subroutine STSEQ was modified to fix a bug involving the application of
associated fields to Table D sequence descriptors.

17) Function ICBFMS was modified to improve the logic for identifying "missing"
strings encoded as REAL*8 10E10 values prior to version 10.2.0 of the library.

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

          Changes to BUFR Archive Library, Version 10.2.5

1) Subroutine MESGBF was modified to ensure that the input BUFR file is
always closed before exiting the subroutine.

2) Function COBFL was modified to allow up to 500 characters in the path of
the filename being opened.

3) A declaration typo was fixed in subroutine BLOCKS.

4) Global parameter MAXNC (the maximum number of FXY descriptors that can be
written into Section 3 of a BUFR message) was increased from 300 to 600.

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

          Changes to BUFR Archive Library, Version 10.2.4

1) Configuration files bufrlib.PRM and makebufrlib.sh were updated to
generate a 4_32 build (4-byte REAL, 4-byte INT, 32-bit compilation) on
the IBM CCS for version 10.2.3 of the BUFRLIB.

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

          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.