updated top-level README and version_decl for V4.4.2 (#1795)
[WRF.git] / external / io_grib1 / gribmap.h
blob24b56f1acac37e0aeaa8a7ed6ca750baed8b8cfb
1 #define MAX_LINE_CHARS 2500
2 #define MAX_PARAMS 256
4 #ifndef CRAY
5 # ifdef NOUNDERSCORE
6 # define LOAD_GRIB1_TABLES load_grib1_tables
7 # define GET_GRIB_PARAM get_grib_param
8 # define FREE_GRIBMAP free_gribmap
9 # define GET_GRIB1_TABLE_INFO_SIZE get_grib1_table_info_size
10 # define GET_GRIB1_TABLES_SIZE get_grib1_tables_size
11 # define READ_GRIBMAP read_gribmap
12 # else
13 # ifdef F2CSTYLE
14 # define LOAD_GRIB1_TABLES load_grib1_tables__
15 # define GET_GRIB_PARAM get_grib_param__
16 # define FREE_GRIBMAP free_gribmap__
17 # define GET_GRIB1_TABLES_SIZE get_grib1_tables_size__
18 # define READ_GRIBMAP read_gribmap__
19 # else
20 # define LOAD_GRIB1_TABLES load_grib1_tables_
21 # define GET_GRIB_PARAM get_grib_param_
22 # define FREE_GRIBMAP free_gribmap_
23 # define GET_GRIB1_TABLES_SIZE get_grib1_tables_size_
24 # define READ_GRIBMAP read_gribmap_
25 # endif
26 # endif
27 #endif
30 typedef struct {
31 int center;
32 int subcenter;
33 int parmtbl;
34 int parm_id[MAX_PARAMS];
35 int dec_sc_factor[MAX_PARAMS];
36 char **wrf_param[MAX_PARAMS];
37 int num_wrf_params[MAX_PARAMS];
38 int num_entries;
39 } Grib1_Table_Info;
41 typedef struct {
42 int num_tables;
43 Grib1_Table_Info *grib_table_info;
44 } Grib1_Tables;
47 int GET_GRIB_PARAM (Grib1_Tables *grib_tables, char *varname, int *center,
48 int *subcenter, int *parmtbl, int *tablenum, int *index,
49 int strlen1, int strlen2);
51 int GET_GRIB1_TABLES_SIZE (int *size);
53 int LOAD_GRIB1_TABLES (char filename[],
54 Grib1_Tables *grib_tables, int *ret, int strlen1);
56 Grib1_Tables *copy_grib_tables(Grib1_Tables *);