[英]Regrid multiple netcdf files in R by using CDO
我需要重新网格化数百个 netCDF 文件,但是当我在 R 中使用 CDO 命令时,总是出现这样的问题:
cdo remapnn (Abort): Too few streams specified! Operator needs 1 input and 1 output streams.
代码如下:
files <- list.files(path = common_path,pattern = ".nc")
cdo_path = '/opt/local/bin/cdo'
new_data_folder = "test_r"
raw_data_folder = "data"
for (i_file in files) {
raw_file <- paste(raw_data_folder,i_file,sep = '/')
new_file <- paste(new_data_folder,i_file,sep = '/')
system(paste(cdo_path,' remapnn,r720x360 ',raw_file,new_file,sep=""))
}
你可以试试这个:
system(paste(cdo_path,' remapnn,r720x360 ',raw_file,' ',new_file,sep = ""))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.