37 if ( strlen ( b->
e.
YYYY ) &&
46 if ( strlen ( aux ) != 12 )
51 memset ( &tim, 0,
sizeof (
struct tm ) );
52 strptime ( aux,
"%Y%m%d%H%M", &tim );
55 gmtime_r ( &t, &tim );
56 sprintf ( b->
s0.
YY,
"%02d", tim.tm_mday );
57 sprintf ( b->
s0.
GG,
"%02d", tim.tm_hour );
58 sprintf ( b->
s0.
MM,
"%02d", (tim.tm_mon + 1) % 100 );
59 sprintf ( b->
s0.
J,
"%d", tim.tm_year % 10 );
60 sprintf ( b->
s0.
gg,
"%02d", tim.tm_min );
89 sprintf ( err,
"bufr2tac: '%s' report still not decoded in this software", s->
type_report );
93 strcpy ( b->
s0.
MiMi,
"ZZ" );
94 strcpy ( b->
s0.
MjMj,
"YY" );
99 for ( is = 0; is < sq->nd; is++ )
102 if ( sq->sequence[is].desc.x == 8 )
105 s->
a = &sq->sequence[is];
117 s->
ival = ( int ) sq->sequence[is].val;
118 s->
val = sq->sequence[is].val;
119 s->
a = &sq->sequence[is];
122 s->
a1 = &sq->sequence[is - 1];
125 switch ( sq->sequence[is].desc.x )
203 sprintf ( err,
"bufr2tac: parse_subset_as_buoy(): lack of mandatory descriptor in sequence" );
213 if ( b->
s0.
iw[0] ==
'/' && b->
s1.
ff[0] !=
'/' )
225 if ( fabs ( s->
lat ) <= 90.0 )
236 if ( fabs ( s->
lon ) <= 180.0 )
269 strcpy ( b->
s0.
Qc,
"5" );
273 strcpy ( b->
s0.
Qc,
"3" );
280 strcpy ( b->
s0.
Qc,
"7" );
284 strcpy ( b->
s0.
Qc,
"1" );
290 if ( b->
s2.
Qd[0] == 0 )
294 if ( b->
s3.
k2[0] == 0 )
298 if ( b->
s1.
Qx[0] == 0 && b->
s1.
Qd[0] )
302 if ( b->
s2.
Qx[0] == 0 && b->
s2.
Qd[0] )
307 if ( b->
s3.
Qd1[0] == 0 )
311 if ( b->
s3.
Qd2[0] == 0 )
316 if ( b->
s3.
k3[0] == 0 )
320 if ( b->
s3.
k6[0] == 0 )
Include header file for binary bufr2tac.
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.
#define bufr_subset_sequence_data
To use bufrdeco library with legacy old code using ECMWF library which is not used currently.
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.
int parse_subset_as_buoy(struct metreport *m, struct bufr2tac_subset_state *s, struct bufr_subset_sequence_data *sq, char *err)
#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
stores information needed to parse a sequential list of expanded descriptors for a subset
struct bufr_atom_data * a1
struct bufr_atom_data * a
contains all possible substrings from a synop report is parsed with success
all the information for a meteorological report in WMO text format from a BUFR file
WIGOS station identifier.