From 973a0778607ba402deaa565fafce5ad9d14b088c Mon Sep 17 00:00:00 2001 From: Jeff Ator Date: Thu, 25 Aug 2022 17:48:42 +0000 Subject: [PATCH] final prep and release notes for new mini-release 11.7.1 --- VERSION | 2 +- docs/ReleaseNotes.md | 10 +++++++++ src/bufr_interface.f90 | 49 +++++++++++++++++++++--------------------- src/bufr_interface.h | 32 +++++++++++++-------------- 4 files changed, 51 insertions(+), 42 deletions(-) diff --git a/VERSION b/VERSION index 308bbae7..12f895e4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -11.7.0 +11.7.1 diff --git a/docs/ReleaseNotes.md b/docs/ReleaseNotes.md index 05d01836..da822149 100644 --- a/docs/ReleaseNotes.md +++ b/docs/ReleaseNotes.md @@ -2,6 +2,16 @@ ## Release Notes @brief Detailed description of changes included within each new release. +### Version 11.7.1 - August 26, 2022 + +* More extensions were added to support the query interface for C++ IODA +converters. +[[Issue #225](https://github.com/NOAA-EMC/NCEPLIBS-bufr/issues/225)] + +* Several internal routines were modified to allow the encoding and +decoding of values larger than 32 bits. +[[Issue #195](https://github.com/NOAA-EMC/NCEPLIBS-bufr/issues/195)] + ### Version 11.7.0 - May 19, 2022 diff --git a/src/bufr_interface.f90 b/src/bufr_interface.f90 index 2ef032db..0e3b601f 100644 --- a/src/bufr_interface.f90 +++ b/src/bufr_interface.f90 @@ -1,6 +1,6 @@ !> @file -!> @brief Enables a number of BUFRLIB functions and variables to be accessed -!> via wrapper functions from C and C++ based client programs. +!> @brief Enable a number of BUFRLIB subprograms and variables to be accessed +!> via wrapper functions from C and C++ based application programs. !> !> @author Ronald Mclaren !> @date 2020-07-29 @@ -9,8 +9,9 @@ !> variables so they can be used from within C and C++ based apps. The !> signatures of the public functions match their Fortran equivalents, as !> shown within the documentation for each of the individual functions. -!> Local copies of some Fortran variables are stored as allocatable objects -!> especially isc, link, jmpb, tag and typ. Its the clients responsibility +!> +!>

