本文整理汇总了Python中PISM.optionsIntWasSet方法的典型用法代码示例。如果您正苦于以下问题:Python PISM.optionsIntWasSet方法的具体用法?Python PISM.optionsIntWasSet怎么用?Python PISM.optionsIntWasSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PISM
的用法示例。
在下文中一共展示了PISM.optionsIntWasSet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: import PISM [as 别名]
# 或者: from PISM import optionsIntWasSet [as 别名]
vel_sia_observed.metadata(0).set_name('u_sia_observed')
vel_sia_observed.metadata(0).set_string('long_name', "x-component of the 'observed' SIA velocities")
vel_sia_observed.metadata(1).set_name('v_sia_observed')
vel_sia_observed.metadata(1).set_string('long_name', "y-component of the 'observed' SIA velocities")
vel_ssa_observed.copy_from(vel_surface_observed)
vel_ssa_observed.add(-1, vel_sia_observed)
(designFunctional, stateFunctional) = PISM.invert.ssa.createTikhonovFunctionals(ssarun)
eta = config.get_double("tikhonov_penalty_weight")
solver_gn = PISM.InvSSATikhonovGN(ssarun.ssa, zeta, vel_ssa_observed, eta, designFunctional, stateFunctional)
(seed, seed_set) = PISM.optionsIntWasSet("-inv_seed", "")
if seed_set:
np.random.seed(seed + PISM.Context().rank)
d1 = PISM.vec.randVectorS(grid, 1)
d2 = PISM.vec.randVectorS(grid, 1)
GNd1 = PISM.IceModelVec2S()
GNd1.create(grid, "", PISM.WITHOUT_GHOSTS)
GNd2 = PISM.IceModelVec2S()
GNd2.create(grid, "", PISM.WITHOUT_GHOSTS)
solver_gn.apply_GN(d1, GNd1)
solver_gn.apply_GN(d2, GNd2)
ip1 = d1.get_vec().dot(GNd2.get_vec())