Sub hourly: Native type of step and endStep for backward compatibility (Experimental idea)

This commit is contained in:
Shahram Najm 2024-01-17 13:50:39 +00:00
parent 77a71acf11
commit 0f3e710d33
2 changed files with 21 additions and 0 deletions

View File

@ -744,5 +744,15 @@ static int pack_string(grib_accessor* a, const char* val, size_t* len)
static int get_native_type(grib_accessor* a)
{
#if 0
grib_handle* h = grib_handle_of_accessor(a);
long step_units = 0;
if (grib_get_long_internal(h, "stepUnits", &step_units) == GRIB_SUCCESS) {
if (step_units == 1) {
return GRIB_TYPE_LONG;
}
}
#endif
return GRIB_TYPE_STRING;
}

View File

@ -349,5 +349,16 @@ static int unpack_string(grib_accessor* a, char* val, size_t* len)
static int get_native_type(grib_accessor* a)
{
#if 0
grib_handle* h = grib_handle_of_accessor(a);
long step_units = 0;
if (grib_get_long_internal(h, "stepUnits", &step_units) == GRIB_SUCCESS) {
if (step_units == 1) {
return GRIB_TYPE_LONG;
}
}
#endif
return GRIB_TYPE_STRING;
}