75{
76 size_t is;
77 char aux[32];
79
80
82
83
85
86
88 {
89 sprintf ( err,
"bufr2tac: '%s' report still not decoded in this software", s->
type_report );
90 return 1;
91 }
92
93 strcpy ( b->
s0.
MiMi,
"ZZ" );
94 strcpy ( b->
s0.
MjMj,
"YY" );
95
97
98
99 for ( is = 0; is < sq->nd; is++ )
100 {
101
102 if ( sq->sequence[is].desc.x == 8 )
103 {
105 s->
a = &sq->sequence[is];
107 }
108
111 )
112 {
113 continue;
114 }
115
117 s->
ival = ( int ) sq->sequence[is].val;
118 s->
val = sq->sequence[is].val;
119 s->
a = &sq->sequence[is];
120 if ( is > 0 )
121 {
122 s->
a1 = &sq->sequence[is - 1];
123 }
124
125 switch ( sq->sequence[is].desc.x )
126 {
127
128 case 1:
130 break;
131
132 case 2:
134 break;
135
136 case 4:
138 break;
139
140 case 5:
142 break;
143
144 case 6:
146 break;
147
148 case 7:
150 break;
151
152 case 10:
154 break;
155
156 case 11:
158 break;
159
160 case 12:
162 break;
163
164 case 13:
166 break;
167
168 case 14:
170 break;
171
172 case 20:
174 break;
175
176 case 22:
178 break;
179
180 case 31:
182 break;
183
184
185 case 33:
187 break;
188
189
190 default:
191 break;
192 }
193
194 }
195
202 {
203 sprintf ( err,"bufr2tac: parse_subset_as_buoy(): lack of mandatory descriptor in sequence" );
204 return 1;
205 }
206
207
209
210
211
212
213 if ( b->
s0.
iw[0] ==
'/' && b->
s1.
ff[0] !=
'/' )
214 {
216 }
217
218
221
222
224 {
225 if ( fabs ( s->
lat ) <= 90.0 )
226 {
228 }
229 else
230 {
231 return 1;
232 }
233 }
235 {
236 if ( fabs ( s->
lon ) <= 180.0 )
237 {
239 }
240 else
241 {
242 return 1;
243 }
244 }
246 {
248 }
250 {
252 }
255
256
258 {
260 }
261
262
264 {
266 {
268 {
269 strcpy ( b->
s0.
Qc,
"5" );
270 }
271 else
272 {
273 strcpy ( b->
s0.
Qc,
"3" );
274 }
275 }
276 else
277 {
279 {
280 strcpy ( b->
s0.
Qc,
"7" );
281 }
282 else
283 {
284 strcpy ( b->
s0.
Qc,
"1" );
285 }
286 }
287 }
288
289
290 if ( b->
s2.
Qd[0] == 0 )
291 {
293 }
294 if ( b->
s3.
k2[0] == 0 )
295 {
297 }
298 if ( b->
s1.
Qx[0] == 0 && b->
s1.
Qd[0] )
299 {
301 }
302 if ( b->
s2.
Qx[0] == 0 && b->
s2.
Qd[0] )
303 {
305 }
306
307 if ( b->
s3.
Qd1[0] == 0 )
308 {
310 }
311 if ( b->
s3.
Qd2[0] == 0 )
312 {
314 }
315
316 if ( b->
s3.
k3[0] == 0 )
317 {
319 }
320 if ( b->
s3.
k6[0] == 0 )
321 {
323 }
324
325 return 0;
326}
int buoy_parse_x33(struct buoy_chunks *b, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 33.
#define SUBSET_MASK_HAVE_MONTH
Bit mask to mark a struct bufr_subset_sequence_data having observation month.
int buoy_parse_x07(struct buoy_chunks *b, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 07.
int buoy_parse_x05(struct buoy_chunks *b, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 05.
#define SUBSET_MASK_HAVE_NAME
Bit mask to mark a struct bufr_subset_sequence_data having station name.
int buoy_parse_x14(struct buoy_chunks *b, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 14.
int buoy_parse_x01(struct buoy_chunks *b, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 01.
int buoy_parse_x13(struct buoy_chunks *b, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 13.
#define SUBSET_MASK_LATITUDE_SOUTH
Bit mask to mark a struct bufr_subset_sequence_data with south latitude.
int buoy_parse_x11(struct buoy_chunks *b, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 11.
#define SUBSET_MASK_LONGITUDE_WEST
Bit mask to mark a struct bufr_subset_sequence_data with west longitude.
#define SUBSET_MASK_HAVE_ALTITUDE
Bit mask to mark a struct bufr_subset_sequence_data having altitude.
int buoy_parse_x22(struct buoy_chunks *b, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 22.
int buoy_parse_x10(struct buoy_chunks *b, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 10.
int buoy_parse_x06(struct buoy_chunks *b, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 06.
int buoy_parse_x02(struct buoy_chunks *b, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 02.
#define SUBSET_MASK_HAVE_YEAR
Bit mask to mark a struct bufr_subset_sequence_data having observation year.
int YYYYMMDDHHmm_to_met_datetime(struct met_datetime *t, const char *source)
Parse the string YYYYMMDDHHmm[ss] and set a struct met_datetime.
int buoy_parse_x31(struct buoy_chunks *b, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 31.
int buoy_parse_x04(struct buoy_chunks *b, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 04.
int buoy_parse_x12(struct buoy_chunks *b, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 12.
#define SUBSET_MASK_HAVE_LONGITUDE
Bit mask to mark a struct bufr_subset_sequence_data having longitude.
int buoy_parse_x08(struct buoy_chunks *b, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 08.
#define SUBSET_MASK_HAVE_LATITUDE
Bit mask to mark a struct bufr_subset_sequence_data having latitude.
void bufr2tac_clean_buoy_chunks(struct buoy_chunks *b)
cleans a buoy_chunks struct
int buoy_parse_x20(struct buoy_chunks *b, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 20.
#define SUBSET_MASK_HAVE_DAY
Bit mask to mark a struct bufr_subset_sequence_data having observation day in a month.
#define SUBSET_MASK_HAVE_HOUR
Bit mask to mark a struct bufr_subset_sequence_data having observation hour.
int buoy_YYYYMMDDHHmm_to_JMMYYGGgg(struct buoy_chunks *b)
Sets YYGG from YYYYMMDDHHmm extended group.
#define DESCRIPTOR_VALUE_MISSING
Bit mask for a missing value in a struct bufr_atom_data.
#define BUOY_EXT
mask bit meaning date extension is parsed with success
#define BUOY_SEC0
mask bit meaning section 0 of buoy is solicited to or parsed with success
struct bufr_atom_data * a1
struct bufr_atom_data * a
contains all possible substrings from a synop report is parsed with success
WIGOS station identifier.