NCEPLIBS-bufr  12.0.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 void bort_exit(void);
30 int icvidx(int ii, int jj, int numjj);
31 void wrdesc(int desc, int *descary, int *ndescary);
32 void restd(int lunb, int tddesc, int *nctddesc, int *ctddesc);
33 void stseq(int lun, int *irepct, int idn, char *nemo, char *cseq, int *cdesc, int ncdesc);
34 
37 #define NFILES 32
38 
43 #define MAXCD 250
44 
47 #define MAXNC 600
48 
51 #define MXNAF 4
52 
54 #define FXY_STR_LEN 6
55 
57 #define MIN_FXY_REPL "101000"
58 
60 #define MIN_FXY_TABLED "300000"
61 
63 #define MAX_FXY_TABLEB "063255"
64 
66 #define NEMO_STR_LEN 8
67 
69 #define UNIT_STR_LEN 24
70 
72 #define VERS_STR_LEN 8
73 
86 void cadn30_f(int idn, char *adn, int adn_str_len);
87 
100 int igetntbi_f(int lun, char *table_type);
101 
113 void elemdx_f(char *card, int lun);
114 
129 void numtbd_f(int lun, int idn, char *nemo, int nemo_str_len, char *tab, int *iret);
130 
143 int ifxy_f(char *cfxy);
144 
161 void uptdd_f(int id, int lun, int ient, int *iret);
162 
176 int imrkopr_f(char *nemo);
177 
191 int istdesc_f(int idn);
192 
204 void strnum_f(char *str, int *num, int *iret);
205 
219 void stntbi_f(int n, int lun, char *numb, char *nemo, char *celsq);
220 
235 int igettdi_f(int iflag);
236 
251 void pktdd_f(int id, int lun, int idn, int *iret);
252 
262 void bort_f(char *errstr);
263 
271 void wrdlen_f(void);
272 
286 int iupb_f(int *mbay, int nbyt, int nbit);
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 wrdlen_f(void)
Determine important information about the local machine.
void bort_exit(void)
This subroutine terminates the application program with a non-zero status code.
Definition: bort_exit.c:16
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:111
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:39
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
int iupb_f(int *mbay, int nbyt, int nbit)
Decode an integer value from an integer array.
void ardllocc(void)
Free all dynamically-allocated memory within internal C language arrays.
Definition: ardllocc.c:21
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 wrdesc(int desc, int *descary, int *ndescary)
Maintain an array of descriptors.
Definition: wrdesc.c:27
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
integer, dimension(:,:), allocatable mbay
Current BUFR message for each internal I/O stream.
integer, dimension(:), allocatable nbit
Length (in bits) of each packed data value in data subset.