NCEPLIBS-bufr  12.1.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 
111  int ireadsb_f(int bufr_unit);
112 
127  void ufbint_f(int bufr_unit, void** c_data, int dim_1, int dim_2,
128  int* iret, const char* table_b_mnemonic);
129 
144  void ufbrep_f(int bufr_unit, void** c_data, int dim_1, int dim_2,
145  int* iret, const char* table_b_mnemonic);
146 
158  void mtinfo_f(const char* path, int file_unit_1, int file_unit_2);
159 
172  void status_f(int file_unit, int* lun, int* il, int* im);
173 
189  void nemdefs_f(int file_unit,
190  const char* mnemonic,
191  char* unit_c,
192  int unit_str_len,
193  char* desc_c,
194  int desc_str_len,
195  int* iret);
196 
213  void nemspecs_f(int file_unit,
214  const char* mnemonic,
215  int mnemonic_idx,
216  int* scale,
217  int* reference,
218  int* bits,
219  int* iret);
220 
234  void nemtab_f(int lun,
235  const char* mnemonic,
236  int* descriptor,
237  char* table_type,
238  int* table_idx);
239 
255  void nemtbb_f(int lun,
256  int table_idx,
257  char* unit_str,
258  int unit_str_len,
259  int* scale,
260  int* reference,
261  int* bits);
262 
271  void get_isc_f(int** isc_ptr, int* isc_size);
272 
281  void get_link_f(int** link_ptr, int* link_size);
282 
291  void get_itp_f(int** itp_ptr, int* itp_size);
292 
302  void get_typ_f(char** typ_ptr, int* typ_len, int* mem_size);
303 
313  void get_tag_f(char** tag_ptr, int* tag_len, int* mem_size);
314 
323  void get_jmpb_f(int** jmpb_ptr, int* jmpb_size);
324 
325 
334  void get_irf_f(int** irf_ptr, int* irf_size);
335 
344  void get_inode_f(int lun, int* start_node);
345 
354  void get_nval_f(int lun, int* num_nodes);
355 
365  void get_val_f(int lun, double** val_ptr, int* val_size);
366 
376  void get_inv_f(int lun, int** inv_ptr, int* inv_size);
377 
390  void readlc_f(int lunit, const char* str_id, char* output_str, int output_str_len);
391 
398 
411  int iupbs01_f(int *bufr, char* mnemonic);
412 
422  int igetprm_f(char *cprmnm);
423 
434  int isetprm_f(char *cprmnm, int ipval);
435 
446  void maxout_f(int max0);
447 
457  int igetmxby_f(void);
458 
473  void ufbseq_f(int bufr_unit, void** c_data, int dim_1, int dim_2,
474  int* iret, const char* table_d_mnemonic);
475 
492  int ireadns_f(int bufr_unit, char* subset, int* iddate, int subset_len);
493 
505  int ibfms_f(double r8val);
506 
519  void openmb_f(int bufr_unit, char *c_subset, int iddate);
520 
531  void bvers_f(char *cverstr, int cverstr_len);
532 
543  void cmpmsg_f(char *cf);
544 
545 #ifdef __cplusplus
546 }
547 #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:120
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:263
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:195
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 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 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:290
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 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.