Calculates the climatology (i.e., complete temporal aggregation, typically the mean) of the input grid.
1 2 3
Function to compute the climatology. This is specified as a list,
indicating the name of the aggregation function in first place (as character), and other optional arguments
to be passed to the aggregation function. Default to mean (i.e.,
Logical. In case of multimember grids, should the climatology be computed sepparately
for each member (
Logical. Should parallel execution be used?
Integer. Upper bound for user-defined number of cores.
Integer number of cores used in parallel computation. Self-selected number of
cores is used when
Two attributes are appended to the grid:
climatology:fun, added to the
Data component of the grid,
indicating the function used to compute the climatology.
season, added to the
Dates component (if not yet existing), in order to provide information
on the season for which the climatology has been computed.
A grid corresponding to the climatology. See details.
Parallel processing is enabled using the parallel package.
Parallelization is undertaken by a FORK-type parallel socket cluster formed by
ncores is not specified (default),
ncores will be one less than the autodetected number of cores.
The maximum number of cores used for parallel processing can be set with the
although this will be reset to the auto-detected number of cores minus 1 if this number is exceeded. Note that not all
code, but just some critical loops within the function are parallelized.
In practice, parallelization does not always result in smaller execution times, due to the parallel overhead. However, parallel computing may potentially provide a significant speedup for the particular case of large multimember datasets or large grids.
Parallel computing is currently not available for Windows machines.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
# Station data: # Mean surface temperature data("VALUE_Iberia_tas") st_mean_clim <- climatology(VALUE_Iberia_tas) str(st_mean_clim) plotClimatology(st_mean_clim, backdrop.theme = "coastline") # Standard deviation of surface temperature st_sd_clim <- climatology(VALUE_Iberia_tas, clim.fun = list(FUN = sd, na.rm = TRUE)) plotClimatology(st_sd_clim, backdrop.theme = "coastline") # July surface temp forecast climatology data("CFS_Iberia_tas") # Aggregate all members before computing the climatology t_mean.clim <- climatology(CFS_Iberia_tas, by.member = FALSE) # Note the new attributes, and that time dimension is preserved as a singleton str(t_mean.clim$Data) str(t_mean.clim$Dates) # Compute a climatology for each member sepparately t_mean_9mem.clim <- climatology(CFS_Iberia_tas, by.member = TRUE) str(t_mean_9mem.clim$Data) # 9 different climatologies, one for each member
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.