Revision 7b9aba64
Added by Benoit Parmentier about 11 years ago
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: 10/11/2013
|
|
13 |
#DATE: 11/01/2013
|
|
14 | 14 |
|
15 | 15 |
#PROJECT: NCEAS INPLANT: Environment and Organisms --TASK#363, TASK$568-- |
16 | 16 |
|
... | ... | |
81 | 81 |
|
82 | 82 |
var<-"TMAX" # variable being interpolated |
83 | 83 |
#out_prefix<-"_365d_gam_cai_lst_comb3_10102013" #User defined output prefix |
84 |
out_prefix<-"_365d_gwr_daily_mults1_lst_comb3_10132013" #User defined output prefix
|
|
84 |
out_prefix<-"_365d_gam_daily_lst_comb5_11012013" #User defined output prefix
|
|
85 | 85 |
|
86 |
out_suffix<-"_OR_10132013" #Regional suffix
|
|
86 |
out_suffix<-"_OR_11012013" #Regional suffix
|
|
87 | 87 |
out_suffix_modis <-"_05302013" #pattern to find tiles produced previously |
88 | 88 |
|
89 | 89 |
#interpolation_method<-c("gam_fusion","gam_CAI","gam_daily") #other otpions to be added later |
... | ... | |
94 | 94 |
#interpolation_method<-c("gwr_CAI") #other otpions to be added later |
95 | 95 |
#interpolation_method<-c("kriging_CAI") |
96 | 96 |
|
97 |
#interpolation_method<-c("gam_daily") #other otpions to be added later
|
|
97 |
interpolation_method<-c("gam_daily") #other otpions to be added later |
|
98 | 98 |
#interpolation_method<-c("kriging_daily") #other otpions to be added later |
99 |
interpolation_method<-c("gwr_daily") #other otpions to be added later |
|
99 |
#interpolation_method<-c("gwr_daily") #other otpions to be added later
|
|
100 | 100 |
|
101 | 101 |
#out_path<-"/home/parmentier/Data/IPLANT_project/Oregon_interpolation/Oregon_03142013/output_data" |
102 | 102 |
out_path <- "/data/project/layers/commons/Oregon_interpolation/output_data" |
... | ... | |
248 | 248 |
seed_number<- 100 #if seed zero then no seed? |
249 | 249 |
|
250 | 250 |
nb_sample<-1 #number of time random sampling must be repeated for every hold out proportion |
251 |
step<- 0.1 |
|
251 |
#step<- 0.1 |
|
252 |
step<- 0 |
|
252 | 253 |
constant<-0 #if value 1 then use the same samples as date one for the all set of dates |
253 |
#prop_minmax<-c(0.3,0.3) #if prop_min=prop_max and step=0 then predictions are done for the number of dates...
|
|
254 |
prop_minmax<-c(0.1,0.7) #if prop_min=prop_max and step=0 then predictions are done for the number of dates... |
|
254 |
prop_minmax<-c(0.3,0.3) #if prop_min=prop_max and step=0 then predictions are done for the number of dates... |
|
255 |
#prop_minmax<-c(0.1,0.7) #if prop_min=prop_max and step=0 then predictions are done for the number of dates...
|
|
255 | 256 |
|
256 | 257 |
seed_number_month <- 100 |
257 | 258 |
nb_sample_month <-1 #number of time random sampling must be repeated for every hold out proportion |
... | ... | |
262 | 263 |
#dates_selected<-c("20100101","20100102","20100103","20100901") # Note that the dates set must have a specific format: yyymmdd |
263 | 264 |
#dates_selected<-c("20100101","20100102","20100301","20100302","20100501","20100502","20100701","20100702","20100901","20100902","20101101","20101102") |
264 | 265 |
dates_selected<-"" # if empty string then predict for the full year specified earlier |
265 |
dates_selected <- 2 # if integer then predict for the evert n dat in the year specified earlier |
|
266 |
#dates_selected <- 2 # if integer then predict for the evert n dat in the year specified earlier
|
|
266 | 267 |
|
267 | 268 |
screen_data_training<- FALSE #screen training data for NA and use same input training for all models fitted |
268 | 269 |
use_clim_image <- TRUE # use predicted image as a base...rather than average Tmin at the station for delta |
... | ... | |
271 | 272 |
#Models to run...this can be changed for each run |
272 | 273 |
#LC1: Evergreen/deciduous needleleaf trees |
273 | 274 |
|
275 |
#Combination 5: for paper multi-timescale paper |
|
276 |
list_models<-c("y_var ~ s(lat,lon)", |
|
277 |
"y_var ~ s(lat,lon) + s(LST)", |
|
278 |
"y_var ~ s(lat,lon) + s(elev_s)", |
|
279 |
"y_var ~ s(lat,lon) + s(elev_s) + s(N_w,E_w)", |
|
280 |
"y_var ~ s(lat,lon) + s(elev_s) + s(DISTOC)", |
|
281 |
"y_var ~ s(lat,lon) + s(elev_s) + s(LST)", |
|
282 |
"y_var ~ s(lat,lon) + s(elev_s) + s(LST) + ti(LST,LC1)") |
|
283 |
|
|
284 |
|
|
274 | 285 |
#Combination 3: for paper baseline=s(lat,lon)+s(elev) |
275 | 286 |
#list_models<-c("y_var ~ s(lat,lon) + s(elev_s)", |
276 | 287 |
# "y_var ~ s(lat,lon) + s(elev_s) + s(N_w)", |
... | ... | |
309 | 320 |
interp_method2 <- NULL #other options are "gwr" and "kriging" |
310 | 321 |
|
311 | 322 |
#interp_method2 <- "gam" #other options are "gwr" and "kriging" |
312 |
list_models <- c("y_var ~ lat*lon + elev_s") |
|
323 |
#list_models <- c("y_var ~ lat*lon + elev_s")
|
|
313 | 324 |
|
314 | 325 |
#list_models<-c("y_var ~ s(lat,lon) + s(elev_s)") |
315 | 326 |
|
Also available in: Unified diff
running gam daily OR temp prediction with combination 5 for multi-time scale paper