Pull from OCW master

Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/c5bf5829
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/c5bf5829
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/c5bf5829

Branch: refs/heads/master
Commit: c5bf5829553cad0a8a5caed031080cbc20843a8c
Parents: 6b24b8d 1340036
Author: huikyole <[email protected]>
Authored: Tue Jul 14 21:53:04 2015 -0700
Committer: huikyole <[email protected]>
Committed: Tue Jul 14 21:53:04 2015 -0700

----------------------------------------------------------------------
 ocw/dataset_processor.py |  0
 ocw/utils.py             | 13 ++++++++++---
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/c5bf5829/ocw/dataset_processor.py
----------------------------------------------------------------------
diff --cc ocw/dataset_processor.py
index 984e142,eb93104..984e142
mode 100644,100755..100755
--- a/ocw/dataset_processor.py
+++ b/ocw/dataset_processor.py

http://git-wip-us.apache.org/repos/asf/climate/blob/c5bf5829/ocw/utils.py
----------------------------------------------------------------------
diff --cc ocw/utils.py
index 2ce5d10,ff6dddd..6ef0366
mode 100644,100755..100755
--- a/ocw/utils.py
+++ b/ocw/utils.py
@@@ -318,25 -338,4 +321,29 @@@ def calc_climatology_monthly(dataset)
          )
          raise ValueError(error)
      else:
++<<<<<<< HEAD
 +        values = reshape_monthly_to_annually(dataset).mean(axis=0)
 +        
 +        # A year can commence from any month
 +        first_month = dataset.times[0].month
 +        times = np.array([datetime.datetime(1, first_month, 1) + 
relativedelta(months = x) 
 +                for x in range(12)])
 +        return values, times
 +
 +def calc_time_series(dataset):
 +    ''' Calculate time series mean values for a dataset
 +
 +    :param dataset: Dataset object 
 +    :type dataset: :class:`dataset.Dataset`
 +
 +    :returns: time series for the dataset of shape (nT)
 +    '''
 +
 +    t_series =[]
 +    for t in xrange(dataset.values.shape[0]):
 +        t_series.append(dataset.values[t,:,:].mean())
 +    
 +    return t_series
++=======
+         return reshape_monthly_to_annually(dataset).mean(axis=0)
++>>>>>>> 1340036ff488decfcefd6cd46c0c17bf2dfe13a8

Reply via email to