本文整理汇总了Python中ocgis.RequestDataset.metadata['dimensions']['dist_dim']['dist']方法的典型用法代码示例。如果您正苦于以下问题:Python RequestDataset.metadata['dimensions']['dist_dim']['dist']方法的具体用法?Python RequestDataset.metadata['dimensions']['dist_dim']['dist']怎么用?Python RequestDataset.metadata['dimensions']['dist_dim']['dist']使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ocgis.RequestDataset
的用法示例。
在下文中一共展示了RequestDataset.metadata['dimensions']['dist_dim']['dist']方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_write_variable_collection_netcdf4_mpi
# 需要导入模块: from ocgis import RequestDataset [as 别名]
# 或者: from ocgis.RequestDataset import metadata['dimensions']['dist_dim']['dist'] [as 别名]
def test_write_variable_collection_netcdf4_mpi(self):
# TODO: TEST: Test writing a grouped netCDF file in parallel.
self.add_barrier = False
if not env.USE_NETCDF4_MPI:
raise SkipTest('not env.USE_NETCDF4_MPI')
path = self.create_rank_valued_netcdf()
# if vm.rank == 0:
# self.ncdump(path, header_only=False)
rd = RequestDataset(path, driver='netcdf')
rd.metadata['dimensions']['dist_dim']['dist'] = True
field = rd.get()
# self.barrier_print(field['data'].get_value())
if vm.rank == 0:
actual_path = self.get_temporary_file_path('actual_mpi.nc')
else:
actual_path = None
actual_path = vm.bcast(actual_path)
# self.barrier_print('before field.write')
field.write(actual_path)
# self.barrier_print('after field.write')
if vm.rank == 0:
# self.ncdump(actual_path, header_only=False)
self.assertNcEqual(actual_path, path)