NCEPLIBS-bufr  12.3.0
bufr_interface.h File Reference

Enable a number of NCEPLIBS-bufr subprograms to be called from within C and C++ application programs. More...

Go to the source code of this file.

Macros

#define VERS_STR_LEN   8
 Size of a character string needed to store a library version number. More...
 

Functions

void atrcpt_f (int *msgin, int lmsgot, int *msgot)
 Read a BUFR message and output an equivalent message with a tank receipt time added to Section 1. More...
 
void bvers_f (char *cverstr, int cverstr_len)
 Get the version number of the NCEPLIBS-bufr software. More...
 
int catch_borts_f (const char *cf)
 Specify the use of compression when writing BUFR messages. More...
 
void ccbfl (void)
 Close all files that were opened via previous calls to function cobfl(). More...
 
void check_for_bort_f (char *error_str, int error_str_len)
 Check whether a bort error was caught during a previous call to a library function or subroutine. More...
 
void closbf_f (int bufr_unit)
 Close a previously opened file and disconnect it from the library. More...
 
void close_f (int unit)
 Close a Fortran file from a C program. More...
 
void closmg_f (int bufr_unit)
 Close a BUFR message. More...
 
void cmpmsg_f (const char *cf)
 Specify the use of compression when writing BUFR messages. More...
 
void cnved4_f (int *msgin, int lmsgot, int *msgot)
 Convert a BUFR message to edition 4. More...
 
void cobfl (const char *bfl, char io)
 Open a new file for reading or writing BUFR messages via a C language interface. More...
 
void codflg_f (const char *cf)
 Specify whether to read code and flag table information from master BUFR tables. More...
 
void copybf_f (int lunin, int lunot)
 Copy an entire BUFR file from one Fortran logical unit to another. More...
 
void copymg_f (int lunin, int lunot)
 Copy a BUFR message from one Fortran logical unit to another. More...
 
void copysb_f (int lunin, int lunot, int *iret)
 Copy a BUFR data subset from one Fortran logical unit to another. More...
 
void cpymem_f (int lunot)
 Copy a message from internal arrays to a file. More...
 
void crbmg (char *bmg, int mxmb, int *nmb, int *iret)
 Read the next BUFR message from the file that was opened via the most recent call to function cobfl() with io = 'r'. More...
 
void cwbmg (const char *bmg, int nmb, int *iret)
 Write a BUFR message to the file that was opened via the most recent call to function cobfl() with io = 'w'. More...
 
void datebf_f (int bufr_unit, int *mear, int *mmon, int *mday, int *mour, int *idate)
 Get the Section 1 date-time from the first data message of a BUFR file. More...
 
void datelen_f (int len)
 Specify the format of Section 1 date-time values that will be output by future calls to message-reading subroutines. More...
 
void delete_table_data_f ()
 Deletes the copies of the moda_tables arrays. More...
 
void drfini_f (int bufr_unit, int *mdrf, int ndrf, const char *table_d_mnemonic)
 Explicitly initialize delayed replication factors for writing to a data subset. More...
 
void dumpbf_f (int bufr_unit, int *jdate, int *jdump)
 Get the Section 1 date-time from the first two "dummy" messages of an NCEP dump file. More...
 
void dxdump_f (int lunit, int luprt)
 Print a copy of the DX BUFR table associated with a specified Fortran logical unit. More...
 
void exitbufr_f ()
 Reset the library. More...
 
void get_inode_f (int lun, int *start_node)
 Get the bufr node idx for the start node of the subset. More...
 
void get_inv_f (int lun, int **inv_ptr, int *inv_size)
 Get pointer to the moda_usrint INV array. More...
 
void get_irf_f (int **irf_ptr, int *irf_size)
 Get copy of the moda_tables IRF array. More...
 
void get_isc_f (int **isc_ptr, int *isc_size)
 Get copy of the moda_tables ISC array. More...
 
void get_itp_f (int **itp_ptr, int *itp_size)
 Get copy of the moda_tables ITP array. More...
 
void get_jmpb_f (int **jmpb_ptr, int *jmpb_size)
 Get copy of the moda_tables JMPB array. More...
 
void get_link_f (int **link_ptr, int *link_size)
 Get copy of the moda_tables LINK array. More...
 
void get_nval_f (int lun, int *num_nodes)
 Get the number of values in the current subset. More...
 
void get_tag_f (char **tag_ptr, int *tag_len, int *mem_size)
 Get copy of the moda_tables TAG array. More...
 
void get_typ_f (char **typ_ptr, int *typ_len, int *mem_size)
 Get copy of the moda_tables TYP array. More...
 
void get_val_f (int lun, double **val_ptr, int *val_size)
 Get pointer to the moda_usrint VAL array. More...
 
void getabdb_f (int lunit, int itab, char(*ctabdb)[128], int *jtab)
 Get Table B and Table D information from the internal DX tables. More...
 
void getcfmng_f (int lunit, const char *cnemoi, int ivali, const char *cnemod, int ivald, char *cmeang_c, int lcmgc, int *iret)
 Get the meaning of a numerical value from a code or flag table. More...
 
void gettagpr_f (int lunit, const char *tagch, int ntagch, char *tagpr, int tagpr_len, int *iret)
 Get the parent for a specified occurrence of a Table B or Table D mnemonic. More...
 
void gettagre_f (int lunit, const char *tagi, int ntagi, char *tagre, int tagre_len, int *ntagre, int *iret)
 Get the parent for a specified occurrence of a Table B or Table D mnemonic. More...
 
double getvalnb_f (int lunit, const char *tagpv, int ntagpv, const char *tagnb, int ntagnb)
 Read a data value corresponding to a specific occurrence of a mnemonic. More...
 
int ibfms_f (double r8val)
 Test whether a data value is "missing". More...
 
int ifbget_f (int bufr_unit)
 Check if there are any more data subsets available within a BUFR message. More...
 
int igetmxby_f (void)
 Get the maximum length of a BUFR message that can be written to an output file. More...
 
int igetprm_f (const char *cprmnm)
 Get the current value of a parameter. More...
 
int igetsc_f (int bufr_unit)
 Check for an abnormal status code associated with the processing of a file. More...
 
void invmrg_f (int lubfi, int lubfj)
 Merge parts of data subsets. More...
 
void ipkm_f (char *cbay, int nbyt, int ival, int cbay_len)
 Encode an integer into a character string. More...
 
int ireadmg_f (int bufr_unit, char *subset, int *iddate, int subset_len)
 Read the next message from a BUFR file. More...
 
int ireadns_f (int bufr_unit, char *subset, int *iddate, int subset_len)
 Read the next data subset from a BUFR file. More...
 
int ireadsb_f (int bufr_unit)
 Read the next data subset from a BUFR message. More...
 
int isetprm_f (const char *cprmnm, int ipval)
 Define a customized parameter value for dynamic allocation. More...
 
int iupbs01_f (int *bufr, const char *mnemonic)
 Read a data value from Section 0 or Section 1 of a BUFR message. More...
 
int iupm_f (const char *cbay, int nbits, int lcbay)
 Decode an integer from a character string. More...
 
int iupvs01_f (int bufr_unit, const char *c_s01m)
 Read a specified value from within Section 0 or 1 of a BUFR message. More...
 
int lcmgdf_f (int bufr_unit, const char *c_subset)
 Check if a subset definition contains any long character strings. More...
 
void maxout_f (int max0)
 Define a customized maximum length for output BUFR messages. More...
 
void mesgbc_f (int lunin, int *mesgtyp, int *icomp)
 Get information from the first data message in a BUFR file. More...
 
void mesgbf_f (int lunit, int *mesgtyp)
 Get information from the first data message in a BUFR file. More...
 
void minimg_f (int bufr_unit, int mini)
 Write a minutes value into Section 1 of a BUFR message. More...
 
void mtinfo_f (const char *path, int file_unit_1, int file_unit_2)
 Specify location of master BUFR tables on local file system. 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)
 Get the element name and units associated with a Table B mnemonic. More...
 
void nemspecs_f (int file_unit, const char *mnemonic, int mnemonic_idx, int *scale, int *reference, int *bits, int *iret)
 Get the scale factor, reference value and bit width associated with a specified occurrence of a Table B mnemonic. More...
 
void nemtab_f (int lun, const char *mnemonic, int *descriptor, char *table_type, int *table_idx)
 Get information about a descriptor. More...
 
void nemtbb_f (int lun, int table_idx, char *unit_str, int unit_str_len, int *scale, int *reference, int *bits)
 Get information about a Table B descriptor. More...
 
int nmsub_f (int bufr_unit)
 Get the total number of data subsets available within a BUFR message. More...
 
void open_f (int unit, const char *filepath)
 Open a Fortran file from a C program. More...
 
void openbf_f (int bufr_unit, const char *cio, int table_file_id)
 Connect a new file to the library, or initialize the library, or change verbosity associated with already-connected file. More...
 
