コード例 #1
0
 def test_get_images(self):
     provider = GleamProvider(CubeConfig(end_time=datetime(2001, 12, 31, 23, 0)), dir=SOURCE_DIR, var="S")
     provider.prepare()
     images = provider.compute_variable_images(datetime(2001, 1, 1), datetime(2001, 1, 9))
     self.assertIsNotNone(images)
     self.assertTrue('evaporative_stress' in images)
     image = images['evaporative_stress']
     self.assertEqual((720, 1440), image.shape)
コード例 #2
0
 def test_get_high_res_images(self):
     provider = GleamProvider(
         CubeConfig(grid_width=4320, grid_height=2160, spatial_res=1 / 12, end_time=datetime(2001, 12, 31, 23, 0)),
         dir=SOURCE_DIR, var="S")
     provider.prepare()
     images = provider.compute_variable_images(datetime(2001, 1, 1), datetime(2001, 1, 9))
     self.assertIsNotNone(images)
     self.assertTrue('evaporative_stress' in images)
     image = images['evaporative_stress']
     self.assertEqual((2160, 4320), image.shape)