Commit d565b410 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

grib2: check gridDescriptionFile

parent 8d020261
......@@ -578,10 +578,16 @@ void gribapiAddRecord(int streamID, int param, grib_handle *gh,
reference_link[0] = 0;
grid.size = numberOfPoints;
if ( grib_get_long(gh, "numberOfGridUsed", &lpar) == 0 ) grid.number = lpar;
if ( grib_get_long(gh, "numberOfGridInReference", &lpar) == 0 ) grid.position = lpar;
if ( grib_get_string(gh, "gridDescriptionFile", reference_link, &len) == 0 )
grid.reference = strdupx(reference_link);
if ( grib_get_long(gh, "numberOfGridUsed", &lpar) == 0 )
{
grid.number = lpar;
if ( grib_get_long(gh, "numberOfGridInReference", &lpar) == 0 ) grid.position = lpar;
if ( grib_get_string(gh, "gridDescriptionFile", reference_link, &len) == 0 )
{
if ( strncmp(reference_link, "file:/", 6) == 0 )
grid.reference = strdupx(reference_link);
}
}
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment