Project

General

Profile

« Previous | Next » 

Revision d4ebc899

Added by Benoit Parmentier over 8 years ago

testing the new gdal_merge function with option resolution and extent

View differences:

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: 08/05/2016  
17
#MODIFIED ON: 08/16/2016
18 18
#PROJECT: NCEAS INPLANT: Environment and Organisms                                                                           
19 19

  
20 20
#First source these files:
......
42 42
#Rscript /nobackupp8/bparmen1/env_layers_scripts/master_script_stage_7_06192016.R TMAX /nobackupp6/aguzman4/climateLayers/out/ reg4 reg4_1999 /nobackupp8/bparmen1/climateLayers/out/reg4 TRUE 1999 6 1e+07 use_edge_weights n 19990107 19990108 /nobackupp8/bparmen1/NEX_data/regions_input_files/r_mask_LST_reg4.tif /nobackupp6/aguzman4/climateLayers/out/reg4/assessment/output_reg4_1999/df_assessment_files_reg4_1999_reg4_1999.txt python ac_testing FALSE Int16 100 -100,100
43 43
#Region 5: test
44 44
#Rscript /nobackupp8/bparmen1/env_layers_scripts/master_script_stage_7_07052016.R TMAX /nobackupp6/aguzman4/climateLayers/out/ reg5 reg5_1991 /nobackupp6/aguzman4/climateLayers/out/reg5/mosaicsAc/ TRUE 1991 6 1e+07 use_edge_weights rmse 19910101 19910103 /nobackupp8/bparmen1/NEX_data/regions_input_files/r_mask_LST_reg5.tif /nobackupp6/aguzman4/climateLayers/out/reg5/assessment/output_reg5_1991/df_assessment_files_reg5_1991_reg5_1991.txt python ac_testing FALSE Int16 100 -100,100
45
#Region 1: test
45 46

  
47
#Rscript /nobackupp8/bparmen1/env_layers_scripts/master_script_stage_7_04232016.R TMAX /nobackupp6/aguzman4/climateLayers/out/ reg1 reg1_1984 /nobackupp6/aguzman4/climateLayers/out/reg1/mosaics/ TRUE 1984 40 1e+07 use_edge_weights rmse 19840101 19841231 /nobackupp8/bparmen1/NEX_data/regions_input_files/r_mask_LST_reg1.tif /nobackupp6/aguzman4/climateLayers/out/reg1/assessment//output_reg1_1984/df_assessment_files_reg1_1984_reg1_1984.txt python var_pred FALSE Int16 100 -100,100
48
#Rscript /nobackupp8/bparmen1/env_layers_scripts/master_script_stage_7_08132016.R TMAX /nobackupp6/aguzman4/climateLayers/out/ reg1 reg1_1984 /nobackupp6/aguzman4/climateLayers/out/reg1/mosaics/ TRUE 1984 6 1e+07 use_edge_weights rmse 19840101 19840103 /nobackupp8/bparmen1/NEX_data/regions_input_files/r_mask_LST_reg1.tif /nobackupp6/aguzman4/climateLayers/out/reg1/assessment//output_reg1_1984/df_assessment_files_reg1_1984_reg1_1984.txt python var_pred FALSE Int16 100 -100,100
46 49

  
47 50
#script /nobackupp8/bparmen1/env_layers_scripts/master_script_stage_7_06192016.R TMAX /nobackupp6/aguzman4/climateLayers/out/ reg5 reg5_1985 /nobackupp6/aguzman4/climateLayers/out/reg5/mosaicsAc/ TRUE 1985 6 1e+07 use_edge_weights n 19850101 19850101 /nobackupp8/bparmen1/NEX_data/regions_input_files/r_mask_LST_reg5.tif /nobackupp6/aguzman4/climateLayers/out/reg5/assessment/output_reg5_1985/df_assessment_files_reg5_1985_reg5_1985.txt python ac_testing FALSE Int16 100 -100,100
48 51

  
......
82 85

  
83 86
#script_path <- "/home/parmentier/Data/IPLANT_project/env_layers_scripts"
84 87
script_path <- "/nobackupp8/bparmen1/env_layers_scripts" #path to script
85
function_mosaicing_functions <- "global_run_scalingup_mosaicing_function_07052016.R" #PARAM12
86
function_mosaicing <-"global_run_scalingup_mosaicing_07052016.R"
88
function_mosaicing_functions <- "global_run_scalingup_mosaicing_function_08222016.R"
89
#function_mosaicing_functions <- "global_run_scalingup_mosaicing_function_07052016.R" #PARAM12
90
function_mosaicing <-"global_run_scalingup_mosaicing_08162016.R"
87 91
source(file.path(script_path,function_mosaicing)) #source all functions used in this script 
88 92
source(file.path(script_path,function_mosaicing_functions)) #source all functions used in this script 
89 93

  
......
115 119
### Use the following values to run code from the shell:
116 120
var <- "TMAX" # variable being interpolated #param 1, arg 1
117 121
in_dir <- "/nobackupp6/aguzman4/climateLayers/out/" #PARAM2,arg 2
118
region_name <- "reg5" #PARAM 3, arg 3 #reg4 South America, Africa reg5,Europe reg2, North America reg1, Asia reg3
119
out_suffix <- "reg5_1991" #PARAM 4, arg 4
122
region_name <- "reg1" #PARAM 3, arg 3 #reg4 South America, Africa reg5,Europe reg2, North America reg1, Asia reg3
123
out_suffix <- "reg1_1984" #PARAM 4, arg 4
120 124
out_suffix_str <- region_name #PARAM 4, CONST 3
121
out_dir <- "/nobackupp8/bparmen1/climateLayers/out/reg5/mosaicsAc" #PARAM 5,arg 5 use this location for now
125
#out_dir <- "/nobackupp8/bparmen1/climateLayers/out/reg5/mosaicsAc" #PARAM 5,arg 5 use this location for now
126
out_dir <- "/nobackupp8/bparmen1/climateLayers/out/reg1/mosaic"
122 127
create_out_dir_param <- TRUE #PARAM 6, arg 6
123
year_predicted <- 1991 #PARAM 7, arg 7
128
year_predicted <- 1984 #PARAM 7, arg 7
124 129
num_cores <- 6 #PARAM 8, arg 8
125 130
max_mem = 1e+07 #param 9, arg 9
126 131
mosaicing_method <- "use_edge_weights" #PARAM10, arg 10
......
130 135

  
131 136
#day_start <- "19990701" #PARAM 12 arg 12
132 137
#day_end <- "19990703" #PARAM 13 arg 13
133
day_start <- "19910101" #PARAM 12 arg 12
134
day_end <- "19910103" #PARAM 13 arg 13
135
infile_mask <- "/nobackupp8/bparmen1/NEX_data/regions_input_files/r_mask_LST_reg5.tif" #PARAM 14, arg 14
136
df_assessment_files_name <- "/nobackupp6/aguzman4/climateLayers/out/reg5/assessment/output_reg5_1991/df_assessment_files_reg5_1991_reg5_1991.txt"  # data.frame with all files used in assessmnet, PARAM 15
138
day_start <- "19840101" #PARAM 12 arg 12
139
day_end <- "19840101" #PARAM 13 arg 13
140
#infile_mask <- "/nobackupp8/bparmen1/NEX_data/regions_input_files/r_mask_LST_reg5.tif" #PARAM 14, arg 14
141
infile_mask <- "/nobackupp8/bparmen1/NEX_data/regions_input_files/r_mask_LST_reg1.tif" #PARAM 14, arg 14
142
df_assessment_files_name <- "/nobackupp6/aguzman4/climateLayers/out/reg1/assessment//output_reg1_1984/df_assessment_files_reg1_1984_reg1_1984.txt"
143
#df_assessment_files_name <- "/nobackupp6/aguzman4/climateLayers/out/reg5/assessment/output_reg5_1991/df_assessment_files_reg5_1991_reg5_1991.txt"  # data.frame with all files used in assessmnet, PARAM 15
137 144
#df_assessment_files_name <- "/nobackupp6/aguzman4/climateLayers/out/reg5/assessment/output_reg5_1985/df_assessment_files_reg5_1985_reg5_1985.txt"
138 145
algorithm <- "python" #PARAM 16 #if R use mosaic function for R, if python use modified gdalmerge script from Alberto Guzmann
139
#layers_option <- c("var_pred") #arg 17 ,param 17, options are:#res_training, res_testing,ac_training, ac_testing, var_pred
146
layers_option <- c("var_pred") #arg 17 ,param 17, options are:#res_training, res_testing,ac_training, ac_testing, var_pred
140 147
#layers_option <- c("ac_training") #arg 17 ,param 17, options are:#res_training, res_testing,ac_training, ac_testing, var_pred
141 148
#layers_option <- c("res_training") # #arg 17 ,param 17, options are:#res_training, res_testing,ac_training, ac_testing, var_pred
142 149
#layers_option <- c("res_testing") #arg 17 ,param 17, options are:#res_training, res_testing,ac_training, ac_testing, var_pred
143
layers_option <- c("ac_testing") #arg 17 ,param 17, options are:#res_training, res_testing,ac_training, ac_testing, var_pred
150
#layers_option <- c("ac_testing") #arg 17 ,param 17, options are:#res_training, res_testing,ac_training, ac_testing, var_pred
144 151

  
145 152
tmp_files <- FALSE #arg 18, param 18, keep temp files if TRUE
146 153
data_type <- "Int16" #, param 19, use int32 for output layers mosaiced

Also available in: Unified diff