43void restd( f77int *lun, f77int *tddesc, f77int *nctddesc, f77int ctddesc[] )
47 f77int desc, ncdesc, cdesc[MAXNC];
48 f77int i, j, inum, itbd, ictbd;
49 f77int iscl, iref, ibit;
51 char tab, nemo[9], adn[7], cunit[25], cwork[31];
56 numtbd( lun, tddesc, nemo, &tab, &itbd, 9, 1 );
57 uptdd( &itbd, lun, &i0, &inum );
63 for ( i = 1; i <= inum; i++ ) {
64 uptdd( &itbd, lun, &i, &desc );
69 numtbd( lun, &desc, nemo, &tab, &ictbd, 9, 1 );
75 restd( lun, &desc, &ncdesc, cdesc );
77 if ( ( *nctddesc > 0 ) &&
78 ( ctddesc[(*nctddesc)-1] >
ifxy(
"101000", 6 ) ) &&
79 ( ctddesc[(*nctddesc)-1] <=
ifxy(
"101255", 6 ) ) ) {
85 cadn30( &ctddesc[(*nctddesc)-1], adn, 7 );
86 sprintf( cwork,
"%c%02ld%c%c%c",
87 adn[0], (
long) ncdesc, adn[3], adn[4], adn[5] );
88 strncpy( adn, cwork, 6 ); adn[6] =
'\0';
89 ctddesc[(*nctddesc)-1] =
ifxy( adn, 7 );
91 else if ( ( *nctddesc > 1 ) &&
92 ( ctddesc[(*nctddesc)-2] ==
ifxy(
"101000", 6 ) ) ) {
98 cadn30( &ctddesc[(*nctddesc)-2], adn, 7 );
99 sprintf( cwork,
"%c%02ld%c%c%c",
100 adn[0], (
long) ncdesc, adn[3], adn[4], adn[5] );
101 strncpy( adn, cwork, 6 ); adn[6] =
'\0';
102 ctddesc[(*nctddesc)-2] =
ifxy( adn, 7 );
107 for ( j = 0; j < ncdesc; j++ ) {
108 wrdesc( cdesc[j], ctddesc, nctddesc );
112 else if ( tab ==
'B' ) {
117 nemtbb( lun, &ictbd, cunit, &iscl, &iref, &ibit, 25 );
118 sprintf( cwork,
"%c%c%c%03ld",
'2',
'0',
'6', (
long) ibit );
119 strncpy( adn, cwork, 6 ); adn[6] =
'\0';
121 wrdesc( desc, ctddesc, nctddesc );
129 wrdesc( desc, ctddesc, nctddesc );
Define signatures to enable a number of BUFRLIB subprograms to be called directly from C application ...
subroutine cadn30(IDN, ADN)
This subroutine converts an FXY value from its bit-wise (integer) representation to its 6 character r...
function ifxy(ADSC)
This function converts an FXY value from its 6 character representation to its bit-wise (integer) rep...
function istdesc(IDN)
Given the bit-wise (integer) representation of a descriptor, this function determines whether the des...
subroutine nemtbb(LUN, ITAB, UNIT, ISCL, IREF, IBIT)
This subroutine returns information about a Table B descriptor from the internal DX BUFR tables.
subroutine numtbd(LUN, IDN, NEMO, TAB, IRET)
This subroutine searches for a descriptor within Table B and Table D of the internal DX BUFR tables.
void restd(f77int *lun, f77int *tddesc, f77int *nctddesc, f77int ctddesc[])
Given the bit-wise (integer) representation of a local (not WMO-standard) Table D descriptor,...
subroutine uptdd(ID, LUN, IENT, IRET)
THIS SUBROUTINE RETURNS THE BIT-WISE REPRESENTATION OF THE FXY VALUE CORRESPONDING TO,...
void wrdesc(f77int desc, f77int descary[], f77int *ndescary)
C C SUBPROGRAM: WRDESC C PRGMMR: ATOR ORG: NP12 DATE: 2004-08-18 C C ABSTRACT: GIVEN THE BIT-WISE REP...