bufr2synop 0.24.0
|
This file has the code to read bufr files from WMO csv files. More...
#include "bufrdeco.h"
Go to the source code of this file.
Functions | |
int | get_wmo_tablenames (struct bufrdeco *b) |
Get the complete pathnames for WMO csv table files needed by a bufr message. More... | |
int | bufr_read_tables (struct bufrdeco *b) |
Read the tables according with bufr file data from a bufr table directory. More... | |
int | bufrdeco_store_tables (struct bufr_tables **t, struct bufr_tables_cache *c, uint8_t ver) |
Init an element of array c->tab[] if still not allocated. If allocated clean it and set *t pointing to this element. More... | |
int | bufrdeco_cache_tables_search (struct bufr_tables_cache *c, uint8_t ver) |
Search a struct bufr_tables in bufr_tables_cache. More... | |
int | bufrdeco_free_cache_tables (struct bufr_tables_cache *c) |
deallocate and clean a bufr_tables_cache More... | |
Variables | |
const char | DEFAULT_BUFRTABLES_WMO_CSV_DIR1 [] = "/usr/local/share/bufr2synop/" |
const char | DEFAULT_BUFRTABLES_WMO_CSV_DIR2 [] = "/usr/share/bufr2synop/" |
This file has the code to read bufr files from WMO csv files.
Definition in file bufrdeco_wmo.c.
int bufr_read_tables | ( | struct bufrdeco * | b | ) |
Read the tables according with bufr file data from a bufr table directory.
b | basic struct with needed data |
The default directories where to search bufr tables are stored in DEFAULT_BUFRTABLES_WMO_CSV_DIR1 and DEFAULT_BUFRTABLES_WMO_CSV_DIR2
Definition at line 162 of file bufrdeco_wmo.c.
References bufr_tables::b, bufr_read_tableB(), bufr_read_tableC(), bufr_read_tableD(), bufrdeco_assert, bufrdeco_cache_tables_search(), bufrdeco_init_tables(), bufrdeco_store_tables(), BUFRDECO_USE_TABLES_CACHE, bufrdeco::cache, bufr_tableB_decoded_item::changed, bufrdeco::error, get_wmo_tablenames(), bufr_tableB::item, bufrdeco::mask, bufr_sec1::master_version, bufr_tableB_decoded_item::nbits, bufr_tableB_decoded_item::nbits_ori, bufr_tables_cache::next, bufr_tableB::nlines, bufr_tableB_decoded_item::reference, bufr_tableB_decoded_item::reference_ori, bufr_tableB_decoded_item::scale, bufr_tableB_decoded_item::scale_ori, bufrdeco::sec1, bufr_tables_cache::tab, and bufrdeco::tables.
Referenced by bufrdeco_read_buffer().
int bufrdeco_cache_tables_search | ( | struct bufr_tables_cache * | c, |
uint8_t | ver | ||
) |
Search a struct bufr_tables in bufr_tables_cache.
c | pointer to the struct bufr_tables_cache where to search |
ver | small int with the master version acting as a key in the seardch |
Definition at line 304 of file bufrdeco_wmo.c.
References BUFRDECO_TABLES_CACHE_SIZE, and bufr_tables_cache::ver.
Referenced by bufr_read_tables().
int bufrdeco_free_cache_tables | ( | struct bufr_tables_cache * | c | ) |
deallocate and clean a bufr_tables_cache
c | pointer to the struct to clean |
Definition at line 322 of file bufrdeco_wmo.c.
References BUFRDECO_TABLES_CACHE_SIZE, and bufr_tables_cache::tab.
Referenced by bufrdeco_close().
int bufrdeco_store_tables | ( | struct bufr_tables ** | t, |
struct bufr_tables_cache * | c, | ||
uint8_t | ver | ||
) |
Init an element of array c->tab[] if still not allocated. If allocated clean it and set *t pointing to this element.
t | pointer to array of struct bufr_tables |
c | pointer ti struct bufr_tables_cache |
ver | version of tables acting as key |
Definition at line 269 of file bufrdeco_wmo.c.
References bufrdeco_init_tables(), BUFRDECO_TABLES_CACHE_SIZE, bufr_tables_cache::next, bufr_tables_cache::nt, bufr_tables_cache::tab, and bufr_tables_cache::ver.
Referenced by bufr_read_tables().
int get_wmo_tablenames | ( | struct bufrdeco * | b | ) |
Get the complete pathnames for WMO csv table files needed by a bufr message.
b | pointer for a struct bufrdeco |
For WMO files this format is adopted BUFR_XX_Y_Z_TableB_en for table B BUFR_XX_Y_Z_CodeFlag for Code table and Flag table. This is equivalent to table C in ECMWF package BUFR_XX_Y_Z_TableD_en for table D
XX is the Version number of master table used Y is the revision (currently ignored) Z is minor revision (currently ignored)
Definition at line 47 of file bufrdeco_wmo.c.
References bufr_tables::b, bufrdeco_assert, BUFRDECO_PATH_LENGTH, bufrdeco::bufrtables_dir, bufr_tables::c, bufr_tables::d, DEFAULT_BUFRTABLES_WMO_CSV_DIR1, DEFAULT_BUFRTABLES_WMO_CSV_DIR2, bufr_sec1::master_version, bufr_tableB::path, bufr_tableC::path, bufr_tableD::path, bufrdeco::sec1, and bufrdeco::tables.
Referenced by bufr_read_tables().
const char DEFAULT_BUFRTABLES_WMO_CSV_DIR1[] = "/usr/local/share/bufr2synop/" |
And these are the default directories when using WMO csv table files
Definition at line 29 of file bufrdeco_wmo.c.
Referenced by get_wmo_tablenames().
const char DEFAULT_BUFRTABLES_WMO_CSV_DIR2[] = "/usr/share/bufr2synop/" |
Definition at line 30 of file bufrdeco_wmo.c.
Referenced by get_wmo_tablenames().