wiki:udg/ecoms/RPackage/examples/continentalSelection

Version 20 (modified by juaco, 7 years ago) (diff)

--

Regional-Continental domain selections

In this example we will load data for Europe for the variable surface (2m) minimum temperature (var = tasmin), for the first two members (members = 1:2) of the CFSv2 hindcast (dataset = CFSv2_seasonal_16), considering the wintertime (DJF, season = c(12,1,2)) for the 10-year period 1991-2000 (years = 1991:2000), according to the forecast issued in September (leadMonth = 3). The original variable is 6-hourly . We will retrieve the daily minimum values, by setting the argument time = "DD" and the daily aggregation function to minimum (aggr.d = "min"):

> ex2 <- loadECOMS(dataset = "CFSv2_seasonal",
                   var = "tasmin",
                   members = 1:2,
                   lonLim = c(-15,35),
                   latLim = c(32, 75),
                   season = c(12,1,2),
                   years = 1991:2000,
                   leadMonth = 3,
                   time = "DD",
                   aggr.d = "min")

Returning the following on-screen information during the data loading process:

[2015-05-15 12:39:51] Defining homogeneization parameters for variable "tasmin"
[2015-05-15 12:39:51] Defining geo-location parameters
[2015-05-15 12:39:51] Defining initialization time parameters
NOTE: Daily aggregation will be computed from 6-hourly data
[2015-05-15 12:39:55] Retrieving data subset ...
[2015-05-15 12:46:28] Done

The size of the object is 35 Mb:

print(object.size(ex2), units = "Mb")

In this case, the data are stored in a 4D-array, with the dimensions indicated by the dimensionsattribute, always following the canonical ordering of dimensions:

str(ex2$Data)
 num [1:2, 1:903, 1:47, 1:54] 21.6 16.1 21.1 17.4 21.5 ...
 - attr(*, "dimensions")= chr [1:4] "member" "time" "lat" "lon"

Members can be plotted individually by setting multimember = TRUE in the plotMeanField function of the downscaleR package:

plotMeanField(ex2, multi.member = TRUE)

Attachments (1)

Download all attachments as: .zip