A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

eCalc

A software tool for calculation of energy demand and greenhouse gas emissions from oil and gas production and processing.
https://github.com/equinor/ecalc

Category: Emissions
Sub Category: Emission Observation and Modeling

Keywords from Contributors

transforms measur optimize compose reporting animals simulator file-upload control archiving

Last synced: about 12 hours ago
JSON representation

Repository metadata

eCalc™ is a software tool for calculation of energy demand and greenhouse gas emissions from oil and gas production and processing.

README.md

eCalc Logo

CI Build
License
Code style: black
PyPI - Python Version
PyPI - Wheel
PyPI - Implementation
Pre-commit - Enabled

eCalc™

eCalc™ is a software tool for calculation of energy demand and greenhouse gas (GHG) emissions from oil and gas production and processing.

Note

eCalc™ is a work in progress and is by no means considered a finished and final product. We currently recommend to use the YAML API when using eCalc, and only
fallback to the Python API when it is strictly needed.

Warning

The quality of the results produced by eCalc™ is highly dependent on the quality of the input data. Further, we do not make any guarantees and are not liable for the quality of results when using eCalc™.


eCalc Illustration


Reference Links


Introduction

eCalc™ is a software tool for calculation of energy demand and GHG emissions from oil and gas production and processing. It enables the cross-disciplinary collaboration required to achieve high-quality and transparent energy and GHG emission prognosis and decision support.

eCalc™ performs energy and emission calculations by integrating data, knowledge and future plans from different disciplines. This could be production and injection profiles from the reservoir engineer, characteristics of energy consuming equipment units such as gas turbines, compressors and pumps from the facility engineer, and emission factors for different fuels from the sustainability engineer. The main idea is using physical or data-driven models to relate production rates and pressures to the required processing energy and resulting emissions. Integrated bookkeeping for all emission sources is offered.

eCalc™ uses a bottom-up approach to give high-quality installation and portfolio level forecasts at the same time as detailed insights about the energy drivers and processing capacities for the individual installation.

Getting started

eCalc™ is both a Python library and has a command line interface (CLI) to use with eCalc YAML Models. We currently recommend using eCalc™ from the command line with eCalc YAML Models, since the Python API is about to change soon, but the YAML will
be more or less stable and backwards compatible.

To get started, please refer to the eCalc™ Docs - Getting Started,
or follow the quick guide below:

Prerequisites

  • Python, version 3.11 or higher
  • Java, version 8 or higher
  • Docker (Optional), Linux or MacOS

eCalc™ only supports Python 3, and will follow Komodo wrt. minimum requirement for Python, which currently is 3.11.

Installation

pip install libecalc
ecalc --version
ecalc selftest

Alternative using Docker:

docker build --target build -t ecalc .
docker run -it ecalc /bin/bash

Inside the docker container, run:

ecalc --version
ecalc selftest

Please refer to Docker Docs for details on how to use Docker.

Alternative using devcontainer:

In vscode:

  • Install extension "Dev Containers" and open command palette (ctrl+p or cmd+p or F1) and click "reopen in container" then click the alternative "eCalc Python Dev Environment".

In github codespaces:

  • In the repo click the "<> Code" button -> codespaces -> in the codespaces section click the ellipsis menu (three dots) -> click "New with options.." -> under "Dev container configuration" click and choose "eCalc Python Dev Environment" -> then click button "Create Codespace".

ecalc-selftest

Create and run your first model

Please refer to the https://equinor.github.io/ecalc/docs/about/modelling/setup/ on how to set up your own model
with the YAML API and https://equinor.github.io/ecalc/docs/about/getting_started/cli/ on how to run it.

See Examples below to use one of our predefined examples.

Development and Contribution

We welcome all kinds of contributions, including code, bug reports, issues, feature requests, and documentation.
The preferred way of submitting a contribution is to either make an issue on GitHub or by forking the project on GitHub
and making a pull request.

See Contribution Document on how to contribute.

See the Developer Guide for details.

Running tests

We use pytest for our tests, to run all tests

poetry run pytest

To update inline snapshots

poetry run pytest -m "inlinesnapshot" --inline-snapshot=fix

Examples

Jupyter Notebook examples can be found in /examples. In order to run these examples, you need to install the optional
dependencies.

Using pip

pip install libecalc[notebooks]

In the examples you will find examples using both the YAML specifications and Python models. See /examples

Run jupyter:

jupyter notebook examples

Using poetry

poetry install --extras notebooks
poetry run jupyter notebook examples

Documentation

The documentation can be found at https://equinor.github.io/ecalc


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 5 days ago

Total Commits: 786
Total Committers: 17
Avg Commits per committer: 46.235
Development Distribution Score (DDS): 0.651

Commits in past year: 383
Committers in past year: 13
Avg Commits per committer in past year: 29.462
Development Distribution Score (DDS) in past year: 0.658

Name Email Commits
Jostein Solaas j****s@e****m 274
Frode Helgetun Krogh 7****k 126
Thomas Falch Johansen T****y 103
Ole Petter Lødøen o****l@e****m 68
github-actions[bot] 4****] 50
Markus Rye Foss m****s@b****o 44
Jørgen j****e@e****m 41
Kjetil Brakstad 6****k 18
Kristin Solbakken k****a@g****m 14
Shi Chen 9****n 12
dependabot[bot] 4****] 7
Morten Dæhli Aslesen m****l@e****m 6
Jason Foulkes 9****l 6
Martin Storødegård 1****c 6
Aleksander Karlsson A****A@e****m 5
Ketil Wik 7****k 5
eCalc Team o****e@e****m 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 15
Total pull requests: 947
Average time to close issues: 8 days
Average time to close pull requests: 10 days
Total issue authors: 5
Total pull request authors: 18
Average comments per issue: 2.53
Average comments per pull request: 0.36
Merged pull request: 809
Bot issues: 0
Bot pull requests: 124

