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;
93 for ( i = 1; i <= inum; i++ ) {
100 wrdesc(desc, ctddesc, nctddesc, maxnc);
112 if (!(cdesc = malloc(maxnc *
sizeof(
int))))
bort_f(
"RESTD FAILED ALLOCATING");
114 restd(lun, desc, &ncdesc, cdesc);
116 if ( ( *nctddesc > 0 ) &&
118 ( ctddesc[(*nctddesc)-1] <=
ifxy_f(
"101255") ) ) {
125 sprintf(cwork,
"%c%02d%c%c%c",
126 adn[0], ncdesc, adn[3], adn[4], adn[5]);
127 strncpy(adn, cwork, 6); adn[6] =
'\0';
128 ctddesc[(*nctddesc)-1] =
ifxy_f(adn);
130 else if ( ( *nctddesc > 1 ) &&
138 sprintf(cwork,
"%c%02d%c%c%c",
139 adn[0], ncdesc, adn[3], adn[4], adn[5]);
140 strncpy(adn, cwork, 6); adn[6] =
'\0';
141 ctddesc[(*nctddesc)-2] =
ifxy_f(adn);
146 for ( j = 0; j < ncdesc; j++ ) {
147 wrdesc(cdesc[j], ctddesc, nctddesc, maxnc);
165 sprintf(cwork,
"%c%c%c%03d",
'2',
'0',
'6',
ibit);
166 strncpy(adn, cwork, 6); adn[6] =
'\0';
168 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.
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.
#define FXY_MINR
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.