agentleFS
equinorequinor/neqsim-community-skills/skills/field-development/neqsim-ncs-infrastructure-network/SKILL.md

neqsim-ncs-infrastructure-network

Skill4 starsChanged 5 months agoApache-2.0View on GitHub

Open-data graph of the Norwegian Continental Shelf export system - fields, discoveries, hosts, trunklines, processing plants, receiving terminals and markets - built live from Sodir, norskpetroleum.no and Gassco, with NeqSim hand-offs (TiebackAnalyzer, HostFacility, LoopedPipeNetwork). USE WHEN: a task must know how NCS fields reach market, which fields share a pipeline or plant, trunkline/plant loading, what an outage strands, single points of failure, or which host a discovery can tie into.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Capacitated arcs: Every norskpetroleum table row becomes a directed arc with capacity, diameter, length and start year.

    line 84
  2. Distinctive:

    Check the Sodir pipeline layer for status.

    line 236
  3. Distinctive:

    Keep the export rate in MSm3/d at 15 C, and the heating values on the same basis.

    line 245

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

NCS Infrastructure Network

This skill gives an agent a working model of how the Norwegian Continental Shelf (NCS) is connected. It covers the physical chain from each field through host platforms and trunklines to the onshore processing plants, the receiving terminals in the UK and continental Europe, and the markets. The graph is built from open data only:

SourceWhat it providesAccess
Sodir DataService (ArcGIS REST)fields, discoveries, facilities, pipelines, reserves, yearly profiles, field "Transport" descriptionsopen API, NLOD 2.0
Sodir FactPages CSVthe same tables as flat CSVopen API
norskpetroleum.nopipeline capacity tables (gas MSm3/d, oil Sm3/d)open download
gassco.eu plant pagesKollsnes, Nyhamna capacities; Kårstø product rates; terminal listopen web
ENTSOG Transparencydaily physical flow at every Norwegian entry pointopen API

A bundled snapshot (data/ncs_network_snapshot.json) makes the skill work offline. scripts/build_snapshot.py rebuilds it from the live APIs in a minute.

It is a screening model of connectivity and nameplate capacity. It is not a hydraulic model of Gassled, not the Gassco nomination system, and not a booking tool. Hydraulic checks are handed to NeqSim LoopedPipeNetwork.

When to Use

  • A task asks where a field's gas or oil goes, and through which pipelines, plants and terminals.
  • A task needs the fields that share a trunkline, plant or terminal, e.g. before a tie-in, a shutdown or a capacity study.
  • A task needs trunkline and plant utilisation for a historical year, or for forecast rates from neqsim-ncs-value-chain-optimization.
  • A task asks what an outage of a pipeline, riser platform or plant strands or reroutes, or which elements are single points of failure.
  • A discovery needs its nearest in-service processing hosts and a NeqSim TiebackAnalyzer screening against them.
  • A study needs live open data: Sodir tables through SodirDataService / SodirFactPages, or observed terminal entry flows from ENTSOG to calibrate the model.

Inputs

  • Nothing to load the bundled snapshot: NcsNetwork.load().
  • Names resolve loosely: "Troll", "TROLL", "Kårstø", "KARSTO" and discovery names such as "7324/8-1 (Wisting)" all work.
  • utilization(year, medium, rates=None): medium is "gas" (MSm3/d) or "liquid" (oil + condensate, Sm3/d); rates overrides history with {field_id: rate}.
  • Open-API clients take an injectable fetch(url, timeout) -> bytes, which makes them testable offline.

Outputs

  • export_routes(field): gas and liquid paths to market with the bottleneck arc and its capacity.
  • utilization(year, medium): flow, capacity and utilisation per trunkline and plant, plus overloaded elements and unrouted fields.
  • outage_impact(element, year): stranded rate and fields; rerouted fields with their new exit.
  • single_points_of_failure(year): elements ranked by stranded production.
  • nearest_hosts(discovery): in-service processing hosts with distance, water depth, operator and facility kind.
  • NeqSim bridge results: TiebackAnalyzer pass/fail, CAPEX and NPV per host; LoopedPipeNetwork node pressures, velocities and deliverable rate along an export path.

