Exemple #1
0
 def setUpClass(cls):
     cls.ds = open_dataset(cls.ncfile)
     cls.data = InteractiveList.from_dataset(
         cls.ds, y=0, z=0, t=0, name=cls.var, auto_update=True)
     cls.data[0].arr_name = 'arr0'
     cls.data.arr_name = 'arr0'
     cls.plotter = BarPlotter(cls.data[0])
     cls.create_dirs()
Exemple #2
0
 def setUpClass(cls):
     cls.ds = open_dataset(cls.ncfile)
     cls.data = InteractiveList.from_dataset(cls.ds,
                                             y=[0, 1],
                                             z=0,
                                             t=0,
                                             name=cls.var,
                                             auto_update=True)
     cls.plotter = BasePlotter(cls.data)
Exemple #3
0
 def setUpClass(cls):
     cls.ds = open_dataset(cls.ncfile)
     cls.data = ArrayList.from_dataset(
         cls.ds, t=0, z=0, name=[cls.var], auto_update=True)[0]
     cls.data = cls.data.sel(lon=slice(0, 69.0), lat=slice(81.0, 34.0))
     cls.data.attrs['long_name'] = 'absolute wind speed'
     cls.data.name = 'wind'
     cls.plotter = SimpleVectorPlotter(cls.data)
     cls.create_dirs()
     cls._color_fmts = cls.plotter.fmt_groups['colors']
     # there is an issue with the colorbar that the size of the axes changes
     # slightly after replotting. Therefore we force a replot here
     if not six.PY34:
         cls.plotter.update(color='absolute')
         cls.plotter.update(todefault=True, replot=True)
Exemple #4
0
    def setUpClass(cls):
        cls.ds = open_dataset(cls.ncfile)
        rcParams[CombinedSimplePlotter().vcmap.default_key] = 'winter'
        cls._data = ArrayList.from_dataset(
            cls.ds, t=0, z=0, name=[cls.var], auto_update=True,
            prefer_list=True)[0]
        for i in range(len(cls.data)):
            cls._data[i] = cls._data[i].sel(lon=slice(0, 69.0),
                                            lat=slice(81.0, 34.0))
        cls._data.attrs['long_name'] = 'Temperature'
        cls._data.attrs['name'] = 't2m'
        cls.plotter = CombinedSimplePlotter(cls.data)
        cls.create_dirs()
        cls._color_fmts = cls.plotter.fmt_groups['colors']

        # there is an issue with the colorbar that the size of the axes changes
        # slightly after replotting. Therefore we force a replot here
        cls.plotter.update(color='absolute')
        cls.plotter.update(todefault=True, replot=True)
Exemple #5
0
 def setUpClass(cls):
     cls.ds = open_dataset(cls.ncfile)
     cls.data = InteractiveList.from_dataset(
         cls.ds, y=[0, 1], z=0, t=0, name=cls.var, auto_update=True)
     cls.plotter = BasePlotter(cls.data)
Exemple #6
0
 def setUpClass(cls):
     cls.ds = open_dataset(cls.ncfile)
     cls.data = ArrayList.from_dataset(
         cls.ds, t=0, z=0, name=cls.var, auto_update=True)[0]
     cls.plotter = Simple2DPlotter(cls.data)
     cls.create_dirs()