Package: CSTools 5.3.2

Victoria Agudetse

CSTools: Assessing Skill of Climate Forecasts on Seasonal-to-Decadal Timescales

Exploits dynamical seasonal forecasts in order to provide information relevant to stakeholders at the seasonal timescale. The package contains process-based methods for forecast calibration, bias correction, statistical and stochastic downscaling, optimal forecast combination and multivariate verification, as well as basic and advanced tools to obtain tailored products. This package was developed in the context of the ERA4CS project MEDSCOPE and the H2020 S2S4E project and includes contributions from ArticXchange project founded by EU-PolarNet 2. Implements methods described in Pérez-Zanón et al. (2022) <doi:10.5194/gmd-15-6115-2022>, Doblas-Reyes et al. (2005) <doi:10.1111/j.1600-0870.2005.00104.x>, Mishra et al. (2018) <doi:10.1007/s00382-018-4404-z>, Sanchez-Garcia et al. (2019) <doi:10.5194/asr-16-165-2019>, Straus et al. (2007) <doi:10.1175/JCLI4070.1>, Terzago et al. (2018) <doi:10.5194/nhess-18-2825-2018>, Torralba et al. (2017) <doi:10.1175/JAMC-D-16-0204.1>, D'Onofrio et al. (2014) <doi:10.1175/JHM-D-13-096.1>, Verfaillie et al. (2017) <doi:10.5194/gmd-10-4257-2017>, Van Schaeybroeck et al. (2019) <doi:10.1016/B978-0-12-812372-0.00010-8>, Yiou et al. (2013) <doi:10.1007/s00382-012-1626-3>.

Authors:Nuria Perez-Zanon [aut], Louis-Philippe Caron [aut], Carmen Alvarez-Castro [aut], Lauriane Batte [aut], Carlos Delgado [aut], Jost von Hardenberg [aut], Llorenç LLedo [aut], Nicolau Manubens [aut], Lluís Palma [aut], Eroteida Sanchez-Garcia [aut], Bert van Schaeybroeck [aut], Veronica Torralba [aut], Deborah Verfaillie [aut], Eva Rifà [ctb], Filippo Cali Quaglia [ctb], Maria M. Chaves-Montero [ctb], Chihchung Chou [ctb], Nicola Cortesi [ctb], Susanna Corti [ctb], Paolo Davini [ctb], Gildas Dayon [ctb], Marta Dominguez [ctb], Federico Fabiano [ctb], Ignazio Giuntoli [ctb], Raul Marcos [ctb], Paola Marson [ctb], Niti Mishra [ctb], Jesus Peña [ctb], Francesc Roura-Adserias [ctb], Silvia Terzago [ctb], Danila Volpi [ctb], An-Chi Ho [ctb], Victoria Agudetse [ctb, cre], Theertha Kariyathan [ctb], Eren Duzenli [ctb], BSC-CNS [cph]

CSTools_5.3.2.tar.gz
CSTools_5.3.2.tar.gz(r-4.7-arm64)CSTools_5.3.2.tar.gz(r-4.7-x86_64)CSTools_5.3.2.tar.gz(r-4.6-arm64)CSTools_5.3.2.tar.gz(r-4.6-x86_64)
CSTools_5.3.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
CSTools/json (API)

# Install 'CSTools' in R:
install.packages('CSTools', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))
Datasets:
  • lonlat_prec - Sample Of Experimental Precipitation Data In Function Of Longitudes And Latitudes
  • lonlat_prec_st - Sample Of Experimental Precipitation Data In Function Of Longitudes And Latitudes with Start
  • lonlat_temp - Sample Of Experimental And Observational Climate Data In Function Of Longitudes And Latitudes
  • lonlat_temp_st - Sample Of Experimental And Observational Climate Data In Function Of Longitudes And Latitudes with Start

On CRAN:

Conda:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

glibc

6.26 score 2 stars 3 packages 67 scripts 905 downloads 74 exports 77 dependencies

Last updated from:7ebf77c2a8. Checks:6 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK243
linux-devel-x86_64OK262
source / vignettesOK283
linux-release-arm64OK229
linux-release-x86_64OK252
wasm-releaseOK653

