NCEPLIBS-bufr  12.2.0
All Data Structures Namespaces Files Functions Variables Macros Pages
bufrlib.h
Go to the documentation of this file.
1 
11 #include <stdio.h>
12 #include <stdlib.h>
13 #include <string.h>
14 #include <ctype.h>
15 
16 #include "bufr_interface.h"
17 
18 void arallocc(void);
19 void ardllocc(void);
20 void dlloctbf(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 FXY_MINR "101000"
38 
40 #define FXY_MINTD "300000"
41 
43 #define FXY_MAXTB "063255"
44 
46 #define FXY_DRP16 "360001"
47 
49 #define FXY_DRP8 "360002"
50 
52 #define FXY_DRP1 "360004"
53 
55 #define FXY_DRF16 "031002"
56 
58 #define FXY_DRF8 "031001"
59 
61 #define FXY_DRF1 "031000"
62 
64 #define NEMO_STR_LEN 8
65 
67 #define UNIT_STR_LEN 24
68 
70 #define BMOSTR "BUFR"
71 
73 #define BMCSTR "7777"
74 
87 void cadn30_f(int idn, char *adn, int adn_str_len);
88 
101 int igetntbi_f(int lun, char *table_type);
102 
114 void elemdx_f(char *card, int lun);
115 
130 void numtbd_f(int lun, int idn, char *nemo, int nemo_str_len, char *tab, int *iret);
131 
144 int ifxy_f(char *cfxy);
145 
162 void uptdd_f(int id, int lun, int ient, int *iret);
163 
177 int imrkopr_f(char *nemo);
178 
192 int istdesc_f(int idn);
193 
205 void strnum_f(char *str, int *num, int *iret);
206 
220 void stntbi_f(int n, int lun, char *numb, char *nemo, char *celsq);
221 
236 int igettdi_f(int iflag);
237 
252 void pktdd_f(int id, int lun, int idn, int *iret);
253 
263 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 dlloctbf(void)
Free all dynamically-allocated memory for internal storage of master Code/Flag table entries.
Definition: cfe.c:81
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 Table D descriptor within internal DX BUFR tables.
Definition: stseq.c:189
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:30
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:83
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