From commits-return-2780-apmail-climate-commits-archive=climate.apache.org@climate.apache.org Mon Jan 22 14:32:48 2018 Return-Path: X-Original-To: apmail-climate-commits-archive@minotaur.apache.org Delivered-To: apmail-climate-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2D3731736C for ; Mon, 22 Jan 2018 14:32:48 +0000 (UTC) Received: (qmail 22501 invoked by uid 500); 22 Jan 2018 14:32:48 -0000 Delivered-To: apmail-climate-commits-archive@climate.apache.org Received: (qmail 22463 invoked by uid 500); 22 Jan 2018 14:32:47 -0000 Mailing-List: contact commits-help@climate.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@climate.apache.org Delivered-To: mailing list commits@climate.apache.org Received: (qmail 22454 invoked by uid 99); 22 Jan 2018 14:32:47 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jan 2018 14:32:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CE6D7E04DB; Mon, 22 Jan 2018 14:32:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: huikyole@apache.org To: commits@climate.apache.org Date: Mon, 22 Jan 2018 14:32:47 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/3] climate git commit: CLIMATE-942 Integer Passed To Temporal Rebin Rather Than String Throws Unknown Unit Type Error Repository: climate Updated Branches: refs/heads/master 1fd1fc451 -> d8278e241 CLIMATE-942 Integer Passed To Temporal Rebin Rather Than String Throws Unknown Unit Type Error Project: http://git-wip-us.apache.org/repos/asf/climate/repo Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/fd9ad3d5 Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/fd9ad3d5 Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/fd9ad3d5 Branch: refs/heads/master Commit: fd9ad3d59c33a8e02069fec7ce0ef30e056896af Parents: 4cf79f3 Author: Michael Anderson Authored: Fri Jan 5 06:19:02 2018 -0500 Committer: Michael Anderson Committed: Fri Jan 5 06:19:02 2018 -0500 ---------------------------------------------------------------------- ocw-ui/backend/processing.py | 5 +++-- .../app/scripts/controllers/parameterselect.js | 20 +++++++++++--------- 2 files changed, 14 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/climate/blob/fd9ad3d5/ocw-ui/backend/processing.py ---------------------------------------------------------------------- diff --git a/ocw-ui/backend/processing.py b/ocw-ui/backend/processing.py index 13ebe55..bdb1d38 100644 --- a/ocw-ui/backend/processing.py +++ b/ocw-ui/backend/processing.py @@ -216,8 +216,9 @@ def run_evaluation(): in target_datasets] # Do temporal re-bin based off of passed resolution - ref_dataset = dsp.temporal_rebin(ref_dataset, time_delta) - target_datasets = [dsp.temporal_rebin(ds, time_delta) + temporal_resolution_type = data['temporal_resolution_type'] + ref_dataset = dsp.temporal_rebin(ref_dataset, temporal_resolution_type) + target_datasets = [dsp.temporal_rebin(ds, temporal_resolution_type) for ds in target_datasets] http://git-wip-us.apache.org/repos/asf/climate/blob/fd9ad3d5/ocw-ui/frontend/app/scripts/controllers/parameterselect.js ---------------------------------------------------------------------- diff --git a/ocw-ui/frontend/app/scripts/controllers/parameterselect.js b/ocw-ui/frontend/app/scripts/controllers/parameterselect.js index cad97e0..6514203 100644 --- a/ocw-ui/frontend/app/scripts/controllers/parameterselect.js +++ b/ocw-ui/frontend/app/scripts/controllers/parameterselect.js @@ -27,8 +27,8 @@ * Controller of the ocwUiApp */ angular.module('ocwUiApp') -.controller('ParameterSelectCtrl', ['$rootScope', '$scope', '$http', '$timeout', - 'selectedDatasetInformation', 'regionSelectParams', 'evaluationSettings', +.controller('ParameterSelectCtrl', ['$rootScope', '$scope', '$http', '$timeout', + 'selectedDatasetInformation', 'regionSelectParams', 'evaluationSettings', function($rootScope, $scope, $http, $timeout, selectedDatasetInformation, regionSelectParams, evaluationSettings) { $scope.datasets = selectedDatasetInformation.getDatasets(); @@ -145,6 +145,8 @@ angular.module('ocwUiApp') data['temporal_resolution'] = 30; } + data['temporal_resolution_type'] = temporal_res; + // Load the Metrics for the evaluation data['metrics'] = [] var metrics = settings.metrics @@ -177,7 +179,7 @@ angular.module('ocwUiApp') window.location = "#/results"; } }, 100); - + }).error(function() { $scope.runningEval = false; }); @@ -192,13 +194,13 @@ angular.module('ocwUiApp') if (parseFloat($scope.displayParams.latMax) > parseFloat($scope.latMax)) $scope.displayParams.latMax = $scope.latMax; - if (parseFloat($scope.displayParams.lonMin) < parseFloat($scope.lonMin)) + if (parseFloat($scope.displayParams.lonMin) < parseFloat($scope.lonMin)) $scope.displayParams.lonMin = $scope.lonMin; - if (parseFloat($scope.displayParams.lonMax) > parseFloat($scope.lonMax)) + if (parseFloat($scope.displayParams.lonMax) > parseFloat($scope.lonMax)) $scope.displayParams.lonMax = $scope.lonMax; - if ($scope.displayParams.start < $scope.start) + if ($scope.displayParams.start < $scope.start) $scope.displayParams.start = $scope.start; if ($scope.displayParams.end > $scope.end) @@ -213,8 +215,8 @@ angular.module('ocwUiApp') $rootScope.$broadcast('redrawOverlays', []); } - $scope.unwatchDatasets = $scope.$watch('datasets', - function() { + $scope.unwatchDatasets = $scope.$watch('datasets', + function() { var numDatasets = $scope.datasets.length; $scope.displayParams.areValid = false; $scope.areInUserRegridState = false; @@ -230,7 +232,7 @@ angular.module('ocwUiApp') // Get the valid lat/lon range in the selected datasets. for (var i = 0; i < numDatasets; i++) { var curDataset = $scope.datasets[i]; - + latMin = (curDataset['latlonVals']['latMin'] > latMin) ? curDataset['latlonVals']['latMin'] : latMin; latMax = (curDataset['latlonVals']['latMax'] < latMax) ? curDataset['latlonVals']['latMax'] : latMax; lonMin = (curDataset['latlonVals']['lonMin'] > lonMin) ? curDataset['latlonVals']['lonMin'] : lonMin;