Project

General

Profile

« Previous | Next » 

Revision df1ec773

Added by Benoit Parmentier almost 10 years ago

NEX assessment part 2 producing daily mosaics plots

View differences:

climate/research/oregon/interpolation/global_run_scalingup_assessment_part2.R
5 5
#Analyses, figures, tables and data are also produced in the script.
6 6
#AUTHOR: Benoit Parmentier 
7 7
#CREATED ON: 03/23/2014  
8
#MODIFIED ON: 01/20/2015            
8
#MODIFIED ON: 01/28/2015            
9 9
#Version: 4
10 10
#PROJECT: Environmental Layers project     
11 11
#COMMENTS: analyses for run 10 global analyses, Europe, Australia, 1000x300km
......
321 321

  
322 322
y_var_name <- "dailyTmax"
323 323
interpolation_method <- c("gam_CAI")
324
out_prefix<-"run10_global_analyses_01202015"
324
out_prefix<-"run10_global_analyses_01282015"
325 325
mosaic_plot <- FALSE
326 326

  
327 327
day_to_mosaic <- c("20100101","20100102","20100103","20100104","20100105",
......
342 342

  
343 343
#out_dir <-paste(out_dir,"_",out_prefix,sep="")
344 344
create_out_dir_param <- FALSE
345
out_dir <-"/data/project/layers/commons/NEX_data/output_run10_global_analyses_01202015/"
345
out_dir <-"/data/project/layers/commons/NEX_data/output_run10_global_analyses_01282015/"
346 346

  
347 347
if(create_out_dir_param==TRUE){
348 348
  out_dir <- create_dir_fun(out_dir,out_prefix)
......
697 697
}
698 698

  
699 699
## Number of tiles with information:
700
sum(df_tile_processed$metrics_v)
701
length(df_tile_processed$metrics_v)
702
sum(df_tile_processed$metrics_v)/length(df_tile_processed$metrics_v) #70.69%
700
sum(df_tile_processed$metrics_v) #number of tiles with raster object
701
length(df_tile_processed$metrics_v) #number of tiles in the region
702
sum(df_tile_processed$metrics_v)/length(df_tile_processed$metrics_v) #62.5% of tiles with info
703 703

  
704 704
#coordinates
705 705
coordinates(summary_metrics_v) <- c("lon","lat")
......
847 847
           full.names=T))
848 848
}
849 849

  
850
#This part should be automated...
850 851
#plot Australia
851
lf_m <- lf_mosaics_reg[[2]]
852
out_dir_str <- out_dir
853
reg_name <- "reg6_1000x3000"
852
#lf_m <- lf_mosaics_reg[[2]]
853
#out_dir_str <- out_dir
854
#reg_name <- "reg6_1000x3000"
854 855
#lapply()
855 856
#list_param_plot_daily_mosaics <- list(lf_m=lf_m,reg_name=reg_name,out_dir_str=out_dir_str,out_suffix=out_prefix)
856
list_param_plot_daily_mosaics <- list(lf_m=lf_m,reg_name=reg_name,out_dir_str=out_dir_str,out_suffix=out_prefix,l_dates=day_to_mosaic)
857
#list_param_plot_daily_mosaics <- list(lf_m=lf_m,reg_name=reg_name,out_dir_str=out_dir_str,out_suffix=out_prefix,l_dates=day_to_mosaic)
857 858

  
858 859
#lf_m_mask_reg4_1500x4500 <- mclapply(1:2,FUN=plot_daily_mosaics,list_param=list_param_plot_daily_mosaics,mc.preschedule=FALSE,mc.cores = 6)
859 860
#debug(plot_daily_mosaics)
860 861
#lf_m_mask_reg6_1000x3000 <- plot_daily_mosaics(1,list_param=list_param_plot_daily_mosaics)
861 862

  
862
lf_m_mask_reg6_1000x3000 <- mclapply(1:length(lf_m),FUN=plot_daily_mosaics,list_param=list_param_plot_daily_mosaics,mc.preschedule=FALSE,mc.cores = 10)
863
#lf_m_mask_reg6_1000x3000 <- mclapply(1:length(lf_m),FUN=plot_daily_mosaics,list_param=list_param_plot_daily_mosaics,mc.preschedule=FALSE,mc.cores = 10)
863 864

  
864 865
#### North America
865 866
lf_m <- lf_mosaics_reg[[1]]
866 867
out_dir_str <- out_dir
867
reg_name <- "reg1_1000x3000"
868
reg_name <- "reg1_1500x4500"
868 869
#lapply()
869 870
list_param_plot_daily_mosaics <- list(lf_m=lf_m,reg_name=reg_name,out_dir_str=out_dir_str,out_suffix=out_prefix,l_dates=day_to_mosaic)
870 871
#lf_m_mask_reg4_1500x4500 <- mclapply(1:2,FUN=plot_daily_mosaics,list_param=list_param_plot_daily_mosaics,mc.preschedule=FALSE,mc.cores = 6)
871 872

  
872
lf_m_mask_reg1_1000x3000 <- mclapply(1:length(lf_m),FUN=plot_daily_mosaics,list_param=list_param_plot_daily_mosaics,mc.preschedule=FALSE,mc.cores = 10)
873
lf_m_mask_reg1_1500x4500 <- mclapply(1:length(lf_m),FUN=plot_daily_mosaics,list_param=list_param_plot_daily_mosaics,mc.preschedule=FALSE,mc.cores = 10)
873 874

  
874 875
##################### END OF SCRIPT ######################

Also available in: Unified diff