[英]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.