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

sellonlatbox: does not work as expected (bug fix)

parent 52c29d88
2011-01-11 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* sellonlatbox: does not work as expected (bug fix) [report: Jonathan Schubert]
2011-01-10 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* Added operator delete - Delete fields
......
......@@ -4,7 +4,7 @@
Name: cdo
#BuildRequires:
Version: 1.4.7rc6
Version: 1.4.8rc1
Release: 1
Summary: Climate Data Operators
License: GNU GENERAL PUBLIC LICENSE Version 2, June 1991
......
......@@ -347,16 +347,18 @@ void genlonlatbox(double xlon1, double xlon2, double xlat1, double xlat2,
for ( *lon22 = *lon21; *lon22 < nlon1 && xvals1[*lon22] < xlon2; (*lon22)++ );
if ( *lon22 >= nlon1 || xvals1[*lon22] > xlon2 ) (*lon22)--;
xlon1 -= 360;
xlon2 -= 360;
for ( *lon11 = 0; xvals1[*lon11] < xlon1; (*lon11)++ );
for ( *lon12 = *lon11; *lon12 < nlon1 && xvals1[*lon12] < xlon2; (*lon12)++ );
//(*lon12)--;
// (*lon12)--;
if ( *lon12 >= nlon1 || xvals1[*lon12] > xlon2 ) (*lon12)--;
if ( *lon12 >= 0 )
if ( IS_EQUAL(xvals1[*lon12], xvals1[*lon21]) ) (*lon12)--;
if ( *lon12 - *lon11 + 1 + *lon22 - *lon21 + 1 <= 0 )
cdoAbort("Longitudinal dimension is too small!");
......
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