diff --git a/definitions/grib1/localConcepts/rjtd/stepType.def b/definitions/grib1/localConcepts/rjtd/stepType.def index 75956a310..1c1cb4d01 100644 --- a/definitions/grib1/localConcepts/rjtd/stepType.def +++ b/definitions/grib1/localConcepts/rjtd/stepType.def @@ -20,4 +20,4 @@ "varas" = {timeRangeIndicator=129;} "varad" = {timeRangeIndicator=131;} -"vari" = {timeRangeIndicator=132;} +"varins" = {timeRangeIndicator=132;} diff --git a/src/grib_accessor_class_g1step_range.c b/src/grib_accessor_class_g1step_range.c index e3985bc5a..cb4d5bcab 100644 --- a/src/grib_accessor_class_g1step_range.c +++ b/src/grib_accessor_class_g1step_range.c @@ -336,21 +336,22 @@ static int unpack_string(grib_accessor* a, char* val, size_t *len) } else sprintf(stepType,"unknown"); /* Patch for olf forecast probabilities */ - if(self->patch_fp_precip) + if (self->patch_fp_precip) { start += 24; } - if(strcmp(stepType,"instant") == 0) { + if (strcmp(stepType,"instant") == 0) { sprintf(buf,"%ld",start); } - else if( (strcmp(stepType,"avgfc") == 0) || - (strcmp(stepType,"avgua") == 0) || - (strcmp(stepType,"avgia") == 0) ) + else if ( (strcmp(stepType,"avgfc") == 0) || + (strcmp(stepType,"avgua") == 0) || + (strcmp(stepType,"avgia") == 0) || + (strcmp(stepType,"varins") == 0) ) { sprintf(buf,"%ld",start); } - else if( + else if ( (strcmp(stepType,"accum") == 0) || (strcmp(stepType,"avg") == 0) || (strcmp(stepType,"min") == 0) || @@ -361,10 +362,9 @@ static int unpack_string(grib_accessor* a, char* val, size_t *len) (strcmp(stepType,"avgad") == 0) || (strcmp(stepType,"avgid") == 0) || (strcmp(stepType,"varas") == 0) || - (strcmp(stepType,"varad") == 0) || - (strcmp(stepType,"vari") == 0) ) + (strcmp(stepType,"varad") == 0) ) { - if(start == theEnd) { + if (start == theEnd) { sprintf(buf,"%ld",theEnd); } else