Engineering Method

  1. Nodes. Fields (142), candidate discoveries (266), plants, receiving terminals, junctions and markets. Curated nodes and aliases live in topology.py, each with a source_url and basis.
  2. Capacitated arcs. Every norskpetroleum table row becomes a directed arc with capacity, diameter, length and start year. A range such as Tampen Link 10–27 uses the conservative low value and keeps the range. Two shared trunks are split at their tie-ins:
    • Statpipe rich gas at a junction, so Johan Sverdrup, Balder and Brage only share the section to Kårstø;
    • Europipe II at the Baltic Pipe tie-in (27.4 MSm3/d to Nybro).
  3. Field routes from prose. The English Sodir "Transport" text of every field is parsed:
    • clauses are split and each is assigned gas, liquid or both ("well stream");
    • proper names that contain commodity words ("Shell-Esso Gas and Liquid") are masked before classification;
    • gazetteer mentions become ordered arcs. Text arcs are dropped when they would bypass a capacitated table path, or when they would leave a plant or terminal (those outlets come from the tables). Each route carries confidence and needs_review.
  4. Volumes. Sodir yearly net production: gas GSm3/yr × 1000/365 gives MSm3/d, and oil + condensate MSm3/yr × 10^6/365 gives Sm3/d.
  5. Utilisation. Capacity-aware greedy routing: fields are routed largest first, each on the path with most headroom, splitting across paths as they fill. It is a feasibility screen, not a nomination optimum; use the value-chain optimiser for that. The 2025 snapshot routes 333.8 MSm3/d (about 122 GSm3/yr, in line with published NCS sales gas) with no element above capacity.
  6. Resilience. An element is removed and every affected field is rerouted. Fields with no remaining path to market count as stranded.

Python Usage Pattern

from ncs_infrastructure_network import NcsNetwork
from ncs_infrastructure_network import neqsim_bridge as nb

net = NcsNetwork.load()
net.export_routes("Johan Sverdrup")["routes"]["gas"][0]["nodes"]
# ['JOHAN_SVERDRUP', 'STATPIPE_RICH_GAS', 'KARSTO', 'EUROPIPE_II_BALTIC_TIE_IN', 'DORNUM', 'MARKET_DE']

u = net.utilization(2025, "gas")                 # trunkline/plant loading
spof = net.single_points_of_failure(2025, "gas")  # KOLLSNES, TROLL A, KARSTO, SLEIPNER ...
net.outage_impact("NYHAMNA", 2025)                # stranded Ormen Lange + Aasta Hansteen gas

# NeqSim: tie-back screening of a discovery against the nearest real hosts
spec = nb.tieback_screen_spec(net, "7324/8-1 (Wisting)", n_hosts=3, max_km=400)
nb.run_tieback_screening(spec, max_distance_km=400)       # TiebackAnalyzer.quickScreen per host

# NeqSim: hydraulic check of an export path (LoopedPipeNetwork, pressure-pressure)
hyd = nb.trunk_hydraulics_spec(net, "TROLL", terminal_pressure_bar=90.0)
nb.run_trunk_hydraulics(hyd, inlet_pressure_bar=160.0)    # deliverable MSm3/d, node pressures

Live open data:

from ncs_infrastructure_network import SodirDataService, EntsogTransparency, summarise_entry_flows

fields = SodirDataService().query("field")                             # layer 7100, paged
reserves = SodirDataService().query("field_reserves")                  # 7113, all versions
flows = EntsogTransparency().norwegian_entry_flows("2026-09-01", "2026-09-07")
summarise_entry_flows(flows)   # mean/max MSm3/d per terminal (GCV 11 kWh/Sm3 default)

Data Refresh

C:\appl\neqsim-venv\Scripts\python.exe scripts\build_snapshot.py                 # live rebuild
C:\appl\neqsim-venv\Scripts\python.exe scripts\build_snapshot.py --raw-cache raw.json
C:\appl\neqsim-venv\Scripts\python.exe scripts\build_snapshot.py --from-raw raw.json   # offline

Sodir updates daily. norskpetroleum reissues the capacity tables irregularly, and the file name carries a date: update NORSKPETROLEUM_TABLES in open_api.py when it changes. After a rebuild, run the tests. They check routing coverage and that the recent year has no overloaded element.

Validated NeqSim Path

QuestionNeqSim classBridge function
Tie-back of a discovery to a real hostneqsim.process.fielddevelopment.tieback.TiebackAnalyzer, HostFacilitytieback_screen_spec, run_tieback_screening
Can a trunkline path deliver a rate?neqsim.process.equipment.network.LoopedPipeNetworktrunk_hydraulics_spec, run_trunk_hydraulics
Economic value of throughputneqsim.process.optimization.valuechain.ValueChainObjectivein neqsim-ncs-value-chain-optimization
Host process model rate checkProcessModel + ProcessAutomation.findMaxThroughputJsonvia the optimize-processmodel agent

