Functions | |
| int | read_tables (char *dir, int vmtab, int vltab, int subcent, int gencent) |
| Reads bufr tables from csv-files. | |
| void | show_desc (int f, int x, int y) |
| Prints the specified descriptor or all if f = 999. | |
| int | get_index (int typ, dd *descr) |
| Returns the index for the given descriptor and typ. | |
| int | read_tab_d (char *fname) |
| Reads bufr table d from a csv-files. | |
| int | read_tab_b (char *fname) |
| Reads bufr table b from a csv-files. | |
| void | free_descs (void) |
| Frees all memory that has been allocated for data descriptors. | |
| char * | get_unit (dd *d) |
| Returns the unit for a given data descriptor. | |
| int read_tables | ( | char * | dir, | |
| int | vmtab, | |||
| int | vltab, | |||
| int | subcent, | |||
| int | gencent | |||
| ) |
This function reads the descriptor tables from csv-files and stores the descriptors in a global array des. Memory for the descriptors is allocated by this function and has to be freed using free_descs.
The filenames are generated by this function and have the form bufrtab{b|d}_Y.csv or loctab{b|d}_X_Y.csv where X is a value calculated of the originating center and subcenter. (X = subcent * 256 + gencent) Y is the table version.
| [in] | dir | The directory where to search for tables, if NULL the function uses the current directory |
| [in] | vmtab | Master table version number |
| [in] | vltab | Local table version number. |
| [in] | subcent | Originating/generating subcenter |
| [in] | gencent | Originating/generating center |
| void show_desc | ( | int | f, | |
| int | x, | |||
| int | y | |||
| ) |
| int get_index | ( | int | typ, | |
| dd * | descr | |||
| ) |
| int read_tab_d | ( | char * | fname | ) |
This function reads a sequence descriptor table (d) from a csv-file and stores the descriptors in a global array des. Memory for the descriptors is allocated by this function and has to be freed using free_descs.
| [in] | fname | The name of a csv-file. |
| int read_tab_b | ( | char * | fname | ) |
This function reads an element descriptor table (b) from a csv-file and stores the descriptors in a global array des. Memory for the descriptors is allocated by this function and has to be freed using free_descs.
| [in] | fname | The name of the csv-file. |
| void free_descs | ( | void | ) |
This function frees all memory that has been allocated for data descriptors
| char* get_unit | ( | dd * | d | ) |
1.5.4