Skip to main content

grib/def/grib2/
table5.rs

1use grib_template_derive::{CodeTable, Dump, TryFromSlice, WriteToBuffer};
2
3#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
4#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_5_0_CodeTable_en.csv", format = wmo_grib2_tables)]
5#[dump(code_table)]
6pub struct DataRepresentationTemplateNum(
7    /// Data representation template number (see Code table 5.0).
8    pub u16,
9);
10
11#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
12#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_5_1_CodeTable_en.csv", format = wmo_grib2_tables)]
13#[dump(code_table)]
14pub struct OriginalFieldValueType(
15    /// Type of original field values (see Code table 5.1).
16    pub u8,
17);
18
19#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
20#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_5_2_CodeTable_en.csv", format = wmo_grib2_tables)]
21#[dump(code_table)]
22pub struct MatrixCoordinateValueFuncDefinition(
23    /// Coordinate value definition (Code table 5.2).
24    pub u8,
25);
26
27#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
28#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_5_3_CodeTable_en.csv", format = wmo_grib2_tables)]
29#[dump(code_table)]
30pub struct MatrixCoordinateParam(
31    /// Physical significance (Code table 5.3).
32    pub u8,
33);
34
35#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
36#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_5_4_CodeTable_en.csv", format = wmo_grib2_tables)]
37#[dump(code_table)]
38pub struct GroupSplittingMethod(
39    /// Group splitting method used (see Code table 5.4).
40    pub u8,
41);
42
43#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
44#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_5_5_CodeTable_en.csv", format = wmo_grib2_tables)]
45#[dump(code_table)]
46pub struct ComplexPackingMissingValueManagement(
47    /// Missing value management used (see Code table 5.5).
48    pub u8,
49);
50
51#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
52#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_5_6_CodeTable_en.csv", format = wmo_grib2_tables)]
53#[dump(code_table)]
54pub struct SpatialDifferencingOrder(
55    /// Order of spatial differencing (see Code table 5.6).
56    pub u8,
57);
58
59crate::helpers::code_labels! {
60    impl SpatialDifferencingOrder {
61        /// First-order spatial differencing.
62        FirstOrder = 1,
63        /// Second-order spatial differencing.
64        SecondOrder = 2,
65    }
66}
67
68#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
69#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_5_7_CodeTable_en.csv", format = wmo_grib2_tables)]
70#[dump(code_table)]
71pub struct FloatPrecision(
72    /// Precision (see Code table 5.7).
73    pub u8,
74);
75
76#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
77#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_5_25_CodeTable_en.csv", format = wmo_grib2_tables)]
78#[dump(code_table)]
79pub struct BiFourierSubtruncationType(
80    /// Bi-Fourier sub-truncation type (see Code table 5.25).
81    pub u8,
82);
83
84#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump)]
85pub struct BiFourierPackMode(
86    /// Packing mode for axes (see Code table 5.26).
87    pub u8,
88);
89
90#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
91#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_5_40_CodeTable_en.csv", format = wmo_grib2_tables)]
92#[dump(code_table)]
93pub struct CompressionType(
94    /// Type of compression used (see Code table 5.40).
95    pub u8,
96);
97
98#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump)]
99#[dump(flag)]
100pub struct OrderingFlags(
101    /// Ordering flags (Flag table 5.50002).
102    pub u8,
103);