xai-cons

Constrain CMIP6 projections using observationally anchored emergent constraints.

3|Updated Oct 26, 2025
One-click install
npx skills add https://github.com/xiechy/climate-ai --skill xai-cons
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xai-cons
Source: https://github.com/xiechy/climate-ai/tree/main/climate-methods/xai-cons
Command: npx skills add https://github.com/xiechy/climate-ai --skill xai-cons

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, matplotlib, scipy, xarray, pandas, and includes references (resource) components.

What problem does it solve?

This Skill specializes in Observational Constraint (Emergent Constraint, EC) analysis - a method that uses historical observations to constrain future climate projections across CMIP multi-model ensembles, reducing prediction uncertainty. It includes inter-model regression analysis, EC relationship establishment, physical mechanism diagnostics (residual analysis, teleconnection pathways, Walker circulation, lead-lag correlation, and SVD), uncertainty quantification (variance reduction, and confidence intervals), and reliability assessment (binning analysis, random EC comparison).

Core Features & Use Cases

  • EC Relationship Establishment: Load CMIP6 multi-model historical and future data, compute regional averages, perform inter-model linear regression, and output β, R², r, p-value, and constrained predictions.
  • Reliability Assessment: Apply binning analysis and random EC comparisons to assess reliability; produces prior/posterior distributions and percent variance reduction.
  • Physical Mechanism Diagnostics: Residual analysis, mediation analysis, teleconnections (e.g., Walker circulation) to validate mechanisms behind ECs.

Quick Start

Use the EC workflow to constrain a CMIP6 variable pair (e.g., South Atlantic SST vs East Asia TAS) by applying historical observations to the emergent relationship and obtaining a constrained future projection.

Frequently Asked Questions about xai-cons

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I constrain CMIP6 climate projections using observational data?

Emergent constraint (EC) analysis uses historical observations to constrain future CMIP6 projections by establishing linear relationships between model variables. Load multi-model historical and future data, compute inter-model regression to derive constraint coefficients (β), then apply observational values to produce constrained predictions with reduced uncertainty.

What is an emergent constraint and how does it reduce climate forecast uncertainty?

An emergent constraint identifies a strong relationship between a historical observable variable and a future climate target across CMIP models. By anchoring this relationship to observations, you shift the model ensemble distribution toward more realistic projections, quantified through variance reduction and posterior confidence intervals.

Can I use emergent constraints to diagnose physical mechanisms in climate teleconnections?

Yes. Beyond regression, EC analysis includes residual analysis, mediation analysis, and teleconnection diagnostics (Walker circulation, lead-lag patterns, SVD) to validate the physical pathways behind constraints and confirm the relationship is mechanistically sound, not spurious.

How do I assess whether an emergent constraint is reliable?

Apply binning analysis to test constraint stability across model subsets and run random EC comparisons against shuffled data to measure statistical significance. These diagnostics produce prior/posterior distributions and reliability metrics, distinguishing robust constraints from artifacts.

What climate variable pairs work best for emergent constraint analysis?

EC analysis works across diverse pairs—SST with temperature (TAS), precipitation with circulation indices—where historical covariance is strong and mechanistically linked. The Skill outputs correlation (r), p-values, and R² to evaluate relationship strength before constraining projections.

What data formats and dependencies do I need to run emergent constraint analysis?

Load xarray-formatted CMIP6 data (multi-model ensembles with historical and future scenarios). The Skill requires numpy, scipy, pandas, matplotlib, and xarray; it outputs regression coefficients, constrained predictions, variance metrics, and diagnostic visualizations as standard arrays and plots.