Learn R Programming

SeaVal

This package supports validation of seasonal weather forecasts. The focus lies on tercile forecasts, i.e. predictions of three probabilities, one for 'below normal' (e.g. temperature or precipitation), 'normal', and 'above normal', respectively. The package implements a large variety of evaluation metrics, as recommended by the World Meteorological Organization. In particular, it simplifies the task of evaluating gridded forecasts against gridded observations. It also provides tools for data import/export and plotting. Finally, it provides functionality for downloading and managing monthly-means gridded precipitation observations provided by Climate Hazards Group InfraRed Precipitation with Station data (CHIRPS).

The package can be installed by running install.packages("SeaVal"). Thereafter it can be loaded by running library(SeaVal) For a comprehensive online tutorial, see http://files.nr.no/samba/CONFER/SeaVal/.

Copy Link

Version

Install

install.packages('SeaVal')

Monthly Downloads

617

Version

1.1.1

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Claudio Heinrich-Mertsching

Last Published

November 25th, 2023

Functions in SeaVal (1.1.1)

MSE

Mean Square Error of ensemble forecasts.
REL

Reliability score
PCC

Pearson Correlation Coefficient
IGSS

Ignorance Skill score
ROCS

ROC-score/Area Under Curve(AUC)
MB

Multicategory Brier score
RES

Resolution score
MBS

Multicategory Brier Skill score
MSD_to_YM

Converts time given as 'months since date' (MSD) into years and months (YM)
MSES

Mean Square Error Skill score
add_country_names

Add country names to a data table with lon/lat coordinates
add_climatology

Add climatology to a data table
RPSS

Ranked Probability skill score
add_tercile_probs

Add tercile probabilities to ensemble forecasts
add_country

Same as add_country_names
ROC_curve

ROC curve for tercile forecasts
RPS

Ranked Probability score
add_tercile_cat

Add a tercile-category column to a data table
SRC

Compute the slope of the reliability curve
SeaVal-package

SeaVal: Validation of Seasonal Weather Forecasts
by_cols_ens_fc_score

Auxiliary function
checks_ens_fc_score

Auxiliary function for scores of ensemble forecasts.
chirps_monthly

Monthly mean precipitation
climatology_ens_forecast

Returns a leave-one-year-out climatology-based ensemble forecast
by_cols_terc_fc_score

Auxiliary function
chirps_dir

CHIRPS directory
are_all_elements_within_eps

Check if all elements of x are within tolerance eps of any element in y
checks_terc_fc_score

Auxiliary function for scores for tercile forecasts.
chirps_ver_map_quantiles

Calculates and saves the quantiles of CHIRPS data required for verification maps.
by_cols_terc_fc_score_sp

Auxiliary function
dimvars

Get dimension variables
crps_aux_esc

Auxiliary function for calculating crps with ensemble size correction by Ferro et al. 2008.
crps_aux

Auxiliary function for calculating crps.
climatology_threshold_exceedence

Get climatological prediction for exceedence probabilities.
disc_score_dt

Generalized Discrimination score
combine

Combine two data tables
data_dir

Auxiliary function to access and change the directory used to load and save data.
create_diagram_by_level

Auxiliary function to simplify grouping for diagrams
delete_redundant_files

Auxiliary function cleaning out the directories, called at the end of the CHIRPS download.
complete_regular_grid

Expand Regular Spatial Grid
get_quantiles

Calculate quantiles from a data table
download_chirps_monthly

Download monthly CHIRPS-data
get_terciles

get terciles from a data table
download_chirps_monthly_high

Auxiliary function called by download_chirps_monthly
ecmwf_monthly

Monthly mean precipitation forecast example dataset
dt_to_netcdf

Write a netcdf from a long data table
download_chirps_monthly_low

Auxiliary function called by download_chirps_monthly
download_chirps_prelim_aux

Auxiliary function for downloading the preliminary CHIRPS monthly data
ggplot_dt

plotting function for spatial data
get_mask

Function to create a mask of dry regions from CHIRPS
fc_cols

Forecast column names
gha_plot

Plotting function with different map for Greater Horn of Africa
obs_cols

Observation column names
obs_dimvars

Auxiliary function returning observation dimvars.
grid_info

Retrieve spatial grid information from a data table
indicator_times_value_aux

Auxiliary function for multiplying two numbers such that 0 x infty is 0. Needed for the ignorance score: 0log(0) should be 0.
netcdf_to_dt

function for converting netcdfs to long data tables.
load_chirps

Function for loading CHIRPS (monthly) data.
set_spatial_grid

Set Spatial Grid Attributes to a Data Table
roc_score_vec

ROC score (AUC)
rel_diag_vec

Reliability diagram from vectors of probabilities and observations
space_dimvars

Auxiliary function
run_dimension_check_ens_fc_score

Auxiliary Function
rel_diag

Reliability Diagrams for tercile forecasts
profit_graph

(Accumulative) profit graphs
run_dimension_check_terc_forecast

Auxiliary Function
restrict_to_country

restricts data to a specified country
roc_curve_vec

ROC curves
round_probs

auxiliary function for rounding probabilities
tercile_plot

Function for plotting terciles
tfc_from_efc

Get tercile probability forecast from ensemble forecasts
upscale_regular_lon_lat

Function for matching data between different grids
ver_map

Plot a verification map of percentiles
restrict_to_GHA

restricts data to the Greater Horn of Africa
ver_map_chirps

Plot a verification map of percentiles based on precomputed CHIRPS quantiles.
tendency_diag

Tendency diagram from a data table containing tercile forecasts.
tc_cols

Tercile column names
upscale_chirps

Upscales monthly CHIRPS data to a coarser grid
time_dimvars

Auxiliary function
CPA

Coefficients of Predictive Ability
EA_country_names

Get names of countries in east Africa
HSS

Hit Skill Score
DISS

Generalized discrimination score
CRPSS

Continuous Ranked Probability Skill Score
GHA_extent

GHA-bounding-box
EIR

Effective Interest Rate
IGS

Ignorance Score
CRPS

Continuous Ranked Probability Score
HS

Hit score