void openmb_f (int bufr_unit, const char *c_subset, int iddate)
 Open a new message for output in a BUFR file that was previously opened for writing. More...
 
void openmg_f (int bufr_unit, const char *c_subset, int iddate)
 Open a new message for output in a BUFR file that was previously opened for writing. More...
 
void pkbs1_f (int ival, int *mbay, const char *c_s1m)
 Specify a value to be written into Section 1 of a BUFR message. More...
 
void pkvs01_f (const char *c_s01m, int ival)
 Specify a value to be written into Section 0 or 1 of all future BUFR messages. More...
 
void rdmemm_f (int imsg, char *subset, int *jdate, int subset_len, int *iret)
 Read a specified message from internal arrays. More...
 
void rdmems_f (int isub, int *iret)
 Read a specified data subset from internal arrays. More...
 
void rdmgsb_f (int lunit, int imsg, int isub)
 Read a specified data subset from a BUFR file. More...
 
void readerme_f (int *mesg, int bufr_unit, char *subset, int *iddate, int subset_len, int *ires)
 Read a BUFR message from a memory array. More...
 
void readlc_f (int lunit, const char *str_id, char *output_str, int output_str_len)
 Read a long string from the BUFR file. More...
 
void readmg_f (int bufr_unit, char *subset, int *iddate, int subset_len, int *ires)
 Read the next message from a BUFR file. More...
 
void readns_f (int bufr_unit, char *subset, int *iddate, int subset_len, int *ires)
 Read the next data subset from a BUFR file. More...
 
void readsb_f (int bufr_unit, int *ires)
 Read the next data subset from a BUFR message. More...
 
void rtrcpt_f (int lunit, int *iyr, int *imo, int *idy, int *ihr, int *imi, int *iret)
 Get the tank receipt time from Section 1 of a BUFR message. More...
 
void setvalnb_f (int lunit, const char *tagpv, int ntagpv, const char *tagnb, int ntagnb, double r8val, int *iret)
 Write a data value corresponding to a specific occurrence of a mnemonic. More...
 
void status_f (int file_unit, int *lun, int *il, int *im)
 Check whether a file is connected to the library. More...
 
void stdmsg_f (const char *cf)
 Specify whether to standardize future output BUFR messages. More...
 
void stndrd_f (int lunit, int *msgin, int lmsgot, int *msgot)
 Standardize a copy of a BUFR message. More...
 
void strcpt_f (const char *cf, int iyr, int imo, int idy, int ihr, int imi)
 Specify a tank receipt time to be written into Section 1 of all future BUFR messages. More...
 
void ufbcnt_f (int lunit, int *kmsg, int *ksub)
 Get the current location of the file pointer within a BUFR file. More...
 
void ufbcpy_f (int lunin, int lunot)
 Copy a BUFR data subset from one Fortran logical unit to another. More...
 
void ufbcup_f (int lunin, int lunot)
 Copy unique elements of a data subset from one file to another. More...
 
void ufbdmp_f (int lunit, int luprt)
 Print a verbose listing of the contents of a data subset. More...
 
void ufbevn_f (int bufr_unit, void **c_data, int dim_1, int dim_2, int dim_3, int *iret, const char *table_b_mnemonic)
 Read one or more data values from a data subset. More...
 
void ufbget_f (int bufr_unit, double *tab, int i1, int *iret, const char *table_b_mnemonic)
 Read one or more data values from a data subset without advancing the subset pointer. More...
 
void ufbint_f (int bufr_unit, void **c_data, int dim_1, int dim_2, int *iret, const char *table_b_mnemonic)
 Read/write one or more data values from/to a data subset. More...
 
void ufbinx_f (int bufr_unit, int imsg, int isub, void **c_data, int dim_1, int dim_2, int *iret, const char *table_b_mnemonic)
 Read one or more data values from a specified data subset. More...
 
void ufbmem_f (int lunit, int inew, int *iret, int *iunit)
 Read an entire BUFR file into internal arrays. More...
 
void ufbmex_f (int lunit, int lundx, int inew, int *iret, int *mesg)
 Read an entire BUFR file into internal arrays. More...
 
void ufbmms_f (int imsg, int isub, char *subset, int *jdate, int subset_len)
 Read a specified data subset from internal arrays. More...
 
void ufbmns_f (int irep, char *subset, int *idate, int subset_len)
 Read a specified data subset from internal arrays. More...
 
void ufbovr_f (int bufr_unit, void **c_data, int dim_1, int dim_2, int *iret, const char *table_b_mnemonic)
 Overwrite one or more data values within a data subset. More...
 
void ufbpos_f (int bufr_unit, int irec, int isub, char *subset, int *iddate, int subset_len)
 Jump forwards or backwards to a specified data subset within a BUFR file. More...
 
void ufbqcd_f (int lunit, const char *cnemo, int *iqcd)
 Return a prepbufr program code corresponding to a mnemonic. More...
 
void ufbqcp_f (int lunit, int iqcp, char *cnemo, int cnemo_len)
 Return a mnemonic corresponding to a prepbufr program code. More...
 
void ufbrep_f (int bufr_unit, void **c_data, int dim_1, int dim_2, int *iret, const char *table_b_mnemonic)
 Read/write one or more data values from/to a data subset. More...
 
void ufbrms_f (int imsg, int isub, void **c_data, int dim_1, int dim_2, int *iret, const char *table_b_mnemonic)
 Read one or more data values from internal arrays. More...
 
void ufbseq_f (int bufr_unit, void **c_data, int dim_1, int dim_2, int *iret, const char *table_d_mnemonic)
 Read/write an entire sequence of data values from/to a data subset. More...
 
void ufbstp_f (int bufr_unit, void **c_data, int dim_1, int dim_2, int *iret, const char *table_b_mnemonic)
 Read/write one or more data values from/to a data subset. More...
 
void ufbtab_f (int bufr_unit, void **c_data, int dim_1, int dim_2, int *iret, const char *table_b_mnemonic)
 Read one or more data values from every data subset in a BUFR file. More...
 
void ufbtam_f (void **c_data, int dim_1, int dim_2, int *iret, const char *table_b_mnemonic)
 Read one or more data values from every data subset in internal arrays. More...
 
void ufdump_f (int lunit, int luprt)
 Print a verbose listing of the contents of a data subset. More...
 
void upds3_f (int *mbay, int lcds3, char(*ccds3)[6], int *nds3)
 Get the sequence of data descriptors contained within Section 3 of a BUFR message. More...
 
void upftbv_f (int lunit, const char *cnemo, double val, int *ibit, int mxib, int *nib)
 Get the bit settings equivalent to a given numerical value for a flag table mnemonic. More...
 
void wrdxtb_f (int lundx, int lunot)
 Generate DX BUFR table messages and write them to a output file. More...
 
void writlc_f (int lunit, const char *str, const char *chr)
 Write a long string to the BUFR file. More...
 
void writsa_f (int bufr_unit, int bufr_len, int *bufr, int *nbufr)
 Write the next data subset to a BUFR message, and return a copy of any completed message. More...
 
void writsb_f (int bufr_unit)
 Write the next data subset to a BUFR message. More...
 

Detailed Description

Enable a number of NCEPLIBS-bufr subprograms to be called from within C and C++ application programs.

This header file defines the signatures which wrap a number of native Fortran subprograms in the library. It also contains prototypes for native C functions in the library which are expected to be called from C and C++ application programs.

Author
Ronald Mclaren
Date
2020-07-29

Definition in file bufr_interface.h.

Macro Definition Documentation

◆ VERS_STR_LEN

#define VERS_STR_LEN   8

Size of a character string needed to store a library version number.

Definition at line 21 of file bufr_interface.h.

Function Documentation

◆ atrcpt_f()

void atrcpt_f ( int *  msgin,
int  lmsgot,
int *  msgot 
)

Read a BUFR message and output an equivalent message with a tank receipt time added to Section 1.

Wraps atrcpt() subroutine.

Parameters
msgin- BUFR message
lmsgot- Allocated length of msgot
msgot- Copy of msgin with a tank receipt time added to Section 1
Author
Jeff Ator
Date
2025-11-20

Referenced by catch_bort_atrcpt().

◆ bvers_f()

void bvers_f ( char *  cverstr,
int  cverstr_len 
)

Get the version number of the NCEPLIBS-bufr software.

Wraps bvers() subroutine.

Parameters
cverstr- Version string.
cverstr_len- Length of version string.
Author
J. Ator
Date
2023-04-07

Referenced by catch_bort_bvers(), and main().

◆ catch_borts_f()

int catch_borts_f ( const char *  cf)

Specify the use of compression when writing BUFR messages.

Wraps catch_borts() function.

Parameters
cf- Flag indicating whether subsequent bort errors should be caught and returned to the application program ('Y' = Yes, 'N' = No).
Returns
- -1 if cf contained an illegal value, otherwise 0
Author
J. Ator
Date
2025-10-15

◆ ccbfl()

void ccbfl ( void  )

