# 需要导入模块: from cdo import Cdo [as 别名]# 或者: from cdo.Cdo importselname[as 别名]deftest_icon_coords(self):cdo = Cdo()ifcdo.hasNetcdf: ifile = DATA_DIR +'/icon/oce_AquaAtlanticBoxACC.nc'ivar ='t_acc'varIn = cdo.readCdf(ifile) varIn = varIn.variables[ivar] expected =u...
selname/delname 根据变量名选择/删除数据,可指定多个变量名,用逗号隔开即可 sellevel 选择指定层的数据,可指定压力层 GRIB参数多字段选择 selmulti 操作符可以从输入文件中选择多个字段然后输出到文件中。常用形式如下: 代码语言:javascript 复制 cdo selmulti,selection-specification infile outfile selection-specificatio...
mygrid infile.nc input.nc output.nc 要求网格数一致 cdo setcalendar,standard in.nc out.nc 更改time维度的calendar属性 cdo setreftime,'1800-01-01','00:00:00' in.nc out.nc 更改time维度的units cdo -selmon,1,2,3 -selyear,2022/2023,-sellonlatbox,70,135,10,55 -selname,U V input.nc...
In [21]: %time os.system("cdo -selname,SCW,SCTOT,SCH,SCS,REFL_10CM -seltimestep,1/5 wrfout_d02_2016-06-23_06_00_00 wrfsub_cdo.nc") CPU times: user 0 ns, sys: 3.29 ms, total: 3.29 ms Wall time: 36.9 s Out[21]: 0 In [22]: %time cdo.selname("SCW,SCTOT,SCH,SCS,...
cdo-selname,SCW,SCTOT,SCH,SCS,REFL_10CM-seltimestep,1/5wrfout_d02_2016-06-23_06_00_00wrfsub_cdo.nc 临时文件 cdo命令行的链式操作可以忽略中间临时文件的输出,从而节省了不必要的空间存储,python-cdo也提供了临时文件的处理。 当不指定output参数时,当前文件夹下是不会生成输出文件的,但是从输出结果...
In [22]: %time cdo.selname("SCW,SCTOT,SCH,SCS,REFL_10CM",input ="-seltimestep,1/5 "+"wrfout_d02_2016-06-23_06_00_00", output ="wrfsub_python.nc") CPU times: user0ns, sys:3.65ms, total:3.65ms Wall time:41.4s Out[22]:'wrfsub_python.nc' ...
cdo -selname,u10,v10 <infile> <outfile> 选择时间步Select timesteps from file:e.g. select only the 3rd time step cdo -seltimestep,3 <infile> <outfile> or select 3 timesteps cdo -seltimestep,1,13,25 <infile> <outfile> or select a time range from 1 to 12 ...
$ cdo selname,SSTK,CI infile.nc outfile.nc To select a lat/lon bounding box: $ cdo sellonlatbox,120,-90,20,-20infile.nc outfile.nc To select a date/time range: $ cdo seldate,2014-12-12T12:00:00,2015-01-31T18:00:00infile.nc outfile.nc ...
cdo.boundaryLevels(input ="-selname,T "+ ofile)) self.assertEqual([50.0,100.0,200.0,300.0,450.0,600.0,800.0,1000.0,1000.0,1000.0], cdo.thicknessOfLevels(input = ofile)) 开发者ID:Try2Code,项目名称:cdo-bindings,代码行数:9,代码来源:test_cdo.py ...
cdo -r -copy data_[1-9].nc outfilename # 对data1-9共9个文件合并 文件的提取 cdo seltimestep,1/60 slp.nc mslp.nc # 提取slp时间维1-60的数据至mslp cdo seltimestep,5,7,8,19,74 slp.nc slp-rain.nc # 提取slp不规则时间维数据 ...