Issue #3101 fix some derived parameters on win64 platform
Change-Id: I9de1d31e7f7c19af437aef834aa84f163bf36d86 Former-commit-id:3aa9bfdca1
[formerly49d34cc4e4
] [formerly5191b61b30
] [formerly3aa9bfdca1
[formerly49d34cc4e4
] [formerly5191b61b30
] [formerlyaa7c1fac90
[formerly5191b61b30
[formerly 4659c0240aa31b615bc50228906d514f47a72f94]]]] Former-commit-id:aa7c1fac90
Former-commit-id:c333277d30
[formerly815aa21d8e
] [formerly e218d9c6b2e2544a412d7bf24b528ba73c8cd8fc [formerly8c1748d370
]] Former-commit-id: a4bf8704f87869be96548083ce3e4e75a769e292 [formerlyb708774e64
] Former-commit-id:cf09a6729c
This commit is contained in:
parent
fb64a8684f
commit
9831077b42
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