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 17:23:28 UTC
svn commit: r1514319 -
/incubator/climate/branches/RefactorInput/ocw/dataset_processor.py
Author: joyce
Date: Thu Aug 15 15:23:27 2013
New Revision: 1514319
URL: http://svn.apache.org/r1514319
Log:
CLIMATE-237 - Progress on dataset_process.subset
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=1514319&r1=1514318&r2=1514319&view=diff
==============================================================================
--- incubator/climate/branches/RefactorInput/ocw/dataset_processor.py (original)
+++ incubator/climate/branches/RefactorInput/ocw/dataset_processor.py Thu Aug 15 15:23:27 2013
@@ -153,6 +153,16 @@ def subset(subregion, target_dataset):
# Get subregion indices into subregion data
dataset_slices = _get_subregion_slice_indices(subregion, target_dataset)
# Build new dataset with subset information
+ return Dataset(
+ target_dataset.lats[latStart, latEnd + 1],
+ target_dataset.lons[lonStart, lonEnd + 1],
+ target_dataset.times[timeStart, timeEnd + 1],
+ target_dataset.values[timeStart:timeEnd + 1,
+ latStart:latEnd + 1,
+ lonStart:lonEnd + 1],
+ target_dataset.variable,
+ target_dataset.name
+ )
def _rcmes_spatial_regrid(spatial_values, lat, lon, lat2, lon2, order=1):
'''