Project

General

Profile

« Previous | Next » 

Revision 0619e299

Added by Benoit Parmentier about 8 years ago

generating animation for region 5 for multiple years sequences

View differences:

climate/research/oregon/interpolation/global_product_assessment_part2.R
18 18
#source /nobackupp6/aguzman4/climateLayers/sharedModules2/etc/environ.sh 
19 19
#
20 20
#setfacl -Rm u:aguzman4:rwx /nobackupp6/aguzman4/climateLayers/LST_tempSpline/
21
#COMMIT: generating animation for region 5 with and without range limit 
21
#COMMIT: generating animation for region 5 for multiple years sequences
22 22

  
23 23
#################################################################################################
24 24

  
......
86 86
#Product assessment
87 87
function_product_assessment_part1_functions <- "global_product_assessment_part1_functions_09192016b.R"
88 88
source(file.path(script_path,function_product_assessment_part1_functions)) #source all functions used in this script 
89
function_product_assessment_part2_functions <- "global_product_assessment_part2_functions_10192016b.R"
89
function_product_assessment_part2_functions <- "global_product_assessment_part2_functions_10222016.R"
90 90
source(file.path(script_path,function_product_assessment_part2_functions)) #source all functions used in this script 
91 91

  
92 92
###############################
......
225 225
#day_start <- "1984101" #PARAM 12 arg 12
226 226
#day_end <- "20141231" #PARAM 13 arg 13
227 227

  
228
function_product_assessment_part2_functions <- "global_product_assessment_part2_functions_10192016b.R"
229
source(file.path(script_path,function_product_assessment_part2_functions)) #source all functions used in this script 
230

  
231 228
#Using default values for parameters exectpt for num_cores=11 instead of 1
232 229
#debug(check_missing)
233 230
#test_missing <- check_missing(lf=lf_raster, 
......
273 270
metric_name <- "var_pred" #use RMSE if accuracy
274 271
#df_raster <- read.table("df_raster_global_assessment_reg6_10102016.txt",sep=",",header=T)
275 272
#plot_figure <- 
276
debug(plot_and_animate_raster_time_series)
273
#function_product_assessment_part2_functions <- "global_product_assessment_part2_functions_10222016.R"
274
#source(file.path(script_path,function_product_assessment_part2_functions)) #source all functions used in this script 
275

  
276
#undebug(plot_and_animate_raster_time_series)
277
range_year <- c(1984,1985)
278
subset_df_time_series <- subset(df_time_series,year%in% range_year)
279
subset_df_time_series <- subset_df_time_series[!is.na(subset_df_time_series$lf),]
280

  
281
lf_subset <- file.path(subset_df_time_series$dir,subset_df_time_series$lf)
282
range_year_str <- paste(range_year, sep = "_", collapse = "_")
277 283

  
278
animation_obj <- plot_and_animate_raster_time_series(lf_raster[1:11], 
284
out_suffix_str <- paste(range_year_str,out_suffix,sep="_")
285

  
286
#started on 10/22/2016 at 9.57
287
animation_obj <- plot_and_animate_raster_time_series(lf_subset, 
279 288
                                                     item_no,
280 289
                                                     region_name,
281 290
                                                     var_name,
......
288 297
                                                     plot_figure=T,
289 298
                                                     generate_animation=T,
290 299
                                                     num_cores=num_cores,
291
                                                     out_suffix="",
292
                                                     out_dir=".")
300
                                                     out_suffix=out_suffix_str,
301
                                                     out_dir=out_dir)
293 302
  
303
zlim_val <- c(-2000,5000)
304
animation_obj <- plot_and_animate_raster_time_series(lf_subset, 
305
                                                     item_no,
306
                                                     region_name,
307
                                                     var_name,
308
                                                     metric_name,
309
                                                     NA_flag_val,
310
                                                     filenames_figures=NULL,
311
                                                     frame_speed=60,
312
                                                     animation_format=".gif",
313
                                                     zlim_val=zlim_val,
314
                                                     plot_figure=T,
315
                                                     generate_animation=T,
316
                                                     num_cores=num_cores,
317
                                                     out_suffix=out_suffix_str,
318
                                                     out_dir=out_dir)
294 319

  
295 320
############################ END OF SCRIPT ##################################

Also available in: Unified diff