本文整理汇总了Python中iris.cube.CubeList.merge方法的典型用法代码示例。如果您正苦于以下问题:Python CubeList.merge方法的具体用法?Python CubeList.merge怎么用?Python CubeList.merge使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类iris.cube.CubeList
的用法示例。
在下文中一共展示了CubeList.merge方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_combination_with_realization
# 需要导入模块: from iris.cube import CubeList [as 别名]
# 或者: from iris.cube.CubeList import merge [as 别名]
def test_combination_with_realization(self):
# => fp, rt, t: 8; realization: 2
triples = ((0, 10, 1),
(0, 10, 2),
(0, 11, 1),
(0, 11, 3), # This '3' breaks the pattern.
(1, 10, 1),
(1, 10, 2),
(1, 11, 1),
(1, 11, 2))
en1_cubes = [self._make_cube(*triple, realization=1) for
triple in triples]
en2_cubes = [self._make_cube(*triple, realization=2) for
triple in triples]
cubes = CubeList(en1_cubes) + CubeList(en2_cubes)
cube, = cubes.merge()
self.assertCML(cube, checksum=False)
示例2: test_orthogonal_with_realization
# 需要导入模块: from iris.cube import CubeList [as 别名]
# 或者: from iris.cube.CubeList import merge [as 别名]
def test_orthogonal_with_realization(self):
# => fp: 2; rt: 2; t: 2; realization: 2
triples = ((0, 10, 1),
(0, 10, 2),
(0, 11, 1),
(0, 11, 2),
(1, 10, 1),
(1, 10, 2),
(1, 11, 1),
(1, 11, 2))
en1_cubes = [self._make_cube(*triple, realization=1) for
triple in triples]
en2_cubes = [self._make_cube(*triple, realization=2) for
triple in triples]
cubes = CubeList(en1_cubes) + CubeList(en2_cubes)
cube, = cubes.merge()
self.assertCML(cube, checksum=False)
示例3: test_combination_with_extra_triple
# 需要导入模块: from iris.cube import CubeList [as 别名]
# 或者: from iris.cube.CubeList import merge [as 别名]
def test_combination_with_extra_triple(self):
# => fp, rt, t, realization: 17
triples = ((0, 10, 1),
(0, 10, 2),
(0, 11, 1),
(0, 11, 2),
(1, 10, 1),
(1, 10, 2),
(1, 11, 1),
(1, 11, 2))
en1_cubes = [self._make_cube(*triple, realization=1) for
triple in triples]
# Add extra time triple on the end.
en2_cubes = [self._make_cube(*triple, realization=2) for
triple in triples + ((1, 11, 3),)]
cubes = CubeList(en1_cubes) + CubeList(en2_cubes)
cube, = cubes.merge()
self.assertCML(cube, checksum=False)
示例4: test_combination_with_extra_realization
# 需要导入模块: from iris.cube import CubeList [as 别名]
# 或者: from iris.cube.CubeList import merge [as 别名]
def test_combination_with_extra_realization(self):
# => fp, rt, t, realization: 17
triples = ((0, 10, 1),
(0, 10, 2),
(0, 11, 1),
(0, 11, 2),
(1, 10, 1),
(1, 10, 2),
(1, 11, 1),
(1, 11, 2))
en1_cubes = [self._make_cube(*triple, realization=1) for
triple in triples]
en2_cubes = [self._make_cube(*triple, realization=2) for
triple in triples]
# Add extra that is a duplicate of one of the time triples
# but with a different realisation.
en3_cubes = [self._make_cube(0, 10, 2, realization=3)]
cubes = CubeList(en1_cubes) + CubeList(en2_cubes) + CubeList(en3_cubes)
cube, = cubes.merge()
self.assertCML(cube, checksum=False)