[
https://issues.apache.org/jira/browse/CLIMATE-598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14376089#comment-14376089
]
ASF GitHub Bot commented on CLIMATE-598:
----------------------------------------
Github user MJJoyce commented on a diff in the pull request:
https://github.com/apache/climate/pull/183#discussion_r26949177
--- Diff: ocw/utils.py ---
@@ -312,19 +314,29 @@ def calc_climatology_season(month_start, month_end,
dataset):
t_series = reshape_data[:, month_index].mean(axis=1)
means = t_series.mean(axis=0)
+
return t_series, means
def calc_climatology_monthly(dataset):
''' Calculate monthly mean values for a dataset.
+ Follow COARDS climo stats calculation, the year can be given as 0
+ but the min year allowed in Python is 1
+ http://www.cgd.ucar.edu/cms/eaton/netcdf/CF-20010629.htm#climatology
:param dataset: Monthly binned Dataset object with the number of months
divisible by 12
:type dataset: :class:`dataset.Dataset`
- :returns: Mean values for each month of the year
+ :returns: Mean values for each month of the year and times
:rtype: A 3D :class:`numpy.ndarray` of shape (12, num_lats, num_lons)
+ :returns: Dataset times array of length 12)
--- End diff --
Hey Kim. It looks like you have a lot of duplication here. For explaining
what this returns just stick with one returns/rtype block. For instance:
```
:returns: Mean values for each month of the ..
:rtype: Tuple of the form (values, times) where values is a blah blah blah
```
> Update time attribute of Dataset when values are reshaped
> ---------------------------------------------------------
>
> Key: CLIMATE-598
> URL: https://issues.apache.org/jira/browse/CLIMATE-598
> Project: Apache Open Climate Workbench
> Issue Type: Improvement
> Reporter: Kim Whitehall
> Assignee: Kim Whitehall
>
> Currently, when the data is reshaped into monthly binned datasets to annual
> bins the time attribute of the dataset doesn't reflect the reshape.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)