Exports:AdamontAnalogAdamontQQCorrAnalogsAreaWeightedas.s2dv_cubeBEI_EMWeightingBEI_PDFBestBEI_ProbsWeightingBEI_TercilesWeightingBEI_WeightsBiasCorrectionBindDimCalibrationCategoricalEnsCombinationCST_AdamontAnalogCST_AdamontQQCorrCST_AnalogsCST_AnalogsPredictorsCST_AnomalyCST_AreaWeightedCST_BEI_WeightingCST_BiasCorrectionCST_BindDimCST_CalibrationCST_CategoricalEnsCombinationCST_ChangeDimNamesCST_DynBiasCorrectionCST_EnsClusteringCST_InsertDimCST_LoadCST_MergeDimsCST_MultiEOFCST_MultiMetricCST_MultivarRMSECST_ProxiesAttractorCST_QuantileMappingCST_RainFARMCST_RegimesAssignCST_ReorderDimsCST_RFSlopeCST_RFTempCST_RFWeightsCST_SaveExpCST_SplitDimCST_StartCST_SubsetCST_SummaryCST_WeatherRegimesDynBiasCorrectionEnsClusteringEvalTrainIndicesMergeDimsMultiEOFMultiMetricPDFIndexHindPlotCombinedMapPlotForecastPDFPlotMostLikelyQuantileMapPlotPDFsOLEPlotTriangles4CategoriesPlotWeeklyClimPredictabilityProxiesAttractorQuantileMappingRainFARMRegimesAssignRF_WeightsRFSlopeRFTemps2dv_cubeSaveExpSplitDimtraining_analogsWeatherRegime

Dependencies:abindBHbigmemorybigmemory.sribootCircStatscliClimProjDiagscodetoolscpp11data.tabledigestdoParalleldotCall64dplyrdtweasyNCDFeasyVerificationfarverfieldsfitdistrplusforeachfuturegenericsggplot2globalsgluegtableisobanditeratorslabelinglatticelifecyclelistenvlubridatemagrittrmapprojmapsMASSMatrixmultiApplyNbClustncdf4parallellypbapplypillarpkgconfigplyrproxyqmapR6rainfarmrRColorBrewerRcppRcppArmadilloreshape2rlangs2dvS7scalessignalspamSpecsVerificationstartRstringistringrsurvivaltibbletidyselecttimechangeutf8uuidvctrsverificationviridisLitewithrzoo

Data Storage and Retrieval
1. System requirements | 2. Overview of CSTools structure | 3. Data storage recommendations | 4. CST_Load example | 5. CST_Start example | Managing big datasets and memory issues

Last update: 2025-11-14
Started: 2021-02-23

Weather Regime Analysis
Weather regime analysis | 1- Required packages | 2- Retrive data from files | 3- Daily anomalies based on a smoothed climatology | 4- Weather regimes in observations | 5- Visualisation of the observed weather regimes | 6- Visualisation of the observed regime persistence | 7- Weather regimes in the predictions | 8- Visualisation of the predicted weather regimes

Last update: 2025-11-14
Started: 2020-07-02

Rainfall Filtered Autoregressive Model (RainFARM) precipitation downscaling
Introduction | Downscaling seasonal precipitation forecasts with RainFARM | Preliminary setup | Standard downscaling without climatological weights | Downscaling using climatological weights | Determining the spectral slopes | Compacting dimensions | Bibliography

Last update: 2024-01-26
Started: 2019-04-24

Analogs based on large scale for downscaling
Downscaling seasonal forecast data using Analogs | 1. Introduction of the function | Example 1: using data from CSTools | Exemple 2: Load data using CST_Start | Two variables and criteria Large [scale] Distance: | Two variables and criteria Local [scale] Distance: | Two variables and criteria Local [scale] Correlation: | Downscaling using exp$data using excludeTime parameter

Last update: 2023-10-20
Started: 2021-02-23

