Debian Codegraph @

frmts/grib/degrib/README.TXT

raw
1 Provenance
2 ----------
3
4 This directory contains a *modified* version of degrib 2.14:
5 http://www.mdl.nws.noaa.gov/~degrib/download/archive/degrib-20171016.tar.gz
6 With metaname.cpp update to degrib 2.25:
7 https://lamp.mdl.nws.noaa.gov/lamp/Data/degrib/download/archive/degrib-20200921.tar.gz
8 (accessed from https://vlab.noaa.gov/web/mdl/degrib-archive)
9
10 and a *modified* version of g2clib 1.6.0:
11 http://www.nco.ncep.noaa.gov/pmb/codes/GRIB2/g2clib-1.6.0.tar (Last updated: 02/18/2016)
12
13 Note: the degrib-20171016.tar.gz includes a bundled version of the g2clib library,
14 at version 1.0.5
15
16 Up-to-date versions of degrib can be found at
17 https://www.weather.gov/mdl/degrib_archive
18 https://sats.nws.noaa.gov/~degrib/download/archive
19
20 Up-to-date versions of g2clib can be found at
21 http://www.nco.ncep.noaa.gov/pmb/codes/GRIB2/
22
23
24 GRIB2 tables
25 ------------
26
27 Starting with GDAL 3.5, GRIB2 tables 4.2 (Parameter Number by Product discipline
28 and Parameter category) and 4.5 (Fixed surface types and units) are available as
29 CSV files in the "data" resource directory of GDAL.
30
31 They result from a merge between tables that used to be hardcoded in degrib
32 metaname.cpp file (those files have been extracted with the extract_tables.py
33 script run on metaname.cpp file, before removing the tables from it), and which
34 are located in frmts/grib/degrib/data, with CSV tables originating from WMO
35 (https://github.com/wmo-im/GRIB2). The merge is done with the merge_degrib_and_wmo_tables.py
36 script. To update to a newer version of the WMO tables, update the wmo_github_tag
37 variable at the top of the script.
38
39 When adding a new table, it must be referenced in the GDAL_DATA_FILES variable
40 of the frmts/grib/CMakeLists.txt file, to be installed.
41
42 The following tables can be found:
43
44 * grib2_center.csv: Content of Table 0 "National/International originating centers"
45 (https://www.nco.ncep.noaa.gov/pmb/docs/on388/table0.html)
46
47 That table has the following columns:
48 - code: Index between 0 and 255 of the originating center
49 - name: Name of the originating center
50
51 * grib2_subcenter.csv: Content of Table C "National subcenters"
52 (https://www.nco.ncep.noaa.gov/pmb/docs/on388/tablec.html)
53
54 That table has the following columns:
55 - center_code: Index between 0 and 255 of the originating center
56 - subcenter_code: Index between 0 and 255 of the national subcenter
57 - name: Name of the national subcenter
58
59 * grib2_table_4_2_{product_type}_{parameter_category}.csv: Content of Table 4.2 for
60 product_type and parameter_category. e.g grib2_table_4_2_0_1.csv corresponds to
61 https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-2-0-1.shtml,
62 that is product_type=0=Meteorological products and
63 parameter_category=1=Moisture category.
64
65 Those tables have the following columns:
66 - subcat: Index between 0 and 255 of the parameter
67 - short_name: Short parameter name
68 - name: Longer parameter name
69 - unit: Parameter unit
70 - unit_conv: Unit conversion rule, whose values can be one of:
71 + UC_NONE: No conversion allowed
72 + UC_K2F: Kelvin degrees are converted to Fahrenheit (if English unit system)
73 or Celsius (metric system)
74 + UC_M2Feet: Meters are converted to Feet if English unit system
75 + UC_M2Inch: Meters are converted to Inch if English unit system
76 + UC_MS2Knots: m/s are converted to Knots if English unit system
77 + UC_LOG10: log10(x) is converted to x if English or metric unit system
78 + UC_UVIndex: multiply Watts/ m**2 by 40 for the UV index if English unit system
79 + UC_M2StatuteMile: Meters are converted to Statute Mile if English unit system
80
81 * grib2_table_4_2_local_index.csv: That table identifies for various (center, subcenter)
82 a local table that contains parameter definitions for parameters that are
83 in the range of codes reserved for local use. That index table is sparsely populated.
84
85 That table has the following columns:
86 - center_code: Index between 0 and 255 of the originating center
87 - subcenter_code: Index between 0 and 255 of the national subcenter
88 - filename: Filename of the local table, typically named grib2_table_4_2_local_{center_name}.csv
89
90 subcenter_code might be an empty string to match all subcenters of a given center.
91 Note that records are processed from the top to the bottom of the file.
92 Consider the following content:
93
94 center_code subcenter_code filename
95 7 5 grib2_table_4_2_local_HPC.csv
96 7 grib2_table_4_2_local_NCEP.csv
97
98 This means that the NCEP table will be used for center_code=7, unless
99 subcenter_code=5 in which case the HPC table will be used.
100
101 * grib2_table_4_2_local_{center_name}.csv: Those tables contain parameter definitions
102 that are specific to a center/subcenter.
103
104 Those tables have the following columns:
105 - prod: Index of the product type
106 - cat: Index of the parameter category
107 - subcat: Index between 0 and 255 of the parameter
108 - short_name: Short parameter name
109 - name: Longer parameter name
110 - unit: Parameter unit
111 - unit_conv: Unit conversion rule