本文整理汇总了Python中PISM.optionsIsSet方法的典型用法代码示例。如果您正苦于以下问题:Python PISM.optionsIsSet方法的具体用法?Python PISM.optionsIsSet怎么用?Python PISM.optionsIsSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PISM
的用法示例。
在下文中一共展示了PISM.optionsIsSet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setFromOptions
# 需要导入模块: import PISM [as 别名]
# 或者: from PISM import optionsIsSet [as 别名]
def setFromOptions(self):
config = self.config
# FIXME (DAM 4/28/11)
# These options probably don't belong here. Seems like IceBasalResistancePlasticLaw
# should be able to set these for itself.
for o in PISM.OptionsGroup(title="Options for pseudo-plastic ice law"):
# // use pseudo plastic instead of pure plastic; see iMbasal.cc
config.flag_from_option("pseudo_plastic", "do_pseudo_plastic_till")
# // power in denominator on pseudo_plastic_uthreshold; typical is q=0.25; q=0 is pure plastic
config.scalar_from_option("pseudo_plastic_q", "pseudo_plastic_q")
if PISM.optionsIsSet("-pseudo_plastic_q"):
config.set_flag("do_pseudo_plastic_till", True)
# // threshold; at this velocity tau_c is basal shear stress
config.scalar_from_option("pseudo_plastic_uthreshold", "pseudo_plastic_uthreshold")
if PISM.optionsIsSet("-pseudo_plastic_uthreshold"):
config.set_flag("do_pseudo_plastic_till", True);
# // controls regularization of plastic basal sliding law
config.scalar_from_option("plastic_reg", "plastic_regularization")
示例2: initPhysics
# 需要导入模块: import PISM [as 别名]
# 或者: from PISM import optionsIsSet [as 别名]
def initPhysics(self):
config = self.config
self.basal = PISM.IceBasalResistancePlasticLaw(
config.get("plastic_regularization") / PISM.secpera,
config.get_flag("do_pseudo_plastic_till"),
config.get("pseudo_plastic_q"),
config.get("pseudo_plastic_uthreshold") / PISM.secpera);
if PISM.optionsIsSet("-ssa_glen"):
self.ice = PISM.CustomGlenIce(self.grid.com,"",config)
B_schoof = 3.7e8; # Pa s^{1/3}; hardness
self.ice.setHardness(B_schoof)
else:
self.ice = PISM.GPBLDIce(self.grid.com, "", config)
self.ice.setFromOptions()
self.enthalpyconverter = PISM.EnthalpyConverter(config)
if PISM.getVerbosityLevel() >3:
self.enthalpyconverter.viewConstants(PETSc.Viewer.STDOUT())