Close all files that were opened via previous calls to function cobfl().

Author
J. Ator
Date
2005-11-29

Definition at line 316 of file crwbmg.c.

References pbf.

Referenced by main().

◆ check_for_bort_f()

void check_for_bort_f ( char *  error_str,
int  error_str_len 
)

Check whether a bort error was caught during a previous call to a library function or subroutine.

Wraps check_for_bort() subroutine.

Parameters
error_str- Error string if a bort error occurred; otherwise empty
error_str_len- Allocated size of error_str
Author
J. Ator
Date
2025-10-15

◆ closbf_f()

void closbf_f ( int  bufr_unit)

Close a previously opened file and disconnect it from the library.

Wraps closbf() subroutine.

Parameters
bufr_unit- the Fortran logical unit number to close.
Author
Ronald Mclaren
Date
2020-07-29

Referenced by catch_bort_closbf().

◆ close_f()

void close_f ( int  unit)

Close a Fortran file from a C program.

Parameters
unit- the integer to use as the Fortran logical unit.
Author
Ronald Mclaren
Date
2020-07-29

◆ closmg_f()

void closmg_f ( int  bufr_unit)

Close a BUFR message.

Wraps closmg() subroutine.

Parameters
bufr_unit- Fortran logical unit number to write to.
Author
J. Ator
Date
2025-12-09

Referenced by catch_bort_closmg().

◆ cmpmsg_f()

void cmpmsg_f ( const char *  cf)

Specify the use of compression when writing BUFR messages.

Wraps cmpmsg() subroutine.

Parameters
cf- Flag indicating whether future BUFR output messages are to be compressed ('Y' = Yes, 'N' = No).
Author
J. Ator
Date
2023-04-07

Referenced by catch_bort_cmpmsg().

◆ cnved4_f()

void cnved4_f ( int *  msgin,
int  lmsgot,
int *  msgot 
)

Convert a BUFR message to edition 4.

Wraps cnved4() subroutine.

Parameters
msgin- BUFR message
lmsgot- Allocated length of msgot
msgot- Copy of msgin now converted to edition 4
Author
Jeff Ator
Date
2025-12-03

Referenced by catch_bort_cnved4().

◆ cobfl()

void cobfl ( const char *  bfl,
char  io 
)

Open a new file for reading or writing BUFR messages via a C language interface.

This function is designed to be easily callable from application program written in either C or Fortran. It is functionally equivalent to subroutine openbf(); however, there are some important differences:

  • When using openbf(), the underlying file must already be associated with a Fortran logical unit number on the local system, typicially via a prior Fortran "OPEN" statement. This is not required when using this function.
  • When using this function, it is only possible to have at most one input (io = 'r') file and one output (io = 'w') file open at a time. If a successive call to this function is made in either case where a file of that type is already open, then the function will automatically close the previous file of that type before opening the new one.
  • When opening a file for input/reading using openbf(), the user can make subsequent calls to any of the NCEPLIBS-bufr message-reading subroutines to read individual BUFR messages from that file into internal arrays, followed by subsequent calls to any of the NCEPLIBS-bufr subset-reading subroutines") to read individual data subsets from each such message. However, when opening a file for input/reading using this function, the user must instead make subsequent calls to crbmg() to read individual BUFR messages from that file, and each such message will be returned directly to the user within an allocated memory array. The user may then, if desired, make subsequent calls to readerme() to store each such message into the same internal arrays, followed by subsequent calls to any of the NCEPLIBS-bufr subset-reading subroutines" to read individual data subsets from each such message.
  • When opening a file for output/writing using openbf(), the user can make subsequent successive calls to writsb() to pack each completed data subset into the BUFR message that is currently open within the internal arrays, for eventual output to that file. However, when opening a file for output/writing using this function, the user can instead, if desired, make subsequent successive calls to writsa() to pack each completed data subset into the BUFR message that is currently open within the internal arrays. The use of writsa() will cause each completed BUFR message to be returned directly to the user within an allocated memory array, which in turn can then be written directly to the file via a subsequent call to cwbmg().

Any errors encountered when using this function are automatically logged to standard output, or to an alternate location previously specified via a call to subroutine errwrt().

Parameters
bfl- System file to be opened. Inclusion of directory prefixes or other local filesystem notation is allowed, up to 200 total characters.
io- Flag indicating how bfl is to be opened:
  • 'r' input (for reading BUFR messages)
  • 'w' output (for writing BUFR messages)
Author
J. Ator
Date
2005-11-29

Definition at line 119 of file crwbmg.c.

References bort_f(), bort_target_set_f(), bort_target_unset_f(), catch_bort_cobfl(), MXFNLEN, and pbf.

Referenced by catch_bort_cobfl(), and main().

◆ codflg_f()

void codflg_f ( const char *  cf)

Specify whether to read code and flag table information from master BUFR tables.

Wraps codflg() subroutine.

Parameters
cf- Flag indicating whether code and flag table information should be included when reading from master BUFR tables
Author
Jeff Ator
Date
2025-12-02

Referenced by catch_bort_codflg().

◆ copybf_f()

void copybf_f ( int  lunin,
int  lunot 
)

Copy an entire BUFR file from one Fortran logical unit to another.

Wraps copybf() subroutine.

Parameters
lunin- Fortran logical unit number for source BUFR file
lunot- Fortran logical unit number for target BUFR file
Author
Jeff Ator
Date
2025-11-20

Referenced by catch_bort_copybf().

◆ copymg_f()

void copymg_f ( int  lunin,
int  lunot 
)

Copy a BUFR message from one Fortran logical unit to another.

Wraps copymg() subroutine.

Parameters
lunin- Fortran logical unit number for source BUFR file
lunot- Fortran logical unit number for target BUFR file
Author
Jeff Ator
Date
2025-11-20

Referenced by catch_bort_copymg().

◆ copysb_f()

void copysb_f ( int  lunin,
int  lunot,
int *  iret 
)

Copy a BUFR data subset from one Fortran logical unit to another.

Wraps copysb() subroutine.

Parameters
lunin- Fortran logical unit number for source BUFR file
lunot- Fortran logical unit number for target BUFR file
iret- Return code
Author
Jeff Ator
Date
2025-11-20

Referenced by catch_bort_copysb().

◆ cpymem_f()

void cpymem_f ( int  lunot)

Copy a message from internal arrays to a file.

Wraps cpymem() subroutine.

Parameters
lunot- Fortran logical unit number for target BUFR file
Author
Jeff Ator
Date
2025-12-02

Referenced by catch_bort_cpymem().

◆ crbmg()

void crbmg ( char *  bmg,
int  mxmb,
int *  nmb,
int *  iret 
)

Read the next BUFR message from the file that was opened via the most recent call to function cobfl() with io = 'r'.

This function is designed to be easily callable from application program written in either C or Fortran.

Parameters
bmg- BUFR message
mxmb- Number of elements in bmg array;; used by the function to ensure that it doesn't overflow the array.
nmb- Size (in bytes) of BUFR message in bmg.
iret- return code:
  • 0 normal return.
  • 1 overflow of bmg array.
  • 2 "7777" indicator not found in expected location.
  • -1 end-of-file encountered while reading.
  • -2 I/O error encountered while reading.
Author
J. Ator
Date
2005-11-29

Definition at line 203 of file crwbmg.c.

References BMCSTR, BMOSTR, bort_f(), bort_target_set_f(), bort_target_unset_f(), catch_bort_crbmg(), iupbs01_f(), pbf, and rbytes().

Referenced by catch_bort_crbmg().

◆ cwbmg()

void cwbmg ( const char *  bmg,
int  nmb,
int *  iret 
)

Write a BUFR message to the file that was opened via the most recent call to function cobfl() with io = 'w'.

This function is designed to be easily callable from application program written in either C or Fortran.

Parameters
bmg- BUFR message
nmb- Size (in bytes) of BUFR message in bmg
iret- return code:
  • 0 normal return.
  • -1 I/O error encountered while writing.
Author
J. Ator
Date
2005-11-29

Definition at line 280 of file crwbmg.c.

References bort_f(), bort_target_set_f(), bort_target_unset_f(), catch_bort_cwbmg(), and pbf.

Referenced by catch_bort_cwbmg().

◆ datebf_f()

void datebf_f ( int  bufr_unit,
int *  mear,
int *  mmon,
int *  mday,
int *  mour,
int *  idate 
)

Get the Section 1 date-time from the first data message of a BUFR file.

Wraps datebf() subroutine.

Parameters
bufr_unit- the Fortran logical unit number to read from
mear- Year stored within Section 1 of first data message
mmon- Month stored within Section 1 of first data message
mday- Day stored within Section 1 of first data message
mour- Hour stored within Section 1 of first data message
idate- Date-time stored within Section 1 of first data message
Author
Jeff Ator
Date
2025-11-18

Referenced by catch_bort_datebf().

◆ datelen_f()

void datelen_f ( int  len)

