Commit 45e092a6 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

stream_cgribex.c: do not check fraction of xinc/yinc

parent d83898ef
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#endif #endif
#include <stdio.h> #include <stdio.h>
#include <float.h> /* FLT_EPSILON */ // #include <float.h> /* FLT_EPSILON */
#include "dmemory.h" #include "dmemory.h"
#include "cdi.h" #include "cdi.h"
...@@ -1765,8 +1765,8 @@ void cgribexDefGrid(int *isec1, int *isec2, int *isec4, int gridID) ...@@ -1765,8 +1765,8 @@ void cgribexDefGrid(int *isec1, int *isec2, int *isec4, int gridID)
ISEC2_LastLon = NINT(xlast*1000); ISEC2_LastLon = NINT(xlast*1000);
ISEC2_LonIncr = NINT(xinc*1000); ISEC2_LonIncr = NINT(xinc*1000);
} }
if ( fabs(xinc*1000 - ISEC2_LonIncr) > FLT_EPSILON )
ISEC2_LonIncr = 0; // if ( fabs(xinc*1000 - ISEC2_LonIncr) > FLT_EPSILON ) ISEC2_LonIncr = 0;
if ( gridtype == GRID_GAUSSIAN || gridtype == GRID_GAUSSIAN_REDUCED ) if ( gridtype == GRID_GAUSSIAN || gridtype == GRID_GAUSSIAN_REDUCED )
{ {
...@@ -1777,8 +1777,7 @@ void cgribexDefGrid(int *isec1, int *isec2, int *isec4, int gridID) ...@@ -1777,8 +1777,7 @@ void cgribexDefGrid(int *isec1, int *isec2, int *isec4, int gridID)
else else
{ {
ISEC2_LatIncr = NINT(yinc*1000); ISEC2_LatIncr = NINT(yinc*1000);
if ( fabs(yinc*1000 - ISEC2_LatIncr) > FLT_EPSILON ) // if ( fabs(yinc*1000 - ISEC2_LatIncr) > FLT_EPSILON ) ISEC2_LatIncr = 0;
ISEC2_LatIncr = 0;
if ( ISEC2_LatIncr < 0 ) ISEC2_LatIncr = -ISEC2_LatIncr; if ( ISEC2_LatIncr < 0 ) ISEC2_LatIncr = -ISEC2_LatIncr;
} }
......
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