本文整理汇总了Python中PISM.verbosityLevelFromOptions方法的典型用法代码示例。如果您正苦于以下问题:Python PISM.verbosityLevelFromOptions方法的具体用法?Python PISM.verbosityLevelFromOptions怎么用?Python PISM.verbosityLevelFromOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PISM
的用法示例。
在下文中一共展示了PISM.verbosityLevelFromOptions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: import PISM [as 别名]
# 或者: from PISM import verbosityLevelFromOptions [as 别名]
import os
context = PISM.Context()
config = context.config
PISM.set_abort_on_sigint(True)
usage = """\
sia_forward.py -i IN.nc [-o file.nc]
where:
-i IN.nc is input file in NetCDF format: contains PISM-written model state
notes:
* -i is required
"""
PISM.verbosityLevelFromOptions()
PISM.show_usage_check_req_opts(context.com, "sia_forward.py", ["-i"], usage)
input_file, input_set = PISM.optionsStringWasSet("-i", "input file")
if not input_set:
import sys
sys.exit(1)
output_file = PISM.optionsString("-o", "output file",
default="sia_" + os.path.basename(input_file))
is_regional = PISM.optionsFlag("-regional",
"Compute SIA using regional model semantics", default=False)
verbosity = PISM.optionsInt("-verbose", "verbosity level", default=2)
periodicity = PISM.XY_PERIODIC
if is_regional: