27 wrdesc(
int desc,
int *descary,
int *ndescary,
int mxdescary)
34 if ( ( *ndescary + 1 ) < mxdescary ) {
35 descary[(*ndescary)++] = desc;
38 sprintf(errstr,
"BUFRLIB: WRDESC - EXPANDED SECTION 3 CONTAINS"
39 " MORE THAN %d DESCRIPTORS", mxdescary);
73 restd(
int lun,
int tddesc,
int *nctddesc,
int *ctddesc)
75 int maxnc, desc, ncdesc, *cdesc;
76 int i, j, inum, itbd, ictbd;
92 for ( i = 1; i <= inum; i++ ) {
104 if (!(cdesc = malloc(maxnc *
sizeof(
int))))
bort_f(
"RESTD FAILED ALLOCATING");
106 restd(lun, desc, &ncdesc, cdesc);
108 if ( ( *nctddesc > 0 ) &&
110 ( ctddesc[(*nctddesc)-1] <=
ifxy_f(
"101255") ) ) {
117 sprintf(cwork,
"%c%02d%c%c%c",
118 adn[0], ncdesc, adn[3], adn[4], adn[5]);
119 strncpy(adn, cwork, 6); adn[6] =
'\0';
120 ctddesc[(*nctddesc)-1] =
ifxy_f(adn);
122 else if ( ( *nctddesc > 1 ) &&
130 sprintf(cwork,
"%c%02d%c%c%c",
131 adn[0], ncdesc, adn[3], adn[4], adn[5]);
132 strncpy(adn, cwork, 6); adn[6] =
'\0';
133 ctddesc[(*nctddesc)-2] =
ifxy_f(adn);
138 for ( j = 0; j < ncdesc; j++ ) {
139 wrdesc(cdesc[j], ctddesc, nctddesc, maxnc);
150 sprintf(cwork,
"%c%c%c%03d",
'2',
'0',
'6',
ibit);
151 strncpy(adn, cwork, 6); adn[6] =
'\0';
153 wrdesc(desc, ctddesc, nctddesc, maxnc);
161 wrdesc(desc, ctddesc, nctddesc, maxnc);
int igetprm_f(char *cprmnm)
Get the current value of a parameter.
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.
Enable a number of NCEPLIBS-bufr subprograms to be called from within the C part of the library.
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.
#define FXY_STR_LEN
Size of a character string needed to store an FXY value.
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.
#define MIN_FXY_REPL
Character string containing minimum FXY value for a replication descriptor.
#define UNIT_STR_LEN
Size of a character string needed to store the units of a Table B descriptor.
int ifxy_f(char *cfxy)
Convert an FXY value from its 6 character representation to its WMO bit-wise representation.
#define NEMO_STR_LEN
Size of a character string needed to store a mnemonic.
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.
integer ibit
Bit pointer within ibay.
void wrdesc(int desc, int *descary, int *ndescary, int mxdescary)
Maintain an array of descriptors.
void restd(int lun, int tddesc, int *nctddesc, int *ctddesc)
Standardize a local Table D descriptor.