The Analogues R-Package - Ramirez-Villegas

Preview:

DESCRIPTION

Presentation by Julian Ramirez-Villegas. CCAFS workshop titled "Using Climate Scenarios and Analogues for Designing Adaptation Strategies in Agriculture," 19-23 September in Kathmandu, Nepal.

Citation preview

The Analogues R-Package

Julian Ramirez-Villegas

The tool

1. Entirely coded as an package2. Optimised for large datasets with GRASS-GIS (experimental)3. Example data at 0.5-degree (~100km), globally, for 24

GCMs, and the SRES-A1B emission scenario, but any other data can be integrated

4. Implemented using the raster, rgdal, sp, and maptools packages, so that it is easy to handle GIS formats, and export outputs

5. Dissimilarity is calculated via two measures (CCAFS and Hallegatte), and uncertainty is provided as the SD and CV among individual GCMs, but, R is flexible

6. Calculations can be done and outputs generated for any geographic region at any resolution.

What do you need?Set up: just download and install

R >= 2.13.0 (http://www.r-project.org), and packages:

raster, sp, rgdal, maps, spgrass6, stringr, maptools, foreign, lattice, akima, plotrix, rimage, XML

GRASS GIS >= 6.4 (http://grass.fbk.eu/) (exp)Quantum GIS >= 1.6 (http://www.qgis.org/) (opt)

What do you need?Set up: just download and install

http://code.google.com/p/ccafs-analogues/

Analogues of what?

• Of a site within all land areas of a given geographic domain (gridded dissimilarity)

Gridded analyses Inputs/Outputs

Initial set up: climate data

Climate data for gridded analyses• Must be gridded data (rasters)• At least one variable, for a given area, with any

time-step (from whole year to daily)• Is uniform in spatial coverage (i.e. extent) and

resolution• Represents one or more given (climate)

scenario(s)• Is stored in the same folder• Is named in a way the tool can understand• Is in a GIS format supported by GDAL

(Geographic Data Abstraction Library)

We provide some dataPeriods: 2030 (2020_2049)Extent: GlobalEmissions scenario: SRES-A1B (a1b)Naming structure:

[CURRENT]_[DTR | MEAN | PREC | BIO]_[STEP].ASC[SRES]_[YEAR]_[GCM]_[DTR | TMEAN | PREC | BIO]_[STEP].ASC

Resolution: 0.5 degree (~50km)

• But we also have 1km downscaled datasets for the same GCMs and for SRES-A2, SRES-B1 and SRES-A1B itself (http://www.ccafs-climate.org)

We provide some data

We provide some data

For instance: BCCR-BCM2.0, precipitation

Gridded-analyses: creating a basic report

After an analysis, you could print a simple report showing results

Point-based analyses Inputs/Outputs

Similar to gridded, but not equal!

Initial set up: climate data

Climate data for point analyses• Can be in any format, but you need to load

them into R (as matrices) beforehand• Ensure quality and zero NODATA by yourself

beforehand• One matrix per variable, with columns being

time-steps and rows sites• Objects named in R as [VARIABLE].[SCENARIO]• Uniform in time-step for all variables

Point analyses: using R afterwards

If you know how to use R, you could do your further data analyses with it

Dissimilarity from a site in Ghana (future) to 35 other sites at present(bars are the distribution of 24 GCMs)

In both cases…

• Results can be exported from R in any GIS (gridded) or table (points) format

• Further operations can be done in R, upon your needs and knowledge

• The R-workspace can be saved and then loaded at any time in the future