climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1573260 - /incubator/climate/trunk/ocw-ui/backend/processing.py
Date Sun, 02 Mar 2014 06:33:23 GMT
Author: joyce
Date: Sun Mar  2 06:33:22 2014
New Revision: 1573260

URL: http://svn.apache.org/r1573260
Log:
CLIMATE-360 - Fix subsetting in UI backend

Modified:
    incubator/climate/trunk/ocw-ui/backend/processing.py

Modified: incubator/climate/trunk/ocw-ui/backend/processing.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/ocw-ui/backend/processing.py?rev=1573260&r1=1573259&r2=1573260&view=diff
==============================================================================
--- incubator/climate/trunk/ocw-ui/backend/processing.py (original)
+++ incubator/climate/trunk/ocw-ui/backend/processing.py Sun Mar  2 06:33:22 2014
@@ -149,25 +149,25 @@ def run_evaluation():
     target_datasets = [dsp.normalize_dataset_datetimes(ds, time_step)
                        for ds in target_datasets]
 
+    # Subset the datasets
+    subset = Bounds(eval_bounds['lat_min'],
+                    eval_bounds['lat_max'],
+                    eval_bounds['lon_min'],
+                    eval_bounds['lon_max'],
+                    eval_bounds['start_time'],
+                    eval_bounds['end_time'])
+
+    ref_dataset = dsp.subset(subset, ref_dataset)
+    target_datasets = [dsp.subset(subset, ds)
+                       for ds
+                       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)
 					   for ds
 					   in target_datasets]
 
-    ## Subset the datasets
-    #subset = Bounds(eval_bounds['lat_min'],
-                    #eval_bounds['lat_max'],
-                    #eval_bounds['lon_min'],
-                    #eval_bounds['lon_max'],
-                    #eval_bounds['start_time'],
-                    #eval_bounds['end_time'])
-
-    #ref_dataset = dsp.subset(subset, ref_dataset)
-    #target_datasets = [dsp.subset(subset, ds)
-					   #for ds
-					   #in target_datasets]
-
     # Do spatial re=bin based off of reference dataset + lat/lon steps
     lat_step = data['spatial_rebin_lat_step']
     lon_step = data['spatial_rebin_lon_step']



Mime
View raw message