bufr2synop 0.24.0
metclimat.h
Go to the documentation of this file.
1/* $Id$ */
2/***************************************************************************
3 * Copyright (C) 2004-2022 by Guillermo Ballester Valor *
4 * gbv@ogimet.com *
5 * *
6 * This file is part of Ogimet *
7 * *
8 * Ogimet is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * Ogimet is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU General Public License *
19 * along with this program; if not, see <http://www.gnu.org/licenses/>. *
20 * *
21 ***************************************************************************/
22/*!
23 \file metclimat.h
24 Main header file for climat related tasks in metdecoder library
25*/
26#ifndef METCLIMAT_H
27#define METCLIMAT_H
28
29/*! \def CLIMAT_SEC0
30 \brief mask bit meaning section 0 of climat is solicited to or parsed with success
31*/
32#define CLIMAT_SEC0 1
33
34/*! \def CLIMAT_SEC1
35 \brief mask bit meaning section 1 of climat is solicited to or parsed with success
36*/
37#define CLIMAT_SEC1 2
38
39/*! \def CLIMAT_SEC2
40 \brief mask bit meaning section 2 of climat is solicited to or parsed with success
41*/
42#define CLIMAT_SEC2 4
43
44/*! \def CLIMAT_SEC3
45 \brief mask bit meaning section 3 of climat is solicited to or parsed with success
46*/
47#define CLIMAT_SEC3 8
48
49/*! \def CLIMAT_SEC4
50 \brief mask bit meaning section 4 of climat is solicited to or parsed with success
51*/
52#define CLIMAT_SEC4 16
53
54/*! \def CLIMAT_EXT
55 \brief mask bit meaning date extension is parsed with success
56*/
57#define CLIMAT_EXT 32
58
59/*! \def CLIMAT_OLD
60 \brief mask bit meaning that the climat is an old CLIMAT, usually before Nov 1994
61*/
62#define CLIMAT_OLD 64
63
64
65/*! \struct climat_sec0
66 \brief contains all possible substrings from section 0 when a report is parsed with success
67*/
69{
70 char MM[4]; /*! MM item (month 01..12) */
71 char JJJ[4]; /*! JJJ item (latest 3 digits of year) */
72 char II[4]; /*!< Regional indicator for a synop station index */
73 char iii[4]; /*!< Station index */
74 char Reg[4]; /*!< WMO IIiii region 'I','II','III', 'IV', 'V', ... */
75};
76
77/*! \struct climat_sec1
78 \brief contains all possible substrings from section 1 when a report is parsed with success
79*/
81{
82 char PoPoPoPo[8];
83 char PPPP[8];
84 char s[2];
85 char TTT[4];
86 char ststst[4];
87 char sx[2];
88 char TxTxTx[4];
89 char sn[2];
90 char TnTnTn[4];
91 char eee[4];
92 char R1R1R1R1[6];
93 char Rd[2];
94 char nrnr[4];
95 char S1S1S1[4];
96 char pspsps[4];
97 char mpmp[4];
98 char mtmt[4];
99 char mtx[2];
100 char mtn[2];
101 char meme[4];
102 char mrmr[4];
103 char msms[4];
104};
105
106/*! \struct climat_sec2
107 \brief contains all possible substrings from section 2 when a report is parsed with success
108*/
110{
111 char YbYb[4];
112 char YcYc[4];
113 char PoPoPoPo[8];
114 char PPPP[8];
115 char s[2];
116 char TTT[4];
117 char ststst[4];
118 char sx[2];
119 char TxTxTx[4];
120 char sn[2];
121 char TnTnTn[4];
122 char eee[4];
123 char R1R1R1R1[6];
124 char nrnr[4];
125 char S1S1S1[4];
126 char ypyp[4];
127 char ytyt[4];
128 char ytxytx[4];
129 char yeye[4];
130 char yryr[4];
131 char ysys[4];
132};
133
134/*! \struct climat_sec3
135 \brief contains all possible substrings from section 3 when a report is parsed with success
136*/
138{
139 char T25[4];
140 char T30[4];
141 char T35[4];
142 char T40[4];
143 char Tn0[4];
144 char Tx0[4];
145 char R01[4];
146 char R05[4];
147 char R10[4];
148 char R50[4];
149 char R100[4];
150 char R150[4];
151 char s00[4];
152 char s01[4];
153 char s10[4];
154 char s50[4];
155 char f10[4];
156 char f20[4];
157 char f30[4];
158 char V1[4];
159 char V2[4];
160 char V3[4];
161};
162
163/*! \struct climat_sec4
164 \brief contains all possible substrings from section 4 when a report is parsed with success
165*/
167{
168 char sx[2];
169 char Txd[4];
170 char yx[4];
171 char sn[2];
172 char Tnd[4];
173 char yn[4];
174 char sax[2];
175 char Tax[4];
176 char yax[4];
177 char san[2];
178 char Tan[4];
179 char yan[4];
180 char RxRxRxRx[8];
181 char yr[4];
182 char iw[2];
183 char fxfxfx[4];
184 char yfx[4];
185 char Dts[4];
186 char Dgr[4];
187 char iy[2];
188 char GxGx[4];
189 char GnGn[4];
190};
191
192/*! \struct climat_old
193 \brief contains all possible substrings from old CLIMAT format when a report is parsed with success
194*/
196{
197 char PoPoPoPo[6];
198 char PPPP[6];
199 char sn[2];
200 char TTT[4];
201 char eee[4];
202 char nrnr[4];
203 char R1R1R1R1[6];
204 char Rd[4];
205 char S1S1S1[4];
206 char KsKs[4];
207};
208
209/*! \struct climat_chunks
210 \brief contains all possible substrings from a synop report is parsed with success
211*/
213{
214 int mask; /*!< Mask with sections parsed succesfully */
215 struct report_date_ext e; /*!< struct with the optional extension parsed */
216 struct wigos_id wid; /*!< struct with the WIGOS indentifier if any */
217 struct climat_sec0 s0; /*!< struct with parsed header and section 0 */
218 struct climat_sec1 s1; /*!< struct with parsed section 1 */
219 struct climat_sec2 s2; /*!< struct with parsed section 2 if present */
220 struct climat_sec3 s3; /*!< struct with parsed section 3 if present */
221 struct climat_sec4 s4; /*!< struct with parsed section 4 if present */
222 struct climat_old o; /*!< struct with parsed old format if present */
223 char error[128]; /*!< string with error code if a wrong climat report is found */
224};
225
226
227
228
229
230#endif
231
contains all possible substrings from a synop report is parsed with success
Definition: metclimat.h:213
struct climat_old o
Definition: metclimat.h:222
struct climat_sec4 s4
Definition: metclimat.h:221
struct report_date_ext e
Definition: metclimat.h:215
struct climat_sec1 s1
Definition: metclimat.h:218
struct climat_sec0 s0
Definition: metclimat.h:217
struct wigos_id wid
Definition: metclimat.h:216
char error[128]
Definition: metclimat.h:223
struct climat_sec2 s2
Definition: metclimat.h:219
struct climat_sec3 s3
Definition: metclimat.h:220
contains all possible substrings from old CLIMAT format when a report is parsed with success
Definition: metclimat.h:196
char nrnr[4]
Definition: metclimat.h:202
char Rd[4]
Definition: metclimat.h:204
char eee[4]
Definition: metclimat.h:201
char S1S1S1[4]
Definition: metclimat.h:205
char KsKs[4]
Definition: metclimat.h:206
char R1R1R1R1[6]
Definition: metclimat.h:203
char PPPP[6]
Definition: metclimat.h:198
char PoPoPoPo[6]
Definition: metclimat.h:197
char TTT[4]
Definition: metclimat.h:200
char sn[2]
Definition: metclimat.h:199
contains all possible substrings from section 0 when a report is parsed with success
Definition: metclimat.h:69
char JJJ[4]
Definition: metclimat.h:71
char iii[4]
Definition: metclimat.h:73
char II[4]
Definition: metclimat.h:72
char MM[4]
Definition: metclimat.h:70
char Reg[4]
Definition: metclimat.h:74
contains all possible substrings from section 1 when a report is parsed with success
Definition: metclimat.h:81
char mtmt[4]
Definition: metclimat.h:98
char mtx[2]
Definition: metclimat.h:99
char R1R1R1R1[6]
Definition: metclimat.h:92
char s[2]
Definition: metclimat.h:84
char sx[2]
Definition: metclimat.h:87
char nrnr[4]
Definition: metclimat.h:94
char pspsps[4]
Definition: metclimat.h:96
char S1S1S1[4]
Definition: metclimat.h:95
char PoPoPoPo[8]
Definition: metclimat.h:82
char mrmr[4]
Definition: metclimat.h:102
char TxTxTx[4]
Definition: metclimat.h:88
char eee[4]
Definition: metclimat.h:91
char mtn[2]
Definition: metclimat.h:100
char PPPP[8]
Definition: metclimat.h:83
char mpmp[4]
Definition: metclimat.h:97
char Rd[2]
Definition: metclimat.h:93
char TTT[4]
Definition: metclimat.h:85
char sn[2]
Definition: metclimat.h:89
char ststst[4]
Definition: metclimat.h:86
char msms[4]
Definition: metclimat.h:103
char TnTnTn[4]
Definition: metclimat.h:90
char meme[4]
Definition: metclimat.h:101
contains all possible substrings from section 2 when a report is parsed with success
Definition: metclimat.h:110
char TTT[4]
Definition: metclimat.h:116
char nrnr[4]
Definition: metclimat.h:124
char R1R1R1R1[6]
Definition: metclimat.h:123
char S1S1S1[4]
Definition: metclimat.h:125
char TnTnTn[4]
Definition: metclimat.h:121
char yryr[4]
Definition: metclimat.h:130
char TxTxTx[4]
Definition: metclimat.h:119
char ytxytx[4]
Definition: metclimat.h:128
char PPPP[8]
Definition: metclimat.h:114
char eee[4]
Definition: metclimat.h:122
char ststst[4]
Definition: metclimat.h:117
char YbYb[4]
Definition: metclimat.h:111
char PoPoPoPo[8]
Definition: metclimat.h:113
char sn[2]
Definition: metclimat.h:120
char YcYc[4]
Definition: metclimat.h:112
char ypyp[4]
Definition: metclimat.h:126
char ytyt[4]
Definition: metclimat.h:127
char sx[2]
Definition: metclimat.h:118
char s[2]
Definition: metclimat.h:115
char ysys[4]
Definition: metclimat.h:131
char yeye[4]
Definition: metclimat.h:129
contains all possible substrings from section 3 when a report is parsed with success
Definition: metclimat.h:138
char Tx0[4]
Definition: metclimat.h:144
char T25[4]
Definition: metclimat.h:139
char R50[4]
Definition: metclimat.h:148
char f20[4]
Definition: metclimat.h:156
char f30[4]
Definition: metclimat.h:157
char s10[4]
Definition: metclimat.h:153
char R150[4]
Definition: metclimat.h:150
char T35[4]
Definition: metclimat.h:141
char Tn0[4]
Definition: metclimat.h:143
char V2[4]
Definition: metclimat.h:159
char R100[4]
Definition: metclimat.h:149
char s01[4]
Definition: metclimat.h:152
char R10[4]
Definition: metclimat.h:147
char T30[4]
Definition: metclimat.h:140
char R05[4]
Definition: metclimat.h:146
char s00[4]
Definition: metclimat.h:151
char V1[4]
Definition: metclimat.h:158
char V3[4]
Definition: metclimat.h:160
char T40[4]
Definition: metclimat.h:142
char R01[4]
Definition: metclimat.h:145
char s50[4]
Definition: metclimat.h:154
char f10[4]
Definition: metclimat.h:155
contains all possible substrings from section 4 when a report is parsed with success
Definition: metclimat.h:167
char RxRxRxRx[8]
Definition: metclimat.h:180
char sax[2]
Definition: metclimat.h:174
char sx[2]
Definition: metclimat.h:168
char Tnd[4]
Definition: metclimat.h:172
char iw[2]
Definition: metclimat.h:182
char yx[4]
Definition: metclimat.h:170
char san[2]
Definition: metclimat.h:177
char Dgr[4]
Definition: metclimat.h:186
char yn[4]
Definition: metclimat.h:173
char yfx[4]
Definition: metclimat.h:184
char GnGn[4]
Definition: metclimat.h:189
char Tax[4]
Definition: metclimat.h:175
char iy[2]
Definition: metclimat.h:187
char GxGx[4]
Definition: metclimat.h:188
char yax[4]
Definition: metclimat.h:176
char Dts[4]
Definition: metclimat.h:185
char fxfxfx[4]
Definition: metclimat.h:183
char yr[4]
Definition: metclimat.h:181
char Tan[4]
Definition: metclimat.h:178
char yan[4]
Definition: metclimat.h:179
char Txd[4]
Definition: metclimat.h:169
char sn[2]
Definition: metclimat.h:171
contains extensions, not in wmo. Date/time UTC information
Definition: metcommon.h:32
WIGOS station identifier.
Definition: metcommon.h:46