在创建栅格时间序列之前,我遇到了从列表中堆叠栅格的问题。当我使用示例数据直接在R环境中执行此操作时,它运行良好。 在此之前的错误代码是:从Linux上的R列表中错误地堆叠栅格
FunR<-function(r){
ext<-raster(extent(r),nrow=1100,ncol=1100)
crs(ext)<-crs(r)
D<-rasterize(r,ext,field="LFRP")
EC<-extent(-20, 60,0,30)
D2<-extend(D,EC)
D3<-crop(D2,extent(-18,20,2,30))
s <- raster(nrow=600, ncol=1000,extent(-18,20,2,30))
crs(s)<-crs(WA)
Ds <- resample(D3, s, method='bilinear')
crs(Ds)<-crs(WA)
Ds
}
###Create rasters and crop
DL4<-sapply(DL3,FunR)
DL5<-stack(DL4) #(error occurs after this line)
但是,一旦我把它作为一个脚本,在HPC我碰到下面的错误运行:
Error in x[[1]] : subscript out of bounds
Calls: stack -> stack -> .local
我如何获得的骑这个,请吗?另外,我如何摆脱我的清单上完全是NA
的文件?我怀疑这可能也是一个问题。 这里是我的“的qsub”脚本:
#PBS -o fre8.txt
#PBS -e fren8.txt
#PBS -N FRP08_quarterly
#PBS -q high_mem
#PBS -l walltime=50:00:00
#PBS -l nodes=1:ppn=4
#PBS -l vmem=400gb
#PBS -m bea
#PBS -M [email protected]
module load R/3.1.3
cd /scratch/aroo1
R --no-save -q -f FRPquarts.R
大家好。现在,我的脚本运行,但在几个小时后自动停止。如何让R在HPC上稳定?我现在有完整的代码,可以在Linux上完美运行,但在HPC上运行几个小时后会崩溃。 –