Most Likely Terciles
Computing and displaying the most likely tercile of a seasonal forecast | 1. Preliminary setup | 2. Loading the data | 3. Computing probabilities | 4. Visualization with PlotMostLikelyQuantileMap | 5. Computing Skill Score | 6. Simultaneous visualization of probabilities and skill scores

Last update: 2023-10-20
Started: 2021-02-23

Multi-model Skill Assessment
1.- Load data | 2.- Computing and plotting Anomaly Correlation Coefficient | 3.- Computing and plotting Root Mean Square error (RMS) | 4.- Computing and plotting Root Mean Square error Skill Scores (RMSSS)

Last update: 2023-10-20
Started: 2019-04-24

Multivariate RMSE
Multivariate Root Mean Square Error (RMSE) | 1.- Load data | 2.- Computing and plotting multivariate RMSEs

Last update: 2023-10-20
Started: 2019-04-24

Plot Forecast PDFs
Plot Forecast PDFs (Probability Distibution Functions) | 1. A simple example | 2. Customizing the appearance of your plots | 3. Adding extremes and observed values | 4. Saving your plot to a file | 5. A reproducible example using lonlat_temp_st

Last update: 2023-10-20
Started: 2020-02-11

Ensemble Clustering
Ensemble clustering | Introduction | Steps of the vignette | 1. Preliminary setup | 2. Loading the data | 3. Launching Ensemble clustering | 4. Results retrieval | 5. Results mapping | Final notes

Last update: 2023-10-18
Started: 2020-07-02

Achiving Best Estimate Index
Achiving the Precipitation Best prediction giving the NAO index | Loading packages and data | 1- Best Estimate Index NAO | 2- Compute weights using the Best Estimation of Index NAO | 3- Apply weights to a precipitation field | Comparison and visualization

Last update: 2023-04-06
Started: 2019-11-27

Readme and manuals

Help Manual