Specify the format of Section 1 date-time values that will be output by future calls to message-reading subroutines.

Wraps datelen() subroutine.

Parameters
len- Length of Section 1 date-time values to be output by all future calls to message-reading subroutines.
Author
Jeff Ator
Date
2025-11-14

Referenced by catch_bort_datelen().

◆ delete_table_data_f()

void delete_table_data_f ( )

Deletes the copies of the moda_tables arrays.

Author
Ronald McLaren
Date
2022-03-23

◆ drfini_f()

void drfini_f ( int  bufr_unit,
int *  mdrf,
int  ndrf,
const char *  table_d_mnemonic 
)

Explicitly initialize delayed replication factors for writing to a data subset.

Wraps drfini() subroutine.

Parameters
bufr_unit- Fortran logical unit number to write to
mdrf- Array of delayed replication factors
ndrf- Number of delayed replication factors in mdrf
table_d_mnemonic- Table D mnemonic
Author
Jeff Ator
Date
2025-10-28

Referenced by catch_bort_drfini().

◆ dumpbf_f()

void dumpbf_f ( int  bufr_unit,
int *  jdate,
int *  jdump 
)

Get the Section 1 date-time from the first two "dummy" messages of an NCEP dump file.

Wraps dumpbf() subroutine.

Parameters
bufr_unit- the Fortran logical unit number to read from
jdate- Dump center date-time stored within Section 1 of first "dummy" message
jdump- Dump initiation date-time stored within Section 1 of second "dummy" message
Author
Jeff Ator
Date
2025-11-18

Referenced by catch_bort_dumpbf().

◆ dxdump_f()

void dxdump_f ( int  lunit,
int  luprt 
)

Print a copy of the DX BUFR table associated with a specified Fortran logical unit.

Wraps dxdump() subroutine.

Parameters
lunit- Fortran logical unit for BUFR file
luprt- Fortran logical unit number for print output
Author
Jeff Ator
Date
2025-11-20

Referenced by catch_bort_dxdump().

◆ exitbufr_f()

void exitbufr_f ( )

Reset the library.

Wraps exitbufr() subroutine.

Author
Ronald Mclaren
Date
2020-07-29

◆ get_inode_f()

void get_inode_f ( int  lun,
int *  start_node 
)

Get the bufr node idx for the start node of the subset.

Parameters
lun- File ID.
start_node- the start node of the subset.
Author
Ronald McLaren
Date
2022-03-23

◆ get_inv_f()

void get_inv_f ( int  lun,
int **  inv_ptr,
int *  inv_size 
)

Get pointer to the moda_usrint INV array.

Parameters
lun- File ID.
inv_ptr- pointer to a pointer to the INV array.
inv_size- size of the INV array.
Author
Ronald McLaren
Date
2022-03-23

◆ get_irf_f()

void get_irf_f ( int **  irf_ptr,
int *  irf_size 
)

Get copy of the moda_tables IRF array.

Parameters
irf_ptr- pointer to a pointer to the IRF array.
irf_size- size of the IRF array.
Author
Ronald McLaren
Date
2023-04-05

◆ get_isc_f()

void get_isc_f ( int **  isc_ptr,
int *  isc_size 
)

Get copy of the moda_tables ISC array.

Parameters
isc_ptr- pointer to a pointer to the ISC array.
isc_size- size of the ISC array.
Author
Ronald McLaren
Date
2022-03-23

◆ get_itp_f()

void get_itp_f ( int **  itp_ptr,
int *  itp_size 
)

Get copy of the moda_tables ITP array.

Parameters
itp_ptr- pointer to a pointer to the ITP array.
itp_size- size of the ITP array.
Author
Ronald McLaren
Date
2022-03-23

◆ get_jmpb_f()

void get_jmpb_f ( int **  jmpb_ptr,
int *  jmpb_size 
)

Get copy of the moda_tables JMPB array.

Parameters
jmpb_ptr- pointer to a pointer to the JMPB array.
jmpb_size- size of the JMPB array.
Author
Ronald McLaren
Date
2022-03-23

◆ get_link_f()

void get_link_f ( int **  link_ptr,
int *  link_size 
)

Get copy of the moda_tables LINK array.

Parameters
link_ptr- pointer to a pointer to the LINK array.
link_size- size of the LINK array.
Author
Ronald McLaren
Date
2022-03-23

◆ get_nval_f()

void get_nval_f ( int  lun,
int *  num_nodes 
)

Get the number of values in the current subset.

Parameters
lun- File ID.
num_nodes- number of values in the subset.
Author
Ronald McLaren
Date
2022-03-23

◆ get_tag_f()

void get_tag_f ( char **  tag_ptr,
int *  tag_len,
int *  mem_size 
)

Get copy of the moda_tables TAG array.

Parameters
tag_ptr- pointer to a pointer to the TAG array.
tag_len- size of each string within the TAG array.
mem_size- size of the TAG array.
Author
Ronald McLaren
Date
2022-03-23

◆ get_typ_f()

void get_typ_f ( char **  typ_ptr,
int *  typ_len,
int *  mem_size 
)

Get copy of the moda_tables TYP array.

Parameters
typ_ptr- pointer to a pointer to the TYP array.
typ_len- size of each string within the TYP array.
mem_size- size of the TYP array.
Author
Ronald McLaren
Date
2022-03-23

◆ get_val_f()

void get_val_f ( int  lun,
double **  val_ptr,
int *  val_size 
)

Get pointer to the moda_usrint VAL array.

Parameters
lun- File ID.
val_ptr- pointer to a pointer to the VAL array.
val_size- size of the VAL array.
Author
Ronald McLaren
Date
2022-03-23

◆ getabdb_f()

void getabdb_f ( int  lunit,
int  itab,
char(*)  ctabdb[128],
int *  jtab 
)

Get Table B and Table D information from the internal DX tables.

Wraps getabdb() subroutine.

Parameters
lunit- Fortran logical unit number for BUFR file
itab- Allocated length of ctabdb
ctabdb- Internal Table B and Table D information
jtab- Number of entries returned in ctabdb
Author
J. Ator
Date
2025-12-05

Referenced by catch_bort_getabdb().

◆ getcfmng_f()

void getcfmng_f ( int  lunit,
const char *  cnemoi,
int  ivali,
const char *  cnemod,
int  ivald,
char *  cmeang_c,
int  lcmgc,
int *  iret 
)

Get the meaning of a numerical value from a code or flag table.

Wraps getcfmng() subroutine.

Parameters
lunit- Fortran logical unit
cnemoi- Mnemonic to search for
ivali- Value associated with cnemoi
cnemod- Optional second mnemonic upon which cnemoi may depend
ivald- Value associated with cnemod
cmeang_c- Meaning associated with cnemoi and ivali (and possibly cnemod and ivald as well)
lcmgc- Allocated length of cmeang_c
iret- Return code from call to getcfmng
Author
J. Ator
Date
2025-11-05

Referenced by catch_bort_getcfmng().

◆ gettagpr_f()

void gettagpr_f ( int  lunit,
const char *  tagch,
int  ntagch,
char *  tagpr,
int  tagpr_len,
int *  iret 
)

Get the parent for a specified occurrence of a Table B or Table D mnemonic.

Wraps gettagpr() subroutine.

Parameters
lunit- Fortran logical unit number for BUFR file
tagch- Table B or Table D mnemonic
ntagch- Ordinal occurrence of tagch for which tagpr is to be returned
tagpr- Table D mnemonic
tagpr_len- Allocated length of tagpr
iret- Return code
Author
J. Ator
Date
2025-12-03

Referenced by catch_bort_gettagpr().

◆ gettagre_f()

void gettagre_f ( int  lunit,
const char *  tagi,
int  ntagi,
char *  tagre,
int  tagre_len,
int *  ntagre,
int *  iret 
)

Get the parent for a specified occurrence of a Table B or Table D mnemonic.

Wraps gettagre() subroutine.

Parameters
lunit- Fortran logical unit number for BUFR file
tagi- Table B mnemonic
ntagi- Ordinal occurrence of tagi for which tagre is to be returned
tagre- Table B mnemonic referenced by tagi via an internal bitmap
tagre_len- Allocated length of tagre
ntagre- Ordinal occurrence of tagre referenced by (ntagi)th occurrence of tagi
iret- Return code
Author
J. Ator
Date
2025-12-03

Referenced by catch_bort_gettagre().

◆ getvalnb_f()

double getvalnb_f ( int  lunit,
const char *  tagpv,
int  ntagpv,
const char *  tagnb,
int  ntagnb 
)

Read a data value corresponding to a specific occurrence of a mnemonic.

Wraps getvalnb() function.

Parameters
lunit- Fortran logical unit number for BUFR file
tagpv- Pivot mnemonic
ntagpv- Ordinal occurrence of tagpv to search for
tagnb- Nearby mnemonic
ntagnb- Ordinal occurrence of tagnb to search for
Returns
Return value
Author
J. Ator
Date
2025-12-05

