ECC-295 passing test with 139 bufr test data

This commit is contained in:
Enrico Fucile 2016-07-19 13:59:56 +01:00
parent 501c7d2397
commit 7b7fa18649
3 changed files with 11 additions and 4 deletions

Binary file not shown.

Binary file not shown.

View File

@ -598,15 +598,22 @@ static void dump_attributes(grib_dumper* d,grib_accessor* a)
static void header(grib_dumper* d,grib_handle* h) {
grib_dumper_fortran *self = (grib_dumper_fortran*)d;
char sampleName[200]={0};
long localSectionPresent,edition;
long localSectionPresent,edition,bufrHeaderCentre,isSatellite;
int ret=0;
grib_get_long(h,"localSectionPresent",&localSectionPresent);
grib_get_long(h,"bufrHeaderCentre",&bufrHeaderCentre);
grib_get_long(h,"edition",&edition);
if (localSectionPresent)
sprintf(sampleName,"BUFR%ld_local.bufr",edition);
else
if (localSectionPresent && bufrHeaderCentre==98 ) {
grib_get_long(h,"isSatellite",&isSatellite);
if (isSatellite)
sprintf(sampleName,"BUFR%ld_local_satellite.bufr",edition);
else
sprintf(sampleName,"BUFR%ld_local.bufr",edition);
} else {
sprintf(sampleName,"BUFR%ld.bufr",edition);
}
fprintf(self->dumper.out,"! This program has been automatically generated with bufr_dump -Efortran\n");
fprintf(self->dumper.out,"program bufr_create_message\n");