Skip to main content

grib/def/grib2/
table4.rs

1use grib_template_derive::{CodeTable, Dump, FixedSize, TryFromSlice, WriteToBuffer};
2
3#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
4#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_4_0_CodeTable_en.csv", format = wmo_grib2_tables)]
5#[dump(code_table)]
6pub struct ProductDefinitionTemplateNum(
7    /// Product definition template number (see Code table 4.0).
8    pub u16,
9);
10
11#[derive(
12    Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable, FixedSize,
13)]
14#[code_table(
15    file = "def/GRIB2/GRIB2_CodeFlag_4_1_CodeTable_en.csv",
16    format = wmo_grib2_tables,
17    context = crate::Grib2Context,
18    key = (context.discipline,),
19)]
20#[dump(code_table, context = crate::Grib2Context)]
21pub struct ParamCategory(
22    /// Parameter category (see Code Table 4.1).
23    pub u8,
24);
25
26#[derive(
27    Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable, FixedSize,
28)]
29#[code_table(
30    file = "def/GRIB2/GRIB2_CodeFlag_4_2_CodeTable_en.csv",
31    format = wmo_grib2_tables,
32    context = crate::ParameterContext,
33    key = (context.discipline, context.category),
34)]
35#[dump(code_table, context = crate::ParameterContext)]
36pub struct ParamNum(
37    /// Parameter number (see Code Table 4.2).
38    pub u8,
39);
40
41#[derive(
42    Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable, FixedSize,
43)]
44#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_4_3_CodeTable_en.csv", format = wmo_grib2_tables)]
45#[dump(code_table)]
46pub struct GeneratingProcessType(
47    /// Type of generating process (see Code Table 4.3).
48    pub u8,
49);
50
51#[derive(
52    Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable, FixedSize,
53)]
54#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_4_4_CodeTable_en.csv", format = wmo_grib2_tables)]
55#[dump(code_table)]
56pub struct TimeRangeUnit(
57    /// Unit of time range (see Code Table 4.4).
58    pub u8,
59);
60
61#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
62#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_4_5_CodeTable_en.csv", format = wmo_grib2_tables)]
63#[dump(code_table)]
64pub struct FixedSurfaceType(
65    /// Type of fixed surface (see Code Table 4.5).
66    pub u8,
67);
68
69#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
70#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_4_6_CodeTable_en.csv", format = wmo_grib2_tables)]
71#[dump(code_table)]
72pub struct EnsembleForecastType(
73    /// Type of ensemble forecast (see Code Table 4.6).
74    pub u8,
75);
76
77#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
78#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_4_7_CodeTable_en.csv", format = wmo_grib2_tables)]
79#[dump(code_table)]
80pub struct DerivedForecastType(
81    /// Derived forecast (see Code Table 4.7).
82    pub u8,
83);
84
85#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
86#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_4_9_CodeTable_en.csv", format = wmo_grib2_tables)]
87#[dump(code_table)]
88pub struct ProbabilityForecastType(
89    /// Probability type (see Code Table 4.9).
90    pub u8,
91);
92
93#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
94#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_4_10_CodeTable_en.csv", format = wmo_grib2_tables)]
95#[dump(code_table)]
96pub struct StatisticalProcessType(
97    /// Statistical process used to calculate the processed field from the
98    /// field at each time increment during the time range (see Code Table
99    /// 4.10).
100    pub u8,
101);
102
103#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
104#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_4_11_CodeTable_en.csv", format = wmo_grib2_tables)]
105#[dump(code_table)]
106pub struct TimeIncrementType(
107    /// Type of time increment between successive fields used in the
108    /// statistical processing (see Code Table 4.11).
109    pub u8,
110);