Project

General

Profile

« Previous | Next » 

Revision 483a41b8

Added by Benoit Parmentier over 8 years ago

debugging overall 30 years combination of assessment for region 4, stage 8

View differences:

climate/research/oregon/interpolation/master_script_stage_8.R
13 13
#STAGE 8: Comparison of predictions across regions and years with figures generation.
14 14
#AUTHOR: Benoit Parmentier                                                                        
15 15
#CREATED ON: 12/29/2015  
16
#MODIFIED ON: 04/29/2016  
16
#MODIFIED ON: 05/18/2016  
17 17
#PROJECT: NCEAS-IPLANT-NASA: Environment Layers                                                                           
18 18

  
19 19
#First source these files:
......
167 167
#out_dir <-paste(out_dir,"_",out_prefix,sep="")
168 168
create_out_dir_param <- TRUE #param 9, arg 6
169 169
out_prefix <- args[4] #param 7, arg 4
170
out_suffix <- "global_analyses_overall_assessment_reg4_04292016"
170
out_suffix <- "global_analyses_overall_assessment_reg4_05182016"
171 171

  
172 172
out_dir <- args[5] #param 8, arg 5
173 173
out_dir <- "/data/project/layers/commons/NEX_data/climateLayers/out/reg4/assessment"
......
204 204
max_mem <- args[9] #param 21
205 205
max_mem <- 1e+07
206 206
#in_dir_list_filename <- args[10] #param 22
207
in_dir_list_filename <- NULL #if NULL, use teh in_dir directory to search for info
207
in_dir_list_filename <- NULL #if NULL, use the in_dir directory to search for info
208 208
#in_dir_list_filename <- "/data/project/layers/commons/NEX_data/reg23_assessment/stage6_reg23_in_dir_list_03212016.txt"
209 209
#in_dir_list_filename <- "/data/project/layers/commons/NEX_data/reg4_assessment/stage6_reg4_in_dir_list_02072016.txt"
210 210
run_figure_by_year <- args[11] # param 10, arg 7, if true will create figures for individual years...
......
212 212

  
213 213
#### Prepare parameters for the production of figures...
214 214
proj_str <- CRS_interp
215
list_in_dir <- as.list(read.table(in_dir_list_filename,stringsAsFactors=F)[,1])
215
#list_in_dir <- as.list(read.table(in_dir_list_filename,stringsAsFactors=F)[,1])
216

  
217
if(!is.null(in_dir_list_filename)){
218
  in_dir_list <- as.list(read.table(in_dir_list_filename,stringsAsFactors=F)[,1])
219
}else{
220
  pattern_str <- paste0("^output_",region_name,".*.")
221
  in_dir_list_all <- list.dirs(path=in_dir,recursive = T)
222
  in_dir_list <- in_dir_list_all[grep(pattern_str,basename(in_dir_list_all),invert=FALSE)] #select directory with shapefiles...
223
  list_in_dir <- in_dir_list #fix the naming later...
224
  #in_dir_shp <- file.path(in_dir_list_all,"shapefiles")
225
}
216 226

  
217 227
#removed df_assessment_file_names from parameters, note the difference compared to part2
218 228
list_param_run_assessment_combined_region_plotting_prediction <-list(  

Also available in: Unified diff