NCEPLIBS-bufr
11.7.0
|
This module contains functions which wrap certain Fortran BUFRLIB functions so they can be called from C and C++. More...
Public Member Functions | |
subroutine, public | closbf_c (bufr_unit) |
Wraps BUFRLIB "closbf" subroutine. More... | |
subroutine, public | close_c (lunit) |
Wraps fortran "close" statement so we can close a Fortran file from a C program. More... | |
subroutine | delete_table_data_c () |
Deletes the copies of the moda_tables arrays. More... | |
subroutine, public | exitbufr_c () |
Wraps BUFRLIB "exitbufr" subroutine. Closes all open file units used by BUFRLIB. More... | |
subroutine | get_inode_c (lun, start_node) |
Get the bufr node idx for the start node of the subset. More... | |
subroutine | get_inv_c (lun, inv_ptr, inv_size) |
Get pointer to the moda_usrint INV array. More... | |
subroutine | get_itp_c (itp_ptr, itp_size) |
Get copy of the moda_tables ITP array. More... | |
subroutine | get_jmpb_c (jmpb_ptr, jmpb_size) |
Get copy of the moda_tables JMPB array. More... | |
subroutine | get_link_c (link_ptr, link_size) |
Get copy of the moda_tables LINK array. More... | |
subroutine | get_nval_c (lun, numNodes) |
Get the number of values in the current subset. More... | |
subroutine | get_tag_c (tag_ptr, tag_len, mem_size) |
Get copy of the moda_tables TAG array. More... | |
subroutine | get_typ_c (typ_ptr, typ_len, mem_size) |
Get copy of the moda_tables TYP array. More... | |
subroutine | get_val_c (lun, val_ptr, val_size) |
Get pointer to the moda_usrint VAL array. More... | |
integer(c_int) function, public | ireadmg_c (bufr_unit, c_subset, iddate, subset_str_len) |
Wraps BUFRLIB "ireadmg" subroutine. More... | |
integer(c_int) function, public | ireadsb_c (bufr_unit) |
Wraps BUFRLIB "ireadsb" function. More... | |
subroutine, public | mtinfo_c (path, file_unit_1, file_unit_2) |
Wraps BUFRLIB "mtinfo" function. More... | |
subroutine, public | open_c (lunit, filepath) |
Wraps fortran "open" statement so we can open a Fortran file from a C program. More... | |
subroutine, public | openbf_c (bufr_unit, cio, table_file_id) |
Wraps BUFRLIB "openbf" subroutine. More... | |
subroutine, public | ufbint_c (bufr_unit, c_data, dim_1, dim_2, iret, table_b_mnemonic) |
Wraps BUFRLIB "ufbint" function. More... | |
subroutine, public | ufbrep_c (bufr_unit, c_data, dim_1, dim_2, iret, table_b_mnemonic) |
Wraps BUFRLIB "ufbrep" function. More... | |
This module contains functions which wrap certain Fortran BUFRLIB functions so they can be called from C and C++.
The signatures of the public functions match their Fortran equivalents, as shown within the documentation for each of the individual functions.
Definition at line 16 of file bufr_interface.f90.
subroutine, public bufr_c_interface_mod::closbf_c | ( | integer(c_int) | bufr_unit | ) |
Wraps BUFRLIB "closbf" subroutine.
[in] | bufr_unit | - c_int: the fortran file unit number to close |
Definition at line 148 of file bufr_interface.f90.
References closbf().
subroutine, public bufr_c_interface_mod::close_c | ( | integer(c_int) | lunit | ) |
Wraps fortran "close" statement so we can close a Fortran file from a C program.
[in] | lunit | - c_int: the integer to use as the fortran file unit |
Definition at line 116 of file bufr_interface.f90.
subroutine bufr_c_interface_mod::delete_table_data_c | ( | ) |
Deletes the copies of the moda_tables arrays.
Definition at line 504 of file bufr_interface.f90.
subroutine, public bufr_c_interface_mod::exitbufr_c | ( | ) |
Wraps BUFRLIB "exitbufr" subroutine. Closes all open file units used by BUFRLIB.
Definition at line 161 of file bufr_interface.f90.
References exitbufr().
subroutine bufr_c_interface_mod::get_inode_c | ( | integer(c_int) | lun, |
integer(c_int), intent(out) | start_node | ||
) |
Get the bufr node idx for the start node of the subset.
[out] | lun | - c_int: pointer for the file stream |
[out] | start_node | - c_int: the start node of the subset |
Definition at line 433 of file bufr_interface.f90.
subroutine bufr_c_interface_mod::get_inv_c | ( | integer(c_int) | lun, |
type(c_ptr), intent(inout) | inv_ptr, | ||
integer(c_int), intent(out) | inv_size | ||
) |
Get pointer to the moda_usrint INV array.
[out] | lun | - c_int: pointer for the file stream |
[out] | inv_ptr | - c_ptr: c style pointer to the INV array |
[out] | inv_size | - c_int: length of the array |
Definition at line 488 of file bufr_interface.f90.
subroutine bufr_c_interface_mod::get_itp_c | ( | type(c_ptr), intent(inout) | itp_ptr, |
integer(c_int), intent(out) | itp_size | ||
) |
Get copy of the moda_tables ITP array.
[out] | itp_ptr | - c_ptr: c style pointer to the ITP array |
[out] | itp_size | - c_int: size of the ITP array |
Definition at line 347 of file bufr_interface.f90.
subroutine bufr_c_interface_mod::get_jmpb_c | ( | type(c_ptr), intent(inout) | jmpb_ptr, |
integer(c_int), intent(out) | jmpb_size | ||
) |
Get copy of the moda_tables JMPB array.
[out] | jmpb_ptr | - c_ptr: c style pointer to the JMPB array |
[out] | jmpb_size | - c_int: length of the array |
Definition at line 413 of file bufr_interface.f90.
subroutine bufr_c_interface_mod::get_link_c | ( | type(c_ptr), intent(inout) | link_ptr, |
integer(c_int), intent(out) | link_size | ||
) |
Get copy of the moda_tables LINK array.
[out] | link_ptr | - c_ptr: c style pointer to the LINK array |
[out] | link_size | - c_int: size of the LINK array |
Definition at line 327 of file bufr_interface.f90.
subroutine bufr_c_interface_mod::get_nval_c | ( | integer(c_int) | lun, |
integer(c_int), intent(out) | numNodes | ||
) |
Get the number of values in the current subset.
[out] | lun | - c_int: pointer for the file stream |
[out] | numNodes | - c_int: number of values in the subset |
Definition at line 450 of file bufr_interface.f90.
subroutine bufr_c_interface_mod::get_tag_c | ( | type(c_ptr), intent(inout) | tag_ptr, |
integer(c_int), intent(out) | tag_len, | ||
integer(c_int), intent(out) | mem_size | ||
) |
Get copy of the moda_tables TAG array.
[out] | tag_ptr | - c_ptr: c style pointer to the TAG array |
[out] | tag_len | - c_int: length of the tag string |
[out] | mem_size | - c_int: size of TAG array |
Definition at line 391 of file bufr_interface.f90.
subroutine bufr_c_interface_mod::get_typ_c | ( | type(c_ptr), intent(inout) | typ_ptr, |
integer(c_int), intent(out) | typ_len, | ||
integer(c_int), intent(out) | mem_size | ||
) |
Get copy of the moda_tables TYP array.
[out] | typ_ptr | - c_ptr: c style pointer to the TYP array |
[out] | typ_len | - c_int: length of the TYP str |
[out] | mem_size | - c_int: length of the TYP array |
Definition at line 368 of file bufr_interface.f90.
subroutine bufr_c_interface_mod::get_val_c | ( | integer(c_int) | lun, |
type(c_ptr), intent(inout) | val_ptr, | ||
integer(c_int), intent(out) | val_size | ||
) |
Get pointer to the moda_usrint VAL array.
[out] | lun | - c_int: pointer for the file stream |
[out] | val_ptr | - c_ptr: c style pointer to the VAL array |
[out] | val_size | - c_int: length of the array |
Definition at line 468 of file bufr_interface.f90.
integer(c_int) function, public bufr_c_interface_mod::ireadmg_c | ( | integer(c_int) | bufr_unit, |
character(kind=c_char, len=1), dimension(*), intent(inout) | c_subset, | ||
integer(c_int), intent(out) | iddate, | ||
integer(c_int) | subset_str_len | ||
) |
Wraps BUFRLIB "ireadmg" subroutine.
[in] | bufr_unit | - c_int: the fortran file unit number to read from |
[in,out] | c_subset | - c_char: the subset string |
[out] | iddate | - c_int: datetime of message |
[in] | subset_str_len | - c_int: length of the subset string |
Definition at line 176 of file bufr_interface.f90.
References ireadmg().
integer(c_int) function, public bufr_c_interface_mod::ireadsb_c | ( | integer(c_int) | bufr_unit | ) |
Wraps BUFRLIB "ireadsb" function.
[in] | bufr_unit | - c_int: the fortran file unit number to read from |
Definition at line 200 of file bufr_interface.f90.
References ireadsb().
subroutine, public bufr_c_interface_mod::mtinfo_c | ( | character(kind=c_char, len=1), intent(in) | path, |
integer(c_int) | file_unit_1, | ||
integer(c_int) | file_unit_2 | ||
) |
Wraps BUFRLIB "mtinfo" function.
[in] | path | - c_char: the path where the WMO tables are stored |
[in] | file_unit_1 | - c_int: number to use for first file unit |
[in] | file_unit_2 | - c_int: number to use for second file unit |
Definition at line 266 of file bufr_interface.f90.
subroutine, public bufr_c_interface_mod::open_c | ( | integer(c_int) | lunit, |
character(kind=c_char, len=1) | filepath | ||
) |
Wraps fortran "open" statement so we can open a Fortran file from a C program.
[in] | lunit | - c_int: the integer to use as the fortran file unit |
[in] | filepath | - c_char: path to the file we want to open. |
Definition at line 100 of file bufr_interface.f90.
subroutine, public bufr_c_interface_mod::openbf_c | ( | integer(c_int) | bufr_unit, |
character(kind=c_char, len=1), intent(in) | cio, | ||
integer(c_int) | table_file_id | ||
) |
Wraps BUFRLIB "openbf" subroutine.
[in] | bufr_unit | - c_int: the fortran file unit number |
[in] | cio | - c_char: cio string |
[in] | table_file_id | - c_int: table_file unit number |
Definition at line 132 of file bufr_interface.f90.
References openbf().
subroutine, public bufr_c_interface_mod::ufbint_c | ( | integer(c_int) | bufr_unit, |
type(c_ptr), intent(inout) | c_data, | ||
integer(c_int) | dim_1, | ||
integer(c_int) | dim_2, | ||
integer(c_int), intent(out) | iret, | ||
character(kind=c_char, len=1), intent(in) | table_b_mnemonic | ||
) |
Wraps BUFRLIB "ufbint" function.
[in] | bufr_unit | - c_int: the fortran file unit number to read from |
[in,out] | c_data | - c_ptr: c style pointer to a pre-allocated buffer |
[in] | dim_1,dim_2 | - c_int: dimensionality of data to read or write |
[out] | iret | - c_int: return value, length of data read |
[in] | table_b_mnemonic | - c_char: string of mnemonics |
Definition at line 220 of file bufr_interface.f90.
References ufbint().
subroutine, public bufr_c_interface_mod::ufbrep_c | ( | integer(c_int) | bufr_unit, |
type(c_ptr), intent(inout) | c_data, | ||
integer(c_int) | dim_1, | ||
integer(c_int) | dim_2, | ||
integer(c_int), intent(out) | iret, | ||
character(kind=c_char, len=1), intent(in) | table_b_mnemonic | ||
) |
Wraps BUFRLIB "ufbrep" function.
[in] | bufr_unit | - c_int: the fortran file unit number to read from |
[in,out] | c_data | - c_ptr: c style pointer to a pre-allocated buffer |
[in] | dim_1,dim_2 | - c_int: dimensionality of data to read or write |
[out] | iret | - c_int: return value, length of data read |
[in] | table_b_mnemonic | - c_char: string of mnemonics |
Definition at line 244 of file bufr_interface.f90.
References ufbrep().