Revision eb0d14f8
Added by Benoit Parmentier over 8 years ago
climate/research/oregon/interpolation/global_run_scalingup_assessment_part3.R | ||
---|---|---|
3 | 3 |
#This script uses the worklfow code applied to the globe. Results currently reside on NEX/PLEIADES NASA. |
4 | 4 |
#Combining tables and figures for individual runs for years and tiles. |
5 | 5 |
#This script complements part1 and part2 of the accuracy assessment and group tables and outputs |
6 |
#from run of accuracy assessement generated earlier. |
|
7 |
#This is used in Stage 8 of master script. |
|
6 |
#from run of accuracy assessement generated earlier. |
|
8 | 7 |
#Analyses, figures, tables and data are also produced in the script. |
9 | 8 |
#AUTHOR: Benoit Parmentier |
10 | 9 |
#CREATED ON: 03/23/2014 |
11 |
#MODIFIED ON: 07/27/2016
|
|
10 |
#MODIFIED ON: 04/29/2016
|
|
12 | 11 |
#Version: 5 |
13 | 12 |
#PROJECT: Environmental Layers project |
14 | 13 |
#COMMENTS: Initial commit, script based on part 2 of assessment, will be modified further for overall assessment |
... | ... | |
279 | 278 |
#if(multiple_region==TRUE){ |
280 | 279 |
df_tile_processed$reg <- as.character(df_tile_processed$reg) |
281 | 280 |
#1.05pm... very slow |
281 |
#17.00pm on July 27, took 20 minutes to merge tb for reg5 |
|
282 | 282 |
tb <- merge(tb,df_tile_processed,by="tile_id") |
283 | 283 |
tb_s <- merge(tb_s,df_tile_processed,by="tile_id") |
284 | 284 |
tb_month_s<- merge(tb_month_s,df_tile_processed,by="tile_id") |
... | ... | |
292 | 292 |
try(summary_metrics_v$lat <- summary_metrics_v$lat.x) |
293 | 293 |
try(summary_metrics_v$lon <- summary_metrics_v$lon.x) |
294 | 294 |
#browser() |
295 |
###Now save tables. |
|
296 |
write.table(tb,paste0("tb_combined_",region_name,"_",out_suffix,".txt"),sep=",") |
|
297 |
write.table(tb_s,paste0("tb_s_combined_",region_name,"_",out_suffix,".txt"),sep=",") |
|
298 |
write.table(summary_metrics_v,paste0("sumary_metrics_v_",region_name,"_",out_suffix,".txt"),sep=",") |
|
295 | 299 |
|
296 | 300 |
############ PART 2: PRODUCE FIGURES ################ |
297 | 301 |
|
... | ... | |
330 | 334 |
#This is slow...make a function and use mclapply?? |
331 | 335 |
#/data/project/layers/commons/NEX_data/output_run6_global_analyses_09162014/shapefiles |
332 | 336 |
|
333 |
centroids_shp_fun <- function(i,list_shp_reg_files,in_dir_shp){ |
|
334 |
|
|
335 |
} |
|
337 |
#centroids_shp_fun <- function(i,list_shp_reg_files,in_dir_shp){
|
|
338 |
# |
|
339 |
#}
|
|
336 | 340 |
in_dir_shp <- file.path(in_dir_list[[1]],"shapefiles") #this should be set as a input parameter!!! |
337 | 341 |
for(i in 1:length(list_shp_reg_files)){ |
338 | 342 |
#path_to_shp <- dirname(list_shp_reg_files[[i]]) |
Also available in: Unified diff
global assessment building accuracy and station table, combined by region