Past year issues: 10
Past year pull requests: 481
Past year average time to close issues: 1 day
Past year average time to close pull requests: 5 days
Past year issue authors: 2
Past year pull request authors: 13
Past year average comments per issue: 2.3
Past year average comments per pull request: 0.29
Past year merged pull request: 415
Past year bot issues: 0
Past year bot pull requests: 71

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/equinor/ecalc

Top Issue Authors

  • andreas-el (7)
  • berland (3)
  • patnr (2)
  • eivindjahren (2)
  • dean-s-oliver (1)

Top Pull Request Authors

  • jsolaas (239)
  • frodehk (176)
  • TeeeJay (123)
  • github-actions[bot] (103)
  • olelod (102)
  • markusrf (51)
  • jorgenengelsen (39)
  • krisolba1 (25)
  • dependabot[bot] (21)
  • kjbrak (19)
  • equinor-schen (16)
  • ketwik (10)
  • Aleksander-Karlsson (6)
  • Blubtastic (6)
  • mortendaehli (5)

Top Issue Labels

  • bug (3)
  • dependencies (1)

Top Pull Request Labels

  • autorelease: tagged (91)
  • dependencies (21)
  • autorelease: pending (10)
  • bug (9)
  • documentation (9)
  • javascript (3)
  • python (3)
  • Breaking Change (2)
  • enhancement (2)

Package metadata

pypi.org: libecalc

eCalc™ is a software tool for calculation of energy demand and greenhouse gas (GHG) emissions from oil and gas production and processing.

  • Homepage: https://github.com/equinor/ecalc
  • Documentation: https://libecalc.readthedocs.io/
  • Licenses: LGPL-3.0-only
  • Latest release: 9.16.6 (published 3 days ago)
  • Last Synced: 2025-04-26T12:36:11.921Z (1 day ago)
  • Versions: 84
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 4,287 Last month
  • Rankings:
    • Dependent packages count: 6.923%
    • Average: 18.733%
    • Dependent repos count: 30.543%
  • Maintainers (4)

Dependencies

.github/workflows/docs-ci.yml actions
  • actions/checkout v3.5.0 composite
  • actions/setup-node v3 composite
  • actions/setup-python v4.5.0 composite
.github/workflows/docs-publish.yml actions
  • actions/checkout v3.5.0 composite
  • actions/setup-node v3 composite
  • actions/setup-python v4.5.0 composite
.github/workflows/examples-ci.yml actions
  • actions/checkout v3.5.0 composite
  • actions/setup-python v4.5.0 composite
.github/workflows/lib-ci.yml actions
  • actions/checkout v3.5.0 composite
  • actions/setup-python v4.5.0 composite
.github/workflows/on-push-any-branch.yml actions
.github/workflows/on-push-main-branch.yml actions
.github/workflows/on-push-release-branch.yml actions
.github/workflows/pre-ci.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/publish.yml actions
  • actions/cache v3.0.11 composite
  • actions/checkout v3 composite
  • actions/setup-python v4.3.0 composite
  • snok/install-poetry v1.3.3 composite
.github/workflows/release-please.yml actions
  • actions/checkout v2 composite
  • google-github-actions/release-please-action v3 composite
.devcontainer/Dockerfile docker
  • mcr.microsoft.com/vscode/devcontainers/javascript-node 16 build
Dockerfile docker
  • dev latest build
  • python 3.8-slim build
docs/package-lock.json npm
  • 1097 dependencies
docs/package.json npm
  • @docusaurus/module-type-aliases ^2.4.0 development
  • @docusaurus/types ^2.4.0 development
  • @tsconfig/docusaurus ^1.0.7 development
  • typescript ^5.0.4 development
  • @docusaurus/core ^2.4.0
  • @docusaurus/plugin-content-docs ^2.4.0
  • @docusaurus/preset-classic ^2.4.0
  • @easyops-cn/docusaurus-search-local ^0.35.0
  • @mdx-js/react ^1.6.22
  • clsx ^1.2.1
  • hast-util-is-element ^2.1.3
  • mdx-mermaid ^v1.3.0
  • mermaid ^10.1.0
  • prism-react-renderer ^1.3.5
  • react ^17.0.2
  • react-dom ^17.0.2
  • rehype-katex ^5.0.0
  • remark-math ^3.0.0
poetry.lock pypi
  • 139 dependencies
pyproject.toml pypi
  • PyYAML ^6.0
  • Shapely ^2.0
  • jupyter ^1.0.0
  • matplotlib ^3.7.1
  • networkx ^3.1
  • numpy ~1.24.0
  • orjson ^3.8.11
  • pandas ^1
  • py4j ^0.10
  • pydantic ^1.10
  • python >=3.8,<3.12
  • rich ^13.4.1
  • ruamel.yaml ^0.17.21
  • scipy ^1.10
  • typer ^0.9.0

Score: 14.981678062966001