Referenced by catch_bort_getvalnb().

◆ ibfms_f()

int ibfms_f ( double  r8val)

Test whether a data value is "missing".

Wraps ibfms() function.

Parameters
r8val- Data value.
Returns
- 1 if r8val is "missing", or 0 otherwise.
Author
J. Ator
Date
2023-04-07

◆ ifbget_f()

int ifbget_f ( int  bufr_unit)

Check if there are any more data subsets available within a BUFR message.

Wraps ifbget() function.

Parameters
bufr_unit- Fortran logical unit number
Returns
Return code
Author
J. Ator
Date
2025-12-09

Referenced by catch_bort_ifbget().

◆ igetmxby_f()

int igetmxby_f ( void  )

Get the maximum length of a BUFR message that can be written to an output file.

Returns
Maximum length of a BUFR message that can be written to an output file.
Author
J. Ator
Date
2023-04-07

◆ igetprm_f()

int igetprm_f ( const char *  cprmnm)

Get the current value of a parameter.

Parameters
cprmnm- Parameter.
Returns
Value of cprmnm.
Author
J. Ator
Date
2023-04-07

Referenced by arallocc(), inittbf(), restd(), and stseq().

◆ igetsc_f()

int igetsc_f ( int  bufr_unit)

Check for an abnormal status code associated with the processing of a file.

Wraps igetsc() function.

Parameters
bufr_unit- Fortran logical unit number
Returns
Return code
Author
J. Ator
Date
2025-12-09

Referenced by catch_bort_igetsc().

◆ invmrg_f()

void invmrg_f ( int  lubfi,
int  lubfj 
)

Merge parts of data subsets.

Wraps invmrg() subroutine.

Parameters
lubfi- Fortran logical unit number for input file
lubfj- Fortran logical unit number for output file
Author
J. Ator
Date
2025-12-09

Referenced by catch_bort_invmrg().

◆ ipkm_f()

void ipkm_f ( char *  cbay,
int  nbyt,
int  ival,
int  cbay_len 
)

Encode an integer into a character string.

Wraps ipkm() subroutine.

Parameters
cbay- Character string
nbyt- Number of bytes of cbay within which to encode ival
ival- Value to encode
cbay_len- Allocated length of cbay
Author
J. Ator
Date
2025-12-09

Referenced by catch_bort_ipkm().

◆ ireadmg_f()

int ireadmg_f ( int  bufr_unit,
char *  subset,
int *  iddate,
int  subset_len 
)

Read the next message from a BUFR file.

Wraps ireadmg() function.

Parameters
bufr_unit- the Fortran logical unit number to read from.
subset- the subset string.
iddate- datetime of message.
subset_len- length of the subset string.
Returns
  • 0 new BUFR message was successfully read into internal arrays.
  • -1 there are no more BUFR messages in bufr_unit.
Author
Ronald Mclaren
Date
2020-07-29

◆ ireadns_f()

int ireadns_f ( int  bufr_unit,
char *  subset,
int *  iddate,
int  subset_len 
)

Read the next data subset from a BUFR file.

Wraps ireadns() function.

Parameters
bufr_unit- the Fortran logical unit number to read from.
subset- the subset string.
iddate- datetime of message.
subset_len- length of the subset string.
Returns
  • 0 new BUFR data subset was successfully read into internal arrays.
  • -1 there are no more BUFR data subsets in bufr_unit.
Author
J. Ator
Date
2023-04-07

◆ ireadsb_f()

int ireadsb_f ( int  bufr_unit)

Read the next data subset from a BUFR message.

Wraps ireadsb() function.

Parameters
bufr_unit- the Fortran logical unit number to read from.
Returns
  • 0 new BUFR data subset was successfully read into internal arrays.
  • -1 there are no more BUFR data subsets in the BUFR message associated with bufr_unit
Author
Ronald Mclaren
Date
2020-07-29

◆ isetprm_f()

int isetprm_f ( const char *  cprmnm,
int  ipval 
)

Define a customized parameter value for dynamic allocation.

Parameters
cprmnm- Parameter.
ipval- Value to be set for cprmnm.
Returns
0 if successful, or -1 if cprmnm unknown.
Author
J. Ator
Date
2023-04-07

◆ iupbs01_f()

int iupbs01_f ( int *  bufr,
const char *  mnemonic 
)

Read a data value from Section 0 or Section 1 of a BUFR message.

Wraps iupbs01() function.

Parameters
bufr- BUFR message.
mnemonic- Value to be read from Section 0 or Section 1.
Returns
- Value corresponding to mnemonic, or -1 if not found or error occurred.
Author
J. Ator
Date
2023-04-07

Referenced by crbmg(), crdbufr(), and main().

◆ iupm_f()

int iupm_f ( const char *  cbay,
int  nbits,
int  lcbay 
)

Decode an integer from a character string.

Wraps iupm() function.

Parameters
cbay- Character string
nbits- Number of bits to decode from cbay
lcbay- Length of cbay
Returns
Decoded value
Author
J. Ator
Date
2025-12-09

Referenced by catch_bort_iupm().

◆ iupvs01_f()

int iupvs01_f ( int  bufr_unit,
const char *  c_s01m 
)

Read a specified value from within Section 0 or 1 of a BUFR message.

Wraps iupvs01() function.

Parameters
bufr_unit- Fortran logical unit number to read from
c_s01m- Mnemonic
Returns
Value corresponding to mnemonic
Author
Jeff Ator
Date
2025-11-14

Referenced by catch_bort_iupvs01().

◆ lcmgdf_f()

int lcmgdf_f ( int  bufr_unit,
const char *  c_subset 
)

Check if a subset definition contains any long character strings.

Wraps lcmgdf() function.

Parameters
bufr_unit- Fortran logical unit number
c_subset- Table A mnemonic
Returns
Return code
Author
Jeff Ator
Date
2025-12-03

Referenced by catch_bort_lcmgdf().

◆ maxout_f()

void maxout_f ( int  max0)

Define a customized maximum length for output BUFR messages.

Wraps maxout() subroutine.

Parameters
max0- New maximum length (in bytes) for all BUFR messages written to all output files.
Author
J. Ator
Date
2023-04-07

◆ mesgbc_f()

void mesgbc_f ( int  lunin,
int *  mesgtyp,
int *  icomp 
)

Get information from the first data message in a BUFR file.

Wraps mesgbc() subroutine.

Parameters
lunin- Fortran logical unit number
mesgtyp- Message type
icomp- Compression indicator
Author
J. Ator
Date
2025-12-09

Referenced by catch_bort_mesgbc().

◆ mesgbf_f()

void mesgbf_f ( int  lunit,
int *  mesgtyp 
)

Get information from the first data message in a BUFR file.

Wraps mesgbf() subroutine.

Parameters
lunit- Fortran logical unit number
mesgtyp- Message type
Author
J. Ator
Date
2025-12-09

Referenced by catch_bort_mesgbf().

◆ minimg_f()

void minimg_f ( int  bufr_unit,
int  mini 
)

Write a minutes value into Section 1 of a BUFR message.

Wraps minimg() subroutine.

Parameters
bufr_unit- the Fortran logical unit number to read from
mini- Minutes value
Author
Jeff Ator
Date
2025-11-18

Referenced by catch_bort_minimg().

◆ mtinfo_f()

void mtinfo_f ( const char *  path,
int  file_unit_1,
int  file_unit_2 
)

Specify location of master BUFR tables on local file system.

Wraps mtinfo() subroutine.

Parameters
path- the path where the WMO tables are stored.
file_unit_1- number to use for first logical unit.
file_unit_2- number to use for second logical unit.
Author
Ronald Mclaren
Date
2020-07-29

◆ nemdefs_f()

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 
)

Get the element name and units associated with a Table B mnemonic.

Wraps nemdefs() subroutine.

Parameters
file_unit- Fortran logical unit for the open file.
mnemonic- Mnemonic.
unit_c- Unit string.
unit_str_len- Unit string length.
desc_c- Description string.
desc_str_len- Description string length.
iret- 0 indicates success -1 indicates failure.
Author
Ronald Mclaren
Date
2020-07-29

Referenced by catch_bort_nemdefs().

◆ nemspecs_f()

void nemspecs_f ( int  file_unit,
const char *  mnemonic,
int  mnemonic_idx,
int *  scale,
int *  reference,
int *  bits,
int *  iret 
)

Get the scale factor, reference value and bit width associated with a specified occurrence of a Table B mnemonic.

Wraps nemspecs() subroutine.

Parameters
file_unit- Fortran logical unit for the open file.
mnemonic- Mnemonic.
mnemonic_idx- Ordinal indicator of specific mnemonic element (if repeated).
scale- Scale of element.
reference- Reference of element.
bits- Number of bits representing the element.
iret- 0 indicates success -1 indicates failure.
Author
Ronald Mclaren
Date
2022-08-08

Referenced by catch_bort_nemspecs().

◆ nemtab_f()

