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

trend: integer overflow; wrong result for nts > 46340 (bug fix)

parent 4770c794
2011-01-11 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
2011-01-12 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* detrend: integer overflow; wrong result for nts > 46340 (bug fix) [report: Torsten Seifert]
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
* sellonlatbox: cellidx was not initialized (bug fix) [report: Jaison Ambadan]
2011-01-07 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
......
......@@ -5,6 +5,7 @@ Version 1.5.0 (?? March 2011):
Fixed bugs:
* sellonlatbox: does not work as expected when selecting all longitutes
* detrend: integer overflow; wrong result for nts > 46340
Version 1.4.7 (06 January 2011):
......
......@@ -609,6 +609,7 @@ int gencellgrid(int gridID1, int *gridsize2, int **cellidx)
yfact = 1;
/* find gridsize2 */
*cellidx = NULL;
for ( i = 0; i < gridsize1; ++i )
{
xval = xvals1[i]*xfact;
......@@ -905,8 +906,16 @@ void *Selbox(void *argument)
if ( vars ) free(vars);
if ( array2 ) free(array2);
if ( array1 ) free(array1);
free(sbox);
if ( operatorID == SELLONLATBOX && gridtype == GRID_CELL ) free(sbox[index].cellidx);
if ( sbox )
{
if ( operatorID == SELLONLATBOX && gridtype == GRID_CELL )
{
for ( index = 0; index < ngrids; index++ )
if ( sbox[index].cellidx ) free(sbox[index].cellidx);
}
free(sbox);
}
cdoFinish();
......
......@@ -120,7 +120,7 @@ void *Subtrend(void *argument)
}
tsID = 0;
tsID = 0;
while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
{
taxisCopyTimestep(taxisID4, taxisID1);
......@@ -139,7 +139,7 @@ void *Subtrend(void *argument)
missval1 = missval;
missval2 = missval;
for ( i = 0; i < gridsize; i++ )
field4.ptr[i] = SUB(field1.ptr[i], ADD(vars2[varID][levelID].ptr[i], MUL(vars3[varID][levelID].ptr[i], tsID+1)));
field4.ptr[i] = SUB(field1.ptr[i], ADD(vars2[varID][levelID].ptr[i], MUL(vars3[varID][levelID].ptr[i], tsID)));
nmiss = 0;
for ( i = 0; i < gridsize; i++ )
......
......@@ -109,13 +109,13 @@ void *Trend(void *argument)
}
}
tsID = 0;
tsID = 0;
while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
{
vdate = taxisInqVdate(taxisID1);
vtime = taxisInqVtime(taxisID1);
zj = tsID + 1;
zj = tsID;
for ( recID = 0; recID < nrecs; recID++ )
{
......@@ -143,6 +143,7 @@ void *Trend(void *argument)
work[4][varID][levelID].ptr[i]++;
}
}
tsID++;
}
......
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