GRIB-762: CRASH: grib_to_netcdf on S2S data (forecast)

This commit is contained in:
Shahram Najm 2015-05-11 18:25:15 +01:00
parent 5f8f69908b
commit e31de2bf71
1 changed files with 5 additions and 4 deletions

View File

@ -1942,9 +1942,12 @@ static void validation_time(request *r)
const char* p = get_value(r, "date", 0);
const char* marsClass = get_value(r, "class", 0);
if (eq_string(marsClass, "s2")) {
/* S2S Data */
/* S2S Data. See GRIB-699 and GRIB-762 */
const char* hdate = get_value(r, "hdate", 0);
grib_context_log(ctx, GRIB_LOG_DEBUG, "grib_to_netcdf: S2S Data");
p = get_value(r, "hdate", 0);
if (hdate) {
p = hdate; /* This is a hindcast */
}
}
if(is_number(p))
date = atol(p);
@ -4187,5 +4190,3 @@ int main(int argc, char** argv)
exit(1);
}
#endif