Help pageTopics
AdamontQQCorr computes quantile-quantile correction of seasonal or decadal forecast data using weather typesAdamontQQCorr
Analogs based on large scale fields.Analogs
Calculate the spatial area-weighted average of multidimensional arrays.AreaWeighted
Conversion of 'startR_array' or 'list' objects to 's2dv_cube'as.s2dv_cube
Computing the weighted ensemble means for SFSs.BEI_EMWeighting
Computing the Best Index PDFs combining Index PDFs from two SFSsBEI_PDFBest
Computing the weighted tercile probabilities for SFSs.BEI_ProbsWeighting
Computing the weighted terciles for SFSs.BEI_TercilesWeighting
Computing the weights for SFSs using the Best Index PDFs.BEI_Weights
Bias Correction based on the mean and standard deviation adjustmentBiasCorrection
Bind two arrays by a specified named dimensionBindDim
Forecast CalibrationCalibration
Make categorical forecast based on a multi-model forecast with potential for calibrateCategoricalEnsCombination
CST_AdamontAnalog finds analogous data in the reference dataset to experiment data based on weather typesAdamontAnalog CST_AdamontAnalog
CST_AdamontQQCorr computes quantile-quantile correction of seasonal or decadal forecast data using weather typesCST_AdamontQQCorr
Downscaling using Analogs based on large scale fields.CST_Analogs
AEMET Downscaling Precipitation and maximum and minimum temperature downscaling method based on analogs: synoptic situations and significant predictors.CST_AnalogsPredictors
Anomalies relative to a climatology along selected dimension with or without cross-validationCST_Anomaly
Calculate the spatial area-weighted average of multidimensional arrays.CST_AreaWeighted
Weighting SFSs of a CSTools object.CST_BEI_Weighting
Bias Correction based on the mean and standard deviation adjustmentCST_BiasCorrection
Bind two objects of class s2dv_cubeCST_BindDim
Forecast CalibrationCST_Calibration
Make categorical forecast based on a multi-model forecast with potential for calibrateCST_CategoricalEnsCombination
Change the name of one or more dimensions for an object of class s2dv_cubeCST_ChangeDimNames
Performing a Bias Correction conditioned by the dynamical properties of the data.CST_DynBiasCorrection
Ensemble clusteringCST_EnsClustering
Add a named dimension to an object of class s2dv_cubeCST_InsertDim
CSTools Data Retreival FunctionCST_Load
Function to Merge DimensionsCST_MergeDims
EOF analysis of multiple variablesCST_MultiEOF
Multiple Metrics applied in Multiple Model AnomaliesCST_MultiMetric
Multivariate Root Mean Square Error (RMSE)CST_MultivarRMSE
Computing two dinamical proxies of the attractor in s2dv_cube.CST_ProxiesAttractor
Quantile Mapping for seasonal or decadal forecast dataCST_QuantileMapping
RainFARM stochastic precipitation downscaling of a CSTools objectCST_RainFARM
Function for matching a field of anomalies with a set of maps used as a reference (e.g. clusters obtained from the WeatherRegime function)CST_RegimesAssign
Reorder the dimensions of an s2dv_cubeCST_ReorderDims
RainFARM spectral slopes from a CSTools objectCST_RFSlope
Temperature downscaling of a CSTools object using lapse rate correction or a reference fieldCST_RFTemp
Compute climatological weights for RainFARM stochastic precipitation downscalingCST_RFWeights
Save objects of class 's2dv_cube' to data in NetCDF formatCST_SaveExp
Function to Split DimensionCST_SplitDim
CSTools data retrieval function using StartCST_Start
Subset an object of class s2dv_cubeCST_Subset
Generate a Summary of the data and metadata in the s2dv_cube objectCST_Summary
Function for Calculating the Cluster analysisCST_WeatherRegimes
Performing a Bias Correction conditioned by the dynamical properties of the data.DynBiasCorrection
Ensemble clusteringEnsClustering
Generate Training and Evaluation Indices for Cross-ValidationEvalTrainIndices
Sample Of Experimental Precipitation Data In Function Of Longitudes And Latitudeslonlat_prec
Sample Of Experimental Precipitation Data In Function Of Longitudes And Latitudes with Startlonlat_prec_st
Sample Of Experimental And Observational Climate Data In Function Of Longitudes And Latitudeslonlat_temp
Sample Of Experimental And Observational Climate Data In Function Of Longitudes And Latitudes with Startlonlat_temp_st
Function to Split DimensionMergeDims
EOF analysis of multiple variables starting from an array (reduced version)MultiEOF
Multiple Metrics applied in Multiple Model AnomaliesMultiMetric
Computing the Index PDFs for a dataset of SFSs for a hindcats period.PDFIndexHind
Plot Multiple Lon-Lat Variables In a Single Map According to a Decision FunctionPlotCombinedMap
Plot one or multiple ensemble forecast pdfs for the same eventPlotForecastPDF
Plot Maps of Most Likely QuantilesPlotMostLikelyQuantileMap
Plotting two probability density gaussian functions and the optimal linear estimation (OLE) as result of combining them.PlotPDFsOLE
Function to convert any 3-d numerical array to a grid of coloured triangles.PlotTriangles4Categories
Plots the observed weekly means and climatology of a timeseries dataPlotWeeklyClim
Computing scores of predictability using two dynamical proxies based on dynamical systems theory.Predictability
Print method for s2dv_cube objectsprint.s2dv_cube
Computing two dinamical proxies of the attractor.ProxiesAttractor
Quantile Mapping for seasonal or decadal forecast dataQuantileMapping
RainFARM stochastic precipitation downscaling (reduced version)RainFARM
Function for matching a field of anomalies with a set of maps used as a reference (e.g. clusters obtained from the WeatherRegime function).RegimesAssign
Compute climatological weights for RainFARM stochastic precipitation downscalingRF_Weights
RainFARM spectral slopes from an array (reduced version)RFSlope
Temperature downscaling of a CSTools object using lapse rate correction (reduced version)RFTemp
Creation of a 's2dv_cube' objects2dv_cube
Save a multidimensional array with metadata to data in NetCDF formatSaveExp
Function to Split DimensionSplitDim
AEMET Training Training method (pre-downscaling) based on analogs: synoptic situations and significant predictors.training_analogs
Function for Calculating the Cluster analysisWeatherRegime