## 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)
Run the code above in your browser using DataLab