Local copies of some Fortran variables are stored as allocatable objects, +!> especially isc, link, jmpb, tag and typ. It's the application program's responsibility !> to call delete_table_data_f in order to properly delete these variables. !> !> @@ -189,13 +190,13 @@ end subroutine exitbufr_c !> @brief Wraps BUFRLIB "ireadmg" subroutine. !> !> @param[in] bufr_unit - c_int: the fortran file unit number to read from -!> @param[inout] c_subset - c_char: the subset string +!> @param[out] c_subset - c_char: the subset string !> @param[out] iddate - c_int: datetime of message !> @param[in] subset_str_len - c_int: length of the subset string !> function ireadmg_c(bufr_unit, c_subset, iddate, subset_str_len) result(ires) bind(C, name='ireadmg_f') integer(c_int), value, intent(in) :: bufr_unit - character(kind=c_char, len=1), intent(inout) :: c_subset(*) + character(kind=c_char, len=1), intent(out) :: c_subset(*) integer(c_int), intent(out) :: iddate integer(c_int), value, intent(in) :: subset_str_len integer(c_int) :: ires @@ -322,10 +323,10 @@ end subroutine status_c !> @brief Gets Table B Unit and Description strings for a mnemonic. Wraps BUFRLIB "nemdefs". !> !> @param[in] file_unit - c_int: Fortran file unit for the open file -!> @param[in] mnemonic - c_char: c str for mnemonic -!> @param[inout] unit_c - c_char: unit str +!> @param[in] mnemonic - c_char: mnemonic +!> @param[out] unit_c - c_char: unit str !> @param[in] unit_str_len - c_int: unit str length -!> @param[inout] desc_c - c_char: description string +!> @param[out] desc_c - c_char: description string !> @param[in] desc_str_len - c_int: description str length !> @param[out] iret - c_int: return value. 0 indicates success -1 indicates failure. !> @@ -333,9 +334,9 @@ subroutine nemdefs_c(file_unit, mnemonic, unit_c, unit_str_len, desc_c, desc_str bind(C, name='nemdefs_f') integer(c_int), value, intent(in) :: file_unit character(kind=c_char,len=1), intent(in) :: mnemonic(*) - character(kind=c_char, len=1), intent(inout) :: unit_c(*) + character(kind=c_char, len=1), intent(out) :: unit_c(*) integer(c_int), value, intent(in) :: unit_str_len - character(kind=c_char, len=1), intent(inout) :: desc_c(*) + character(kind=c_char, len=1), intent(out) :: desc_c(*) integer(c_int), value, intent(in) :: desc_str_len integer(c_int), intent(out) :: iret @@ -360,7 +361,7 @@ end subroutine nemdefs_c !> @brief Gets Table B scale, reference, and bits values. Wraps BUFRLIB "nemspecs". !> !> @param[in] file_unit - c_int: Fortran file unit for the open file -!> @param[in] mnemonic - c_char: c str for mnemonic +!> @param[in] mnemonic - c_char: mnemonic !> @param[in] mnemonic_idx - c_int: indicates specific mnemonic element (if repeated) !> @param[out] scale - c_int: scale of element !> @param[out] reference - c_int: reference of element @@ -387,51 +388,49 @@ end subroutine nemspecs_c !> @date 2022-08-16 !> !> @brief This subroutine returns information about a descriptor from the internal DX BUFR tables, -!> based on the mnemonic associated with that descriptor. +!> based on the mnemonic associated with that descriptor. Wraps BUFRLIB "nemtab". !> -!> @param[in] bufr_unit - c_int: : the bufr file pointer -!> @param[in] mnemonic - c_char: c str for mnemonic +!> @param[in] bufr_unit - c_int: the bufr file pointer +!> @param[in] mnemonic - c_char: mnemonic !> @param[out] descriptor - c_int: the binary descriptor for the mnemonic -!> @param[out] table type - c_char: 'A', 'B', 'C', or 'D' depeninding on table type +!> @param[out] table type - c_char: 'A', 'B', 'C', or 'D', depending on table type !> @param[out] table_idx - c_int: the table index, or 0 if not found !> subroutine nemtab_c(bufr_unit, mnemonic, descriptor, table_type, table_idx) & bind(C, name='nemtab_f') integer(c_int), value, intent(in) :: bufr_unit character(kind=c_char,len=1), intent(in) :: mnemonic(*) - integer(c_int), intent(out) ::descriptor + integer(c_int), intent(out) :: descriptor character(kind=c_char,len=1), intent(out) :: table_type(*) integer(c_int), intent(out) :: table_idx character(len=1) :: table_type_f - ! Get the scale, reference and bits call nemtab(bufr_unit, c_f_string(mnemonic), descriptor, table_type_f, table_idx) table_type(1)(1:1) = table_type_f(1:1) -! call copy_f_c_str(table_type_f, table_type, 1) end subroutine nemtab_c !> @author Ronald McLaren !> @date 2022-08-16 !> -!> @brief Get information about a Table B descriptor. +!> @brief Get information about a Table B descriptor. Wraps BUFRLIB "nemtbb". !> -!> @param[in] bufr_unit - c_int: : the bufr file pointer -!> @param[in] table_idx - c_int : c str for mnemonic -!> @param[inout] unit_str - c_char: unit str +!> @param[in] bufr_unit - c_int: the bufr file pointer +!> @param[in] table_idx - c_int: Table B index +!> @param[out] unit_str - c_char: unit str !> @param[in] unit_str_len - c_int: unit str length !> @param[out] scale - c_int: scale of element -!> @param[out] reference - c_int: reference of elemen +!> @param[out] reference - c_int: reference of element !> @param[out] bits - c_int: bits of element !> subroutine nemtbb_c(bufr_unit, table_idx, unit_str, unit_str_len, scale, reference, bits) & bind(C, name='nemtbb_f') integer(c_int), intent(in), value :: bufr_unit integer(c_int), intent(in), value :: table_idx - character(kind=c_char,len=1), intent(inout) :: unit_str(*) + character(kind=c_char,len=1), intent(out) :: unit_str(*) integer(c_int), intent(in), value :: unit_str_len integer(c_int), intent(out) :: scale integer(c_int), intent(out) :: reference diff --git a/src/bufr_interface.h b/src/bufr_interface.h index d2b284ff..a7c85675 100644 --- a/src/bufr_interface.h +++ b/src/bufr_interface.h @@ -77,7 +77,7 @@ extern "C" { @brief Wraps BUFRLIB "ireadmg" subroutine. @param[in] bufr_unit - int: the fortran file unit number to read from - @param[inout] subset - char*: the subset string + @param[out] subset - char*: the subset string @param[out] iddate - int*: datetime of message @param[in] subset_len - int: length of the subset string */ @@ -156,10 +156,10 @@ extern "C" { @brief Gets Table B Unit and Description strings for a mnemonic. Wraps BUFRLIB "nemdefs". @param[in] file_unit - int: Fortran file unit for the open file - @param[in] mnemonic - char*: c str for mnemonic - @param[inout] unit_c - char*: unit str + @param[in] mnemonic - const char*: mnemonic + @param[out] unit_c - char*: unit str @param[in] unit_str_len - int: unit str length - @param[inout] desc_c - char*: description string + @param[out] desc_c - char*: description string @param[in] desc_str_len - int: description str length @param[out] iret - int*: return value. 0 indicates success -1 indicates failure. */ @@ -177,8 +177,8 @@ extern "C" { @brief Gets Table B scale, reference, and bits values. Wraps BUFRLIB "nemspecs". - @param[in] file_unit - c_int: Fortran file unit for the open file - @param[in] mnemonic - const char*: c str for mnemonic + @param[in] file_unit - int: Fortran file unit for the open file + @param[in] mnemonic - const char*: mnemonic @param[in] mnemonic_idx - int: indicates specific mnemonic element (if repeated) @param[out] scale - int*: scale of element @param[out] reference - int*: reference of element @@ -200,10 +200,10 @@ extern "C" { @brief This subroutine returns information about a descriptor from the internal DX BUFR tables, based on the mnemonic associated with that descriptor. - @param[in] bufr_unit - int: : the bufr file pointer - @param[in] mnemonic - char*: c str for mnemonic + @param[in] bufr_unit - int: the bufr file pointer + @param[in] mnemonic - const char*: mnemonic @param[out] descriptor - int*: the binary descriptor for the mnemonic - @param[out] table_type char* - c_char: 'A', 'B', 'C', or 'D' depeninding on table type + @param[out] table_type char*: 'A', 'B', 'C', or 'D', depending on table type @param[out] table_idx - int*: the table index, or 0 if not found */ void nemtab_f(int bufr_unit, @@ -218,13 +218,13 @@ extern "C" { @brief Get information about a Table B descriptor. - @param[in] bufr_unit - c_int: : the bufr file pointer - @param[in] table_idx - c_int : c str for mnemonic - @param[inout] unit_str - c_char: unit str - @param[in] unit_str_len - c_int: unit str length - @param[out] scale - c_int: scale of element - @param[out] reference - c_int: reference of elemen - @param[out] bits - c_int: bits of element + @param[in] bufr_unit - int: the bufr file pointer + @param[in] table_idx - int: Table B index + @param[out] unit_str - char*: unit str + @param[in] unit_str_len - int: unit str length + @param[out] scale - int*: scale of element + @param[out] reference - int*: reference of element + @param[out] bits - int*: bits of element */ void nemtbb_f(int bufr_unit, int table_idx,