1 Climate Extremes Analytics Toolkit and Data Services Yonas Mersha and Teferi Demissie December 2025 2 ©2025 International Livestock Research Institute (ILRI) ILRI thanks all donors and organizations which globally support its work through their contributions to the CGIAR Trust Fund. This publication is copyrighted by the International Livestock Research Institute (ILRI). It is licensed for use under the Creative Commons Attribution 4.0 International Licence. To view this licence, visit https://creativecommons.org/licenses/by/4.0. Unless otherwise noted, you are free to share (copy and redistribute the material in any medium or format), adapt (remix, transform, and build upon the material) for any purpose, even commercially, under the following condition: ATTRIBUTION. The work must be attributed, but not in any way that suggests endorsement by ILRI or the author(s). NOTICE: For any reuse or distribution, the license terms of this work must be made clear to others. Any of the above conditions may be waived with the copyright holder's permission. Nothing in this license impairs or restricts the author’s moral rights. Fair dealing and other rights are in no way affected by the above. The parts used must not misrepresent the meaning of the publication. ILRI would appreciate being sent a copy of any materials in which text, photos, etc., have been used. Citation: Mersha, Y., Demissie, T. 2025. Climate Extremes Analytics Toolkit and Data Services. ILRI Research Report. Nairobi, Kenya: ILRI. https://www.cgiar.org/funders https://creativecommons.org/licenses/by/4.0 3 Table of Contents Executive Summary .......................................................................................... 4 Introduction ........................................................................................................ 5 Background ....................................................................................................... 5 Objectives .......................................................................................................... 5 Scope .................................................................................................................. 6 System Overview & Architecture ................................................................. 6 Data Sources & Inputs ...................................................................................... 6 Preprocessing & Harmonization Methodology ....................................... 7 Climate Extreme Indices Framework (ETCCDI -aligned) ....................... 7 Precipitation Extremes ................................................................................... 8 Temperature Extremes ................................................................................... 8 Implementation & Workflow ......................................................................... 8 Outputs & Data Services ................................................................................. 9 Quality Control & Validation ....................................................................... 12 Limitations & Assumptions .......................................................................... 13 Applications & Stakeholders ....................................................................... 13 Future Enhancements .................................................................................... 14 Conclusion ........................................................................................................ 14 4 Executive Summary Climate extremes rather than changes in average climate conditions are increasingly recognized as the dominant drivers of agricultural risk, crop failure, and livelihood disruption across many farming systems. Short duration extreme rainfall events can cause flooding, erosion, and nutrient loss, while prolonged dry spells and heat extremes reduce crop productivity, stress livestock, and undermine food security. These risks are amplified in smallholder dominated agricultural landscapes where adaptive capacity and access to timely climate information remain limited. The Climate Extremes Analytics Toolkit and Data Services has been developed to address this gap by providing a systematic, reproducible, and scientifically robust framework for translating raw climate data into decision relevant indicators of climate extremes. The toolkit implements internationally standardized ETCCDI climate extreme indices, enabling consistent assessment of precipitation and temperature extremes across space and time. By focusing on extremes rather than means, the system captures the climate signals most directly linked to agricultural impacts. Within the context of the CGIAR Sustainable Farming Program (SFP), the toolkit serves as a foundational analytical layer that supports climate risk diagnostics, resilience planning, and climate smart agriculture interventions. It enables researchers, program teams, and partners to identify hotspots of climate risk, monitor trends in extreme events, and generate evidence that informs sustainable farming strategies, policy dialogue, and investment decisions. 5 Introduction Background Agricultural production systems operate at the interface between climate variability and socio-economic constraints. While gradual shifts in temperature and rainfall averages influence long-term crop suitability, it is climate extremes such as intense rainfall events, extended dry spells, and heatwaves that most often trigger acute agricultural losses. These events affect planting decisions, crop establishment, yield stability, and post-harvest outcomes, and they can rapidly erode household resilience. In many regions targeted by CGIAR programs, observational climate networks are sparse, and decision-makers rely increasingly on gridded climate datasets derived from satellites and reanalysis systems. Although these datasets offer unprecedented spatial coverage, their analytical value depends on appropriate processing and interpretation. Without systematic methods for extracting extreme event information, much of the decision relevant signal remains underutilized. The ETCCDI framework was developed to standardize the definition and computation of climate extreme indices, enabling consistent analysis across datasets, regions, and studies. However, applying ETCCDI methods in an operational, agriculture focused context requires careful data handling, scalable workflows, and outputs tailored to user needs. The Climate Extremes Analytics Toolkit responds to this requirement by operationalizing ETCCDI concepts within a modular, reproducible analytics environment. Objectives The overarching objective of the toolkit is to bridge the gap between climate data and agricultural decision-making by providing robust indicators of climate extremes that are directly relevant to sustainable farming systems. Specific objectives include: • Translating daily climate data into standardized extreme indices that capture intensity, frequency, and duration of hazardous events • Enabling spatially explicit analysis of climate extremes to identify risk hotspots affecting farming systems • Supporting temporal analysis of extremes to assess variability, trends, and emerging risks • Producing outputs that are compatible with advisory systems, risk assessments, and policy analyses under the Sustainable Farming Program 6 Scope The scope of the toolkit includes: • Climate extremes related to precipitation and temperature, which are among the most critical drivers of agricultural risk • Gridded datasets at daily temporal resolution, allowing capture of short-lived but impactful events • Spatial scales ranging from local (grid cell) to regional and national aggregates • Analytical outputs designed to support both research and operational decision support contexts System Overview & Architecture The Climate Extremes Analytics Toolkit is structured as a layered analytical system, designed to ensure transparency, flexibility, and scalability. Each layer performs a specific function while remaining interoperable with the others. • The data ingestion layer handles raw climate inputs and associated metadata. This layer is intentionally decoupled from the analytics logic, allowing the toolkit to ingest data from multiple sources without altering downstream processes. • The processing and harmonization layer ensures that all datasets conform to consistent temporal, spatial, and unit standards. This layer is critical for maintaining analytical integrity, particularly when comparing extremes across regions or time periods. • The analytics layer implements ETCCDI aligned algorithms to compute climate extreme indices. These algorithms operate at the grid-cell level, preserving spatial detail while enabling aggregation to decision- relevant scales. Finally, the output and service layer generates analysis ready datasets and summaries that can be consumed by researchers, integrated into advisory platforms, or used in reporting and policy contexts. This modular architecture aligns with CGIAR principles of open science, reproducibility, and scalability. Data Sources & Inputs The toolkit is designed to operate on gridded climate datasets that provide spatially continuous representations of key climate variables. Such datasets are essential for agricultural risk analysis in regions where ground-based observations are limited or unevenly distributed. Primary input variables include: • Daily precipitation amounts 7 • Daily minimum and maximum temperatures Each dataset includes spatial coordinates, temporal indices, and metadata describing units, calendars, and data provenance. The toolkit assumes that inputs are provided in standardized scientific data formats such as NetCDF, which support efficient handling of large, multidimensional arrays. The system is dataset-agnostic, allowing users to substitute different climate products depending on availability, resolution, and analytical needs. Preprocessing & Harmonization Methodology Preprocessing is a critical step in extreme-event analysis, as errors or inconsistencies can disproportionately affect extreme-value calculations. Temporal preprocessing ensures that time series are continuous, correctly ordered, and aligned to a consistent calendar. Any temporal gaps or inconsistencies are explicitly identified and documented. Unit harmonization ensures that all variables are expressed in physically meaningful and comparable units, preventing misinterpretation of thresholds or index values. Spatial harmonization confirms that coordinate systems and grid definitions are internally consistent, which is essential for spatial aggregation and mapping of extremes. Missing data handling is performed cautiously, as inappropriate gap-filling can artificially suppress or inflate extremes. The toolkit emphasizes transparency in how missing data are treated and flags areas where data limitations may affect interpretation. Climate Extreme Indices Framework (ETCCDI -aligned) The analytical core of the toolkit is built around ETCCDI indices, which are widely recognized for their scientific rigor and comparability. 8 Precipitation Extremes Precipitation indices quantify aspects of rainfall behavior that directly affect agricultural systems. Intensity-based indices capture the magnitude of extreme rainfall events that can lead to flooding and erosion. Frequency-based indices measure how often rainfall exceeds agriculturally relevant thresholds, while duration-based indices describe the persistence of wet or dry conditions that influence soil moisture and crop stress. Temperature Extremes Temperature indices focus on extremes that affect crop physiology and livestock health. These include measures of heat stress, prolonged warm spells, and threshold exceedance events. Such indices are critical for understanding yield losses, evapotranspiration demand, and animal welfare risks. Implementation & Workflow The Climate Extremes Analytics Toolkit is implemented using a modern, scalable climate analytics framework built primarily on the Python libraries xarray and xclim. This design choice enables robust handling of large, multidimensional climate datasets while ensuring alignment with internationally recognized climate extreme methodologies, particularly those defined by the Expert Team on Climate Change Detection and Indices (ETCCDI). At the core of the workflow, climate datasets are ingested into xarray data structures, which provide labeled dimensions and coordinates for space and time. This structure enables efficient, vectorized computations across large spatial grids and long temporal records. The toolkit is designed to accept either a single multi-variable file or collections of files, automatically discovering variable names and metadata, thereby reducing the need for dataset- specific preprocessing. Temporal harmonization is a critical early step in the workflow. Where sub-daily data are provided, the toolkit systematically resamples these inputs to daily resolution following climate-science conventions. Daily maximum and minimum temperatures are derived from sub-daily temperature fields, while precipitation fluxes are converted to daily totals or means (scaled appropriately to mm/day). All variables are then normalized to consistent physical units, with temperature expressed in degrees Celsius and precipitation in millimeters per day, ensuring compatibility with ETCCDI and drought index algorithms. Spatial harmonization is handled through optional regridding procedures. The toolkit supports variable-aware regridding, applying bilinear interpolation for temperature fields and conservative, mass-preserving methods for precipitation fields. Where available, regridding is performed using xESMF to ensure numerical rigor; in environments where xESMF is unavailable, the system gracefully falls back to native xarray interpolation. This flexibility supports deployment across diverse computing environments without compromising methodological transparency. 9 Following preprocessing, climate extreme indices are computed independently at the grid-cell level using xclim’s extensible index framework, which currently supports over 150 climate indices and allows for custom index construction. This grid-wise computation preserves spatial heterogeneity and enables fine-scale identification of climate risk patterns relevant to farming systems. Results are subsequently aggregated temporally (e.g., monthly, seasonal, or annual summaries) or spatially (e.g., administrative units, agro-ecological zones) depending on analytical and decision-making needs. The entire workflow is designed to be reproducible, transparent, and auditable. Outputs are written as compressed, CF-compliant NetCDF files using efficient float32 encoding, with metadata describing variables, coordinates, spatial resolution, and temporal coverage. To ensure scalability, particularly for large regional or multi-decadal analyses, the toolkit leverages dask-based parallel and chunked computation, enabling efficient processing of “big climate data” in both research and operational settings. Outputs & Data Services The Climate Extremes Analytics Toolkit generates a comprehensive suite of outputs that translate raw climate data into decision-relevant climate intelligence for sustainable farming systems. Core outputs include spatially explicit layers of climate extreme indices, temporal summaries of extreme-event behavior, and aggregated indicators aligned with agricultural decision cycles. Extreme indices are produced at appropriate temporal frequencies, reflecting both scientific conventions and practical relevance. Annual indices such as Consecutive Dry Days (CDD), total wet-day precipitation (PRCPTOT), very wet day precipitation totals (R95pTOT), and the Warm Spell Duration Index (WSDI) provide insights into longer-term stress patterns affecting crop productivity and resilience. Monthly indices, including maximum five- day precipitation (Rx5day) and monthly maximum temperatures (TXx), capture short-duration extremes that are closely linked to flooding, erosion, and heat stress. Drought conditions are characterized using standardized indices such as SPI and SPEI, computed at multiple accumulation periods (1-, 3-, 6-, and 12-month scales) to reflect impacts across different agricultural time horizons. Beyond raw index outputs, the toolkit supports the generation of higher-level analytical products designed for interpretation and communication. These include anomaly maps, percentile ranks, trend and statistical significance maps, decadal change analyses, and hotspot maps highlighting areas of persistent or intensifying climate risk. Zonal statistics allow indices to be summarized over administrative units or agro-ecological zones, while variability metrics (e.g., interannual standard deviation or interquartile range) provide insight into climate stability and uncertainty. Within the Sustainable Farming Program, these outputs function as a shared data service that supports multiple work packages. They underpin climate risk screening, inform the targeting of climate-smart agriculture interventions, and enable monitoring of evolving climate stressors across farming systems. Because outputs are 10 produced in standardized, interoperable formats, they can be readily integrated into advisory platforms, dashboards, and downstream modeling workflows. Figure 1. Spatial distribution of drought indicators for June 2015. Maps show the Standardized Precipitation Index (SPI), Standardized Precipitation Evapotranspiration Index (SPEI), and Consecutive Dry Days (CDD), highlighting spatial variability in moisture deficits and dry spell persistence across the region. Figure 2. Spatial distribution of heat stress indicators for June 2015. Maps present the monthly maximum of daily maximum temperature (TXx), the number of days with TX ≥ 35 °C, and the Warm Spell Duration Index (WSDI), illustrating the intensity and persistence of extreme heat conditions. 11 Figure 3. Spatial distribution of heavy precipitation indicators for June 2015. Maps show annual total wet-day precipitation (PRCPTOT), the maximum consecutive 5-day precipitation amount (Rx5day), and the fraction of total precipitation from very wet days exceeding the 95th percentile (R95pTOT), highlighting spatial variability in rainfall intensity and extreme precipitation contributions. Figure 4. Zonal mean heat stress indicators for June 2015. Maps present zonal averages of the monthly maximum of daily maximum temperature (TXx), the number of days with TX ≥ 35 °C, and the Warm Spell Duration Index (WSDI), illustrating sub-regional contrasts in heat intensity and persistence. 12 Figure 5. Climate extreme hotspot maps for June 2015. Maps show drought, heat-stress, and heavy-precipitation hotspots based on the count of indices falling within extreme percentile tails (≤20% or ≥80%) relative to the 1991–2020 baseline. Higher values indicate locations experiencing multiple concurrent extreme signals. Figure 6. Spatial distribution of compound climate hazards for June 2015. Maps depict the occurrence of compound hazards, including hot–dry conditions, hot–wet conditions, and the co- occurrence of long dry spells with intense 5-day rainfall, based on threshold exceedance relative to the 1991–2020 baseline. Quality Control & Validation Quality control and validation are embedded throughout the toolkit’s analytical pipeline to ensure scientific robustness and user confidence. At the data ingestion stage, automated checks verify variable names, coordinate integrity, spatial resolution, and temporal continuity. Unit normalization and metadata inspection further ensure that all inputs conform to the assumptions required by climate extreme algorithms. During index computation, derived outputs are evaluated against expected climatological behavior. This includes verification of spatial gradients, seasonal cycles, and known regional climate characteristics. Visual diagnostics such 13 as time series plots, spatial maps, and variability summaries are used systematically to identify artifacts, discontinuities, or unexpected patterns that may indicate data or processing issues. Validation within this framework focuses on internal consistency and physical plausibility, rather than direct impact attribution. The toolkit does not attempt to validate indices against observed agricultural outcomes, recognizing that such impacts depend on a range of non-climatic factors. Instead, validation ensures that the indices faithfully represent underlying climate signals and are suitable for use as inputs to agricultural risk assessments and decision-support processes. Limitations & Assumptions The analytical results produced by the toolkit are inherently shaped by the characteristics of the input climate datasets. While gridded satellite and reanalysis products provide essential spatial coverage, they may smooth or misrepresent localized microclimates, particularly in regions with complex topography or strong land–atmosphere interactions. As a result, extreme values at fine spatial scales should be interpreted with appropriate caution. The toolkit further assumes that climate extreme indices serve as proxies for potential stress, rather than direct measures of agricultural impact. Crop and livestock responses to climate extremes are mediated by management practices, phenological timing, soil conditions, and socio-economic context. Consequently, toolkit outputs are best interpreted in conjunction with agronomic models, field observations, and local knowledge. Explicit documentation of these assumptions is intended to prevent over-interpretation and to promote responsible use of climate information within planning, advisory, and policy contexts. Applications & Stakeholders The Climate Extremes Analytics Toolkit is designed to support a wide spectrum of stakeholders engaged in sustainable agriculture and climate risk management. CGIAR researchers and Sustainable Farming Program teams use the toolkit to diagnose climate risks, compare farming system exposure across regions, and support evidence- based intervention design. National agricultural and meteorological agencies can apply the outputs for climate monitoring, early warning, and strategic planning. Development partners and policymakers benefit from the toolkit’s standardized indicators, which facilitate consistent interpretation of climate risks across institutions and scales. By providing a common analytical language grounded in ETCCDI methodologies, the toolkit enhances coordination, reduces duplication, and strengthens cross- sectoral dialogue on climate resilience and sustainable farming. 14 Future Enhancements Future development of the toolkit will focus on strengthening the linkage between climate extremes and agricultural outcomes. Planned enhancements include deeper integration with crop, livestock, and farming systems models, enabling more explicit translation of climate signals into production and livelihood impacts. Expansion to compound extremes such as concurrent heat and drought and additional stress indicators will further broaden the toolkit’s analytical scope. Operational enhancements will prioritize automation, scalability, and near-real-time processing to support routine monitoring and advisory generation. Continued alignment with open standards and community-supported libraries such as xclim will ensure that the toolkit remains scientifically current and interoperable within evolving climate service ecosystems. Conclusion The Climate Extremes Analytics Toolkit provides a robust, scalable, and scientifically grounded framework for operationalizing climate extremes analysis in support of sustainable agriculture. By combining ETCCDI-aligned methodologies, modern data analytics infrastructure, and a focus on decision-relevant outputs, the toolkit transforms complex climate datasets into actionable intelligence for farming systems. As a cross-AoW digital public good within the CGIAR Sustainable Farming Program, the toolkit strengthens the evidence base for climate risk-informed research, planning, and intervention design. Its continued development and integration with broader agricultural decision-support systems will play a critical role in advancing resilience and sustainability across diverse farming contexts.