NCEPLIBS-bufr  12.1.0
restd.c File Reference

Standardize a local Table D descriptor. More...

#include "bufrlib.h"

Go to the source code of this file.

Functions

void restd (int lun, int tddesc, int *nctddesc, int *ctddesc)
 Standardize a local Table D descriptor. More...
 
void wrdesc (int desc, int *descary, int *ndescary, int mxdescary)
 Maintain an array of descriptors. More...
 

Detailed Description

Standardize a local Table D descriptor.

Author
J. Ator
Date
2004-08-18

Definition in file restd.c.

Function Documentation

◆ restd()

void restd ( int  lun,
int  tddesc,
int *  nctddesc,
int *  ctddesc 
)

Standardize a local Table D descriptor.

Given the bit-wise (integer) representation of a local (not WMO-standard) Table D descriptor, this subroutine returns an equivalent array of WMO-standard child descriptors.

Any child descriptors which are themselves local Table D descriptors are automatically resolved via a recursive call to this same subroutine. This recursive process continues until all child descriptors are either WMO-standard descriptors (from Table B, Table C, Table D, or replication descriptors) or else are local Table B descriptors, in which case they are preceded with an appropriate 2-06-YYY Table C operator in the output array. The output array is then useable by any standard BUFR decoder program in order to interpret the same data values as were represented by the input local Table D descriptor.

Parameters
lun- File ID
tddesc- WMO bit-wise representation of FXY value for local Table D descriptor
nctddesc- Number of WMO-standard child descriptors returned in ctddesc
ctddesc- Array of WMO-standard child descriptors equivalent to tddesc
Author
J. Ator
Date
2004-08-18

Definition at line 73 of file restd.c.

References bort_f(), cadn30_f(), FXY_STR_LEN, moda_bitbuf::ibit, ifxy_f(), igetprm_f(), istdesc_f(), MIN_FXY_REPL, NEMO_STR_LEN, nemtbb_f(), numtbd_f(), restd(), UNIT_STR_LEN, uptdd_f(), and wrdesc().

Referenced by restd().

◆ wrdesc()

void wrdesc ( int  desc,
int *  descary,
int *  ndescary,
int  mxdescary 
)

Maintain an array of descriptors.

Given the WMO bit-wise representation of a descriptor, this routine adds it to an ongoing array of descriptors, after first making sure that there is enough room in the array.

If an array overflow occurs, then an appropriate error message will be written via bort().

Parameters
desc- WMO bit-wise representation of descriptor to be written into descary
descary- Array of descriptors
ndescary- Number of descriptors written so far into descary
mxdescary- Maximum number of descriptors that can be written into descary
Author
J. Ator
Date
2004-08-18

Definition at line 27 of file restd.c.

References bort_f().

Referenced by restd().