pierreroudier / dissever

Dissever: a method for spatial downscaling
10 stars 7 forks source link

How to Parallel the function “dissever”? #9

Closed Damonfruit closed 4 years ago

Damonfruit commented 4 years ago

Dear Pierre Roudier, Thanks very much for your effort to develop the ‘dissever’ package. I have used it to downscale one precipitation grid file, which took my 4.5 mins. But I have so many file to downscale, so how can I parallel it? I have little time to do this thing. I need your help. Thanks in advance.

pierreroudier commented 4 years ago

dissever automatically detects if a parallel backend has been registered:

ncores <- 4 # Number of cores you want to use
cl <- parallel::makeCluster(ncores)
doParallel::registerDoParallel(cl)
# rest of your dissever code here