equinor / equinor/ccs-scripts

Allow precomputation/caching of CO2Data and Grid geometry

Open
#469 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2
Forks
2
Avg merge
5d 23h
Merged PRs (30d)
2

Description

Potential extension of https://github.com/equinor/ccs-scripts/issues/457

Containment and mass maps both call extract_source_data and calculate_co2 on the exact same inputs, which means we read UNRST and compute CO₂ per cell twice. We could expose a lower-level containment entrypoint that accepts a precomputed CO2Data, then add a simple orchestrator that loads data + computes CO₂ once and feeds it to both pipelines.

Similarly, we’re recomputing grid geometry (grid load, cell corners, cell connections) for every aggregation call (SGAS, AMFG, migration time, mass maps). We could split geometry vs data phases, compute connections once per (grid, map) combination, and pass them into subsequent calls.

It does however depend a lot on how the scripts are being used. If one is running all the scripts, this saves a lot, but if one only runs a couple of scripts, this could complicate the process.

Contributor guide

Open the contributing guide

Research direction

Start by tracing extract_source_data and calculate_co2 through the containment and mass-map pipelines, then inspect the aggregation calls for SGAS, AMFG, migration time, and mass maps. Determine how to share CO2Data and grid geometry while preserving use of individual scripts. Done means repeated inputs are computed once without unnecessarily complicating single-script workflows.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering, performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.