Revision 4aef71fa
Added by Benoit Parmentier over 9 years ago
climate/research/oregon/interpolation/presentation_global_run_scalingup_assessment.Rmd | ||
---|---|---|
11 | 11 |
knit : slidify::knit2slides |
12 | 12 |
--- |
13 | 13 |
|
14 |
```{r,echo=F} |
|
14 |
```{r,echo=FALSE}
|
|
15 | 15 |
|
16 | 16 |
#First let's set up the input parameters for the script in R: |
17 | 17 |
|
18 | 18 |
in_dir <- "/data/project/layers/commons/NEX_data/output_run10_1500x4500_global_analyses_pred_1992_09012015" |
19 | 19 |
|
20 |
#region_name <- "world" #PARAM 13 #reg4 South America, Africa reg5,Europe reg2, North America reg1, Asia reg3 |
|
21 |
#mosaicing_method <- c("unweighted","use_edge_weights") |
|
22 |
out_suffix <- paste(region_name,"_","pred_1992_09032015",sep="") |
|
23 |
#_mosaic_run10_1500x4500_global_analyses_06212015 |
|
20 |
#region_name <- "reg4" #PARAM 13 #reg4 South America, Africa reg5,Europe reg2, North America reg1, Asia reg3 |
|
21 |
#out_suffix <- paste(region_name,"_","pred_1992_09032015",sep="") |
|
22 |
out_suffix <- "pred_1992_09032015" |
|
24 | 23 |
#day_to_mosaic <- c("20100831", |
25 | 24 |
# "20100901") #PARAM7 |
26 | 25 |
|
... | ... | |
28 | 27 |
|
29 | 28 |
## Tiles of 1500x4500 km |
30 | 29 |
|
30 |
|
|
31 | 31 |
There were 43 tiles for region 4 (Africa) |
32 | 32 |
|
33 | 33 |
1. Tiles were run for 365 days. |
34 | 34 |
2. Year tested was 1992. |
35 |
3. Assessment of number of days predicted and accuracy was carried out.
|
|
35 |
3. Assessments for the number of days predicted and accuracy were carried out.
|
|
36 | 36 |
|
37 | 37 |
|
38 | 38 |
--- .class #id |
... | ... | |
46 | 46 |
</style> |
47 | 47 |
|
48 | 48 |
|
49 |
|
|
50 | 49 |
# Tiles of 1500x4500km global run |
51 | 50 |
|
52 | 51 |
```{r, echo=FALSE} |
... | ... | |
59 | 58 |
``` |
60 | 59 |
|
61 | 60 |
```{r image_file1, echo = F, results = 'asis'} |
62 |
#| I am text to the left | ![Flowers](/flowers.jpeg) | |
|
63 |
#md_str <- paste('\n| |![](',image_file1,')\n',sep="") |
|
64 |
#md_str <- paste('\n->![alt text](',image_file1,'),<-\n',sep="") |
|
65 |
#<center>![Alt test](http://upload.wikimedia.org/wikipedia/en/b/bc/Wiki.png)</center> |
|
66 | 61 |
md_str <- paste('\n<center>![](',image_file1,')<center>\n',sep="") |
67 |
#md_str <- paste('\n![](',image_file1,'#center)\n',sep="") |
|
68 |
#fig.align = "center" |
|
62 |
|
|
69 | 63 |
cat(md_str) |
70 | 64 |
``` |
71 | 65 |
|
... | ... | |
74 | 68 |
# ACCUARY PER TILES FOR MODEL 1 |
75 | 69 |
|
76 | 70 |
```{r, echo=FALSE} |
77 |
#image_file2 <- file.path(in_dir,"Figure9_clim_mosaics_day_test_edge_weighted_20100831_world_mosaic_07092015.png") |
|
78 |
|
|
79 | 71 |
|
80 | 72 |
fname <- paste("Figure2a_boxplot_with_oultiers_by_tiles_mod1_run10_1500x4500_global_analyses_pred_1992_09012015.png") |
81 | 73 |
image_file2 <- file.path(in_dir,fname) |
... | ... | |
86 | 78 |
``` |
87 | 79 |
|
88 | 80 |
|
89 |
```{r image_file2, echo = F, results = 'asis', fig.show = 'hold', out.width = '50%',out.extra='style=""'} |
|
81 |
```{r image_file2, image_file3 , echo = F, results = 'asis', fig.show = 'hold', out.width = '50%',out.extra='style=""'}
|
|
90 | 82 |
|
91 | 83 |
md_str <- paste('\n![](',image_file2,') ','![](',image_file3,')\n',sep="") |
92 | 84 |
cat(md_str) |
93 |
#md_str <- paste('\n![](',image_file2,')\n',sep="") |
|
94 |
#cat(md_str) |
|
95 | 85 |
|
96 | 86 |
#![alt-text-1](image1.png "title-1") ![alt-text-2](image2.png "title-2") |
97 | 87 |
|
... | ... | |
184 | 174 |
|
185 | 175 |
--- |
186 | 176 |
|
187 |
# Predicted less than 367
|
|
177 |
# Predicted tiles for 1992
|
|
188 | 178 |
|
189 | 179 |
```{r, echo=FALSE} |
190 | 180 |
#image_file1 <- file.path(in_dir,"Figure9_clim_mosaics_day_test_unweighted_20100831_world_mosaic_07092015") |
... | ... | |
208 | 198 |
|
209 | 199 |
--- |
210 | 200 |
|
211 |
# Predicted less than 365 |
|
201 |
# Predicted less than 365, at least one missing day
|
|
212 | 202 |
|
213 | 203 |
```{r, echo=FALSE} |
214 | 204 |
#image_file1 <- file.path(in_dir,"Figure9_clim_mosaics_day_test_unweighted_20100831_world_mosaic_07092015") |
... | ... | |
228 | 218 |
#md_str <- paste('\n![](',image_file1,'#center)\n',sep="") |
229 | 219 |
#fig.align = "center" |
230 | 220 |
cat(md_str) |
221 |
``` |
|
222 |
--- |
|
223 |
|
|
224 |
--- |
|
225 |
# Missing days |
|
226 |
|
|
227 |
```{r echo = F} |
|
228 |
|
|
229 |
#tb <- read.table(file=file.path(out_dir,paste("tb_diagnostic_v_NA","_",out_suffix,".txt",sep="")),sep=",") |
|
230 |
tb <- read.table(file.path("/data/project/layers/commons/NEX_data/output_run10_1500x4500_global_analyses_pred_1992_09012015","tb_diagnostic_v_NA_run10_1500x4500_global_analyses_pred_1992_09012015.txt"),sep=",") |
|
231 |
|
|
232 |
#table(tb$pred_mod) |
|
233 |
#table(tb$index_d) |
|
234 |
#table(subset(tb,pred_mod!="mod_kr")) |
|
235 |
#table(subset(tb,pred_mod=="mod1")$index_d) |
|
236 |
#aggregate() |
|
237 |
tb$predicted <- 1 |
|
238 |
test <- aggregate(predicted~pred_mod+tile_id,data=tb,sum) |
|
239 |
#as.character(unique(test$tile_id)) #141 tiles |
|
240 |
#dim(subset(test,test$predicted==365 & test$pred_mod=="mod1")) |
|
241 |
#histogram(subset(test, test$pred_mod=="mod1")$predicted) |
|
242 |
#unique(subset(test, test$pred_mod=="mod1")$predicted) |
|
243 |
summary_predicted <-table((subset(test, test$pred_mod=="mod1")$predicted)) |
|
244 |
|
|
245 |
``` |
|
246 |
|
|
247 |
```{r summary_predicted, echo = F} |
|
248 |
|
|
249 |
barplot(summary_predicted,main="Frequency of number of days predicted") |
|
250 |
print(summary_predicted) |
|
251 |
|
|
231 | 252 |
``` |
232 | 253 |
|
233 | 254 |
--- |
Also available in: Unified diff
adding barplot of predicted days for Africa 1992 assessment