climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1514449 - /incubator/climate/branches/RefactorInput/ocw/dataset_processor.py
Date Thu, 15 Aug 2013 19:26:20 GMT
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):



Mime
View raw message