Date/Area extraction: Rename of keys

This commit is contained in:
Shahram Najm 2016-08-08 09:54:21 +01:00
parent b60cc55c6a
commit 6e46aea21e
4 changed files with 13 additions and 11 deletions

View File

@ -32,10 +32,12 @@ transient extractAreaNorthLatitude=1.1;
transient extractAreaSouthLatitude=1.1;
transient extractAreaLatitudeRank=1;
transient extractAreaLongitudeRank=1;
transient extractAreaNumberOfSubsets=0;
transient extractedAreaNumberOfSubsets=0;
meta doExtractArea bufr_extract_area_subsets(doExtractSubsets,numberOfSubsets,extractSubsetList,extractAreaWestLongitude,extractAreaEastLongitude,
extractAreaNorthLatitude,extractAreaSouthLatitude,extractAreaLongitudeRank,extractAreaLatitudeRank,extractAreaNumberOfSubsets)=0;
meta doExtractArea bufr_extract_area_subsets(
doExtractSubsets,numberOfSubsets,extractSubsetList,extractAreaWestLongitude,extractAreaEastLongitude,
extractAreaNorthLatitude,extractAreaSouthLatitude,extractAreaLongitudeRank,extractAreaLatitudeRank,
extractedAreaNumberOfSubsets)=0;
transient extractDateTimeYearStart=2016;
transient extractDateTimeMonthStart=1;
@ -57,7 +59,7 @@ transient extractDateTimeDayRank=1;
transient extractDateTimeHourRank=1;
transient extractDateTimeMinuteRank=1;
transient extractDateTimeSecondRank=1;
transient extractDateTimeNumberOfSubsets=0;
transient extractedDateTimeNumberOfSubsets=0;
meta doExtractDateTime bufr_extract_datetime_subsets(doExtractSubsets,numberOfSubsets,extractSubsetList);

View File

@ -26,7 +26,7 @@
MEMBERS = const char* extractAreaSouthLatitude
MEMBERS = const char* extractAreaLongitudeRank
MEMBERS = const char* extractAreaLatitudeRank
MEMBERS = const char* extractAreaNumberOfSubsets
MEMBERS = const char* extractedAreaNumberOfSubsets
END_CLASS_DEF
*/
@ -59,7 +59,7 @@ typedef struct grib_accessor_bufr_extract_area_subsets {
const char* extractAreaSouthLatitude;
const char* extractAreaLongitudeRank;
const char* extractAreaLatitudeRank;
const char* extractAreaNumberOfSubsets;
const char* extractedAreaNumberOfSubsets;
} grib_accessor_bufr_extract_area_subsets;
extern grib_accessor_class* grib_accessor_class_gen;
@ -162,7 +162,7 @@ static void init(grib_accessor* a, const long len , grib_arguments* arg )
self->extractAreaSouthLatitude = grib_arguments_get_name(grib_handle_of_accessor(a),arg,n++);
self->extractAreaLongitudeRank = grib_arguments_get_name(grib_handle_of_accessor(a),arg,n++);
self->extractAreaLatitudeRank = grib_arguments_get_name(grib_handle_of_accessor(a),arg,n++);
self->extractAreaNumberOfSubsets = grib_arguments_get_name(grib_handle_of_accessor(a),arg,n++);
self->extractedAreaNumberOfSubsets = grib_arguments_get_name(grib_handle_of_accessor(a),arg,n++);
a->flags |= GRIB_ACCESSOR_FLAG_FUNCTION;
}
@ -238,7 +238,7 @@ static int select_area(grib_accessor* a) {
}
nsubsets=grib_iarray_used_size(subsets);
ret=grib_set_long(h,self->extractAreaNumberOfSubsets,nsubsets);
ret=grib_set_long(h,self->extractedAreaNumberOfSubsets,nsubsets);
if (ret) return ret;
if (nsubsets!=0) {

View File

@ -358,7 +358,7 @@ static int select_datetime(grib_accessor* a)
}
nsubsets=grib_iarray_used_size(subsets);
ret=grib_set_long(h,"extractDateTimeNumberOfSubsets",nsubsets);
ret=grib_set_long(h,"extractedDateTimeNumberOfSubsets",nsubsets);
if (ret) return ret;
if (nsubsets!=0) {

View File

@ -48,10 +48,10 @@ cat > $fRules <<EOF
transient extractDateTimeSecondEnd=39.6;
set doExtractDateTime=1;
if (extractDateTimeNumberOfSubsets!=0) {
if (extractedDateTimeNumberOfSubsets!=0) {
write;
}
print "extracted [extractDateTimeNumberOfSubsets] of [originalNumberOfSubsets] subsets";
print "extracted [extractedDateTimeNumberOfSubsets] of [originalNumberOfSubsets] subsets";
EOF
inputBufr="amsa_55.bufr"