Project

General

Profile

« Previous | Next » 

Revision 65a82b4a

Added by Benoit Parmentier almost 10 years ago

running part 1 accuracy assessment NEX run 1000x3000km

View differences:

climate/research/oregon/interpolation/global_run_scalingup_assessment_part1.R
5 5
#Part 1 create summary tables and inputs for figure in part 2 and part 3.
6 6
#AUTHOR: Benoit Parmentier 
7 7
#CREATED ON: 03/23/2014  
8
#MODIFIED ON: 01/20/2015            
8
#MODIFIED ON: 02/05/2015            
9 9
#Version: 4
10 10
#PROJECT: Environmental Layers project  
11 11
#TO DO:
......
57 57
  
58 58
#function_analyses_paper1 <-"contribution_of_covariates_paper_interpolation_functions_07182014.R" #first interp paper
59 59
#function_analyses_paper2 <-"multi_timescales_paper_interpolation_functions_08132014.R"
60
#function_analyses_paper1 <-"contribution_of_covariates_paper_interpolation_functions_07182014.R" #first interp paper
61
function_assessment_part1 <-"global_run_scalingup_assessment_part1_01202015.R"
60
function_analyses_paper1 <-"multi_timescales_paper_interpolation_functions_08132014.R"
61
  
62
load_obj <- function(f)
63
{
64
  env <- new.env()
65
  nm <- load(f, env)[1]
66
  env[[nm]]
67
}
62 68
  
63
source(function_assessment_part1)
69
create_dir_fun <- function(out_dir,out_suffix){
70
  if(!is.null(out_suffix)){
71
    out_name <- paste("output_",out_suffix,sep="")
72
    out_dir <- file.path(out_dir,out_name)
73
  }
74
  #create if does not exists: create the output dir as defined 
75
  if(!file.exists(out_dir)){
76
    dir.create(out_dir)
77
  }
78
  return(out_dir)
79
}
80

  
81

  
82

  
64 83
##############################
65 84
#### Parameters and constants  
66 85

  
67 86
#reg1 (North Am), reg2(Europe),reg3(Asia), reg4 (South Am), reg5 (Africa), reg6 (Australia-Asia)
68 87
#master directory containing the definition of tile size and tiles predicted
69
in_dir1 <- "/nobackupp4/aguzman4/climateLayers/output1000x3000_km/"
88
in_dir1 <- "/nobackupp6/aguzman4/climateLayers/output1000x3000_km/"
70 89

  
71
region_names <- c("reg1","reg6") #selected region names
90
region_names <- c("reg1") #selected region names
72 91

  
73 92
in_dir_list <- list.dirs(path=in_dir1,recursive=FALSE) #get the list regions processed for this run
74 93
#basename(in_dir_list)
......
97 116

  
98 117
y_var_name <- "dailyTmax"
99 118
interpolation_method <- c("gam_CAI")
100
out_prefix<-"run10_global_analyses_01202015"
119
out_prefix<-"run10_global_analyses_01282015"
101 120

  
102 121
#out_dir<-"/data/project/layers/commons/NEX_data/" #On NCEAS Atlas
103 122
out_dir <- "/nobackup/bparmen1/" #on NEX
......
453 472
#  create_dir_fun(file.path(output_atlas_dir,as.character(df_tile_processed$tile_coord[i]),"/shapefiles"),out_suffix=NULL)
454 473
#}  
455 474

  
456
#Copy summary textfiles and mosaic back to atlas
475
#Copy summary textfiles back to atlas
457 476

  
458 477
Atlas_dir <- file.path("/data/project/layers/commons/NEX_data/",basename(out_dir))#,"output/subset/shapefiles")
459 478
Atlas_hostname <- "parmentier@atlas.nceas.ucsb.edu"

Also available in: Unified diff