XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • None
    • 1.1.0
    • None
    • None

    Description

      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.
      
      

      Attachments

        Issue Links

          Activity

            People

              agoodman Alex Goodman
              jarifibrahim Ibrahim Jarif
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: