Project

General

Profile

« Previous | Next » 

Revision b695b5f1

Added by Benoit Parmentier about 8 years ago

debugging function of number of predictions for day with missing tiles

View differences:

climate/research/oregon/interpolation/global_product_assessment_part0.R
9 9
#
10 10
#AUTHOR: Benoit Parmentier 
11 11
#CREATED ON: 10/27/2016  
12
#MODIFIED ON: 11/16/2016            
12
#MODIFIED ON: 11/20/2016            
13 13
#Version: 1
14 14
#PROJECT: Environmental Layers project     
15 15
#COMMENTS: 
......
20 20
#source /nobackupp6/aguzman4/climateLayers/sharedModules2/etc/environ.sh 
21 21
#
22 22
#setfacl -Rm u:aguzman4:rwx /nobackupp6/aguzman4/climateLayers/LST_tempSpline/
23
#COMMIT: testing and moving generate raster of number of predictions for day with missing tiles   
23
#COMMIT: debugging function of number of predictions for day with missing tiles   
24 24

  
25 25
#################################################################################################
26 26

  
......
97 97
###############################
98 98
####### Parameters, constants and arguments ###
99 99

  
100
CRS_locs_WGS84<-CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +towgs84=0,0,0") #constant 1
100
#CRS_locs_WGS84 <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +towgs84=0,0,0") #constant 1
101
proj_str <- "+proj=longlat +ellps=WGS84 +datum=WGS84 +towgs84=0,0,0"
102

  
101 103
var<-"TMAX" # variable being interpolated #param 1, arg 1
102 104
interpolation_method<-c("gam_CAI") #param 2
103
CRS_interp <- "+proj=longlat +ellps=WGS84 +datum=WGS84 +towgs84=0,0,0" #param 3
105
#CRS_interp <- "+proj=longlat +ellps=WGS84 +datum=WGS84 +towgs84=0,0,0" #param 3
104 106
#list_models<-c("y_var ~ s(lat,lon,k=5) + s(elev_s,k=3) + s(LST,k=3)") #param 4
105 107
metric_name <- "var_pred" #use RMSE if accuracy
106 108
pred_mod_name <- "mod1"
......
175 177

  
176 178
list_param_predictions_tiles_missing <- list(in_dir1,region_name,y_var_name,interpolation_method,out_suffix,out_dir,
177 179
                                             create_out_dir_param,proj_str,list_year_predicted,file_format,NA_flag_val,
178
                                             num_cores,plotting_figures,item_no,day_to_mosaic,countries_shp,plot_region,
179
                                             threshold_missing_day,pred_mod_name,metric_name)
180
                                             num_cores,plotting_figures,item_no,day_to_mosaic_range,countries_shp,plotting_figures,
181
                                             #threshold_missing_day,
182
                                             pred_mod_name,metric_name)
180 183

  
181 184
names(list_param_predictions_tiles_missing) <- c("in_dir1","region_name","y_var_name","interpolation_method","out_suffix","out_dir",
182 185
                                             "create_out_dir_param","proj_str","list_year_predicted","file_format","NA_flag_val",
183
                                             "num_cores","plotting_figures","item_no","day_to_mosaic","countries_shp","plot_region",
184
                                             "threshold_missing_day","pred_mod_name","metric_name")
186
                                             "num_cores","plotting_figures","item_no","day_to_mosaic_range","countries_shp","plotting_figures",
187
                                             #"threshold_missing_day",
188
                                             "pred_mod_name","metric_name")
185 189

  
186 190
debug(predictions_tiles_missing_fun)
187 191
predictions_tiles_missing_fun(1,list_param=list_param_predictions_tiles_missing)
......
211 215
  ##for plotting assessment function
212 216
  
213 217
  item_no <- list_param_run_assessment_prediction$mosaic_plot  #PARAM14
214
  day_to_mosaic <- list_param$day_to_mosaic #PARAM15
218
  day_to_mosaic_range <- list_param$day_to_mosaic_range #PARAM15
215 219
  countries_shp <- list_param$countries_shp #PARAM17
216
  plot_region <- list_param$plot_region #PARAM18
217
  threshold_missing_day <- list_param$threshold_missing_day #PARM20
220
  plotting_figures <- list_param$plotting_figures #PARAM18
221
  #threshold_missing_day <- list_param$threshold_missing_day #PARM20
218 222
  pred_mod_name <- list_param$pred_mod_name
219 223
  metric_name <- list_param$metric_name
220 224
  

Also available in: Unified diff