ECC-690: New Satellite Winds BUFR Sequence for GOES16. Remove env. variable

This commit is contained in:
Shahram Najm 2018-07-04 17:08:36 +01:00
parent 25f3eb3d9f
commit 656b96983d
4 changed files with 2 additions and 24 deletions

View File

@ -2289,9 +2289,7 @@ static int create_keys(grib_accessor* a,long onlySubset,long startSubset,long en
/* forceGroupClosure=1; */
/* reset_qualifiers(significanceQualifierGroup); */
} else if (descriptor->X==33 && !qualityPresent) {
if (c->bufr_quality_without_bitmap == 1) {
dump=1; /* ECC-690: percentConfidence WITHOUT a bitmap! e.g. NOAA GOES16 BUFR */
}
dump=1; /* ECC-690: percentConfidence WITHOUT a bitmap! e.g. NOAA GOES16 BUFR */
}
if (ide==0 && !self->compressedData) {
@ -2358,12 +2356,7 @@ static int create_keys(grib_accessor* a,long onlySubset,long startSubset,long en
if(descriptor->code==33007) {
add_key = 0; /* Standard behaviour */
if (!qualityPresent) {
if (c->bufr_quality_without_bitmap) {
add_key = 1;
} else {
grib_context_log(c, GRIB_LOG_WARNING,
"create_keys: descriptor=%6.6ld: Class 33 quality information without a bitmap!",descriptor->code);
}
add_key = 1;
}
}
if (add_key) {

View File

@ -1054,7 +1054,6 @@ struct grib_context
int ieee_packing;
int bufrdc_mode;
int bufr_set_to_missing_if_out_of_range;
int bufr_quality_without_bitmap;
FILE* log_stream;
grib_trie* classes;
grib_trie* lists;

View File

@ -336,7 +336,6 @@ static grib_context default_grib_context = {
0, /* ieee_packing */
0, /* bufrdc_mode */
0, /* bufr_set_to_missing_if_out_of_range */
0, /* bufr_quality_without_bitmap*/
0, /* log_stream */
0, /* classes */
0, /* lists */
@ -374,13 +373,11 @@ grib_context* grib_context_get_default()
const char* keep_matrix = NULL;
const char* bufrdc_mode = NULL;
const char* bufr_set_to_missing_if_out_of_range = NULL;
const char* bufr_quality_without_bitmap = NULL;
const char* file_pool_max_opened_files = NULL;
write_on_fail = codes_getenv("ECCODES_GRIB_WRITE_ON_FAIL");
bufrdc_mode = codes_getenv("ECCODES_BUFRDC_MODE_ON");
bufr_set_to_missing_if_out_of_range = codes_getenv("ECCODES_BUFR_SET_TO_MISSING_IF_OUT_OF_RANGE");
bufr_quality_without_bitmap = codes_getenv("ECCODES_BUFR_QUALITY_WITHOUT_BITMAP");
large_constant_fields = codes_getenv("ECCODES_GRIB_LARGE_CONSTANT_FIELDS");
no_abort = codes_getenv("ECCODES_NO_ABORT");
debug = codes_getenv("ECCODES_DEBUG");
@ -477,8 +474,6 @@ grib_context* grib_context_get_default()
default_grib_context.bufrdc_mode = bufrdc_mode ? atoi(bufrdc_mode) : 0;
default_grib_context.bufr_set_to_missing_if_out_of_range = bufr_set_to_missing_if_out_of_range ?
atoi(bufr_set_to_missing_if_out_of_range) : 0;
default_grib_context.bufr_quality_without_bitmap = bufr_quality_without_bitmap ?
atoi(bufr_quality_without_bitmap) : 0;
default_grib_context.file_pool_max_opened_files = file_pool_max_opened_files ?
atoi(file_pool_max_opened_files) : DEFAULT_FILE_POOL_MAX_OPENED_FILES;
}

View File

@ -31,7 +31,6 @@ cat > $tempRules <<EOF
print "#4#percentConfidence=[#4#percentConfidence!30]";
EOF
export ECCODES_BUFR_QUALITY_WITHOUT_BITMAP=1
${tools_dir}/codes_bufr_filter $tempRules $input > $tempOut
cat > $tempRef << EOF
@ -79,12 +78,4 @@ echo 'set unpack=1;set extractSubset=4;set doExtractSubsets=1;write;' | ${tools_
echo 'set unpack=1; assert(#2#percentConfidence==62); assert(#4#percentConfidence==63);' | ${tools_dir}/codes_bufr_filter - $tempBufr
# Unset environment variable and those percentConfidence keys should disappear
unset ECCODES_BUFR_QUALITY_WITHOUT_BITMAP
set +e
${tools_dir}/codes_bufr_filter $tempRules $input
status=$?
set -e
[ $status -ne 0 ]
rm -f $tempRules $tempRef $tempOut $tempBufr