Validation Checklist

  • summary() shows fields ≥ 120, hosts ≥ 50, the four plants and seven terminals.
  • utilization(<recent year>, "gas"): routed/total > 0.99 and overloaded empty.
  • Routes flagged needs_review were read against the Sodir text before being quoted.
  • Capacities quoted with their source_url; estimates and calibrated values (confidence low/medium, e.g. Melkøya calibrated from observed Snøhvit deliveries) flagged.
  • Any host capacity used in a tie-back came from the caller, never assumed.
  • ENTSOG kWh/d converted with a stated GCV.

Common Mistakes

  • Reading the Norwegian description row. Layer 7102 has both nb and en rows per field. Filter fldCultureCode='en', or the parser silently misses every route.
  • Treating profiles as a forecast. Layer 7300 is history only; the current year is year-to-date. Forecasts come from neqsim-ncs-value-chain-optimization.
  • Mapping "Statpipe" to Statfjord. Tie-ins join Statpipe rich gas downstream of Statfjord. Mapping them to the Statfjord node lets their gas leak out through Tampen Link.
  • Shortest-hop routing. Sending every field on the fewest hops overloads Langeled and Zeepipe IIA to 2–3× capacity. Use the capacity-aware utilization.
  • ENTSOG 404. A 404 means "no data for the window", not a failure.
  • norskpetroleum "csv" links. They return xlsx. The data header is the row containing Operator/From/To.
  • Sodir DataService WHERE clauses. Several LIKE/OR terms or non-ASCII letters (e.g. a name with "A" ring) return an empty body and a JSONDecodeError. Query one simple predicate (or a block/licence number) and filter names client-side. The licence layer (3000) returns no geometry, so licence outlines and prospect positions need another source. An exact-name IN ('ÅSGARD A','ÅSGARD B','BERLING') list on the facility layer (6000) works even with non-ASCII letters, and return_geometry=True, out_sr=4326 returns facility x/y (lon/lat) for distance-to-host checks.
  • Gassco UMM. It sits behind a terms click-through with no API. Never automate acceptance; the user exports outage messages and supplies them.

Limitations

  • Nameplate capacities only. Line-pack, pressure-dependent capacity, gas quality blending and the Gassco nomination rules are not modelled.
  • Kårstø publishes product rates (t/h), not dry-gas throughput. Its export is bounded by Statpipe dry gas and Europipe II.
  • Host processing capacities are not open data. Tie-back screening uses distance and water depth unless the caller supplies capacity.
  • Route extraction is text mining of public prose. Treat needs_review routes as hypotheses.
  • UK-side systems (FLAGS, SAGE, FUKA, CATS, Forties) end at an entry node; the UK network is not modelled.

Related NeqSim Functionality

  • neqsim-ncs-value-chain-optimization: multi-period, capacity-constrained optimisation of the whole NCS on this graph.
  • neqsim-norwegian-continental-shelf-data: headline facts, carbon cost, fit_arps_decline.
  • neqsim-resource-classification-screening: maturity of the discoveries listed here.
  • neqsim-ncs-ownership-equity: partners and working interests of the fields and discoveries listed here, for net-to-company economics.
  • neqsim-production-network-routing, neqsim-step-out-screening, neqsim-pipe-route-profile: detailed tie-back hydraulics.
  • NeqSim Java: TiebackAnalyzer, HostFacility, LoopedPipeNetwork, NetworkPlanningHorizon, TiebackRouteNetwork.

Worked pattern: gas export from an injecting field

For a field that re-injects gas and wants to start exporting (for example a Utsira High field routed through the Johan Sverdrup gas line to Heimdal or Statpipe):

  • Check the Sodir pipeline layer for status. A riser platform can be removed while the pipeline objects remain listed, so confirm the real tie-in point (for Heimdal, the subsea bypass of the removed riser platform).
  • The last pipeline section can be much smaller than the trunk (the Johan Sverdrup gas line ends in a 12 inch spur), so test the spur, not only the trunk, for rate and pressure.
  • Combine the route with the Gassled entry specification screening (enterprise-gas-quality-specification) before the hydraulics: the export option is decided by gas quality (dew points, Wobbe) as much as by capacity.
  • Keep the export rate in MSm3/d at 15 C, and the heating values on the same basis.

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.