I am trying to crop a raster brick, but am running into issues trying to do it on an HPC.
I have a raster, env, with 60786 rows, 64100 columns, and 19 layers.
I am tyring to split it into N sub rasters based on row number, but I keep getting the error message "Failure during raster IO".
I am able to run the data with a smaller subset, but not with the full data set. The code runs fine on my desktop, but takes 5 days.
I have tried to change the location of the temporary files, but nothing seems to work.
Here is the relevant code
#### Start prediction
sub = raster::crop(env,raster::extent(env,min(rows_sub),max(rows_sub),1,ncol(env))) ### This is where it fails
raster::predict(object=env, model = model, filename=paste(out.path,"/",basename(args),".grd",sep=""),overwrite=TRUE)
Is this an issue on the HPC? Not sure how to diagnose. Thanks for any help