Skip to content

Commit

Permalink
Merge pull request #229 from NOAA-EMC/release/11.7.1
Browse files Browse the repository at this point in the history
final prep and release notes for new mini-release 11.7.1
  • Loading branch information
jbathegit authored Aug 26, 2022
2 parents 0997671 + 973a077 commit cc89841
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 42 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11.7.0
11.7.1
10 changes: 10 additions & 0 deletions docs/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
49 changes: 24 additions & 25 deletions src/bufr_interface.f90
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
!>
!> <p>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.
!>
!>
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -322,20 +323,20 @@ 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.
!>
subroutine nemdefs_c(file_unit, mnemonic, unit_c, unit_str_len, desc_c, desc_str_len, iret) &
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

Expand All @@ -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
Expand All @@ -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
Expand Down
32 changes: 16 additions & 16 deletions src/bufr_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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.
*/
Expand All @@ -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
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit cc89841

Please sign in to comment.