Commit 1eabc66a authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

timcor: set data range -1 to 1

parent bfa50d07
2016-02-24 Uwe Schulzweida
* using CDI library version 1.7.1
* Version 1.7.1 released
2015-11-16 Uwe Schulzweida
* timcor: set data range -1 to 1
2015-10-28 Uwe Schulzweida
* using CDI library version 1.7.0
......
......@@ -51,10 +51,10 @@ int correlation_t(long gridsize, double missval1, double missval2, int *nofvals,
temp6 = MUL(temp4, temp5);
cor = DIV(temp1, SQRT(temp6));
/*
if ( cor < -1) cor = -1;
else if ( cor > 1) cor = 1;
*/
if ( cor < -1 ) cor = -1;
else if ( cor > 1 ) cor = 1;
if ( DBL_IS_EQUAL(cor, missval1) ) nmiss++;
}
else
......
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