Package: foreSIGHT 2.0.0

David McInerney

foreSIGHT: Systems Insights from Generation of Hydroclimatic Timeseries

A tool to create hydroclimate scenarios, stress test systems and visualize system performance in scenario-neutral climate change impact assessments. Scenario-neutral approaches 'stress-test' the performance of a modelled system by applying a wide range of plausible hydroclimate conditions (see Brown & Wilby (2012) <doi:10.1029/2012EO410001> and Prudhomme et al. (2010) <doi:10.1016/j.jhydrol.2010.06.043>). These approaches allow the identification of hydroclimatic variables that affect the vulnerability of a system to hydroclimate variation and change. This tool enables the generation of perturbed time series using a range of approaches including simple scaling of observed time series (e.g. Culley et al. (2016) <doi:10.1002/2015WR018253>) and stochastic simulation of perturbed time series via an inverse approach (see Guo et al. (2018) <doi:10.1016/j.jhydrol.2016.03.025>). It incorporates 'Richardson-type' weather generator model configurations documented in Richardson (1981) <doi:10.1029/WR017i001p00182>, Richardson and Wright (1984), as well as latent variable type model configurations documented in Bennett et al. (2018) <doi:10.1016/j.jhydrol.2016.12.043>, Rasmussen (2013) <doi:10.1002/wrcr.20164>, Bennett et al. (2019) <doi:10.5194/hess-23-4783-2019> to generate hydroclimate variables on a daily basis (e.g. precipitation, temperature, potential evapotranspiration) and allows a variety of different hydroclimate variable properties, herein called attributes, to be perturbed. Options are included for the easy integration of existing system models both internally in R and externally for seamless 'stress-testing'. A suite of visualization options for the results of a scenario-neutral analysis (e.g. plotting performance spaces and overlaying climate projection information) are also included. Version 1.0 of this package is described in Bennett et al. (2021) <doi:10.1016/j.envsoft.2021.104999>. As further developments in scenario-neutral approaches occur the tool will be updated to incorporate these advances.

Authors:Bree Bennett [aut], David McInerney [aut, cre], Sam Culley [aut], Anjana Devanand [aut], Seth Westra [aut], Danlu Guo [ctb], Holger Maier [ths]

foreSIGHT_2.0.0.tar.gz
foreSIGHT_2.0.0.zip(r-4.7)foreSIGHT_2.0.0.zip(r-4.6)foreSIGHT_2.0.0.zip(r-4.5)
foreSIGHT_2.0.0.tgz(r-4.6-x86_64)foreSIGHT_2.0.0.tgz(r-4.6-arm64)foreSIGHT_2.0.0.tgz(r-4.5-x86_64)foreSIGHT_2.0.0.tgz(r-4.5-arm64)
foreSIGHT_2.0.0.tar.gz(r-4.7-arm64)foreSIGHT_2.0.0.tar.gz(r-4.7-x86_64)foreSIGHT_2.0.0.tar.gz(r-4.6-arm64)foreSIGHT_2.0.0.tar.gz(r-4.6-x86_64)
foreSIGHT_2.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
foreSIGHT/json (API)
NEWS

