[1] | 1 | #define MAX_LINE_CHARS 2500 |
---|
| 2 | #define MAX_PARAMS 256 |
---|
| 3 | |
---|
| 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 |
---|
| 28 | |
---|
| 29 | |
---|
| 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; |
---|
| 40 | |
---|
| 41 | typedef struct { |
---|
| 42 | int num_tables; |
---|
| 43 | Grib1_Table_Info *grib_table_info; |
---|
| 44 | } Grib1_Tables; |
---|
| 45 | |
---|
| 46 | |
---|
| 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); |
---|
| 50 | |
---|
| 51 | int GET_GRIB1_TABLES_SIZE (int *size); |
---|
| 52 | |
---|
| 53 | int LOAD_GRIB1_TABLES (char filename[], |
---|
| 54 | Grib1_Tables *grib_tables, int *ret, int strlen1); |
---|
| 55 | |
---|
| 56 | Grib1_Tables *copy_grib_tables(Grib1_Tables *); |
---|