本文整理汇总了Python中PISM.grid_info方法的典型用法代码示例。如果您正苦于以下问题:Python PISM.grid_info方法的具体用法?Python PISM.grid_info怎么用?Python PISM.grid_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PISM
的用法示例。
在下文中一共展示了PISM.grid_info方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: init_grid2d_from_file
# 需要导入模块: import PISM [as 别名]
# 或者: from PISM import grid_info [as 别名]
def init_grid2d_from_file(grid,bootfile,Mx=None,My=None):
pio = PISM.PISMIO(grid)
pio.open_for_reading(bootfile)
grid_info = PISM.grid_info(); pio.get_grid_info( "land_ice_thickness", grid_info )
pio.close()
grid.Mx = grid_info.x_len;
grid.My = grid_info.y_len;
grid.Mz = 2;
grid.x0 = grid_info.x0;
grid.y0 = grid_info.y0;
grid.Lx = grid_info.Lx;
grid.Ly = grid_info.Ly;
if not Mx is None:
grid.Mx = Mx
if not My is None:
grid.My = My
grid.compute_nprocs();
grid.compute_ownership_ranges();
grid.compute_horizontal_spacing();
grid.compute_vertical_levels();
grid.createDA()