modelinput_test: Example model specification file for models2wux

Description Usage Details See Also Examples

Description

This is an example model specification for WUX, giving information on two example NetCDF files from the CMIP5 project. The datatype is a list. For specification details see the "Configfile modelinput" section in models2wux.

Usage

1

Details

The two CMIP5 simulations "NorESM1-M" and "CanESM2" (either having historical run and RCP 8.5 forcing) are assumed to be stored in the home directory "~/tmp/CMIP5". You can download them using CMIP5fromESGF. See the example for a typical workflow.

See Also

models2wux, CMIP5fromESGF

Examples

 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
## Not run: 
## Here is how to use the climate model specification file
## "modelinput_test" for models2wux.

## I) DOWNLOAD EXEMPLARY DATA
## download temperature fields of two example GCMs (NorESM1-M and
## CanESM2) with the  RCP 8.5 and the historical run
## into your temporary directory. This command will create a folder
## "CMIP5" in "~/tmp" with two subfolders for each model again with
## two subfolders for each experiment.
CMIP5fromESGF(save.to = "~/tmp/CMIP5/",
              models = c("NorESM1-M", "CanESM2"),
              variables = c("tas"),
              experiments= c("historical", "rcp85"))

## II) INTERFACE FOR THE DATA (type list)
## This is the information for models2wux to read in the data. Usually
## you have to create such a file for yourself, or add it to an existing
## one. This file assumes you have downloaded the two GCMs into ~/tmp/CMIP5 by
## CMIP5fromESGF, as shown above.
data(modelinput_test)

## III) CONTROL FILE FOR models2wux (type list)
## What climate data you want to read in (here it is the two example
## simluations mentioned above)? What subregion to analysze? What is you
## reference and what your scenario period? Aggregate to specific
## seasons? 
data(userinput_CMIP5_timeseries)

## IV) CONVERT CLIMATE SIMULATIONS TO A data.frame
wux.test <- models2wux(userinput_CMIP5_timeseries, modelinput_test)

## V) ANALYZE data.frame
require(lattice)
wux.test$year <- as.integer(as.character(wux.test$year))
xyplot(air_temperature ~ year|season,
       groups=acronym,
       data = wux.test,
       type = c("l", "g"),
       main = "NorESM1-M and CanESM2 simulations over Alpine Region\n
       historical and RCP 8.5 forcing")

## End(Not run)

wux documentation built on May 2, 2019, 4:03 p.m.