# List of RCLIM Functions

a) To explore weather and climate extremes in gridded datasets

A three-dimensional p x q x n array is referred to as a field, with first two space dimensions p and q, respectively, (e.g. longitude and latitude) and third time dimension n.

A matrix p x q is referred to as a map, with first and second dimensions p and q, respectively, (e.g. longitude and latitude).

Name Short description
1. acs Compute average cluster size for a given three-dimensional p x q x n array of excesses. First two dimensions p and q are space dimensions (e.g. longitude and latitude). Third dimension n is time.
2. anomalyfield Calculate anomalies by subtracting mean annual cycle or long-term mean of a three-dimensional p x q x n array of monthly mean values.
3. applyfield Compute basic statistics (e.g. mean, variance, min, max, skewness, quantile) for a given p x q x n three-dimensional array.
4. applyfieldnew Same as above, but also allows specification of fraction of non-missing values for the computation of the statistics. Grid points with larger fraction of missing values than specified are excluded.
5. bluered Generate a colour scale for plotting.
6. boundexcesses Compute upper bound of excesses for a given 2 x p x q array of Generalized Pareto distribution parameters. First index of the first dimension of the array represents the scale parameter. Second index of the first dimension of the array represents the shape parameter.
7. corfield Compute correlation between each point of a p x q x n three-dimensional array, and a vector of length n.
8. covfield Compute covariance between each point of a p x q x n three-dimensional array, and a vector of length n.
9. detrend Remove time trend from a time series.
10. detrendfield Remove time trend at each grid point of a p x q x n three-dimensional array.
11. eof Compute EOFs and PCs of a p x q x n three-dimensional array.
12. extract Extract a subset of data from either a p x q two-dimensional map (matrix) or a p x q x n three-dimensional array (field).
13. extractmap Extract a matrix (map) on a specific date from a p x q x n three-dimensional array.
14. extractwindow Extract field of monthly data for a given time period from a p x q x n three-dimensional array.
15. first Load R libraries needed to run RCLIM functions.
16. flipmap Flip a p x q two-dimensional map (matrix) or a p x q x n three-dimensional array up side down. Flip either latitude or longitude or both dimensions of a map or a three-dimensional array.
17. identifyfield Identify points by clicking on an image plot of the first time slice of a given p x q x n three-dimensional array, or an image plot of a p x q two-dimensional matrix. Also apply a user specified function to each selected points of the three-dimensional array.
18. moviefield Produce a movie of a given p x q x n three-dimensional array.
19. mygpd.fit Same as gpd.fit function from ismev package but with standard error calculation disactivated.
20. netcdfinfo Extract data structure, names of variables and dimension information form netcdf file.
21. netcdfread Extract longitude vector, latitude vector, time vector and data array from a netcdf file.
22. netcdfwrite Write two-dimensional map or three-dimensional array of data, longitude vector, latitude vector and time vector into a netcdf file.
23. plotmap Map two p x q dimensional data matrix in either cylindrical equidistant latitude and longitude projection or stereographic projection.
24. plotpc Plot EOFs and Principal Components (PCs, time series) that are output of the eof.r function.
25. projmap Generate a pixel plot of a matrix on a specified map projection.
26. reshapefield Reshape a n x p*q matrix in a three-dimensional n x p x q array or reshape three-dimensional n x p x q array into a n x p*q matrix.
27. returnperiod Compute return period for a given p x q matrix of excesses and a given 2 x p x q array of Generalized Pareto distribution parameters.
28. tvt Compute time-varying threshold for a given monthly time series.
29. xdependence Compute extreme dependence measures between a given p x q x n three-dimensional array and a given time series of length n.
30. xdependence1 Same as above, but also allows specification of fraction of non-missing values for the computation of the statistics. Grid points with larger fraction of missing values than specified are excluded.
31. xexcess Compute mean excess and variance of excess for a given n x p x q three-dimensional.
32. xgev Compute location, shape and scale parameters of a Generalized Extreme Value Distribution for block annual maxima or minima of a given p x q x n three-dimensional array.
33. xindex Compute the intervals estimator for the extremal index, an index for time clusters, for a given time series and threshold.
34. xindexfield Compute the intervals estimator for the extremal index at each grid point of a p x q x n three-dimensional array.
35. xpareto Compute shape and scale parameters of a Generalized Pareto Distribution for a given p x q x n three-dimensional array.
36. xparetotvt Fit Generalized Pareto distribution with time-varying threshold at each grid point for a given p x q x n three-dimensional array of montly data.
37. xparetotvtcov Fit Generalized Pareto distribution with time-varying threshold at each grid point for a given p x q x n three-dimensional array of montly data. Allows linear modelling of the paramters.
38. zoom Zoom in on either a p x q two-dimensional map (matrix) or a p x q x n three-dimensional array (field), by selecting two corners that define a rectangular region of the space and a subset of time slices.

b) To combine and calibrate forecasts

Name Short description
39. fa Bayesian calibration and combination of forecasts. Download these files (xfa.txt,yfa.txt, xfasst.txt and yfasst.txt) to execute the examples provided in the internal description of this function.
40. faprior Estimate prior distribution.
41. falikelihood Model likelihood distribution.
42. faprediction Estimate posterior distribution.