Cameron Goodale created CLIMATE-237:
---------------------------------------

             Summary: Add Subset Generation function to dataset_processor module
                 Key: CLIMATE-237
                 URL: https://issues.apache.org/jira/browse/CLIMATE-237
             Project: Apache Open Climate Workbench
          Issue Type: Sub-task
          Components: rcmet
    Affects Versions: 0.1-incubating
         Environment: *nix
            Reporter: Cameron Goodale
            Assignee: Cameron Goodale
             Fix For: 0.2-incubating


It has been discussed to have a subsetting capability added into OCW.  The 
logic place for this would be in the dataset_processor module.

The initial design is to take in a list of datasets and a subset options 
dictionary.  Example of calling the function is given below:

{code}
from dataset import Dataset
import dataset_processor as dsp
# build up 2 datasets
ds1 = Dataset(....)
ds2 = Dataset(....)
#declare the subsetting options you want to use
subset_options = {'latMin' : 10, 'latMax' : 20,
                           'lonMin' : -130, 'lonMax': -90,
                           'startDate' : datetime.datetime(2000,1,1),
                           'endDate' : datetime.datetime(2010,12,31)} 

ds1_subsetted, ds2_subsetted = dsp.subset([dataset_one, dataset_two], 
subset_options)
{code}

The ds1_subsetted and ds2_subsetted variables are just Dataset objects that 
comply with the subset options.  The returned datasets will come back in the 
same order they were given.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to