ECC-524: grib_iterator behaves strangely for lambert representation

This commit is contained in:
Shahram Najm 2017-08-16 14:26:24 +01:00
parent 23592790f0
commit 957734702d
1 changed files with 2 additions and 1 deletions

View File

@ -239,7 +239,7 @@ static int init(grib_iterator* iter, grib_handle* h, grib_arguments* args)
x = -x;
}
angle = atan(x / tmp);
angle = atan2(x, tmp); /* See ECC-524 */
rho = sqrt(x*x + tmp2);
if (n <= 0) rho = -rho;
lonDeg = LoVInDegrees + (angle/n) * RAD2DEG;
@ -248,6 +248,7 @@ static int init(grib_iterator* iter, grib_handle* h, grib_arguments* args)
while ( lonDeg < 0.0) lonDeg += 360.0;
lons[index] = lonDeg;
lats[index] = latDeg;
/*printf("DBK: llat[%d] = %g \t llon[%d] = %g\n", index,lats[index], index,lons[index]);*/
}
}