void nemtab_f ( int  lun,
const char *  mnemonic,
int *  descriptor,
char *  table_type,
int *  table_idx 
)

Get information about a descriptor.

Wraps nemtab() subroutine.

Parameters
lun- File ID.
mnemonic- Mnemonic.
descriptor- The binary descriptor for the mnemonic.
table_type- Type of internal DX BUFR table ('B', 'C', or 'D').
table_idx- The table index, or 0 if not found.
Author
Ronald Mclaren
Date
2022-08-16

Referenced by stseq().

◆ nemtbb_f()

void nemtbb_f ( int  lun,
int  table_idx,
char *  unit_str,
int  unit_str_len,
int *  scale,
int *  reference,
int *  bits 
)

Get information about a Table B descriptor.

Wraps nemtbb() subroutine.

Parameters
lun- File ID.
table_idx- Table B index.
unit_str- Unit string.
unit_str_len- Unit string length.
scale- Scale of element.
reference- Reference value of element.
bits- Number of bits representing theelement.
Author
Ronald McLaren
Date
2022-08-16

Referenced by restd().

◆ nmsub_f()

int nmsub_f ( int  bufr_unit)

Get the total number of data subsets available within a BUFR message.

Wraps nmsub() function.

Parameters
bufr_unit- Fortran logical unit number to read from
Returns
Number of data subsets
Author
Jeff Ator
Date
2025-11-14

Referenced by catch_bort_nmsub().

◆ open_f()

void open_f ( int  unit,
const char *  filepath 
)

Open a Fortran file from a C program.

Parameters
unit- the integer to use as the Fortran logical unit.
filepath- path to the file we want to open.
Author
Ronald Mclaren
Date
2020-07-29

◆ openbf_f()

void openbf_f ( int  bufr_unit,
const char *  cio,
int  table_file_id 
)

Connect a new file to the library, or initialize the library, or change verbosity associated with already-connected file.

Wraps openbf() subroutine.

Parameters
bufr_unit- the Fortran logical unit number.
cio- cio string (ex "IN", "SEC3", and "OUT").
table_file_id- table_file unit number.
Author
Ronald Mclaren
Date
2020-07-29

Referenced by catch_bort_openbf().

◆ openmb_f()

void openmb_f ( int  bufr_unit,
const char *  c_subset,
int  iddate 
)

Open a new message for output in a BUFR file that was previously opened for writing.

Wraps openmb() subroutine.

Parameters
bufr_unit- Fortran logical unit number to write to.
c_subset- Table A mnemonic of message.
iddate- Date-time to be stored within Section 1 of message.
Author
J. Ator
Date
2023-04-07

Referenced by catch_bort_openmb().

◆ openmg_f()

void openmg_f ( int  bufr_unit,
const char *  c_subset,
int  iddate 
)

Open a new message for output in a BUFR file that was previously opened for writing.

Wraps openmg() subroutine.

Parameters
bufr_unit- Fortran logical unit number to write to.
c_subset- Table A mnemonic of message.
iddate- Date-time to be stored within Section 1 of message.
Author
J. Ator
Date
2025-10-20

Referenced by catch_bort_openmg().

◆ pkbs1_f()

void pkbs1_f ( int  ival,
int *  mbay,
const char *  c_s1m 
)

Specify a value to be written into Section 1 of a BUFR message.

Wraps pkbs1() subroutine.

Parameters
ival- Value corresponding to mnemonic
mbay- BUFR message
c_s1m- Mnemonic
Author
Jeff Ator
Date
2025-11-18

Referenced by catch_bort_pkbs1().

◆ pkvs01_f()

void pkvs01_f ( const char *  c_s01m,
int  ival 
)

Specify a value to be written into Section 0 or 1 of all future BUFR messages.

Wraps pkvs01() subroutine.

Parameters
c_s01m- Mnemonic
ival- Value corresponding to mnemonic
Author
Jeff Ator
Date
2025-11-14

Referenced by catch_bort_pkvs01().

◆ rdmemm_f()

void rdmemm_f ( int  imsg,
char *  subset,
int *  jdate,
int  subset_len,
int *  iret 
)

Read a specified message from internal arrays.

Wraps rdmemm() subroutine.

Parameters
imsg- Number of BUFR message to be read
subset- Table A mnemonic for type of BUFR message that was read
jdate- Date-time stored within Section 1 of BUFR message that was read
subset_len- Allocated length of subset string
iret- Return code
Author
Jeff Ator
Date
2025-12-01

Referenced by catch_bort_rdmemm().

◆ rdmems_f()

void rdmems_f ( int  isub,
int *  iret 
)

Read a specified data subset from internal arrays.

Wraps rdmems() subroutine.

Parameters
isub- Number of data subset to be read
iret- Return code
Author
Jeff Ator
Date
2025-12-01

Referenced by catch_bort_rdmems().

◆ rdmgsb_f()

void rdmgsb_f ( int  lunit,
int  imsg,
int  isub 
)

Read a specified data subset from a BUFR file.

Wraps rdmgsb() subroutine.

Parameters
lunit- Fortran logical unit number for BUFR file
imsg- Message number
isub- Subset number
Author
Jeff Ator
Date
2025-11-25

Referenced by catch_bort_rdmgsb().

◆ readerme_f()

void readerme_f ( int *  mesg,
int  bufr_unit,
char *  subset,
int *  iddate,
int  subset_len,
int *  ires 
)

Read a BUFR message from a memory array.

Wraps readerme() subroutine.

Parameters
mesg- BUFR message
bufr_unit- Fortran logical unit number
subset- Subset string
iddate- Datetime of message
subset_len- Length of the subset string
ires- Return code
Author
Jeff Ator
Date
2025-11-25

Referenced by catch_bort_readerme().

◆ readlc_f()

void readlc_f ( int  lunit,
const char *  str_id,
char *  output_str,
int  output_str_len 
)

Read a long string from the BUFR file.

Parameters
lunit- Fortran logical unit.
str_id- Mnemonic for the string for the source field plus the index number (ex: 'IDMN#2')
output_str- The pre-allocated result string
output_str_len- Size of the result string buffer
Author
Ronald McLaren
Date
2023-07-03

Referenced by catch_bort_readlc().

◆ readmg_f()

void readmg_f ( int  bufr_unit,
char *  subset,
int *  iddate,
int  subset_len,
int *  ires 
)

Read the next message from a BUFR file.

Wraps readmg() subroutine.

Parameters
bufr_unit- the Fortran logical unit number to read from
subset- the subset string
iddate- datetime of message
subset_len- length of the subset string
ires- return code:
  • 0 new BUFR message was successfully read into internal arrays.
  • -1 there are no more BUFR messages in bufr_unit.
Author
Jeff Ator
Date
2025-08-25

Referenced by catch_bort_readmg().

◆ readns_f()

void readns_f ( int  bufr_unit,
char *  subset,
int *  iddate,
int  subset_len,
int *  ires 
)

Read the next data subset from a BUFR file.

Wraps readns() subroutine.

Parameters
bufr_unit- the Fortran logical unit number to read from.
subset- the subset string.
iddate- datetime of message.
subset_len- length of the subset string.
ires- return code:
  • 0 new BUFR data subset was successfully read into internal arrays.
  • -1 there are no more BUFR data subsets in bufr_unit.
Author
J. Ator
Date
2025-09-05

Referenced by catch_bort_readns().

◆ readsb_f()

void readsb_f ( int  bufr_unit,
int *  ires 
)

Read the next data subset from a BUFR message.

Wraps readsb() subroutine.

Parameters
bufr_unit- the Fortran logical unit number to read from.
ires- return code:
  • 0 new BUFR data subset was successfully read into internal arrays.
  • -1 there are no more BUFR data subsets in the BUFR message associated with bufr_unit
Author
Jeff Ator
Date
2025-09-05

Referenced by catch_bort_readsb().

◆ rtrcpt_f()

void rtrcpt_f ( int  lunit,
int *  iyr,
int *  imo,
int *  idy,
int *  ihr,
int *  imi,
int *  iret 
)

Get the tank receipt time from Section 1 of a BUFR message.

Wraps rtrcpt() subroutine.

Parameters
lunit- Fortran logical unit
iyr- Tank receipt year
imo- Tank receipt month
idy- Tank receipt day
ihr- Tank receipt hour
imi- Tank receipt minute
iret- Return code
Author
Jeff Ator
Date
2025-11-20

Referenced by catch_bort_rtrcpt().

◆ setvalnb_f()

void setvalnb_f ( int  lunit,
const char *  tagpv,
int  ntagpv,
const char *  tagnb,
int  ntagnb,
double  r8val,
int *  iret 
)

Write a data value corresponding to a specific occurrence of a mnemonic.

Wraps setvalnb() subroutine.

Parameters
lunit- Fortran logical unit number for BUFR file
tagpv- Pivot mnemonic
ntagpv- Ordinal occurrence of tagpv to search for
tagnb- Nearby mnemonic
ntagnb- Ordinal occurrence of tagnb to search for
r8val- Value to be stored
iret- Return code
Author
J. Ator
Date
2025-12-05

