51 return ( abs ( s->
itval ) );
63 return ( abs ( s->
itval ) );
84 sprintf ( aux,
"%s%s%s%s%s", syn->
e.
YYYY,syn->
e.
MM,syn->
e.
DD,syn->
e.
HH, syn->
e.
mm );
85 memset ( &tim, 0,
sizeof (
struct tm ) );
86 if ( strlen ( aux ) == 12 )
88 strptime ( aux,
"%Y%m%d%H%M", &tim );
91 gmtime_r ( &t, &tim );
94 else if ( syn->
e.
mm[0] == 0 && syn->
e.
HH[0] )
96 return atoi ( syn->
e.
HH );
119 else if ( s->
ival < 2000 || s->
ival > 2050 )
125 sprintf ( syn->
e.
YYYY,
"%04d", s->
ival );
134 sprintf ( syn->
e.
MM,
"%02d", s->
ival );
143 sprintf ( syn->
e.
DD,
"%02d", s->
ival );
152 sprintf ( syn->
e.
HH,
"%02d", s->
ival );
161 sprintf ( syn->
e.
mm,
"%02d", s->
ival );
264 else if ( s->
ival < 2000 || s->
ival > 2050 )
271 if ( b->
e.
YYYY[0] == 0 )
283 if ( b->
e.
MM[0] == 0 )
285 sprintf ( b->
e.
MM,
"%02d", s->
ival );
295 if ( b->
e.
DD[0] == 0 )
297 sprintf ( b->
e.
DD,
"%02d", s->
ival );
308 if ( b->
e.
HH[0] == 0 )
310 sprintf ( b->
e.
HH,
"%02d", s->
ival );
321 if ( b->
e.
mm[0] == 0 )
323 sprintf ( b->
e.
mm,
"%02d", s->
ival );
420 else if ( s->
ival < 2000 || s->
ival > 2050 )
431 sprintf ( c->
s2.
YcYc,
"%02d", s->
ival % 100 );
433 sprintf ( c->
s2.
YbYb,
"%02d", (
int ) s->
a1->
val % 100 );
435 else if ( c->
e.
YYYY[0] ==
'\0' )
439 sprintf ( c->
s0.
JJJ,
"%03d", abs ( s->
ival ) % 1000 );
449 sprintf ( c->
e.
MM,
"%02d", s->
ival );
451 sprintf ( c->
s0.
MM,
"%02d", s->
ival );
460 if ( c->
e.
DD[0] == 0 )
462 sprintf ( c->
e.
DD,
"%02d", s->
ival );
477 if ( c->
e.
HH[0] == 0 )
479 sprintf ( c->
e.
HH,
"%02d", s->
ival );
489 if ( c->
e.
mm[0] == 0 )
491 sprintf ( c->
e.
mm,
"%02d", s->
ival );
584 else if ( s->
ival < 2000 || s->
ival > 2050 )
590 if ( t->
a.
e.
YYYY[0] == 0 )
605 if ( t->
a.
e.
MM[0] == 0 )
607 sprintf ( t->
a.
e.
MM,
"%02d", s->
ival );
608 sprintf ( t->
b.
e.
MM,
"%02d", s->
ival );
609 sprintf ( t->
c.
e.
MM,
"%02d", s->
ival );
610 sprintf ( t->
d.
e.
MM,
"%02d", s->
ival );
620 if ( t->
a.
e.
DD[0] == 0 )
622 sprintf ( t->
a.
e.
DD,
"%02d", s->
ival );
623 sprintf ( t->
b.
e.
DD,
"%02d", s->
ival );
624 sprintf ( t->
c.
e.
DD,
"%02d", s->
ival );
625 sprintf ( t->
d.
e.
DD,
"%02d", s->
ival );
636 if ( t->
a.
e.
HH[0] == 0 )
638 sprintf ( t->
a.
e.
HH,
"%02d", s->
ival );
639 sprintf ( t->
b.
e.
HH,
"%02d", s->
ival );
640 sprintf ( t->
c.
e.
HH,
"%02d", s->
ival );
641 sprintf ( t->
d.
e.
HH,
"%02d", s->
ival );
656 if ( t->
a.
e.
mm[0] == 0 )
658 sprintf ( t->
a.
e.
mm,
"%02d", s->
ival );
659 sprintf ( t->
b.
e.
mm,
"%02d", s->
ival );
660 sprintf ( t->
c.
e.
mm,
"%02d", s->
ival );
661 sprintf ( t->
d.
e.
mm,
"%02d", s->
ival );
675 if ( t->
a.
e.
ss[0] == 0 )
677 sprintf ( t->
a.
e.
ss,
"%02d", s->
ival );
678 sprintf ( t->
b.
e.
ss,
"%02d", s->
ival );
679 sprintf ( t->
c.
e.
ss,
"%02d", s->
ival );
680 sprintf ( t->
d.
e.
ss,
"%02d", s->
ival );
694 if ( (
int ) s->
r->
n < s->
rep )
710 if ( (
int ) s->
w->
n < s->
itval )
Include header file for binary bufr2tac.
#define SUBSET_MASK_HAVE_MONTH
Bit mask to mark a struct bufr_subset_sequence_data having observation month.
int bufr2tac_set_error(struct bufr2tac_subset_state *s, int severity, char *origin, char *explanation)
#define SUBSET_MASK_HAVE_MINUTE
Bit mask to mark a struct bufr_subset_sequence_data having observation minute.
#define SUBSET_MASK_HAVE_SECOND
Bit mask to mark a struct bufr_subset_sequence_data having observation second.
#define SUBSET_MASK_HAVE_YEAR
Bit mask to mark a struct bufr_subset_sequence_data having observation year.
#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 syn_parse_x04(struct synop_chunks *syn, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 04.
int time_period_duration(struct bufr2tac_subset_state *s)
Get time period duration in seconds.
int temp_parse_x04(struct temp_chunks *t, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 04.
int hour_rounded(struct synop_chunks *syn)
Get the rounded hour of a given date.
int buoy_parse_x04(struct buoy_chunks *b, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 04.
int climat_parse_x04(struct climat_chunks *c, struct bufr2tac_subset_state *s)
Parse a expanded descriptor with X = 04.
#define DESCRIPTOR_VALUE_MISSING
Bit mask for a missing value in a struct bufr_atom_data.
#define CLIMAT_SEC0
mask bit meaning section 0 of climat is solicited to or parsed with success
#define CLIMAT_SEC4
mask bit meaning section 4 of climat is solicited to or parsed with success
#define CLIMAT_SEC2
mask bit meaning section 2 of climat is solicited to or parsed with success
#define CLIMAT_SEC1
mask bit meaning section 1 of climat is solicited to or parsed with success
#define RAW_TEMP_NMAX_POINTS
maximum number of raw points points
stores information needed to parse a sequential list of expanded descriptors for a subset
struct temp_raw_wind_shear_data * w
struct bufr_atom_data * a1
struct bufr_atom_data * a
struct bufr_descriptor desc
contains all possible substrings from a synop report is parsed with success
contains all possible substrings from a synop report is parsed with success
contains all possible substrings from a synop report is parsed with success
Store the whole TEMP report.
struct temp_raw_point_data raw[TEMP_NMAX_POINTS *4]
struct temp_raw_wind_shear_point raw[TEMP_NMAX_POINTS]