returnlevel_plot: Create return level plots

Description Usage Arguments Value See Also Examples

View source: R/returnlevel_plot.R

Description

this function creates a return level plot for a given location

Usage

1
2
3
4
returnlevel_plot(GEVparam, period_range = c(1,128),
                 obs = NULL, plottitle = NULL, 
                 save_name = NULL, save_dir = getwd(), 
                 printPlot = TRUE)

Arguments

GEVparam

a named vector with the GEV parameters of the location for which a return level plot is wanted. names are loc, scale and shape

period_range

the range of the return period to be plotted. a vector with start and end point, which should be numbers greater or equal than 1.
default is period_range = c(1,128)

obs

a vector with empirical observations. if provided, sample quantiles of this vector are added to the plot as points

plottitle

a character string defining the title of the plot.
default is plottitle = "return level plot". if no plottitle is wanted, use plottitle = ""

save_name

a character string defining the saving name of the plot.

save_dir

a character string defining the directory for the plot to be saved.
default is the working directory

printPlot

logical value; if TRUE (default), the plot is printed

Value

a return level plot

See Also

GEVparameters_from_models, returnlevel_map, cond_returnlevel_plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# load function output from optimizer_biv_hr_model
data("optim_hr")

# define coefficients
sd_coeff  = optim_hr$coefficients$sd_coeff
swe_coeff = optim_hr$coefficients$swe_coeff
cor_coeff = optim_hr$coefficients$cor_coeff

# arlberg
arl = c("lon" = 10.211, "lat" = 47.13, "alt" = 1979,
        "mdday" = 15.781, "sd_mmax" = 245.6,
        "swe_mmax" = 506.75)
sd_GEVparam_arl  = GEVparameters_from_models(arl, sd_coeff)
swe_GEVparam_arl = GEVparameters_from_models(arl, swe_coeff)

# create return level plots
returnlevel_plot(GEVparam = sd_GEVparam_arl,
                 save_name = "sd_return_level_plot_arlberg",
                 printPlot = FALSE)
returnlevel_plot(GEVparam = swe_GEVparam_arl,
                 save_name = "swe_return_level_plot_arlberg",
                 printPlot = FALSE)

SpatialModelsZAMG documentation built on Nov. 11, 2019, 3 p.m.