Referenced by catch_bort_setvalnb().

◆ status_f()

void status_f ( int  file_unit,
int *  lun,
int *  il,
int *  im 
)

Check whether a file is connected to the library.

Wraps status() subroutine.

Parameters
file_unit- Fortran logical unit number of file.
lun- File ID.
il- File status.
im- Message status.
Author
Ronald Mclaren
Date
2020-07-29

Referenced by catch_bort_status().

◆ stdmsg_f()

void stdmsg_f ( const char *  cf)

Specify whether to standardize future output BUFR messages.

Wraps stdmsg() subroutine.

Parameters
cf- Flag indicating whether future BUFR output messages should be WMO-standard
Author
Jeff Ator
Date
2025-12-02

Referenced by catch_bort_stdmsg().

◆ stndrd_f()

void stndrd_f ( int  lunit,
int *  msgin,
int  lmsgot,
int *  msgot 
)

Standardize a copy of a BUFR message.

Wraps stndrd() subroutine.

Parameters
lunit- Fortran logical unit number for BUFR file
msgin- BUFR message
lmsgot- Allocated length of msgot
msgot- Copy of msgin now fully WMO-standardized
Author
Jeff Ator
Date
2025-12-02

Referenced by catch_bort_stndrd().

◆ strcpt_f()

void strcpt_f ( const char *  cf,
int  iyr,
int  imo,
int  idy,
int  ihr,
int  imi 
)

Specify a tank receipt time to be written into Section 1 of all future BUFR messages.

Wraps strcpt() subroutine.

Parameters
cf- Flag indicating whether future BUFR output messages should include a tank receipt time
iyr- Tank receipt year
imo- Tank receipt month
idy- Tank receipt day
ihr- Tank receipt hour
imi- Tank receipt minute
Author
Jeff Ator
Date
2025-11-20

Referenced by catch_bort_strcpt().

◆ ufbcnt_f()

void ufbcnt_f ( int  lunit,
int *  kmsg,
int *  ksub 
)

Get the current location of the file pointer within a BUFR file.

Wraps ufbcnt() subroutine.

Parameters
lunit- Fortran logical unit
kmsg- Message number
ksub- Subset number
Author
J. Ator
Date
2025-11-05

Referenced by catch_bort_ufbcnt().

◆ ufbcpy_f()

void ufbcpy_f ( int  lunin,
int  lunot 
)

Copy a BUFR data subset from one Fortran logical unit to another.

Wraps ufbcpy() subroutine.

Parameters
lunin- Fortran logical unit number for source BUFR file
lunot- Fortran logical unit number for target BUFR file
Author
Jeff Ator
Date
2025-11-20

Referenced by catch_bort_ufbcpy().

◆ ufbcup_f()

void ufbcup_f ( int  lunin,
int  lunot 
)

Copy unique elements of a data subset from one file to another.

Wraps ufbcup() subroutine.

Parameters
lunin- Fortran logical unit number for source BUFR file
lunot- Fortran logical unit number for target BUFR file
Author
Jeff Ator
Date
2025-12-02

Referenced by catch_bort_ufbcup().

◆ ufbdmp_f()

void ufbdmp_f ( int  lunit,
int  luprt 
)

Print a verbose listing of the contents of a data subset.

Wraps ufbdmp() subroutine.

Parameters
lunit- Fortran logical unit for BUFR file
luprt- Fortran logical unit number for print output
Author
Jeff Ator
Date
2025-11-20

Referenced by catch_bort_ufbdmp().

◆ ufbevn_f()

void ufbevn_f ( int  bufr_unit,
void **  c_data,
int  dim_1,
int  dim_2,
int  dim_3,
int *  iret,
const char *  table_b_mnemonic 
)

Read one or more data values from a data subset.

Wraps ufbevn() subroutine.

Parameters
bufr_unit- the Fortran logical unit number to read from.
c_data- pointer to a pointer to a pre-allocated buffer.
dim_1- dimensionality of data to read
dim_2- dimensionality of data to read
dim_3- dimensionality of data to read
iret- return value, length of data read.
table_b_mnemonic- string of mnemonics.
Author
J. Ator
Date
2025-11-05

Referenced by catch_bort_ufbevn().

◆ ufbget_f()

void ufbget_f ( int  bufr_unit,
double *  tab,
int  i1,
int *  iret,
const char *  table_b_mnemonic 
)

Read one or more data values from a data subset without advancing the subset pointer.

Wraps ufbget() subroutine.

Parameters
bufr_unit- Fortran logical unit number to read from
tab- Data values
i1- Allocated length of tab
iret- Return code
table_b_mnemonic- String of mnemonics to read from the data subset
Author
J. Ator
Date
2025-12-05

Referenced by catch_bort_ufbget().

◆ ufbint_f()

void ufbint_f ( int  bufr_unit,
void **  c_data,
int  dim_1,
int  dim_2,
int *  iret,
const char *  table_b_mnemonic 
)

Read/write one or more data values from/to a data subset.

Wraps ufbint() subroutine.

Parameters
bufr_unit- the Fortran logical unit number to read from or write to.
c_data- pointer to a pointer to a pre-allocated buffer.
dim_1- dimensionality of data to read or write.
dim_2- dimensionality of data to read or write.
iret- return value, length of data read or written.
table_b_mnemonic- string of mnemonics.
Author
Ronald Mclaren
Date
2020-07-29

Referenced by catch_bort_ufbint().

◆ ufbinx_f()

void ufbinx_f ( int  bufr_unit,
int  imsg,
int  isub,
void **  c_data,
int  dim_1,
int  dim_2,
int *  iret,
const char *  table_b_mnemonic 
)

Read one or more data values from a specified data subset.

Wraps ufbinx() subroutine.

Parameters
bufr_unit- the Fortran logical unit number to read from
imsg- Number of BUFR message to be read
isub- Number of data subset to be read from imsg
c_data- pointer to a pointer to a pre-allocated buffer.
dim_1- dimensionality of data to read
dim_2- dimensionality of data to read
iret- return value, length of data read
table_b_mnemonic- string of mnemonics.
Author
J. Ator
Date
2025-12-05

Referenced by catch_bort_ufbinx().

◆ ufbmem_f()

void ufbmem_f ( int  lunit,
int  inew,
int *  iret,
int *  iunit 
)

Read an entire BUFR file into internal arrays.

Wraps ufbmem() subroutine.

Parameters
lunit- Fortran logical unit number for BUFR file
inew- Processing option
iret- Number of BUFR messages that were read and stored into internal arrays
iunit- File status
Author
Jeff Ator
Date
2025-11-25

Referenced by catch_bort_ufbmem().

◆ ufbmex_f()

void ufbmex_f ( int  lunit,
int  lundx,
int  inew,
int *  iret,
int *  mesg 
)

Read an entire BUFR file into internal arrays.

Wraps ufbmex() subroutine.

Parameters
lunit- Fortran logical unit number for BUFR file
lundx- Fortran logical unit number containing DX BUFR table information
inew- Processing option
iret- Number of BUFR messages that were read and stored into internal arrays
mesg- Types of BUFR messages that were read and stored into internal arrays
Author
Jeff Ator
Date
2025-11-25

Referenced by catch_bort_ufbmex().

◆ ufbmms_f()

void ufbmms_f ( int  imsg,
int  isub,
char *  subset,
int *  jdate,
int  subset_len 
)

Read a specified data subset from internal arrays.

Wraps ufbmms() subroutine.

Parameters
imsg- Number of BUFR message to be read
isub- Number of data subset to be read from imsg
subset- Table A mnemonic for type of BUFR message that was read
jdate- Date-time stored within Section 1 of BUFR message that was read
subset_len- Allocated length of subset string
Author
Jeff Ator
Date
2025-12-01

Referenced by catch_bort_ufbmms().

◆ ufbmns_f()

void ufbmns_f ( int  irep,
char *  subset,
int *  idate,
int  subset_len 
)

Read a specified data subset from internal arrays.

Wraps ufbmns() subroutine.

Parameters
irep- Number of data subset to be read
subset- Table A mnemonic for type of BUFR message that was read
idate- Date-time stored within Section 1 of BUFR message that was read
subset_len- Allocated length of subset string
Author
Jeff Ator
Date
2025-12-01

Referenced by catch_bort_ufbmns().

◆ ufbovr_f()

void ufbovr_f ( int  bufr_unit,
void **  c_data,
int  dim_1,
int  dim_2,
int *  iret,
const char *  table_b_mnemonic 
)

Overwrite one or more data values within a data subset.

Wraps ufbovr() subroutine.

Parameters
bufr_unit- the Fortran logical unit number to write to
c_data- pointer to a pointer to a pre-allocated buffer.
dim_1- dimensionality of data to write
dim_2- dimensionality of data to write
iret- return value, length of data written
table_b_mnemonic- string of mnemonics.
Author
J. Ator
Date
2025-12-05

