Revision db787d3a
Added by Benoit Parmentier about 8 years ago
climate/research/oregon/interpolation/global_product_assessment_part2.R | ||
---|---|---|
4 | 4 |
#This part 2 of the assessment focuses on graphics to explore the spatial patterns of raster times series as figures and movie |
5 | 5 |
#AUTHOR: Benoit Parmentier |
6 | 6 |
#CREATED ON: 10/03/2016 |
7 |
#MODIFIED ON: 10/09/2016
|
|
7 |
#MODIFIED ON: 10/10/2016
|
|
8 | 8 |
#Version: 1 |
9 | 9 |
#PROJECT: Environmental Layers project |
10 | 10 |
#COMMENTS: Initial commit, script based on part NASA biodiversity conferenc |
... | ... | |
87 | 87 |
#Product assessment |
88 | 88 |
function_product_assessment_part1_functions <- "global_product_assessment_part1_functions_09192016b.R" |
89 | 89 |
source(file.path(script_path,function_product_assessment_part1_functions)) #source all functions used in this script |
90 |
function_product_assessment_part2_functions <- "global_product_assessment_part2_functions_10092016.R"
|
|
90 |
function_product_assessment_part2_functions <- "global_product_assessment_part2_functions_10102016.R"
|
|
91 | 91 |
source(file.path(script_path,function_product_assessment_part2_functions)) #source all functions used in this script |
92 | 92 |
|
93 | 93 |
############################### |
... | ... | |
281 | 281 |
##################################### PART 5 ###### |
282 | 282 |
##### Plotting specific days for the mosaics |
283 | 283 |
|
284 |
function_product_assessment_part2_functions <- "global_product_assessment_part2_functions_10092016.R"
|
|
284 |
function_product_assessment_part2_functions <- "global_product_assessment_part2_functions_10102016.R"
|
|
285 | 285 |
source(file.path(script_path,function_product_assessment_part2_functions)) #source all functions used in this script |
286 | 286 |
|
287 | 287 |
#NA_flag_val_mosaic <- -3399999901438340239948148078125514752.000 |
... | ... | |
340 | 340 |
out_filename_figure_animation="test.gif") |
341 | 341 |
|
342 | 342 |
|
343 |
generate_animation_from_figures_fun(filenames_figures= unlist(lf_mosaic_plot_fig[1:11]), |
|
344 |
frame_speed=frame_speed, |
|
345 |
format_file=animation_format, |
|
346 |
out_suffix=out_suffix_str, |
|
347 |
out_dir=out_dir, |
|
348 |
out_filename_figure_animation="test2.gif") |
|
343 | 349 |
|
344 | 350 |
#### PLOT ACCURACY METRICS: First test #### |
345 | 351 |
##this will be cleaned up later: |
... | ... | |
347 | 353 |
#dir_ac_mosaics <- "/data/project/layers/commons/NEX_data/climateLayers/out/reg4/mosaic/output_reg4_1999" |
348 | 354 |
lf_tmp <-list.files(path=dir_ac_mosaics,pattern="r_m_use_edge_weights_weighted_mean_mask_gam_CAI_.*.ac.*._reg4_1999.tif") |
349 | 355 |
|
350 |
#lf_tmp1 <- lf_tmp[21:24] |
|
351 |
#list_param_plot_raster_mosaic |
|
352 |
lf_tmp <-list.files(path=dir_ac_mosaics,pattern="r_m_use_edge_weights_weighted_mean_mask_gam_CAI_.*.ac.*._reg4_1999.tif",full.names=T) |
|
353 |
#Product assessment |
|
354 |
#function_product_assessment_part1_functions <- "global_product_assessment_part1_functions_06142016b.R" |
|
355 |
#source(file.path(script_path,function_product_assessment_part1_functions)) #source all functions used in this script |
|
356 |
|
|
357 | 356 |
r_mosaiced_ac <- stack(lf_tmp) |
358 | 357 |
l_dates <- unlist(lapply(1:length(lf_tmp),FUN=extract_date,x=basename(lf_tmp),item_no=14)) |
359 | 358 |
variable_name |
Also available in: Unified diff
degugging function to generate animation from mosaic figures