Revision 69bffde4
Added by Benoit Parmentier almost 9 years ago
climate/research/oregon/interpolation/master_script_stage_6.R | ||
---|---|---|
11 | 11 |
#STAGE 6: Assessement of predictions by tiles and regions with mosaicing of predictions and accuracy |
12 | 12 |
#AUTHOR: Benoit Parmentier |
13 | 13 |
#CREATED ON: 12/29/2015 |
14 |
#MODIFIED ON: 12/29/2015
|
|
14 |
#MODIFIED ON: 12/31/2015
|
|
15 | 15 |
#PROJECT: NCEAS INPLANT: Environment and Organisms |
16 | 16 |
|
17 | 17 |
## TODO: |
... | ... | |
49 | 49 |
|
50 | 50 |
#CALLED FROM MASTER SCRIPT: |
51 | 51 |
|
52 |
#modis_download_script <- file.path(script_path,"modis_download.py") # LST modis download python script |
|
52 |
script_path <- "/nobackupp8/bparmen1/env_layers_scripts" #path to script |
|
53 |
function_assessment_part1_script <- "global_run_scalingup_assessment_part1_functions_02112015.R" #PARAM12 |
|
54 |
function_assessment_part1a <-"global_run_scalingup_assessment_part1a_12312015.R" |
|
55 |
source(file.path(script_path,function_assessment_part1_script)) #source all functions used in this script |
|
56 |
source(file.path(script_path,function_assessment_part1a)) #source all functions used in this script |
|
53 | 57 |
|
58 |
### Parameters and arguments ### |
|
59 |
|
|
54 | 60 |
var<-"TMAX" # variable being interpolated |
55 | 61 |
|
56 | 62 |
#interpolation_method<-c("gam_fusion") #other otpions to be added later |
... | ... | |
68 | 74 |
#/nobackupp6/aguzman4/climateLayers/out_15x45/1982 |
69 | 75 |
|
70 | 76 |
#region_names <- c("reg23","reg4") #selected region names, #PARAM2 |
71 |
region_names <- c("reg4")
|
|
77 |
region_name <- c("reg4") #run assessment by region
|
|
72 | 78 |
#region_names <- c("reg1","reg2","reg3","reg4","reg5","reg6") #selected region names, #PARAM2 |
73 | 79 |
interpolation_method <- c("gam_CAI") #PARAM4 |
74 | 80 |
out_prefix <- "run_global_analyses_pred_12282015" #PARAM5 |
... | ... | |
87 | 93 |
NA_flag_val <- -9999 #No data value, #PARAM11 |
88 | 94 |
num_cores <- 6 #number of cores used #PARAM13 |
89 | 95 |
|
90 |
list_param_run_assessment_prediction <- list(in_dir1,region_names,interpolation_method,out_prefix,
|
|
96 |
list_param_run_assessment_prediction <- list(in_dir1,region_name,interpolation_method,out_prefix, |
|
91 | 97 |
out_dir,create_out_dir_param,CRS_locs_WGS84, |
92 | 98 |
list_year_predicted,file_format,NA_flag_val,num_cores) |
93 |
list_names <- c("in_dir1","region_names","interpolation_method","out_prefix",
|
|
99 |
list_names <- c("in_dir1","region_name","interpolation_method","out_prefix", |
|
94 | 100 |
"out_dir","create_out_dir_param","CRS_locs_WGS84", |
95 | 101 |
"list_year_predicted","file_format","NA_flag_val","num_cores") |
96 | 102 |
|
... | ... | |
100 | 106 |
max_mem<-args[11] |
101 | 107 |
#rasterOptions(maxmemory=1e+07,timer=TRUE) |
102 | 108 |
|
103 |
#debug(raster_prediction_fun)
|
|
109 |
#debug(run_assessment_prediction_fun)
|
|
104 | 110 |
#debug(debug_fun_test) |
105 | 111 |
#debug_fun_test(list_param_raster_prediction) |
106 | 112 |
i <- 1 #this select the first year of list_year_predicted |
107 | 113 |
if (stages_to_run[6]==6){ |
108 |
assessment_prediction_obj <- run_assessment_prediction_fun(ii,list_param_raster_prediction)
|
|
114 |
assessment_prediction_obj <- run_assessment_prediction_fun(i,list_param_run_assessment_prediction)
|
|
109 | 115 |
} |
110 | 116 |
|
111 | 117 |
############### END OF SCRIPT ################### |
Also available in: Unified diff
master script stage 6 assessment, call to assessment function