Commit 51221d85 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Switch grib_api grid template to dynamic memory.

parent 28936598
......@@ -459,10 +459,11 @@ void gribapiAddRecord(stream_t * streamptr, int param, grib_handle *gh,
// I. e. kick the fixed size array and allocate enough space, whatever that may be.
strncpy(record->varname, varname, sizeof(record->varname));
grid_t grid;
gribapiGetGrid(gh, &grid);
grid_t *grid = (grid_t *)Malloc(sizeof (*grid));
gribapiGetGrid(gh, grid);
int gridID = varDefGrid(vlistID, &grid, 0);
int gridID = varDefGrid(vlistID, grid, 0);
Free(grid);
int zaxistype = gribapiGetZaxisType(gribEditionNumber(gh), leveltype1);
......
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