Commit 32acaa0c authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cgribexDefGrid: convert generic grids with gridsize=1 to lonlat

parent 3ea99c42
......@@ -1709,8 +1709,9 @@ void cgribexDefGrid(int *isec1, int *isec2, int *isec4, int gridID)
if ( gridtype == GRID_GENERIC )
{
int xsize, ysize;
int xsize, ysize, gridsize;
gridsize = gridInqSize(gridID);
xsize = gridInqXsize(gridID);
ysize = gridInqYsize(gridID);
......@@ -1721,7 +1722,7 @@ void cgribexDefGrid(int *isec1, int *isec2, int *isec4, int gridID)
gridtype = GRID_GAUSSIAN;
gridChangeType(gridID, gridtype);
}
else if ( (xsize == 1 && ysize == 1) || (xsize == 0 && ysize == 0) )
else if ( gridsize == 1 )
{
gridtype = GRID_LONLAT;
gridChangeType(gridID, gridtype);
......
......@@ -1927,8 +1927,9 @@ void gribapiDefGrid(grib_handle *gh, int gridID, int ljpeg)
if ( gridtype == GRID_GENERIC )
{
int xsize, ysize;
int xsize, ysize, gridsize;
gridsize = gridInqSize(gridID);
xsize = gridInqXsize(gridID);
ysize = gridInqYsize(gridID);
......@@ -1939,7 +1940,7 @@ void gribapiDefGrid(grib_handle *gh, int gridID, int ljpeg)
gridtype = GRID_GAUSSIAN;
gridChangeType(gridID, gridtype);
}
else if ( (xsize == 1 && ysize == 1) || (xsize == 0 && ysize == 0) )
else if ( gridsize == 1 )
{
gridtype = GRID_LONLAT;
gridChangeType(gridID, gridtype);
......
Supports Markdown
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