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

ASF GitHub Bot commented on CLIMATE-623:
----------------------------------------

Github user cgoodale commented on a diff in the pull request:

    https://github.com/apache/climate/pull/192#discussion_r28900493
  
    --- Diff: ocw/dataset.py ---
    @@ -180,17 +180,23 @@ def _validate_inputs(self, lats, lons, times, values):
                 err_msg = "Longitude Array should be 1 dimensional. %s 
dimensions found." % lon_dim
             elif time_dim != 1:
                 err_msg = "Time Array should be 1 dimensional.  %s dimensions 
found." % time_dim
    -        elif value_dim != 3:
    -            err_msg = "Value Array should be 3 dimensional.  %s dimensions 
found." % value_dim
    +        elif value_dim < 2:
    +            err_msg = "Value Array should be at least 2 dimensional.  %s 
dimensions found." % value_dim
             # Finally check that the Values array conforms to the proper shape
    -        elif values.shape != (time_count, lat_count, lon_count):
    +        if value_dim == 2 and values.shape != (lat_count, lon_count):
                 err_msg = """Value Array must be of shape (times, lats, lons).
    -Expected shape (%s, %s, %s) but received (%s, %s, %s)""" % (time_count,
    -                                                            lat_count,
    -                                                            lon_count,
    -                                                            
values.shape[0],
    -                                                            
values.shape[1],
    -                                                            
values.shape[2])
    +    Expected shape (%s, %s, %s) but received (%s, %s, %s)""" % (lat_count,
    --- End diff --
    
    Need to reduce the string inputs to be 4 instead of 6.


> Allow propogation of 2D arrays
> ------------------------------
>
>                 Key: CLIMATE-623
>                 URL: https://issues.apache.org/jira/browse/CLIMATE-623
>             Project: Apache Open Climate Workbench
>          Issue Type: Improvement
>            Reporter: Kim Whitehall
>            Assignee: Kim Whitehall
>
> Some calculations return 2D arrays which are then needed for metric 
> calculations and plots. As such, these should be allowed to propagate.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to