You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by jo...@apache.org on 2013/08/15 21:26:20 UTC

svn commit: r1514449 - /incubator/climate/branches/RefactorInput/ocw/dataset_processor.py

Author: joyce
Date: Thu Aug 15 19:26:20 2013
New Revision: 1514449

URL: http://svn.apache.org/r1514449
Log:
CLIMATE-237 - Fix bug in check for subregion containment by dataset.

Modified:
    incubator/climate/branches/RefactorInput/ocw/dataset_processor.py

Modified: incubator/climate/branches/RefactorInput/ocw/dataset_processor.py
URL: http://svn.apache.org/viewvc/incubator/climate/branches/RefactorInput/ocw/dataset_processor.py?rev=1514449&r1=1514448&r2=1514449&view=diff
==============================================================================
--- incubator/climate/branches/RefactorInput/ocw/dataset_processor.py (original)
+++ incubator/climate/branches/RefactorInput/ocw/dataset_processor.py Thu Aug 15 19:26:20 2013
@@ -648,11 +648,14 @@ def _is_subregion_contained_by_dataset(s
         otherwise
     '''
     latMin, latMax, lonMin, lonMax = target_dataset.spatial_boundaries()
+    start, end = target_dataset.time_range()
     return (
         latMin <= subregion["latMin"] <= latMax and
         latMin <= subregion["latMax"] <= latMax and
         lonMin <= subregion["lonMin"] <= lonMax and
-        lonMin <= subregion["lonMax"] <= lonMax
+        lonMin <= subregion["lonMax"] <= lonMax and
+        start <= subregion["start"] <= end and
+        start <= subregion["end"] <= end
     )
 
 def _get_subregion_slice_indices(subregion, target_dataset):