NCEPLIBS-bufr  12.2.0
bufr_interface.h
Go to the documentation of this file.
1 
13 #pragma once
14 
15 void cobfl(char *bfl, char io);
16 void crbmg(char *bmg, int mxmb, int *nmb, int *iret);
17 void cwbmg(char *bmg, int nmb, int *iret);
18 void ccbfl(void);
19 
21 #define VERS_STR_LEN 8
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
35 void open_f(int unit, const char *filepath);
36 
44 void close_f(int unit);
45 
58 void openbf_f(int bufr_unit, const char *cio, int table_file_id);
59 
69 void closbf_f(int bufr_unit);
70 
78 void exitbufr_f();
79 
96 int ireadmg_f(int bufr_unit, char *subset, int *iddate, int subset_len);
97 
113 void readmg_f(int bufr_unit, char *subset, int *iddate, int subset_len, int *ires);
114 
128 int ireadsb_f(int bufr_unit);
129 
142 void readsb_f(int bufr_unit, int *ires);
143 
158 void ufbint_f(int bufr_unit, void **c_data, int dim_1, int dim_2,
159  int *iret, const char *table_b_mnemonic);
160 
175 void ufbrep_f(int bufr_unit, void **c_data, int dim_1, int dim_2,
176  int *iret, const char *table_b_mnemonic);
177 
189 void mtinfo_f(const char *path, int file_unit_1, int file_unit_2);
190 
203 void status_f(int file_unit, int *lun, int *il, int *im);
204 
220 void nemdefs_f(int file_unit,
221  const char *mnemonic,
222  char *unit_c,
223  int unit_str_len,
224  char *desc_c,
225  int desc_str_len,
226  int *iret);
227 
244 void nemspecs_f(int file_unit,
245  const char *mnemonic,
246  int mnemonic_idx,
247  int *scale,
248  int *reference,
249  int *bits,
250  int *iret);
251 
265 void nemtab_f(int lun,
266  const char *mnemonic,
267  int *descriptor,
268  char *table_type,
269  int *table_idx);
270 
286  void nemtbb_f(int lun,
287  int table_idx,
288  char *unit_str,
289  int unit_str_len,
290  int *scale,
291  int *reference,
292  int *bits);
293 
302 void get_isc_f(int **isc_ptr, int *isc_size);
303 
312 void get_link_f(int **link_ptr, int *link_size);
313 
322 void get_itp_f(int **itp_ptr, int *itp_size);
323 
333 void get_typ_f(char **typ_ptr, int *typ_len, int *mem_size);
334 
344 void get_tag_f(char **tag_ptr, int *tag_len, int *mem_size);
345 
354 void get_jmpb_f(int **jmpb_ptr, int *jmpb_size);
355 
356 
365 void get_irf_f(int **irf_ptr, int *irf_size);
366 
375 void get_inode_f(int lun, int *start_node);
376 
385 void get_nval_f(int lun, int *num_nodes);
386 
396 void get_val_f(int lun, double **val_ptr, int *val_size);
397 
407 void get_inv_f(int lun, int **inv_ptr, int *inv_size);
408 
420 void readlc_f(int lunit, const char *str_id, char *output_str, int output_str_len);
421 
428 
441 int iupbs01_f(int *bufr, char *mnemonic);
442 
452 int igetprm_f(char *cprmnm);
453 
464 int isetprm_f(char *cprmnm, int ipval);
465 
476 void maxout_f(int max0);
477 
487 int igetmxby_f(void);
488 
503 void ufbseq_f(int bufr_unit, void **c_data, int dim_1, int dim_2,
504  int *iret, const char *table_d_mnemonic);
505 
522 int ireadns_f(int bufr_unit, char *subset, int *iddate, int subset_len);
523 
540 void readns_f(int bufr_unit, char *subset, int *iddate, int subset_len, int *ires);
541 
553 int ibfms_f(double r8val);
554 
567 void openmb_f(int bufr_unit, char *c_subset, int iddate);
568 
579 void bvers_f(char *cverstr, int cverstr_len);
580 
591 void cmpmsg_f(char *cf);
592 
593 #ifdef __cplusplus
594 }
595 #endif
void closbf_f(int bufr_unit)
Close a previously opened file and disconnect it from the library.
void get_jmpb_f(int **jmpb_ptr, int *jmpb_size)
Get copy of the moda_tables JMPB array.
int isetprm_f(char *cprmnm, int ipval)
Define a customized parameter value for dynamic allocation.
int igetprm_f(char *cprmnm)
Get the current value of a parameter.
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.
void get_nval_f(int lun, int *num_nodes)
Get the number of values in the current subset.
void get_inode_f(int lun, int *start_node)
Get the bufr node idx for the start node of the subset.
void cobfl(char *bfl, char io)
Open a new file for reading or writing BUFR messages via a C language interface.
Definition: crwbmg.c:119
void cwbmg(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...
Definition: crwbmg.c:262
void get_val_f(int lun, double **val_ptr, int *val_size)
Get pointer to the moda_usrint VAL array.
int iupbs01_f(int *bufr, char *mnemonic)
Read a data value from Section 0 or Section 1 of a BUFR message.
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.
int igetmxby_f(void)
Get the maximum length of a BUFR message that can be written to an output file.
void maxout_f(int max0)
Define a customized maximum length for output BUFR messages.
int ireadsb_f(int bufr_unit)
Read the next data subset from a BUFR message.
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 alr...
void get_tag_f(char **tag_ptr, int *tag_len, int *mem_size)
Get copy of the moda_tables TAG array.
void get_inv_f(int lun, int **inv_ptr, int *inv_size)
Get pointer to the moda_usrint INV array.
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...
void status_f(int file_unit, int *lun, int *il, int *im)
Check whether a file is connected to the library.
void get_typ_f(char **typ_ptr, int *typ_len, int *mem_size)
Get copy of the moda_tables TYP array.
void get_link_f(int **link_ptr, int *link_size)
Get copy of the moda_tables LINK array.
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()...
Definition: crwbmg.c:194
int ireadmg_f(int bufr_unit, char *subset, int *iddate, int subset_len)
Read the next message from a BUFR file.
int ibfms_f(double r8val)
Test whether a data value is "missing".
void readsb_f(int bufr_unit, int *ires)
Read the next data subset from a BUFR message.
void get_isc_f(int **isc_ptr, int *isc_size)
Get copy of the moda_tables ISC array.
void mtinfo_f(const char *path, int file_unit_1, int file_unit_2)
Specify location of master BUFR tables on local file system.
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.
void readmg_f(int bufr_unit, char *subset, int *iddate, int subset_len, int *ires)
Read the next message from a BUFR file.
void openmb_f(int bufr_unit, char *c_subset, int iddate)
Open a new message for output in a BUFR file that was previously opened for writing.
void close_f(int unit)
Close a Fortran file from a C program.
void ccbfl(void)
Close all files that were opened via previous calls to function cobfl().
Definition: crwbmg.c:289
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.
void readlc_f(int lunit, const char *str_id, char *output_str, int output_str_len)
Function used to get long strings from the BUFR file.
int ireadns_f(int bufr_unit, char *subset, int *iddate, int subset_len)
Read the next data subset from a BUFR file.
void exitbufr_f()
Reset the library.
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.
void open_f(int unit, const char *filepath)
Open a Fortran file from a C program.
void delete_table_data_f()
Deletes the copies of the moda_tables arrays.
void nemtab_f(int lun, const char *mnemonic, int *descriptor, char *table_type, int *table_idx)
Get information about a descriptor.
void bvers_f(char *cverstr, int cverstr_len)
Get the version number of the NCEPLIBS-bufr software.
void readns_f(int bufr_unit, char *subset, int *iddate, int subset_len, int *ires)
Read the next data subset from a BUFR file.
void get_irf_f(int **irf_ptr, int *irf_size)
Get copy of the moda_tables IRF array.
void get_itp_f(int **itp_ptr, int *itp_size)
Get copy of the moda_tables ITP array.
void cmpmsg_f(char *cf)
Specify the use of compression when writing BUFR messages.