0

我需要重新网格化数百个 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="")) 
}
4

1 回答 1

0

你可以试试这个:

system(paste(cdo_path,' remapnn,r720x360 ',raw_file,' ',new_file,sep = ""))
于 2019-09-19T15:20:30.157 回答