Mazi,

On the next iteration of updates to local.py try using the test data to
make sure that it passes.

--Paul

On 8/21/13 9:28 AM, "Maziyar Boustani (JIRA)" <[email protected]> wrote:

>
>    [ 
>https://issues.apache.org/jira/browse/CLIMATE-268?page=com.atlassian.jira.
>plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13746538#co
>mment-13746538 ] 
>
>Maziyar Boustani commented on CLIMATE-268:
>------------------------------------------
>
>Here is the header for
>AFRICA_KNMI-RACMO2.2b_CTL_ERAINT_MM_50km_1989-2008_tasmax.nc (FILE_1):
>
>{code}
>variables:
>       double time(time) ;
>               time:bounds = "time_bnds" ;
>               time:calendar = "standard" ;
>               time:long_name = "time" ;
>               time:standard_name = "time" ;
>               time:units = "months since 1950-01-01 00:00:00" ;
>       char rotated_pole ;
>               rotated_pole:grid_mapping_name = "rotated_latitude_longitude" ;
>               rotated_pole:grid_north_pole_latitude = 90.f ;
>               rotated_pole:grid_north_pole_longitude = 0.f ;
>       float rlon(rlon) ;
>               rlon:axis = "X" ;
>               rlon:standard_name = "grid_longitude" ;
>               rlon:long_name = "longitude in rotated pole grid" ;
>               rlon:units = "degrees" ;
>       float lon(rlat, rlon) ;
>               lon:standard_name = "longitude" ;
>               lon:long_name = "longitude" ;
>               lon:units = "degrees_east" ;
>       float rlat(rlat) ;
>               rlat:axis = "Y" ;
>               rlat:standard_name = "grid_latitude" ;
>               rlat:long_name = "latitude in rotated grid" ;
>               rlat:units = "degrees" ;
>       float lat(rlat, rlon) ;
>               lat:standard_name = "latitude" ;
>               lat:long_name = "latitude" ;
>               lat:units = "degrees_north" ;
>       float height(height) ;
>               height:axis = "Z" ;
>               height:standard_name = "height" ;
>               height:long_name = "height above the surface" ;
>               height:units = "m" ;
>               height:positive = "up" ;
>       double time_bnds(time, bnds) ;
>               time_bnds:long_name = "time bounds" ;
>       float tasmax(time, height, rlat, rlon) ;
>               tasmax:standard_name = "air_temperature" ;
>               tasmax:long_name = "Daily maximum 2-m temperature" ;
>               tasmax:units = "K" ;
>               tasmax:cell_methods = "time: maximum" ;
>               tasmax:coordinates = "lon lat" ;
>               tasmax:grid_mapping = "rotated_pole" ;
>               tasmax:_FillValue = 1.e+30f ;
>{code}
>So based on the header of this file, not only the values are in 4D array
>but also the latitude and longitude are in 2D array which is the reason
>you got this error.
>We need to do more work on local.py to convert the latitude and longitude
>to 1D if they are 2D.
>I will go ahead and create JIRA's for that.
>                
>> local.py returns a Dataset Object with a 4-D Array for the
>>Dataset.values
>> 
>>-------------------------------------------------------------------------
>>
>>                 Key: CLIMATE-268
>>                 URL: https://issues.apache.org/jira/browse/CLIMATE-268
>>             Project: Apache Open Climate Workbench
>>          Issue Type: Sub-task
>>          Components: general
>>    Affects Versions: 0.2-incubating
>>         Environment: *nix
>>            Reporter: Cameron Goodale
>>            Assignee: Cameron Goodale
>>             Fix For: 0.3-incubating
>>
>>   Original Estimate: 2h
>>  Remaining Estimate: 2h
>>
>> When loading a dataset from local.py the returned OCW Dataset object
>>has a value attribute with a 4 dimensional array, when it should be 3
>>dimensions.
>> Current Shape:
>> (time, height?, lat, lon)
>> Instead it should be:
>> :param values: Three dimensional numpy array of parameter values with
>>shape [timesLength, latsLength, lonsLength]. Per Dataset class
>>documentation.
>> The local.py code needs to be updated to ensure the values are
>>constructed and passed into the Dataset constructor.
>
>--
>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