1 | User Tables Wesley Ebisuzaki |
---|
2 | ---- ------ |
---|
3 | |
---|
4 | GRIB files describe the contents (example, zonal wind, temperature) by |
---|
5 | a parameter table and parameter number. Since the size of the parameter |
---|
6 | table is limited to 255 entries, groups are finding (1) that they want |
---|
7 | to use their own parameter table and (2) large groups are finding that |
---|
8 | they have to use multiple parameter tables. |
---|
9 | |
---|
10 | The parameter table used by wgrib is determined by (v1.5.0 and later) |
---|
11 | |
---|
12 | use built-in tables |
---|
13 | use user-defined table if available |
---|
14 | use built-in NCEP-2 table (warning under certain conditions) |
---|
15 | |
---|
16 | Alternatively, if wgrib is compiled with the "-D P_TABLE_FIRST" |
---|
17 | option, then the search order is, |
---|
18 | |
---|
19 | use user-defined table if available |
---|
20 | use built-in tables |
---|
21 | use built-in NCEP-2 table (warning under certain conditions) |
---|
22 | |
---|
23 | [This is the preferred search order for foreign-language parameter tables.] |
---|
24 | |
---|
25 | |
---|
26 | The name of the user-defined table is searched for in |
---|
27 | |
---|
28 | 1) the environment variable "GRIBTAB" |
---|
29 | 2) the environment variable "gribtab" |
---|
30 | 3) the file gribtab |
---|
31 | |
---|
32 | Defining an environment variable depends on the operating system |
---|
33 | and on the shell. |
---|
34 | |
---|
35 | example |
---|
36 | export GRIBTAB=~/data/gribtab (bash) |
---|
37 | setenv GRIBTAB ~/data/gribtab (csh) |
---|
38 | GRIBTAB=$HOME/data/gribtab ; export GRIBTAB (sh) |
---|
39 | |
---|
40 | |
---|
41 | |
---|
42 | The format of the GRIBTAB file is |
---|
43 | |
---|
44 | ----------------------------------------------------------------------- |
---|
45 | -1:CENTER:SUBCENTER:PARAMETER_TABLE |
---|
46 | 0:name:comment |
---|
47 | 1:name:comment |
---|
48 | ... |
---|
49 | 255:name:comment |
---|
50 | |
---|
51 | -1:CENTER:SUBCENTER:PARAMETER_TABLE |
---|
52 | 0:name:comment |
---|
53 | 1:name:comment |
---|
54 | ... |
---|
55 | 255:name:comment |
---|
56 | |
---|
57 | (etc.) |
---|
58 | ----------------------------------------------------------------------- |
---|
59 | |
---|
60 | "CENTER" is number between 0 and 255 with -1 being a wildcard. |
---|
61 | "SUBCENTER" is number between 0 and 255 with -1 being a wildcard. |
---|
62 | "PARAMETER_TABLE" is number between 0 and 255 with -1 being a wildcard. |
---|
63 | "name" is a string with the variable name "TMP". |
---|
64 | "comment" is a string such describing the variable such as "temperature [K]" |
---|
65 | Any missing parameter lines will be given a generic name and comment. |
---|
66 | |
---|
67 | Each GRIB record contains the center (PDS octet 5), subcenter (PDS octet 26) |
---|
68 | and parameter_table (PDS octet 4). The names and comments from the |
---|
69 | first section to match the center-subcenter-parameter_name in the PDS |
---|
70 | are used. Currently the subcenter are not used in matching the |
---|
71 | built-in tables. This will probably change when sub-centers start using |
---|
72 | their own parameter tables. |
---|
73 | |
---|
74 | Policy |
---|
75 | |
---|
76 | The wgrib code is easily modified to add new built-in parameter tables. |
---|
77 | New tables will be added under the following conditions: a reasonable |
---|
78 | number of users, I don't have to type it in and the table is reasonably |
---|
79 | stable. (Rules subject to change.) |
---|
80 | |
---|