Project

General

Profile

« Previous | Next » 

Revision bd69aaca

Added by Benoit Parmentier over 11 years ago

master script, gam fusion using tensor as basis e.g. te(x,y)

View differences:

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

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

  
......
71 71
stages_to_run<-c(0,0,3,4,5) #May decide on antoher strategy later on...
72 72

  
73 73
var<-"TMAX" # variable being interpolated
74
out_prefix<-"_365d_GAM_fus_all_lst_05212013"                #User defined output prefix
74
out_prefix<-"_365d_GAM_fus_all_lst_05252013"                #User defined output prefix
75
out_suffix<-"_VE_05252013"
76
out_suffix_modis="_05252013"
77

  
75 78
#interpolation_method<-c("gam_fusion","gam_CAI") #other otpions to be added later
76 79
#interpolation_method<-c("gam_CAI") #other otpions to be added later
77 80
interpolation_method<-c("gam_fusion") #other otpions to be added later
......
101 104
#CRS_interp <-"+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs";
102 105
CRS_locs_WGS84<-CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +towgs84=0,0,0") #Station coords WGS84
103 106
out_region_name<-"_venezuela_region" #generated on the fly
104
out_suffix<-"_VE_05232013"
107
#out_suffix<-"_VE_05252013"
105 108
ref_rast_name<-""  #local raster name defining resolution, exent, local projection--. set on the fly??
106 109
#ref_rast_name<-"mean_day244_rescaled.rst"  #local raster name defining resolution, exent: oregon
107 110
  
......
125 128
hdfdir =  '/home/parmentier/Data/IPLANT_project/MOD11A1_tiles'
126 129
download=1
127 130
clim_calc=0
128
out_suffix_modis="_0522013"
131
#out_suffix_modis="_05252013"
129 132
#end_month= "12"
130 133
#start_month= "1"
131 134

  
......
218 221
dates_selected<-"" # if empty string then predict for the full year specified earlier
219 222

  
220 223
#Models to run...this can be change for each run
221
list_models<-c("y_var ~ s(x,y)",
222
               "y_var ~ s(LST)",
223
               "y_var ~ s(x,y,LST)",
224
               "y_var ~ s(LST,elev_s)",
225
               "y_var ~ s(lat,lon) + s(elev_s) + s(N_w,E_w) + s(LST)", 
226
               "y_var ~ s(lat,lon) + s(elev_s) + s(N_w,E_w) + s(LST) + s(LC2)",
227
               "y_var ~ s(lat,lon) + s(elev_s) + s(N_w,E_w) + s(LST) + s(LC6)")
228
#               "y_var ~ s(lat,lon) + s(elev_s) + s(N_w,E_w) + s(LST) + s(DISTOC)")
229

  
224
list_models<-c("y_var ~ te(x,y)",
225
               "y_var ~ te(LST)",
226
               "y_var ~ te(x,y,LST)",
227
               "y_var ~ te(LST,elev_s)",
228
               "y_var ~ te(lat,lon) + te(elev_s) + te(N_w,E_w) + te(LST)", 
229
               "y_var ~ te(lat,lon) + te(elev_s) + te(N_w,E_w) + te(LST) + te(LC2)",
230
               "y_var ~ te(lat,lon) + te(elev_s) + te(N_w,E_w) + te(LST) + te(LC6)")
230 231

  
231 232
#Default name of LST avg to be matched               
232 233
lst_avg<-c("mm_01","mm_02","mm_03","mm_04","mm_05","mm_06","mm_07","mm_08","mm_09","mm_10","mm_11","mm_12")  

Also available in: Unified diff