Project

General

Profile

« Previous | Next » 

Revision 2168e318

Added by Benoit Parmentier over 11 years ago

running gam fusion comb3 OR with revised screening for paper analyses

View differences:

climate/research/oregon/interpolation/master_script_temp.R
10 10
#STAGE 5: Output analyses: assessment of results for specific dates...
11 11
#
12 12
#AUTHOR: Benoit Parmentier                                                                       
13
#DATE: 08/08/2013                                                                                 
13
#DATE: 08/12/2013                                                                                 
14 14

  
15 15
#PROJECT: NCEAS INPLANT: Environment and Organisms --TASK#363, TASK$568--   
16 16

  
......
48 48

  
49 49
##SCRIPT USED FOR THE PREDICTIONS: Source or list all scripts here to avoid confusion on versions being run!!!!
50 50

  
51
#source(file.path(script_path,"master_script_temp_08052013.R")) #Master script can be run directly...
51
#source(file.path(script_path,"master_script_temp_08122013.R")) #Master script can be run directly...
52 52

  
53 53
#CALLED FROM MASTER SCRIPT:
54 54

  
......
80 80
#met_stations_outfiles_obj_file<-"met_stations_outfiles_obj_kriging_daily__365d_kriging_daily_mults10_lst_comb3_08062013.RData"
81 81

  
82 82
var<-"TMAX" # variable being interpolated
83
out_prefix<-"_365d_gam_daily_mults10_lst_comb3_08082013"                #User defined output prefix
84
out_suffix<-"_OR_08082013"                                       #Regional suffix
83
out_prefix<-"_365d_gam_fus_lst_comb3_08122013"                #User defined output prefix
84
out_suffix<-"_OR_08122013"                                       #Regional suffix
85 85
out_suffix_modis <-"_05302013"                       #pattern to find tiles produced previously     
86 86

  
87 87
#interpolation_method<-c("gam_fusion","gam_CAI","gam_daily") #other otpions to be added later
88 88
#interpolation_method<-c("gam_CAI") #other otpions to be added later
89
#interpolation_method<-c("gam_fusion") #other otpions to be added later
89
interpolation_method<-c("gam_fusion") #other otpions to be added later
90 90
#interpolation_method<-c("kriging_fusion") #other otpions to be added later
91 91
#interpolation_method<-c("gwr_fusion") #other otpions to be added later
92 92
#interpolation_method<-c("gwr_CAI") #other otpions to be added later
93 93
#interpolation_method<-c("kriging_CAI") 
94 94

  
95
interpolation_method<-c("gam_daily") #other otpions to be added later
95
#interpolation_method<-c("gam_daily") #other otpions to be added later
96 96
#interpolation_method<-c("kriging_daily") #other otpions to be added later
97 97
#interpolation_method<-c("gwr_daily") #other otpions to be added later
98 98

  
......
243 243
#Set additional parameters
244 244
#Input for sampling function...
245 245
seed_number<- 100  #if seed zero then no seed?     
246
nb_sample<-10           #number of time random sampling must be repeated for every hold out proportion
247
step<-0.1         
246
nb_sample<-1           #number of time random sampling must be repeated for every hold out proportion
247
step<-0         
248 248
constant<-0             #if value 1 then use the same samples as date one for the all set of dates
249
prop_minmax<-c(0.1,0.7)  #if prop_min=prop_max and step=0 then predicitons are done for the number of dates...
249
prop_minmax<-c(0.3,0.3)  #if prop_min=prop_max and step=0 then predictions are done for the number of dates...
250 250
#dates_selected<-c("20100101","20100102","20100103","20100901") # Note that the dates set must have a specific format: yyymmdd
251
dates_selected<-c("20100101","20100102","20100301","20100302","20100501","20100502","20100701","20100702","20100901","20100902","20101101","20101102")
252
#dates_selected<-"" # if empty string then predict for the full year specified earlier
251
#dates_selected<-c("20100101","20100102","20100301","20100302","20100501","20100502","20100701","20100702","20100901","20100902","20101101","20101102")
252
dates_selected<-"" # if empty string then predict for the full year specified earlier
253 253
screen_data_training<-FALSE #screen training data for NA and use same input training for all models fitted
254 254

  
255 255
#Models to run...this can be changed for each run
256 256
#LC1: Evergreen/deciduous needleleaf trees
257 257

  
258 258
#Combination 3: for paper baseline=s(lat,lon)+s(elev)
259
# list_models<-c("y_var ~ s(lat,lon) + s(elev_s)",
260
#               "y_var ~ s(lat,lon) + s(elev_s) + s(N_w)",
261
#               "y_var ~ s(lat,lon) + s(elev_s) + s(E_w)",
262
#               "y_var ~ s(lat,lon) + s(elev_s) + s(LST)",
263
#               "y_var ~ s(lat,lon) + s(elev_s) + s(DISTOC)",
264
#               "y_var ~ s(lat,lon) + s(elev_s) + s(LC1)",
265
#               "y_var ~ s(lat,lon) + s(elev_s) + s(CANHGHT)",
266
#               "y_var ~ s(lat,lon) + s(elev_s) + s(LST) + ti(LST,LC1)",
267
#               "y_var ~ s(lat,lon) + s(elev_s) + s(LST) + ti(LST,CANHGHT)")
259
list_models<-c("y_var ~ s(lat,lon) + s(elev_s)",
260
              "y_var ~ s(lat,lon) + s(elev_s) + s(N_w)",
261
              "y_var ~ s(lat,lon) + s(elev_s) + s(E_w)",
262
              "y_var ~ s(lat,lon) + s(elev_s) + s(LST)",
263
              "y_var ~ s(lat,lon) + s(elev_s) + s(DISTOC)",
264
              "y_var ~ s(lat,lon) + s(elev_s) + s(LC1)",
265
              "y_var ~ s(lat,lon) + s(elev_s) + s(CANHGHT)",
266
              "y_var ~ s(lat,lon) + s(elev_s) + s(LST) + ti(LST,LC1)",
267
              "y_var ~ s(lat,lon) + s(elev_s) + s(LST) + ti(LST,CANHGHT)")
268 268

  
269 269
#list_models<-c("y_var ~ lat*lon + elev_s")
270 270

  
271
list_models<-c("y_var ~ s(lat,lon) + s(elev_s)")
271
#list_models<-c("y_var ~ s(lat,lon) + s(elev_s)")
272 272

  
273 273
#list_models<-c("y_var ~ lat*lon + elev_s",
274 274
#              "y_var ~ lat*lon + elev_s + N_w",

Also available in: Unified diff