Issue #3101 fix some derived parameters on win64 platform
Change-Id: I9de1d31e7f7c19af437aef834aa84f163bf36d86 Former-commit-id: 4659c0240aa31b615bc50228906d514f47a72f94
This commit is contained in:
parent
8f8ea5d014
commit
aa7c1fac90
3 changed files with 25 additions and 8 deletions
|
@ -18,6 +18,14 @@
|
|||
# further licensing information.
|
||||
##
|
||||
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# --/--/----- Initial creation
|
||||
# May 06, 2014 3101 njensen Cast numpy shape values to int
|
||||
# for cross platform compatibility
|
||||
|
||||
from com.raytheon.uf.common.derivparam.python.function import CapeFuncPythonAdapter as CapeFunc
|
||||
from numpy import zeros
|
||||
|
||||
|
@ -90,9 +98,8 @@ def __execute(*args):
|
|||
pressureValue = pressure
|
||||
pressure = zeros(temperatureValues.shape, temperatureValues.dtype)
|
||||
pressure[:] = pressureValue
|
||||
if upperTerminationPressure is None:
|
||||
threeDshape = pressureValues.shape
|
||||
return CapeFunc.capeFunc(useVirtualTemp, pressureValues, temperatureValues, pressure, potentialTemperature, specificHumidity, threeDshape[1], threeDshape[2], threeDshape[0]).__numpy__
|
||||
else:
|
||||
threeDshape = pressureValues.shape
|
||||
return CapeFunc.capeFuncTop(useVirtualTemp, pressureValues, temperatureValues, pressure, potentialTemperature, specificHumidity, upperTerminationPressure, threeDshape[1], threeDshape[2], threeDshape[0]).__numpy__
|
||||
threeDshape = pressureValues.shape
|
||||
if upperTerminationPressure is None:
|
||||
return CapeFunc.capeFunc(useVirtualTemp, pressureValues, temperatureValues, pressure, potentialTemperature, specificHumidity, int(threeDshape[1]), int(threeDshape[2]), int(threeDshape[0])).__numpy__
|
||||
else:
|
||||
return CapeFunc.capeFuncTop(useVirtualTemp, pressureValues, temperatureValues, pressure, potentialTemperature, specificHumidity, upperTerminationPressure, int(threeDshape[1]), int(threeDshape[2]), int(threeDshape[0])).__numpy__
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
# ------------ ---------- ----------- --------------------------
|
||||
# Feb 17, 2010 4502 jelkins Initial Creation.
|
||||
# Jun 05, 2013 2043 bsteffen Ported from meteolib C
|
||||
# May 06, 2014 3101 njensen Cast numpy shape values to int
|
||||
# for cross platform compatibility
|
||||
|
||||
from numpy import zeros
|
||||
from com.raytheon.uf.common.derivparam.python.function import DCapeFuncPythonAdapter as DCapeFunc
|
||||
|
@ -62,5 +64,5 @@ def execute(threeDtemperature, threeDdewpoint, pressure, potentialTemperature, s
|
|||
pressure = zeros(potentialTemperature.shape, potentialTemperature.dtype)
|
||||
pressure[:] = pressureValue
|
||||
threeDshape = threeDpressure.shape
|
||||
return DCapeFunc.dcapeFunc(useVirtualTemp, threeDpressure, threeDtemperature[0], threeDdewpoint[0], pressure, potentialTemperature, specificHumidity, threeDshape[1], threeDshape[2], threeDshape[0], maxEvaporation, maxRelativeHumidity).__numpy__[0]
|
||||
return DCapeFunc.dcapeFunc(useVirtualTemp, threeDpressure, threeDtemperature[0], threeDdewpoint[0], pressure, potentialTemperature, specificHumidity, int(threeDshape[1]), int(threeDshape[2]), int(threeDshape[0]), maxEvaporation, maxRelativeHumidity).__numpy__[0]
|
||||
|
||||
|
|
|
@ -18,6 +18,14 @@
|
|||
# further licensing information.
|
||||
###
|
||||
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# --/--/----- Initial creation
|
||||
# May 06, 2014 3101 njensen Cast numpy shape values to int
|
||||
# for cross platform compatibility
|
||||
|
||||
from numpy import ndarray, float32, NaN
|
||||
from numpy import sin, isnan, invert
|
||||
from com.raytheon.uf.common.derivparam.python.function import DistFilterPythonAdapter as DistFilter
|
||||
|
@ -43,7 +51,7 @@ def execute(input, dist, dx, dy, times=1):
|
|||
#return executePython(input, npts, times)
|
||||
|
||||
def executeJava(input, npts, times):
|
||||
output = DistFilter.filter(input, npts, input.shape[1], input.shape[0], times).__numpy__[0]
|
||||
output = DistFilter.filter(input, npts, int(input.shape[1]), int(input.shape[0]), times).__numpy__[0]
|
||||
output[output==1e37] = NaN
|
||||
return output
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue