本文整理汇总了Python中cdo.Cdo.smooth方法的典型用法代码示例。如果您正苦于以下问题:Python Cdo.smooth方法的具体用法?Python Cdo.smooth怎么用?Python Cdo.smooth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cdo.Cdo
的用法示例。
在下文中一共展示了Cdo.smooth方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_smooth
# 需要导入模块: from cdo import Cdo [as 别名]
# 或者: from cdo.Cdo import smooth [as 别名]
def test_smooth(self):
cdo = Cdo()
if (parse_version(cdo.version()) >= parse_version('1.7.2') and cdo.hasNetcdf):
ifile = "-select,level=0 " + DATA_DIR + '/icon/phc.nc'
cdo = Cdo()
cdo.debug = DEBUG
#cdo.merge(input='/home/ram/data/icon/input/phc3.0/PHC__3.0__TempO__1x1__annual.nc /home/ram/data/icon/input/phc3.0/PHC__3.0__SO__1x1__annual.nc',
# output=ifile,
# options='-O')
smooth = cdo.smooth(input=" -sellonlatbox,0,30,0,90 -chname,SO,s,TempO,t " + ifile, returnMaArray='s',options='-f nc')
plot(np.flipud(smooth[0,:,:]),ofile='smooth',title='smooth')
smooth2 = cdo.smooth('nsmooth=2',input="-sellonlatbox,0,30,0,90 -chname,SO,s,TempO,t " + ifile, returnMaArray='s',options='-f nc')
plot(np.flipud(smooth2[0,:,:]),ofile='smooth2',title='smooth,nsmooth=2')
smooth4 = cdo.smooth('nsmooth=4',input="-sellonlatbox,0,30,0,90 -chname,SO,s,TempO,t " + ifile, returnMaArray='s',options='-f nc')
plot(np.flipud(smooth4[0,:,:]),ofile='smooth4',title='smooth,nsmooth=4')
smooth9 = cdo.smooth9(input="-sellonlatbox,0,30,0,90 -chname,SO,s,TempO,t " + ifile, returnMaArray='s',options='-f nc')
plot(np.flipud(smooth9[0,:,:]),ofile='smooth9',title='smooth9')
smooth3deg = cdo.smooth('radius=6deg',input="-sellonlatbox,0,30,0,90 -chname,SO,s,TempO,t " + ifile, returnMaArray='s',options='-f nc')
plot(np.flipud(smooth3deg[0,:,:]),ofile='smooth3deg',title='smooth,radius=6deg')
smooth20 = cdo.smooth('nsmooth=20',input="-sellonlatbox,0,30,0,90 -chname,SO,s,TempO,t " + ifile, returnMaArray='s',options='-f nc')
plot(np.flipud(smooth20[0,:,:]),ofile='smooth20',title='smooth,nsmooth=20')