本文整理汇总了Python中cdo.Cdo.sinfov方法的典型用法代码示例。如果您正苦于以下问题:Python Cdo.sinfov方法的具体用法?Python Cdo.sinfov怎么用?Python Cdo.sinfov使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cdo.Cdo
的用法示例。
在下文中一共展示了Cdo.sinfov方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_simple
# 需要导入模块: from cdo import Cdo [as 别名]
# 或者: from cdo.Cdo import sinfov [as 别名]
def test_simple(self):
cdo = Cdo()
cdo.debug = DEBUG
s = cdo.sinfov(input="-topo",options="-f nc")
s = cdo.sinfov(input="-remapnn,r36x18 -topo",options="-f nc")
f = tempfile.NamedTemporaryFile(delete=True,prefix='cdoPy').name
cdo.expr("'z=log(abs(topo)+1)*9.81'",input="-topo", output=f, options="-f nc")
s = cdo.infov(input=f)
cdo.stdatm("0",output=f,options="-f nc")
rm([f,])
示例2: test_log
# 需要导入模块: from cdo import Cdo [as 别名]
# 或者: from cdo.Cdo import sinfov [as 别名]
def test_log(self):
cmd = '-fldmean -mul -random,r20x20 -topo,r20x20'
if DEBUG:
print('# logging with a real file')
cdo = Cdo(logging = True,logFile='foo.log')
cdo.topo()
cdo.temp()
cdo.sinfov(input=cmd)
if DEBUG:
cdo.showLog()
cmd = '-fldmean -mul -random,r20x20 -topo,r20x20'
if DEBUG:
print('# logging with a real file, passed as unicode string')
cdo = Cdo(logging=True, logFile=u'foo.log')
cdo.topo()
cdo.temp()
cdo.sinfov(input=cmd)
if DEBUG:
cdo.showLog()
if DEBUG:
print('# logging with in-memory stringio')
cdo = Cdo(logging = True)
cdo.topo()
cdo.temp()
cdo.sinfov(input=cmd)
if DEBUG:
cdo.showLog()
示例3: testCall
# 需要导入模块: from cdo import Cdo [as 别名]
# 或者: from cdo.Cdo import sinfov [as 别名]
def testCall(self):
cdo = Cdo()
if DEBUG:
print(cdo.sinfov(input=DATA_DIR+'/icon/oce.nc'))
示例4: test_output_set_to_none
# 需要导入模块: from cdo import Cdo [as 别名]
# 或者: from cdo.Cdo import sinfov [as 别名]
def test_output_set_to_none(self):
cdo = Cdo()
self.assertEqual(str,type(cdo.topo(output = None)))
self.assertEqual("GRIB",cdo.sinfov(input = "-topo", output = None)[0].split(' ')[-1])