NCEPLIBS-bufr 11.7.1
|
Define signatures to enable a number of BUFRLIB subprograms to be called via wrapper functions from C and C++ application programs. More...
Go to the source code of this file.
Functions | |
void | closbf_f (int bufr_unit) |
Wraps BUFRLIB "closbf" subroutine. More... | |
void | close_f (int unit) |
Wraps fortran "close" statement so we can close a Fortran file from a C program. More... | |
void | delete_table_data_f () |
Deletes the copies of the moda_tables arrays. More... | |
void | exitbufr_f () |
Wraps BUFRLIB "exitbufr" subroutine. Closes all open file units used by BUFRLIB. More... | |
void | get_inode_f (int lun, int *startNode) |
Get the bufr node idx for the start node of the subset. More... | |
void | get_inv_f (int lun, int **data, int *len) |
Get pointer to the moda_usrint INV array. More... | |
void | get_isc_f (int **data, int *len) |
Get copy of the moda_tables ISC array. More... | |
void | get_itp_f (int **data, int *len) |
Get copy of the moda_tables ITP array. More... | |
void | get_jmpb_f (int **data, int *len) |
Get copy of the moda_tables JMPB array. More... | |
void | get_link_f (int **data, int *len) |
Get copy of the moda_tables LINK array. More... | |
void | get_nval_f (int lun, int *numNodes) |
Get the number of values in the current subset. More... | |
void | get_tag_f (char **data, int *str_len, int *size) |
Get copy of the moda_tables TAG array. More... | |
void | get_typ_f (char **data, int *str_len, int *size) |
Get copy of the moda_tables TYP array. More... | |
void | get_val_f (int lun, double **data, int *len) |
Get pointer to the moda_usrint VAL array. More... | |
int | ireadmg_f (int bufr_unit, char *subset, int *iddate, int subset_len) |
Wraps BUFRLIB "ireadmg" subroutine. More... | |
int | ireadsb_f (int bufr_unit) |
Wraps BUFRLIB "ireadsb" function. More... | |
void | mtinfo_f (const char *path, int file_unit_1, int file_unit_2) |
Wraps BUFRLIB "mtinfo" function. More... | |
void | nemdefs_f (int file_unit, const char *mnemonic, char *unit_c, int unit_str_len, char *desc_c, int desc_str_len, int *iret) |
Gets Table B Unit and Description strings for a mnemonic. Wraps BUFRLIB "nemdefs". More... | |
void | nemspecs_f (int file_unit, const char *mnemonic, int mnemonic_idx, int *scale, int *reference, int *bits, int *iret) |
Gets Table B scale, reference, and bits values. Wraps BUFRLIB "nemspecs". More... | |
void | nemtab_f (int bufr_unit, const char *mnemonic, int *descriptor, char *table_type, int *table_idx) |
This subroutine returns information about a descriptor from the internal DX BUFR tables, based on the mnemonic associated with that descriptor. More... | |
void | nemtbb_f (int bufr_unit, int table_idx, char *unit_str, int unit_str_len, int *scale, int *reference, int *bits) |
Get information about a Table B descriptor. More... | |
void | open_f (int unit, const char *filepath) |
Wraps fortran "open" statement so we can open a Fortran file from a C program. More... | |
void | openbf_f (int bufr_unit, const char *cio, int table_file_id) |
Wraps BUFRLIB "openbf" subroutine. More... | |
void | status_f (int file_unit, int *lun, int *il, int *im) |
Wraps BUFRLIB "status" function. More... | |
void | ufbint_f (int bufr_unit, void **c_data, int dim_1, int dim_2, int *iret, const char *table_b_mnemonic) |
Wraps BUFRLIB "ufbint" function. More... | |
void | ufbrep_f (int bufr_unit, void **c_data, int dim_1, int dim_2, int *iret, const char *table_b_mnemonic) |
Wraps BUFRLIB "ufbrep" function. More... | |
Define signatures to enable a number of BUFRLIB subprograms to be called via wrapper functions from C and C++ application programs.
This header file defines the signatures for the functions in bufr_interface.f90 which wrap a number of native Fortran subroutines in the BUFRLIB.
Definition in file bufr_interface.h.
void closbf_f | ( | int | bufr_unit | ) |
Wraps BUFRLIB "closbf" subroutine.
[in] | bufr_unit | - int: the fortran file unit number to close |
void close_f | ( | int | unit | ) |
Wraps fortran "close" statement so we can close a Fortran file from a C program.
[in] | unit | - int: the integer to use as the fortran file unit |
void delete_table_data_f | ( | ) |
Deletes the copies of the moda_tables arrays.
void exitbufr_f | ( | ) |
Wraps BUFRLIB "exitbufr" subroutine. Closes all open file units used by BUFRLIB.
void get_inode_f | ( | int | lun, |
int * | startNode | ||
) |
Get the bufr node idx for the start node of the subset.
[out] | lun | - int: pointer for the file stream |
[out] | startNode | - int*: the start node of the subset |
void get_inv_f | ( | int | lun, |
int ** | data, | ||
int * | len | ||
) |
Get pointer to the moda_usrint INV array.
[out] | lun | - int: pointer for the file stream |
[out] | data | - int**: c style pointer to the INV array |
[out] | len | - int*: length of the array |
void get_isc_f | ( | int ** | data, |
int * | len | ||
) |
Get copy of the moda_tables ISC array.
[out] | data | - int**: c style pointer to the ISC array |
[out] | len | - int: length of the array |
void get_itp_f | ( | int ** | data, |
int * | len | ||
) |
Get copy of the moda_tables ITP array.
[out] | data | - int**: c style pointer to the ITP array |
[out] | len | - int: length of the array |
void get_jmpb_f | ( | int ** | data, |
int * | len | ||
) |
Get copy of the moda_tables JMPB array.
[out] | data | - int**: c style pointer to the JMPB array |
[out] | len | - int: length of the array |
void get_link_f | ( | int ** | data, |
int * | len | ||
) |
Get copy of the moda_tables LINK array.
[out] | data | - int**: c style pointer to the ISC array |
[out] | len | - int: length of the array |
void get_nval_f | ( | int | lun, |
int * | numNodes | ||
) |
Get the number of values in the current subset.
[out] | lun | - int: pointer for the file stream |
[out] | startNode | - int*: number of values in the subset |
void get_tag_f | ( | char ** | data, |
int * | str_len, | ||
int * | size | ||
) |
Get copy of the moda_tables TAG array.
[out] | data | - int**: c style pointer to the TAG array |
[out] | len | - int: length of the array |
void get_typ_f | ( | char ** | data, |
int * | str_len, | ||
int * | size | ||
) |
Get copy of the moda_tables TYP array.
[out] | data | - int**: c style pointer to the TYP array |
[out] | len | - int: length of the array |
void get_val_f | ( | int | lun, |
double ** | data, | ||
int * | len | ||
) |
Get pointer to the moda_usrint VAL array.
[out] | lun | - int: pointer for the file stream |
[out] | data | - double**: c style pointer to the VAL array |
[out] | len | - int*: length of the array |
int ireadmg_f | ( | int | bufr_unit, |
char * | subset, | ||
int * | iddate, | ||
int | subset_len | ||
) |
Wraps BUFRLIB "ireadmg" subroutine.
[in] | bufr_unit | - int: the fortran file unit number to read from |
[out] | subset | - char*: the subset string |
[out] | iddate | - int*: datetime of message |
[in] | subset_len | - int: length of the subset string |
int ireadsb_f | ( | int | bufr_unit | ) |
Wraps BUFRLIB "ireadsb" function.
[in] | bufr_unit | - int: the fortran file unit number to read from |
void mtinfo_f | ( | const char * | path, |
int | file_unit_1, | ||
int | file_unit_2 | ||
) |
Wraps BUFRLIB "mtinfo" function.
[in] | path | - const char*: the path where the WMO tables are stored |
[in] | file_unit_1 | - int: number to use for first file unit |
[in] | file_unit_2 | - int: number to use for second file unit |
void nemdefs_f | ( | int | file_unit, |
const char * | mnemonic, | ||
char * | unit_c, | ||
int | unit_str_len, | ||
char * | desc_c, | ||
int | desc_str_len, | ||
int * | iret | ||
) |
Gets Table B Unit and Description strings for a mnemonic. Wraps BUFRLIB "nemdefs".
[in] | file_unit | - int: Fortran file unit for the open file |
[in] | mnemonic | - const char*: mnemonic |
[out] | unit_c | - char*: unit str |
[in] | unit_str_len | - int: unit str length |
[out] | desc_c | - char*: description string |
[in] | desc_str_len | - int: description str length |
[out] | iret | - int*: return value. 0 indicates success -1 indicates failure. |
void nemspecs_f | ( | int | file_unit, |
const char * | mnemonic, | ||
int | mnemonic_idx, | ||
int * | scale, | ||
int * | reference, | ||
int * | bits, | ||
int * | iret | ||
) |
Gets Table B scale, reference, and bits values. Wraps BUFRLIB "nemspecs".
[in] | file_unit | - int: Fortran file unit for the open file |
[in] | mnemonic | - const char*: mnemonic |
[in] | mnemonic_idx | - int: indicates specific mnemonic element (if repeated) |
[out] | scale | - int*: scale of element |
[out] | reference | - int*: reference of element |
[out] | bits | - int*: number of bits representing the element |
[out] | iret | - int*: return value. 0 indicates success -1 indicates failure. |
void nemtab_f | ( | int | bufr_unit, |
const char * | mnemonic, | ||
int * | descriptor, | ||
char * | table_type, | ||
int * | table_idx | ||
) |
This subroutine returns information about a descriptor from the internal DX BUFR tables, based on the mnemonic associated with that descriptor.
[in] | bufr_unit | - int: the bufr file pointer |
[in] | mnemonic | - const char*: mnemonic |
[out] | descriptor | - int*: the binary descriptor for the mnemonic |
[out] | table_type | char*: 'A', 'B', 'C', or 'D', depending on table type |
[out] | table_idx | - int*: the table index, or 0 if not found |
void nemtbb_f | ( | int | bufr_unit, |
int | table_idx, | ||
char * | unit_str, | ||
int | unit_str_len, | ||
int * | scale, | ||
int * | reference, | ||
int * | bits | ||
) |
Get information about a Table B descriptor.
[in] | bufr_unit | - int: the bufr file pointer |
[in] | table_idx | - int: Table B index |
[out] | unit_str | - char*: unit str |
[in] | unit_str_len | - int: unit str length |
[out] | scale | - int*: scale of element |
[out] | reference | - int*: reference of element |
[out] | bits | - int*: bits of element |
void open_f | ( | int | unit, |
const char * | filepath | ||
) |
Wraps fortran "open" statement so we can open a Fortran file from a C program.
unit | - int: the integer to use as the fortran file unit |
filepath | - const char*: path to the file we want to open. |
void openbf_f | ( | int | bufr_unit, |
const char * | cio, | ||
int | table_file_id | ||
) |
Wraps BUFRLIB "openbf" subroutine.
[in] | bufr_unit | - int: the fortran file unit number |
[in] | cio | - const char*: cio string (ex "IN", "SEC3", and "OUT") |
[in] | table_file_id | - int: table_file unit number |
void status_f | ( | int | file_unit, |
int * | lun, | ||
int * | il, | ||
int * | im | ||
) |
Wraps BUFRLIB "status" function.
[in] | file_unit | - int: the fortran file unit number to read from |
[out] | lun | - int: pointer for the file stream |
[out] | il | - int: file status |
[out] | im | - int: message status |
void ufbint_f | ( | int | bufr_unit, |
void ** | c_data, | ||
int | dim_1, | ||
int | dim_2, | ||
int * | iret, | ||
const char * | table_b_mnemonic | ||
) |
Wraps BUFRLIB "ufbint" function.
[in] | bufr_unit | - int: the fortran file unit number to read from |
[in,out] | c_data | - void**: c style pointer to a pre-allocated buffer |
[in] | dim_1,dim_2 | - int: dimensionality of data to read or write |
[out] | iret | - int: return value, length of data read |
[in] | table_b_mnemonic | - const char*: string of mnemonics |
void ufbrep_f | ( | int | bufr_unit, |
void ** | c_data, | ||
int | dim_1, | ||
int | dim_2, | ||
int * | iret, | ||
const char * | table_b_mnemonic | ||
) |
Wraps BUFRLIB "ufbrep" function.
[in] | bufr_unit | - int: the fortran file unit number to read from |
[in,out] | c_data | - void**: c style pointer to a pre-allocated buffer |
[in] | dim_1,dim_2 | - int: dimensionality of data to read or write |
[out] | iret | - int: return value, length of data read |
[in] | table_b_mnemonic | - const char*: string of mnemonics |