Revision 13bcbbf4
Added by Benoit Parmentier over 8 years ago
climate/research/oregon/interpolation/global_run_scalingup_mosaicing_function.R | ||
---|---|---|
199 | 199 |
tb_date <- subset(tb,date==date_processed & pred_mod==pred_mod_name) |
200 | 200 |
tb_date$tile_coord <- as.character(tb_date$tile_coord) |
201 | 201 |
df_centroids <- merge(df_centroids,tb_date,by="tile_coord") |
202 |
|
|
202 |
#df_centroids passed from 32 to 31! |
|
203 |
|
|
203 | 204 |
#use mclapply |
204 | 205 |
#list_raster_name <- vector("list",length=length(lf)) |
205 | 206 |
list_param_raster_df_centroids <- list(df_centroids,metric_name,NA_flag_val,file_format,out_dir_str,out_suffix_str) |
... | ... | |
208 | 209 |
#undebug(create_raster_df_centroids_fun) |
209 | 210 |
#test_lf <- lapply(1,FUN=create_raster_df_centroids_fun,list_param=list_param_raster_df_centroids) |
210 | 211 |
|
211 |
list_raster_name <- mclapply(1:length(lf),FUN=create_raster_df_centroids_fun,list_param=list_param_raster_df_centroids,mc.preschedule=FALSE,mc.cores = num_cores) |
|
212 |
lf_raster <- df_centroids$files |
|
213 |
#list_raster_name <- mclapply(1:length(lf),FUN=create_raster_df_centroids_fun,list_param=list_param_raster_df_centroids,mc.preschedule=FALSE,mc.cores = num_cores) |
|
214 |
|
|
215 |
list_raster_name <- mclapply(1:length(lf_raster),FUN=create_raster_df_centroids_fun,list_param=list_param_raster_df_centroids,mc.preschedule=FALSE,mc.cores = num_cores) |
|
212 | 216 |
|
213 | 217 |
raster_created_obj <- list(list_raster_name,df_centroids) |
214 | 218 |
names(raster_created_obj) <- c("list_raster_name","df_centroids") |
... | ... | |
1743 | 1747 |
#debug(create_accuracy_metric_raster) |
1744 | 1748 |
#list_raster_created_obj <- lapply(1:1,FUN=create_accuracy_metric_raster, |
1745 | 1749 |
# list_param=list_param_accuracy_metric_raster) |
1746 |
#raster_created_obj <- create_accuracy_metric_raster(1, list_param_accuracy_metric_raster)
|
|
1750 |
#raster_created_obj <- create_accuracy_metric_raster(32, list_param_accuracy_metric_raster)
|
|
1747 | 1751 |
|
1748 | 1752 |
#Extract list of files for rmse and date 1 (19920101), there should be 28 raster images |
1749 | 1753 |
lf_accuracy_raster <- lapply(1:length(list_raster_created_obj),FUN=function(i){unlist(list_raster_created_obj[[i]]$list_raster_name)}) |
Also available in: Unified diff
debugging of create raster from centroids, identification of reg5 Africa accuracy layers