You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@climate.apache.org by "Alex Goodman (JIRA)" <ji...@apache.org> on 2016/07/06 04:46:11 UTC

[jira] [Closed] (CLIMATE-822) ValueError in RCMES test

     [ https://issues.apache.org/jira/browse/CLIMATE-822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Goodman closed CLIMATE-822.
--------------------------------
    Resolution: Duplicate

I tested Kyo's recent changes and they seem to solve this particular issue as well.

> ValueError in RCMES test
> ------------------------
>
>                 Key: CLIMATE-822
>                 URL: https://issues.apache.org/jira/browse/CLIMATE-822
>             Project: Apache Open Climate Workbench
>          Issue Type: Bug
>            Reporter: Ibrahim Jarif
>            Assignee: Alex Goodman
>            Priority: Critical
>             Fix For: 1.1
>
>
> {code}
> test[smoke*] % python test.py 
> Loading AFRICA_KNMI-RACMO2.2b_CTL_ERAINT_MM_50km_1989-2008_tasmax.nc into an OCW Dataset Object
> KNMI_Dataset.values shape: (times, lats, lons) - (240, 201, 194) 
> Working with the rcmed interface to get CRU3.1 Daily-Max Temp
> We are going to use the Model to constrain the Spatial Domain
> The KNMI_Dataset spatial bounds (min_lat, max_lat, min_lon, max_lon) are: 
> (-45.7599983215332, 42.2400016784668, -24.639999389648438, 60.279998779296875)
> The KNMI_Dataset spatial resolution (lat_resolution, lon_resolution) is: 
> (0.43999863, 0.44000053)
> Calculating the Maximum Overlap in Time for the datasets
> Overlap computed to be: 1989-01-01 to 2008-12-01
> We are going to grab the first 3 year(s) of data
> Final Overlap is: 1989-01-01 to 1992-01-01
> Fetching data from RCMED...
> CRU31_Dataset.values shape: (times, lats, lons) - (37, 176, 170)
> KNMI_Dataset.values shape: (times, lats, lons) - (240, 201, 194)
> Our two datasets have a mis-match in time. We will subset on time to 3 years
> CRU31_Dataset.values shape: (times, lats, lons) - (37, 176, 170)
> KNMI_Dataset.values shape: (times, lats, lons) - (37, 201, 194) 
> Temporally Rebinning the Datasets to a Single Timestep
> KNMI_Dataset.values shape: (201, 194)
> CRU31_Dataset.values shape: (176, 170) 
> Spatially Regridding the KNMI_Dataset...
> Spatially Regridding the CRU31_Dataset...
> Final shape of the KNMI_Dataset:(1, 176, 170)
> Final shape of the CRU31_Dataset:(1, 176, 170)
> Setting up a Bias metric to use for evaluation
> Making the Evaluation definition
> Executing the Evaluation using the object's run() method
> Accessing the Results of the Evaluation run
> Generating a contour map using ocw.plotter.draw_contour_map()
> Traceback (most recent call last):
>   File "test.py", line 179, in <module>
>     subtitles=sub_titles)
>   File "/home/ibrahim/Desktop/climate/ocw/plotter.py", line 716, in draw_contour_map
>     cs = m.contourf(x, y, data, cmap=cmap, levels=clevs, extend=extend)
>   File "/home/ibrahim/miniconda2/lib/python2.7/site-packages/mpl_toolkits/basemap/__init__.py", line 521, in with_transform
>     return plotfunc(self,x,y,data,*args,**kwargs)
>   File "/home/ibrahim/miniconda2/lib/python2.7/site-packages/mpl_toolkits/basemap/__init__.py", line 3673, in contourf
>     CS = ax.contourf(x,y,data,*args,**kwargs)
>   File "/home/ibrahim/miniconda2/lib/python2.7/site-packages/matplotlib/__init__.py", line 1812, in inner
>     return func(ax, *args, **kwargs)
>   File "/home/ibrahim/miniconda2/lib/python2.7/site-packages/matplotlib/axes/_axes.py", line 5652, in contourf
>     return mcontour.QuadContourSet(self, *args, **kwargs)
>   File "/home/ibrahim/miniconda2/lib/python2.7/site-packages/matplotlib/contour.py", line 1424, in __init__
>     ContourSet.__init__(self, ax, *args, **kwargs)
>   File "/home/ibrahim/miniconda2/lib/python2.7/site-packages/matplotlib/contour.py", line 863, in __init__
>     self._process_args(*args, **kwargs)
>   File "/home/ibrahim/miniconda2/lib/python2.7/site-packages/matplotlib/contour.py", line 1445, in _process_args
>     x, y, z = self._contour_args(args, kwargs)
>   File "/home/ibrahim/miniconda2/lib/python2.7/site-packages/matplotlib/contour.py", line 1540, in _contour_args
>     self._contour_level_args(z, args)
>   File "/home/ibrahim/miniconda2/lib/python2.7/site-packages/matplotlib/contour.py", line 1183, in _contour_level_args
>     raise ValueError("Filled contours require at least 2 levels.")
> ValueError: Filled contours require at least 2 levels.
> {code}



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