source: trunk/ToBeReviewed/LECTURE/GRIB/TABLES/usertables.txt @ 67

Last change on this file since 67 was 67, checked in by pinsard, 18 years ago

miscellaneous modifications according to cerbere.lodyc.jussieu.fr: /usr/home/smasson/SAXO_RD/

  • Property svn:executable set to *
File size: 2.7 KB
Line 
1                       User Tables               Wesley Ebisuzaki
2                       ---- ------
3
4GRIB files describe the contents (example, zonal wind, temperature) by
5a parameter table and parameter number.  Since the size of the parameter
6table is limited to 255 entries, groups are finding (1) that they want
7to use their own parameter table and (2) large groups are finding that
8they have to use multiple parameter tables. 
9
10The 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
16Alternatively, if wgrib is compiled with the "-D P_TABLE_FIRST"
17option, 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
26The 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
32Defining an environment variable depends on the operating system
33and 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
42The format of the GRIBTAB file is
43
44-----------------------------------------------------------------------
45-1:CENTER:SUBCENTER:PARAMETER_TABLE
460:name:comment
471:name:comment
48...
49255:name:comment
50
51-1:CENTER:SUBCENTER:PARAMETER_TABLE
520:name:comment
531:name:comment
54...
55255: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]"
65Any missing parameter lines will be given a generic name and comment.
66
67Each GRIB record contains the center (PDS octet 5), subcenter (PDS octet 26)
68and parameter_table (PDS octet 4).  The names and comments from the
69first section to match the center-subcenter-parameter_name in the PDS
70are used.  Currently the subcenter are not used in matching the
71built-in tables.  This will probably change when sub-centers start using
72their own parameter tables.
73
74                                Policy
75
76The wgrib code is easily modified to add new built-in parameter tables.
77New tables will be added under the following conditions: a reasonable
78number of users, I don't have to type it in and the table is reasonably
79stable.  (Rules subject to change.)
80
Note: See TracBrowser for help on using the repository browser.