Commit 619589eb authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

GRIB2: correct longitudeOfFirstGridPoint if necessary (bug fix).

parent 365db31d
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
* Version 1.9.6 released * Version 1.9.6 released
2018-09-05 Uwe Schulzweida
* GRIB2: correct longitudeOfFirstGridPoint if necessary (bug fix)
2018-09-04 Uwe Schulzweida 2018-09-04 Uwe Schulzweida
* CDI_reduce_dim: wrong result when reduce time dimension (bug fix) * CDI_reduce_dim: wrong result when reduce time dimension (bug fix)
......
...@@ -585,7 +585,7 @@ void gribapiGetGrid(grib_handle *gh, grid_t *grid) ...@@ -585,7 +585,7 @@ void gribapiGetGrid(grib_handle *gh, grid_t *grid)
{ {
if ( grid->x.size > 1 ) if ( grid->x.size > 1 )
{ {
if ( editionNumber <= 1 ) //if ( editionNumber <= 1 )
{ {
if ( grid->x.last < grid->x.first ) if ( grid->x.last < grid->x.first )
{ {
...@@ -596,7 +596,7 @@ void gribapiGetGrid(grib_handle *gh, grid_t *grid) ...@@ -596,7 +596,7 @@ void gribapiGetGrid(grib_handle *gh, grid_t *grid)
} }
// correct xinc if necessary // correct xinc if necessary
if ( IS_EQUAL(grid->x.first, 0) && grid->x.last > 354 ) if ( IS_EQUAL(grid->x.first, 0) && grid->x.last > 354 && grid->x.last < 360 )
{ {
double xinc = 360. / grid->x.size; double xinc = 360. / grid->x.size;
if ( fabs(grid->x.inc-xinc) > 0.0 ) if ( fabs(grid->x.inc-xinc) > 0.0 )
......
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