This repository was archived by the owner on May 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
77 lines (54 loc) · 2.18 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
cmipr
=====
```{r echo=FALSE}
knitr::opts_chunk$set(
comment = "#>",
collapse = TRUE,
warning = FALSE,
message = FALSE,
fig.path = "inst/img/",
fig.width = 10,
fig.height = 6
)
```
[](https://travis-ci.org/ropenscilabs/cmipr)
[](https://codecov.io/gh/ropenscilabs/cmipr)
[](https://github.com/ropensci/onboarding/issues/99)
R client for CMIP (Coupled Model Intercomparison Project) data
> Under the [World Climate Research Programme (WCRP)](https://www.wcrp-climate.org/) the Working Group on Coupled Modelling (WGCM) established the Coupled Model Intercomparison Project (CMIP) as a standard experimental protocol for studying the output of coupled atmosphere-ocean general circulation models (AOGCMs). Virtually the entire international climate modeling community has participated in this project since its inception in 1995.
Links:
* CMIP (http://cmip-pcmdi.llnl.gov/)
* [CMIP Data available via FTP](http://gdo-dcp.ucllnl.org/downscaled_cmip_projections/dcpInterface.html#Projections:%20Complete%20Archives)
## Install
Development version
```{r eval=FALSE}
devtools::install_github("ropenscilabs/cmipr")
```
```{r}
library("cmipr")
```
## List files
```{r}
cmip_list_files('bcsd/yearly')
cmip_list_files('bcsd/yearly/cccma_cgcm3_1.1')
```
## Download data
```{r}
key <- "bcsd/yearly/cnrm_cm3.1/cnrm_cm3.1.sresa1b.monthly.Prcp.2034.nc"
(res <- cmip_fetch(key))
```
## Read data into R
Can load in a single file (gives `RasterLayer`), or many (gives `RasterBrick`)
```{r}
out <- cmip_read(res)
```
## Plot
```{r fig.cap=""}
plot(out)
```
## Meta
* Please [report any issues or bugs](https://github.com/ropenscilabs/cmipr/issues).
* License: MIT
* Get citation information for `cmipr` in R doing `citation(package = 'cmipr')`
* Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
[](https://ropensci.org)