Revision 331e163a
Added by Benoit Parmentier over 8 years ago
climate/research/oregon/interpolation/master_script_stage_7.R | ||
---|---|---|
14 | 14 |
|
15 | 15 |
#AUTHOR: Benoit Parmentier |
16 | 16 |
#CREATED ON: 01/01/2016 |
17 |
#MODIFIED ON: 04/24/2016
|
|
17 |
#MODIFIED ON: 05/01/2016
|
|
18 | 18 |
#PROJECT: NCEAS INPLANT: Environment and Organisms |
19 | 19 |
|
20 | 20 |
#First source these files: |
... | ... | |
63 | 63 |
|
64 | 64 |
#script_path <- "/home/parmentier/Data/IPLANT_project/env_layers_scripts" |
65 | 65 |
script_path <- "/nobackupp8/bparmen1/env_layers_scripts" #path to script |
66 |
function_mosaicing_functions <- "global_run_scalingup_mosaicing_function_04232016.R" #PARAM12
|
|
67 |
function_mosaicing <-"global_run_scalingup_mosaicing_04222016.R"
|
|
66 |
function_mosaicing_functions <- "global_run_scalingup_mosaicing_function_05012016.R" #PARAM12
|
|
67 |
function_mosaicing <-"global_run_scalingup_mosaicing_05012016.R"
|
|
68 | 68 |
source(file.path(script_path,function_mosaicing)) #source all functions used in this script |
69 | 69 |
source(file.path(script_path,function_mosaicing_functions)) #source all functions used in this script |
70 | 70 |
|
... | ... | |
94 | 94 |
#The 20 arguments are passed directly from Rscript: |
95 | 95 |
|
96 | 96 |
### Use the following values to run code from the shell: |
97 |
#var<-"TMAX" # variable being interpolated #param 1, arg 1 |
|
98 |
#in_dir <- "/nobackupp6/aguzman4/climateLayers/out/" #PARAM2,arg 2 |
|
99 |
#region_name <- "reg4" #PARAM 3, arg 3 #reg4 South America, Africa reg5,Europe reg2, North America reg1, Asia reg3 |
|
100 |
#out_suffix <- "reg4" #PARAM 4, arg 4 |
|
101 |
#out_suffix_str <- region_name #PARAM 4, CONST 3 |
|
102 |
#out_dir <- "/nobackupp8/bparmen1/climateLayers/out/reg4" #PARAM 5,arg 5 use this location for now |
|
103 |
#create_out_dir_param <- TRUE #PARAM 6, arg 6 |
|
104 |
#year_predicted <- 1991 #PARAM 7, arg 7 |
|
105 |
#num_cores <- 6 #PARAM 8, arg 8 |
|
106 |
#max_mem = 1e+07 #param 9, arg 9 |
|
107 |
#mosaicing_method <- "use_edge_weights" #PARAM10, arg 10 |
|
108 |
#metric_name <- "rmse" #RMSE, MAE etc. #PARAM 11, arg 11 |
|
109 |
#day_start <- "19910101" #PARAM 12 arg 12 |
|
110 |
#day_end <- "19910103" #PARAM 13 arg 13 |
|
111 |
#infile_mask <- "/nobackupp8/bparmen1/NEX_data/regions_input_files/r_mask_reg4.tif" #PARAM 14, arg 14 |
|
112 |
#df_assessment_files_name <- "/nobackupp6/aguzman4/climateLayers/out/reg4/assessment/output_reg4_1991/df_assessment_files_reg4_1991_reg4_1991.txt" # data.frame with all files used in assessmnet, PARAM 15 |
|
113 |
#algorithm <- "python" #PARAM 16 #if R use mosaic function for R, if python use modified gdalmerge script from Alberto Guzmann |
|
114 |
#layers_option <- c("var_pred") #arg 17 ,param 17, options are:#res_training, res_testing,ac_training, ac_testing, var_pred |
|
115 |
#tmp_files <- FALSE #arg 18, param 18 |
|
116 |
#data_type <- Int16 #, param 19, use int32 for output layers mosaiced |
|
117 |
#scaling <- 100 #, param 20, if null use 1 |
|
118 |
#values_range <- c(-100,100) |
|
97 |
var <- "TMAX" # variable being interpolated #param 1, arg 1 |
|
98 |
in_dir <- "/nobackupp6/aguzman4/climateLayers/out/" #PARAM2,arg 2 |
|
99 |
region_name <- "reg4" #PARAM 3, arg 3 #reg4 South America, Africa reg5,Europe reg2, North America reg1, Asia reg3 |
|
100 |
out_suffix <- "reg4_1999" #PARAM 4, arg 4 |
|
101 |
out_suffix_str <- region_name #PARAM 4, CONST 3 |
|
102 |
out_dir <- "/nobackupp8/bparmen1/climateLayers/out/reg4" #PARAM 5,arg 5 use this location for now |
|
103 |
create_out_dir_param <- TRUE #PARAM 6, arg 6 |
|
104 |
year_predicted <- 1999 #PARAM 7, arg 7 |
|
105 |
num_cores <- 6 #PARAM 8, arg 8 |
|
106 |
max_mem = 1e+07 #param 9, arg 9 |
|
107 |
mosaicing_method <- "use_edge_weights" #PARAM10, arg 10 |
|
108 |
metric_name <- "rmse" #RMSE, MAE etc. #PARAM 11, arg 11 |
|
109 |
day_start <- "19990701" #PARAM 12 arg 12 |
|
110 |
day_end <- "19990703" #PARAM 13 arg 13 |
|
111 |
infile_mask <- "/nobackupp8/bparmen1/NEX_data/regions_input_files/r_mask_LST_reg4.tif" #PARAM 14, arg 14 |
|
112 |
df_assessment_files_name <- "/nobackupp6/aguzman4/climateLayers/out/reg4/assessment/output_reg4_1999/df_assessment_files_reg4_1999_reg4_1999.txt" # data.frame with all files used in assessmnet, PARAM 15 |
|
113 |
algorithm <- "python" #PARAM 16 #if R use mosaic function for R, if python use modified gdalmerge script from Alberto Guzmann |
|
114 |
layers_option <- c("var_pred") #arg 17 ,param 17, options are:#res_training, res_testing,ac_training, ac_testing, var_pred |
|
115 |
#layers_option <- c("ac_testing") #arg 17 ,param 17, options are:#res_training, res_testing,ac_training, ac_testing, var_pred |
|
116 |
|
|
117 |
tmp_files <- FALSE #arg 18, param 18, keep temp files if TRUE |
|
118 |
data_type <- "Int16" #, param 19, use int32 for output layers mosaiced |
|
119 |
scaling <- 100 #, param 20, if null use 1 |
|
120 |
values_range <- "-100,100" |
|
119 | 121 |
|
120 | 122 |
# var <- "TMAX" # variable being interpolated #param 1, arg 1 |
121 | 123 |
# in_dir <- "/nobackupp6/aguzman4/climateLayers/out/" #PARAM2,arg 2 |
... | ... | |
234 | 236 |
python_bin <- "/nobackupp6/aguzman4/climateLayers/sharedModules2/bin" #PARAM 30 |
235 | 237 |
#python script and gdal on Atlas NCEAS |
236 | 238 |
#mosaic_python <- "/data/project/layers/commons/NEX_data/sharedCode" #PARAM 30 |
237 |
#python_bin <- "/usr/bin" #PARAM 30 |
|
239 |
#python_bin <- "/usr/bin" #PARAM 30 #Atlas
|
|
238 | 240 |
match_extent <- "FALSE" #PARAM 31 #try without matching!!! |
239 | 241 |
#for residuals... |
240 | 242 |
list_models <- NULL #PARAM 32 |
Also available in: Unified diff
running stage 7 mosaicing for region 4 on 1999 for poster NASA biodiversity conference