diff --git a/edexOsgi/com.raytheon.uf.common.derivparam.python/utility/common_static/base/derivedParameters/functions/Cape.py b/edexOsgi/com.raytheon.uf.common.derivparam.python/utility/common_static/base/derivedParameters/functions/Cape.py index da98d5c111..d18b656da9 100644 --- a/edexOsgi/com.raytheon.uf.common.derivparam.python/utility/common_static/base/derivedParameters/functions/Cape.py +++ b/edexOsgi/com.raytheon.uf.common.derivparam.python/utility/common_static/base/derivedParameters/functions/Cape.py @@ -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__ diff --git a/edexOsgi/com.raytheon.uf.common.derivparam.python/utility/common_static/base/derivedParameters/functions/Dcape.py b/edexOsgi/com.raytheon.uf.common.derivparam.python/utility/common_static/base/derivedParameters/functions/Dcape.py index 778bab0f56..c8668c0b13 100644 --- a/edexOsgi/com.raytheon.uf.common.derivparam.python/utility/common_static/base/derivedParameters/functions/Dcape.py +++ b/edexOsgi/com.raytheon.uf.common.derivparam.python/utility/common_static/base/derivedParameters/functions/Dcape.py @@ -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] diff --git a/edexOsgi/com.raytheon.uf.common.derivparam.python/utility/common_static/base/derivedParameters/functions/Filter.py b/edexOsgi/com.raytheon.uf.common.derivparam.python/utility/common_static/base/derivedParameters/functions/Filter.py index 3689fccf16..92f6e41ca8 100644 --- a/edexOsgi/com.raytheon.uf.common.derivparam.python/utility/common_static/base/derivedParameters/functions/Filter.py +++ b/edexOsgi/com.raytheon.uf.common.derivparam.python/utility/common_static/base/derivedParameters/functions/Filter.py @@ -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