Referenced by catch_bort_ufbovr().

◆ ufbpos_f()

void ufbpos_f ( int  bufr_unit,
int  irec,
int  isub,
char *  subset,
int *  iddate,
int  subset_len 
)

Jump forwards or backwards to a specified data subset within a BUFR file.

Wraps ufbpos() subroutine.

Parameters
bufr_unit- the Fortran logical unit number to read from
irec- Ordinal number of message to be read
isub- Ordinal number of subset to be read from (irec)th message
subset- the subset string
iddate- datetime of message
subset_len- length of the subset string
Author
Jeff Ator
Date
2025-11-13

Referenced by catch_bort_ufbpos().

◆ ufbqcd_f()

void ufbqcd_f ( int  lunit,
const char *  cnemo,
int *  iqcd 
)

Return a prepbufr program code corresponding to a mnemonic.

Wraps ufbqcd() subroutine.

Parameters
lunit- Fortran logical unit
cnemo- Mnemonic
iqcd- Y value of descriptor associated with mnemonic
Author
J. Ator
Date
2025-11-05

Referenced by catch_bort_ufbqcd().

◆ ufbqcp_f()

void ufbqcp_f ( int  lunit,
int  iqcp,
char *  cnemo,
int  cnemo_len 
)

Return a mnemonic corresponding to a prepbufr program code.

Wraps ufbqcp() subroutine.

Parameters
lunit- Fortran logical unit
iqcp- Y value of a Category 63 Table D descriptor
cnemo- Mnemonic associated with iqcp
cnemo_len- Allocated length of cnemo string
Author
J. Ator
Date
2025-11-05

Referenced by catch_bort_ufbqcp().

◆ ufbrep_f()

void ufbrep_f ( int  bufr_unit,
void **  c_data,
int  dim_1,
int  dim_2,
int *  iret,
const char *  table_b_mnemonic 
)

Read/write one or more data values from/to a data subset.

Wraps ufbrep() subroutine.

Parameters
bufr_unit- the Fortran logical unit number to read from or write to.
c_data- pointer to a pointer to a pre-allocated buffer.
dim_1- dimensionality of data to read or write.
dim_2- dimensionality of data to read or write.
iret- length of data read or written.
table_b_mnemonic- string of mnemonics.
Author
Ronald Mclaren
Date
2020-07-29

Referenced by catch_bort_ufbrep().

◆ ufbrms_f()

void ufbrms_f ( int  imsg,
int  isub,
void **  c_data,
int  dim_1,
int  dim_2,
int *  iret,
const char *  table_b_mnemonic 
)

Read one or more data values from internal arrays.

Wraps ufbrms() subroutine.

Parameters
imsg- Number of BUFR message to be read
isub- Number of data subset to be read from imsg
c_data- pointer to a pointer to a pre-allocated buffer.
dim_1- dimensionality of data to read or write.
dim_2- dimensionality of data to read or write.
iret- return value, length of data read or written.
table_b_mnemonic- string of mnemonics.
Author
Jeff Ator
Date
2025-12-01

Referenced by catch_bort_ufbrms().

◆ ufbseq_f()

void ufbseq_f ( int  bufr_unit,
void **  c_data,
int  dim_1,
int  dim_2,
int *  iret,
const char *  table_d_mnemonic 
)

Read/write an entire sequence of data values from/to a data subset.

Wraps ufbseq() subroutine.

Parameters
bufr_unit- the Fortran logical unit number to read from or write to.
c_data- pointer to a pointer to a pre-allocated buffer.
dim_1- dimensionality of data to read or write.
dim_2- dimensionality of data to read or write.
iret- return value, length of data read or written.
table_d_mnemonic- Table A or Table D mnemonic.
Author
J. Ator
Date
2023-04-07

Referenced by catch_bort_ufbseq().

◆ ufbstp_f()

void ufbstp_f ( int  bufr_unit,
void **  c_data,
int  dim_1,
int  dim_2,
int *  iret,
const char *  table_b_mnemonic 
)

Read/write one or more data values from/to a data subset.

Wraps ufbstp() subroutine.

Parameters
bufr_unit- the Fortran logical unit number to read from or write to.
c_data- pointer to a pointer to a pre-allocated buffer.
dim_1- dimensionality of data to read or write.
dim_2- dimensionality of data to read or write.
iret- length of data read or written.
table_b_mnemonic- string of mnemonics.
Author
Jeff Ator
Date
2025-10-24

Referenced by catch_bort_ufbstp().

◆ ufbtab_f()

void ufbtab_f ( int  bufr_unit,
void **  c_data,
int  dim_1,
int  dim_2,
int *  iret,
const char *  table_b_mnemonic 
)

Read one or more data values from every data subset in a BUFR file.

Wraps ufbtab() subroutine.

Parameters
bufr_unit- the Fortran logical unit number to read from
c_data- pointer to a pointer to a pre-allocated buffer.
dim_1- dimensionality of data to read
dim_2- dimensionality of data to read
iret- return value, number of data subsets read
table_b_mnemonic- String of mnemonics to read from each data subset
Author
J. Ator
Date
2025-11-13

Referenced by catch_bort_ufbtab().

◆ ufbtam_f()

void ufbtam_f ( void **  c_data,
int  dim_1,
int  dim_2,
int *  iret,
const char *  table_b_mnemonic 
)

Read one or more data values from every data subset in internal arrays.

Wraps ufbtam() subroutine.

Parameters
c_data- pointer to a pointer to a pre-allocated buffer.
dim_1- dimensionality of data to read
dim_2- dimensionality of data to read
iret- return value, number of data subsets read
table_b_mnemonic- String of mnemonics to read from each data subset
Author
J. Ator
Date
2025-12-01

Referenced by catch_bort_ufbtam().

◆ ufdump_f()

void ufdump_f ( int  lunit,
int  luprt 
)

Print a verbose listing of the contents of a data subset.

Wraps ufdump() subroutine.

Parameters
lunit- Fortran logical unit for BUFR file
luprt- Fortran logical unit number for print output
Author
Jeff Ator
Date
2025-11-20

Referenced by catch_bort_ufdump().

◆ upds3_f()

void upds3_f ( int *  mbay,
int  lcds3,
char(*)  ccds3[6],
int *  nds3 
)

Get the sequence of data descriptors contained within Section 3 of a BUFR message.

Wraps upds3() subroutine.

Parameters
mbay- BUFR message
lcds3- Allocated length of cds3
ccds3- Data descriptor sequence within Section 3 of mbay
nds3- Number of descriptors returned in cds3
Author
Jeff Ator
Date
2025-11-18

Referenced by catch_bort_upds3().

◆ upftbv_f()

void upftbv_f ( int  lunit,
const char *  cnemo,
double  val,
int *  ibit,
int  mxib,
int *  nib 
)

Get the bit settings equivalent to a given numerical value for a flag table mnemonic.

Wraps upftbv() subroutine.

Parameters
lunit- Fortran logical unit
cnemo- Mnemonic with flag table units
val- Value corresponding to cnemo
ibit- Bit numbers which were set to "On" in val
mxib- Allocated size of ibit
nib- Number of bit numbers returned in ibit
Author
J. Ator
Date
2025-11-05

Referenced by catch_bort_upftbv().

◆ wrdxtb_f()

void wrdxtb_f ( int  lundx,
int  lunot 
)

Generate DX BUFR table messages and write them to a output file.

Wraps wrdxtb() subroutine.

Parameters
lundx- Fortran logical unit number containing DX BUFR table information
lunot- Fortran logical unit number for output file
Author
J. Ator
Date
2025-12-09

Referenced by catch_bort_wrdxtb().

◆ writlc_f()

void writlc_f ( int  lunit,
const char *  str,
const char *  chr 
)

Write a long string to the BUFR file.

Parameters
lunit- Fortran logical unit.
str- Mnemonic for the string for the source field plus the index number (ex: 'IDMN#2')
chr- Value corresponding to str
Author
Jeff Ator
Date
2025-10-24

Referenced by catch_bort_writlc().

◆ writsa_f()

void writsa_f ( int  bufr_unit,
int  bufr_len,
int *  bufr,
int *  nbufr 
)

Write the next data subset to a BUFR message, and return a copy of any completed message.

Wraps writsa() subroutine.

Parameters
bufr_unit- Fortran logical unit number to write to
bufr_len- Allocated length of bufr array
bufr- BUFR message
nbufr- Number of integers returned in bufr array, or 0 if no message was returned
Author
Jeff Ator
Date
2025-10-20

Referenced by catch_bort_writsa().

◆ writsb_f()

void writsb_f ( int  bufr_unit)

Write the next data subset to a BUFR message.

Wraps writsb() subroutine.

Parameters
bufr_unit- Fortran logical unit number to write to
Author
Jeff Ator
Date
2025-10-20

Referenced by catch_bort_writsb().