1 | typedef struct DATA_INPUT { |
---|
2 | unsigned short usProc_id; /* Generating Process ID Number (Table A) */ |
---|
3 | unsigned short usGrid_id; /* Grid Identification (Table B) */ |
---|
4 | unsigned short usParm_id; /* GRIB parameter id */ |
---|
5 | unsigned short usParm_sub_id; /* GRIB parameter sub-id */ |
---|
6 | unsigned short usLevel_id; /* GRIB level id */ |
---|
7 | int nLvl_1; /* 1st level value - scaled to an integer*/ |
---|
8 | int nLvl_2; /* 2nd level value - scaled to an integer*/ |
---|
9 | int nYear; /* year of data e.g. 1993 */ |
---|
10 | int nMonth; /* month of year e.g. 8 */ |
---|
11 | int nDay; /* day of month e.g. 31 */ |
---|
12 | int nHour; /* hour of day e.g. 0 */ |
---|
13 | int nMinute; /* minute of hour e.g. 0 */ |
---|
14 | int nSecond; /* second of minute e.g. 0 */ |
---|
15 | unsigned short usFcst_id; /* Forecast time unit id - Table 4 */ |
---|
16 | unsigned short usFcst_per1; /* forecast time 1 (tau) e.g. 0. */ |
---|
17 | unsigned short usFcst_per2; /* forecast time 2 (tau) e.g. 0. */ |
---|
18 | unsigned short usTime_range_id; /* Time range indicator - Table 5 */ |
---|
19 | unsigned short usTime_range_avg;/* Number in average */ |
---|
20 | unsigned short usTime_range_mis;/* Number missing from average */ |
---|
21 | int nDec_sc_fctr; /* Decimal scale factor */ |
---|
22 | /* WSI Extended PDS fields */ |
---|
23 | unsigned short PDS_41; /* Forecast time 1 unit id - Table 4 */ |
---|
24 | int PDS_42; /* forecast time 1 (up to 4 bytes) */ |
---|
25 | unsigned short PDS_46; /* Forecast time 2 unit id - Table 4 */ |
---|
26 | int PDS_47; /* forecast time 2 */ |
---|
27 | unsigned short PDS_51; /* Time range indicator - Table 5 */ |
---|
28 | unsigned short PDS_52; /* Top of atmosphere--used with sigma coord*/ |
---|
29 | } DATA_INPUT; |
---|
30 | |
---|
31 | typedef struct GEOM_IN { /* info from tables grid_reg_geom/as_reg_im */ |
---|
32 | char prjn_name[21]; /* projection name */ |
---|
33 | char stor_dsc[21]; /* (+x in +y)/(+x in -y)/(-y in +x)/etc */ |
---|
34 | long nx; /* count of columns */ |
---|
35 | long ny; /* count of rows */ |
---|
36 | double lat; /* lat of origin in degrees */ |
---|
37 | double lon; /* lon of origin in degrees */ |
---|
38 | double orig_ix; /* column # for origin, left column is 1 */ |
---|
39 | double orig_iy; /* row # for origin; top row is 1 */ |
---|
40 | double x_int_dis; /* distance interval between columns in km */ |
---|
41 | double y_int_dis; /* distance interval between rows in km */ |
---|
42 | double parm_1; /* geom parm 1, depends on projection |
---|
43 | * Spherical: j Direction Increment (Latitude) |
---|
44 | * Lambert:*/ |
---|
45 | double parm_2; /* geom parm 2, depends on projection */ |
---|
46 | double parm_3; /* geom parm 3, depends on projection */ |
---|
47 | /* Do NOT MODIFY parameters before this point */ |
---|
48 | /* Additional Parameters Required by GRIB */ |
---|
49 | double first_lat; /* latitude of grid point (1,1) */ |
---|
50 | double first_lon; /* longitude of grid point (1,1) */ |
---|
51 | double last_lat; /* latitude of grid point (nx,ny) */ |
---|
52 | double last_lon; /* longitude of grid point (nx,ny) */ |
---|
53 | unsigned short scan; /* Scan mode value from Table 8 */ |
---|
54 | unsigned short usRes_flag; /* Resolution and Component Flags (Table 7) */ |
---|
55 | } GEOM_IN; |
---|
56 | |
---|
57 | typedef struct USER_INPUT { /* user's input from input.dat */ |
---|
58 | /* PDS Section */ |
---|
59 | unsigned char chCase_id; /* User defined case ID (1 digit alphanumeric)*/ |
---|
60 | unsigned short usParm_tbl; /* GRIB Table Version Number */ |
---|
61 | unsigned short usSub_tbl; /* Local Table Version Number */ |
---|
62 | unsigned short usCenter_id; /* ID of Originating Center (Table 0) */ |
---|
63 | unsigned short usGds_bms_id;/* GDS and BMS Flag (Table 1) */ |
---|
64 | unsigned short usCenter_sub;/* Sub-Table Entry for originating Ctr (Tbl 0)*/ |
---|
65 | unsigned short usTrack_num; /* Tracking ID for data set */ |
---|
66 | unsigned short usBDS_flag; /* Binary Data Section Flag (Table 11) */ |
---|
67 | unsigned short usBit_pack_num; /* Number of bits into which data is packed*/ |
---|
68 | } USER_INPUT; |
---|