# Install 'foreSIGHT' in R:
install.packages('foreSIGHT', repos = c('https://cranhaven.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/climateanalytics/foresight/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • barossa_obs - Multi-site rainfall observations in the Barossa Valley used in examples and vignette
  • data_A5030502 - Catchment data for Scott Creek in South Australia for period 1976-1985.
  • egClimData - Climate attributes from projections.
  • egMultiSiteSim - Output from call to generateScenarios() using multi-site model (see example 5 in generateScenarios).
  • egScalPerformance - Performance metrics of the tank model using simple scaled scenarios.
  • egScalSummary - Summary of a simple scaled scenario.
  • egSimOATPerformance - Performance metrics of the tank model using OAT scenarios.
  • egSimOATSummary - Summary of a OAT scenario.
  • egSimPerformance - Performance metrics of the tank model using regGrid scenarios.
  • egSimPerformanceB - Performance metrics of an alternate tank model using regGrid scenarios.
  • egSimSummary - Summary of a regGrid scenario.
  • subdaily_synthetic_obs - Synthetic sub-daily rainfall data
  • tank_obs - Observations for demo tank model examples and vignette

On CRAN:

Conda:

archivedpackagesr-universecpp

3.28 score 5 stars 19 scripts 606 downloads 55 exports 60 dependencies

Last updated from:ef0f0205cc (on package/foreSIGHT). Checks:13 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-arm64OK185
linux-devel-x86_64OK191
source / vignettesOK236
linux-release-arm64OK172
linux-release-x86_64OK180
macos-release-arm64OK141
macos-release-x86_64OK375
macos-oldrel-arm64OK122
macos-oldrel-x86_64OK262
windows-develOK167
windows-releaseOK219
windows-oldrelOK166
wasm-releaseOK136

Exports:boxplot_probcalculateAttributescalGR4Jconvert_climYMD_POSIXctcreate_climcreateExpSpaceevaluate_system_metricsfunc_avgfunc_avgDSDfunc_avgDwellTimefunc_avgWSDfunc_corfunc_cvfunc_dyWetfunc_F0func_maxDSDfunc_maxWSDfunc_normPfunc_nWetfunc_Pfunc_Rfunc_rngfunc_seasRatiofunc_totfunc_WDcorfunc_wettest6monPeakDayfunc_wettest6monSeasRatiogenerateScenariosgetSimSummaryGR4J_wrappermodCalibratormodSimulatormvFunc_avgDryDaymvFunc_avgWetDaymvFunc_cormvFunc_cvDryDaymvFunc_cvWetDayplotExpSpaceplotOptionsplotPerformanceAttributesOATplotPerformanceOATplotPerformanceSpaceplotPerformanceSpaceMultiplotScenariosrunSystemModelsetSeasonalTiedAttributesshuffle_simtankWrapperviewAttributeDefviewAttributeFuncsviewDefaultOptimArgsviewModelParametersviewModelsviewTankMetricswriteControlFile

Dependencies:airGRBLRPMclicodetoolscowplotcpp11crayondata.tabledfoptimdirectlabelsdoParalleldotCall64dplyrfarverfieldsforeachGAgenericsggplot2gluegtablehmsisobanditeratorsjsonlitelabelinglatticelifecyclelubridatemagrittrmapsMatrixmvtnormpillarpkgconfigprettyunitsprogresspurrrquadprogR6RColorBrewerRcppRcppArmadilloRGNrlangS7scalesSoilHyPspamstringistringrtibbletidyrtidyselecttimechangeutf8vctrsviridisLitewithrzoo

'Stress-Testing' using foreSIGHT: Stochastic simulation

Rendered fromVignette_foreSIGHT_stochastic.Rmdusingknitr::rmarkdown_notangleon May 27 2026.

Last update: 2026-05-27
Started: 2026-05-27

Introduction to climate stress testing using foreSIGHT

Rendered fromVignette_foreSIGHT_intro.Rmdusingknitr::rmarkdown_notangleon May 27 2026.

Last update: 2026-05-27
Started: 2026-05-27

Readme and manuals

Help Manual

Help pageTopics
Multi-site rainfall observations in the Barossa Valley used in examples and vignettebarossa_obs
Draws a boxplot with the whiskers at specified probability limitsboxplot_prob
Calculates the attributes of the hydroclimate time seriescalculateAttributes
Calibrate GR4J rainfall runoff model parameterscalGR4J
Converts "old" reference climate data format (<V1.2) to "new" format with POSIXct dates.convert_climYMD_POSIXct
Create foreSIGHT reference climate object from time information and climate data.create_clim
Creates exposure space of hydroclimatic targets for generation of scenarios using 'generateScenarios'createExpSpace
Catchment data for Scott Creek in South Australia for period 1976-1985.data_A5030502
Climate attributes from projections.egClimData
Output from call to generateScenarios() using multi-site model (see example 5 in generateScenarios).egMultiSiteSim
Performance metrics of the tank model using simple scaled scenarios.egScalPerformance
Summary of a simple scaled scenario.egScalSummary
Performance metrics of the tank model using OAT scenarios.egSimOATPerformance
Summary of a OAT scenario.egSimOATSummary
Performance metrics of the tank model using regGrid scenarios.egSimPerformance
Performance metrics of an alternate tank model using regGrid scenarios.egSimPerformanceB
Summary of a regGrid scenario.egSimSummary
Calculates system metrics for and observed and baseline stochastic climatesevaluate_system_metrics
Calculates average of time seriesfunc_avg
Calculates average dry spell duration (below threshold)func_avgDSD
Calculates the average dwell time, i.e. average time for below median value spellsfunc_avgDwellTime
Calculates average wet spell duration (below threshold)func_avgWSD
Calculates the lag-1 autocorrelationfunc_cor
Calculates the coefficient of variation (mead/sd)func_cv
Calculates average rainfall on wet days (above threshold)func_dyWet
Calculates the number of frost daysfunc_F0
Calculates maximum dry spell duration (below threshold)func_maxDSD
Calculates maximum wet spell duration (above threshold)func_maxWSD
Calculates normalised quantile (quantile divided by mean)func_normP
Calculates number of wet days (above threshold)func_nWet
Calculates a quantile valuefunc_P
Calculates the number of days above a threshold (often used for temperature)func_R
Calculates the inter-quantile rangefunc_rng
Calculates seasonality ratiofunc_seasRatio
Calculates total of time seriesfunc_tot
Calculates the lag-1 autocorrelation for wet daysfunc_WDcor
Calculates the day of year corresponding to the wettest 6 monthsfunc_wettest6monPeakDay
Calculates the ratio of wet season to dry season rainfall, based on wettest6monPeakDayfunc_wettest6monSeasRatio
Produces time series of hydroclimatic variables for an exposure space.generateScenarios
Produces a summary object containing the metadata of a full simulationgetSimSummary
System model wrapper GR4JGR4J_wrapper
modCalibratormodCalibrator
modSimulatormodSimulator
Calculates the average value of a non-rainfall time series on dry-daysmvFunc_avgDryDay
Calculates the average value of a non-rainfall time series on wet-daysmvFunc_avgWetDay
Calculates the correlation between two time seriesmvFunc_cor
Calculates the coefficient of variation (sdev/mean) value of a non-rainfall time series on dry-daysmvFunc_cvDryDay
Calculates the coefficient of variation (sdev/mean) value of a non-rainfall time series on wet-daysmvFunc_cvWetDay
Plots the location of points in a two-dimensional exposure spaceplotExpSpace
Plots the differences in performance metrics from two system optionsplotOptions
Plots changes in attributes for a specified perturbed attributeplotPerformanceAttributesOAT
Plots performance for one-at-a-time (OAT) perturbations in attributesplotPerformanceOAT
Plots a performance space using the system performance and scenarios as inputplotPerformanceSpace
Plots contours of the number of performance thresholds exceeded in the perturbation spaceplotPerformanceSpaceMulti
Creates summary plots of the biases in the scenariosplotScenarios
Runs a system model and outputs the system performancerunSystemModel
Creates tied attributes which tie seasonal changes in attributes to annual changessetSeasonalTiedAttributes
Post-processing to apply changes in temporal structure of annual precipitation.shuffle_sim
Example perturbed stochastic climates for Scott Creek.sim.stoch
Synthetic sub-daily rainfall datasubdaily_synthetic_obs
Observations for demo tank model examples and vignettetank_obs
A function to calculate difference performance from simulated tank behaviourtankPerformance
Wrapper function for a rain water tank system modeltankWrapper
Prints the definition of an attributeviewAttributeDef
Prints the list of built-in attribute functionsviewAttributeFuncs
Prints the default optimisation argumentsviewDefaultOptimArgs
Prints the names and bounds of the parameters of the stochastic modelsviewModelParameters
Prints the available stochastic model optionsviewModels
Prints the names of the performance metrics of the rain water tank system modelviewTankMetrics
Writes a sample 'controlFile.json' filewriteControlFile