ASM #19014 - Fix data rounding causing Td to be greater than T

Change-Id: Id021a4ddc4959423e9e6184d6707b0363612351d

Former-commit-id: cf774dbaa31261ca96eb643bd9b615448d2e19ab
This commit is contained in:
Rici.Yu 2016-05-27 08:51:46 -04:00
parent 57bbecadbb
commit ac4b06261e

View file

@ -43,6 +43,8 @@
# NumPy 1.9.
# 04/07/2016 5539 randerso Reversed order of parameters/return value in collapseKey
# to match order of Wx/Discrete tuple
# 05/27/2016 19014 ryu Fix rounding issue causing Td to be greater than T
# in output netCDF file.
#
##
@ -766,7 +768,7 @@ def storeScalarWE(we, trList, file, timeRange, databaseID,
if multiplier is not None:
cube -= offset
cube *= multiplier
numpy.around(cube,out=cube)
numpy.floor(cube+0.5, out=cube)
# normal trim
else:
digits = we.getGpi().getPrecision()