Revision 68849df1
Added by Benoit Parmentier about 10 years ago
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: 10/21/2014
|
|
8 |
#MODIFIED ON: 11/03/2014
|
|
9 | 9 |
#Version: 3 |
10 | 10 |
#PROJECT: Environmental Layers project |
11 | 11 |
#COMMENTS: analyses for run 5 global using 6 specific tiles |
... | ... | |
215 | 215 |
#in_dir1 <- "/data/project/layers/commons/NEX_data/output_run6_global_analyses_09162014/output20Deg2" |
216 | 216 |
# parent output dir for the curent script analyes |
217 | 217 |
#out_dir <-"/data/project/layers/commons/NEX_data/output_run3_global_analyses_06192014/" #On NCEAS Atlas |
218 |
out_dir <-"/data/project/layers/commons/NEX_data/output_run8_global_analyses_10212014/"
|
|
218 |
out_dir <-"/data/project/layers/commons/NEX_data/output_run8_global_analyses_10292014/"
|
|
219 | 219 |
# input dir containing shapefiles defining tiles |
220 | 220 |
#in_dir_shp <- "/data/project/layers/commons/NEX_data/output_run5_global_analyses_08252014/output/subset/shapefiles" |
221 | 221 |
|
... | ... | |
228 | 228 |
|
229 | 229 |
y_var_name <- "dailyTmax" |
230 | 230 |
interpolation_method <- c("gam_CAI") |
231 |
out_prefix<-"run8_global_analyses_10212014"
|
|
231 |
out_prefix<-"run8_global_analyses_10292014"
|
|
232 | 232 |
mosaic_plot <- FALSE |
233 | 233 |
|
234 | 234 |
proj_str<- CRS_WGS84 |
... | ... | |
622 | 622 |
list_df_ac_mod[[i]] <- arrange(as.data.frame(ac_mod),desc(rmse))[,c("rmse","mae","tile_id")] |
623 | 623 |
} |
624 | 624 |
|
625 |
|
|
626 |
#coordinates |
|
627 |
coordinates(summary_metrics_v) <- c("lon","lat") |
|
628 |
summary_metrics_v$n_missing <- summary_metrics_v$n == 365 |
|
629 |
|
|
630 |
#plot(summary_metrics_v) |
|
631 |
p_shp <- layer(sp.polygons(reg_layer, lwd=1, col='black')) |
|
632 |
#title("(a) Mean for 1 January") |
|
633 |
p <- bubble(summary_metrics_v,"n_missing",main=paste("Averrage RMSE per tile and by ",model_name[i])) |
|
634 |
p1 <- p+p_shp |
|
635 |
print(p1) |
|
636 |
|
|
625 | 637 |
###################### |
626 | 638 |
### Figure 7: Number of predictions: daily and monthly |
627 | 639 |
|
... | ... | |
631 | 643 |
#xyplot(n~pred_mod | tile_id,data=subset(as.data.frame(summary_metrics_v), |
632 | 644 |
# pred_mod!="mod_kr"),type="h") |
633 | 645 |
|
634 |
|
|
646 |
#cor |
|
635 | 647 |
|
636 | 648 |
# |
637 | 649 |
## Figure 7a |
... | ... | |
653 | 665 |
pred_mod!="mod_kr"),type="h") |
654 | 666 |
|
655 | 667 |
test |
668 |
|
|
669 |
unique(test$tile_id) #71 tiles |
|
670 |
dim(subset(test,test$predicted==365 & test$pred_mod=="mod2")) |
|
671 |
histogram(subset(test, test$pred_mod=="mod2")$predicted) |
|
672 |
unique(subset(test, test$pred_mod=="mod2")$predicted) |
|
673 |
table((subset(test, test$pred_mod=="mod2")$predicted)) |
|
674 |
|
|
656 | 675 |
LST_avgm_min <- aggregate(LST~month,data=data_month_all,min) |
657 | 676 |
histogram(test$predicted~test$tile_id) |
658 | 677 |
table(tb) |
Also available in: Unified diff
run 8 NEX scaling up assessment part2, production of figures for Asia, Africa and South America