From 46f252319e832c7a8e0af126a823df9adf806039 Mon Sep 17 00:00:00 2001 From: Ben Steffensmeier Date: Tue, 15 Jan 2013 18:08:19 -0600 Subject: [PATCH] Issue #1493 fix grib2 decoder to handle ensembles Former-commit-id: 02e0433afc4c5690b5c538f552bb738aba99fb6c [formerly 7d155653bc07e72a7240215f79c65d65a7aed74d] [formerly 02e0433afc4c5690b5c538f552bb738aba99fb6c [formerly 7d155653bc07e72a7240215f79c65d65a7aed74d] [formerly 4595797f5f635673aad386d55fdee8a84bac6c17 [formerly c694df943bb70f2903fe495400061444a67d3357]]] Former-commit-id: 4595797f5f635673aad386d55fdee8a84bac6c17 Former-commit-id: e7969ff457a1f0d71aecaeb209f84fe24d6b4d4e [formerly fb237583e2d6451e0bb4c3a866b99c279b1f6991] Former-commit-id: e8255e320db80266884382f2bc6c1e9c4772f089 --- .../com.raytheon.edex.plugin.grib/GribDecoder.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/GribDecoder.py b/edexOsgi/com.raytheon.edex.plugin.grib/GribDecoder.py index 47d00f2970..9da78b1cab 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/GribDecoder.py +++ b/edexOsgi/com.raytheon.edex.plugin.grib/GribDecoder.py @@ -593,19 +593,19 @@ class GribDecoder(): # Special case handling for specific PDS Templates if pdsTemplateNumber == 1 or pdsTemplateNumber == 11: - typeEnsemble = Integer(pdsTemplate[15]) - perturbationNumber = Integer(pdsTemplate[16]) + typeEnsemble = Integer(pdsTemplate[15]).intValue() + perturbationNumber = Integer(pdsTemplate[16]).intValue() pdsFields['numForecasts'] = Integer(pdsTemplate[17]) if(typeEnsemble == 0): - pdsFields['ensembleId'] = "ctlh" + perturbationNumber; + pdsFields['ensembleId'] = "ctlh" + str(perturbationNumber); elif(typeEnsemble == 1): - pdsFields['ensembleId'] = "ctll" + perturbationNumber; + pdsFields['ensembleId'] = "ctll" + str(perturbationNumber); elif(typeEnsemble == 2): - pdsFields['ensembleId'] = "n" + perturbationNumber; + pdsFields['ensembleId'] = "n" + str(perturbationNumber); elif(typeEnsemble == 3): - pdsFields['ensembleId'] = "p" + perturbationNumber; + pdsFields['ensembleId'] = "p" + str(perturbationNumber); else: - pdsFields['ensembleId'] = typeEnsemble + "." + perturbationNumber; + pdsFields['ensembleId'] = str(typeEnsemble) + "." + str(perturbationNumber); if pdsTemplateNumber == 11: endTime = GregorianCalendar(pdsTemplate[18], pdsTemplate[19] - 1, pdsTemplate[20], pdsTemplate[21], pdsTemplate[22], pdsTemplate[23])