[ 
https://issues.apache.org/jira/browse/CLIMATE-349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13914931#comment-13914931
 ] 

Maziyar Boustani commented on CLIMATE-349:
------------------------------------------

Hi Alex, Mike,


@Alex: Thanks for respond. I agree with you that we need to have a full-year 
(number of month divisible by 12) data to be able to calculate a mean value for 
each year.
So here what we are going to do:

@Mike:
We would have refactored version of "calcAnnualCycleMeans" in metric and 
refactored version of "reshapeMonthlyData" in utils file.
I will put a guard for incoming dataset on "calcAnnualCycleMeans" function to 
filter dataset for full-year format if not and then send it to 
"reshapeMonthlyData" for reshaping. (because asking for annually mean value of 
data for not full-year data would not make sense).
In this case "reshapeMonthlyData" would always expect to get full-year value 
(data % 12), otherwise raise an error.
The result would be recorded in a log file for user.

> Refactoring "reshapeMonthlyData" from rcmes/utils/misc.py 
> ----------------------------------------------------------
>
>                 Key: CLIMATE-349
>                 URL: https://issues.apache.org/jira/browse/CLIMATE-349
>             Project: Apache Open Climate Workbench
>          Issue Type: Improvement
>          Components: metrics
>    Affects Versions: 0.3-incubating
>            Reporter: Maziyar Boustani
>            Assignee: Maziyar Boustani
>             Fix For: 0.4-incubating
>
>
> Refactoring function "reshapeMonthlyData" from [1] to [2] and providing 
> unittest for that.
> [1]:https://svn.apache.org/repos/asf/incubator/climate/trunk/rcmet/src/main/python/rcmes/utils/misc.py
> [2]:https://svn.apache.org/repos/asf/incubator/climate/trunk/ocw/utils.py



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to