PyGWP - A CO2-equivalent computer based on static or dynamic CO2-relative global warming potentials.
Sources
Installation
We are going to use a package management system to install and manage software packages written in Python, namely pip. Open a session in your OS shell prompt and type
pip install pygwp
Or using a non-python-builtin approach, namely git,
git clone git://github.com/lfaucheux/PyGWP.git
cd PyGWP
python setup.py install
Requirements
Use cases
- Scientific modelling
Example usage:
>>> from PyGWP import GWPBasedCO2eq
>>> dyn_gwp20 = GWPBasedCO2eq(
... first_year = 2020,
... project_horizon = 5,
... GWP_horizon = 20,
... static = False
... )
>>> ghgs_weight_per_weight_of_output_inventory_flow = {'CO2':1., 'N2O':.0, 'CH4':.0}
>>> co2eq_traj = dyn_gwp20.co2eq_yields_trajectory_computer(
... ghgs_weight_per_weight_of_output_inventory_flow,
... as_row_array=False
... )
>>> co2eq_traj['as_array']
array([[1. ],
[0.95764081],
[0.91469171],
[0.87112496],
[0.82691128]])
>>> co2eq_traj['as_dict']
{2024: 0.82691127746144444, 2020: 1.0, 2021: 0.95764080833063492, 2022: 0.91469171438570718, 2023: 0.87112496115582216}
>>> co2eq_traj = dyn_gwp20.co2eq_yields_trajectory_computer({'CO2':.0,'N2O':1.,'CH4':.0})
>>> co2eq_traj['as_array']
array([[292.33637282, 278.90543843, 265.35617058, 251.68752668,
237.89845498]])
>>> co2eq_traj = dyn_gwp20.co2eq_yields_trajectory_computer({'CO2':.0,'N2O':.0,'CH4':1.})
>>> co2eq_traj['as_array']
array([[72.2209832 , 70.75950679, 69.17102216, 67.44449179, 65.56791893]])
>>> sta_gwp20 = GWPBasedCO2eq(
... first_year = 2020,
... project_horizon = 5,
... GWP_horizon = 20,
... static = True
... )
>>> co2eq_traj = sta_gwp20.co2eq_yields_trajectory_computer({'CO2':.0, 'N2O':.0, 'CH4':1.})
>>> co2eq_traj['as_array']
array([[72.2209832, 72.2209832, 72.2209832, 72.2209832, 72.2209832]])
License
Distributed under the MIT license
Metadata
Release files for PyGWP 0.0.32
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| PyGWP-0.0.32.tar.gz | 6.0 kB | Without provenance | Details for PyGWP-0.0.32.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| PyGWP-0.0.32-py2-none-any.whl | Python 2 | none | any | Details for PyGWP-0.0.32-py2-none-any.whl |
Total release size: 14.0 kB
Release files / PyGWP-0.0.32.tar.gz
| Download URL | PyGWP-0.0.32.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0becb9f7e17418e2e965dd167bfbfb9560b8b10d5be881a75a30b3dec16ac916
|
|
BLAKE2b-256 checksum How to use checksums |
a1c4c026d3022318e62c57e8a5ab4eee37b264450fa29973cd8fdf8e55ec5449
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/2.7.15
|
Release files / PyGWP-0.0.32-py2-none-any.whl
| Download URL | PyGWP-0.0.32-py2-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
82805608d30a3aa0fbf9dc0e5cc23942c3ca030de853e7a23e8cfdac64ee8ffc
|
|
BLAKE2b-256 checksum How to use checksums |
cfb0f2cea34b1c97918e29cc6e787fbc178e7db2ec628accded3eb1bbcc9a418
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/2.7.15
|
Security for PyGWP 0.0.32
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.