NCEPLIBS-bufr  12.1.0
bufrlib.h
Go to the documentation of this file.
1 
12 #include <stdio.h>
13 #include <stdlib.h>
14 #include <string.h>
15 #include <ctype.h>
16 
17 #include "bufr_interface.h"
18 
19 void arallocc(void);
20 void ardllocc(void);
21 void openrb(int nfile, char *ufile);
22 void openwb(int nfile, char *ufile);
23 void openab(int nfile, char *ufile);
24 void backbufr(int nfile);
25 void cewind(int nfile);
26 void closfb(int nfile);
27 int crdbufr(int nfile, int *bufr, int mxwrd);
28 void cwrbufr(int nfile, int *bufr, int nwrd);
29 int icvidx(int ii, int jj, int numjj);
30 void restd(int lunb, int tddesc, int *nctddesc, int *ctddesc);
31 void stseq(int lun, int *irepct, int idn, char *nemo, char *cseq, int *cdesc, int ncdesc);
32 
34 #define FXY_STR_LEN 6
35 
37 #define MIN_FXY_REPL "101000"
38 
40 #define MIN_FXY_TABLED "300000"
41 
43 #define MAX_FXY_TABLEB "063255"
44 
46 #define NEMO_STR_LEN 8
47 
49 #define UNIT_STR_LEN 24
50 
63 void cadn30_f(int idn, char *adn, int adn_str_len);
64 
77 int igetntbi_f(int lun, char *table_type);
78 
90 void elemdx_f(char *card, int lun);
91 
106 void numtbd_f(int lun, int idn, char *nemo, int nemo_str_len, char *tab, int *iret);
107 
120 int ifxy_f(char *cfxy);
121 
138 void uptdd_f(int id, int lun, int ient, int *iret);
139 
153 int imrkopr_f(char *nemo);
154 
168 int istdesc_f(int idn);
169 
181 void strnum_f(char *str, int *num, int *iret);
182 
196 void stntbi_f(int n, int lun, char *numb, char *nemo, char *celsq);
197 
212 int igettdi_f(int iflag);
213 
228 void pktdd_f(int id, int lun, int idn, int *iret);
229 
239 void bort_f(char *errstr);
Enable a number of NCEPLIBS-bufr subprograms to be called from within C and C++ application programs.
int igettdi_f(int iflag)
Get the next usable Table D index for the current master table, or reset the index.
void cadn30_f(int idn, char *adn, int adn_str_len)
Convert an FXY value from its WMO bit-wise representation to its six-character representation.
void elemdx_f(char *card, int lun)
Decode the scale factor, reference value, bit width, and units from a Table B mnemonic definition.
int imrkopr_f(char *nemo)
Check whether a specified mnemonic is a Table C marker operator.
void numtbd_f(int lun, int idn, char *nemo, int nemo_str_len, char *tab, int *iret)
Search for a Table B or Table D descriptor within the internal DX BUFR tables.
void bort_f(char *errstr)
Log one error message and abort application program.
void stseq(int lun, int *irepct, int idn, char *nemo, char *cseq, int *cdesc, int ncdesc)
Store information about a standard Table D descriptor within internal DX BUFR tables.
Definition: stseq.c:107
void stntbi_f(int n, int lun, char *numb, char *nemo, char *celsq)
Store a new entry within the internal BUFR Table B or D.
void closfb(int nfile)
Close a previously opened BUFR file.
Definition: cread.c:92
int crdbufr(int nfile, int *bufr, int mxwrd)
Read the next message from a BUFR file that was previously opened for reading.
Definition: cread.c:114
void openab(int nfile, char *ufile)
Open a new file for appending BUFR messages.
Definition: cread.c:56
void cwrbufr(int nfile, int *bufr, int nwrd)
Write a BUFR message into a file that was previously opened for writing.
Definition: cread.c:199
void arallocc(void)
Dynamically allocate C language arrays.
Definition: arallocc.c:29
int ifxy_f(char *cfxy)
Convert an FXY value from its 6 character representation to its WMO bit-wise representation.
void restd(int lunb, int tddesc, int *nctddesc, int *ctddesc)
Standardize a local Table D descriptor.
Definition: restd.c:73
void openwb(int nfile, char *ufile)
Open a new file for writing BUFR messages.
Definition: cread.c:43
void strnum_f(char *str, int *num, int *iret)
Decode an integer from a character string.
void openrb(int nfile, char *ufile)
Open a new file for reading BUFR messages.
Definition: cread.c:30
int icvidx(int ii, int jj, int numjj)
Computes a unique 1-dimensional array index from 2-dimensional indices.
Definition: icvidx.c:22
void ardllocc(void)
Free all memory that was dynamically allocated during a previous call to subroutine arallocc().
Definition: arallocc.c:90
void pktdd_f(int id, int lun, int idn, int *iret)
Store information about a child mnemonic within the internal arrays.
int igetntbi_f(int lun, char *table_type)
Get the next index for storing an entry within an internal DX BUFR table.
void backbufr(int nfile)
Backspace a BUFR file by one BUFR message.
Definition: cread.c:68
void uptdd_f(int id, int lun, int ient, int *iret)
Get the WMO bit-wise representation of the FXY value corresponding to a child mnemonic of a Table D s...
int istdesc_f(int idn)
Check whether a descriptor is WMO-standard.
void cewind(int nfile)
Rewind a BUFR file back to its beginning.
Definition: cread.c:80