Skip to content

Commit 8b24ef0

Browse files
JohnLCaronhaileyajohnson
authored andcommitted
Fix GRIB data template 50002 according to issue #881.
1 parent 3245120 commit 8b24ef0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

grib/src/main/java/ucar/nc2/grib/grib2/Grib2DataReader.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1057,8 +1057,9 @@ private float[] getData50002(RandomAccessFile raf, Grib2Drs.Type50002 gdrs) thro
10571057
break;
10581058
}
10591059

1060+
// LOOK see https://github.com/Unidata/netcdf-java/issues/881
10601061
int D = gdrs.decimalScaleFactor;
1061-
float DD = (float) java.lang.Math.pow((double) 10, (double) D);
1062+
float DD = (float) java.lang.Math.pow((double) 10, (double) -D);
10621063
float R = gdrs.referenceValue;
10631064
int E = gdrs.binaryScaleFactor;
10641065
float EE = (float) java.lang.Math.pow(2.0, (double) E);

0 commit comments

Comments
 (0)