OpenGHG
A cloud platform for greenhouse gas data analysis and collaboration.
https://github.com/openghg/openghg
Category: Emissions
Sub Category: Emission Observation and Modeling
Keywords
analysis cloud collaboration data-science greenhouse-gas
Keywords from Contributors
greenhouse-gas-emissions greenhouse-gases greenhouse-monitoring
Last synced: about 20 hours ago
JSON representation
Repository metadata
A platform for greenhouse gas (GHG) data analysis and collaboration.
- Host: GitHub
- URL: https://github.com/openghg/openghg
- Owner: openghg
- License: apache-2.0
- Created: 2020-09-30T14:35:48.000Z (over 4 years ago)
- Default Branch: devel
- Last Pushed: 2025-05-15T16:09:13.000Z (2 days ago)
- Last Synced: 2025-05-15T23:06:01.735Z (2 days ago)
- Topics: analysis, cloud, collaboration, data-science, greenhouse-gas
- Language: Python
- Homepage: https://www.openghg.org
- Size: 270 MB
- Stars: 36
- Watchers: 2
- Forks: 8
- Open Issues: 235
- Releases: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
README.md
OpenGHG - a cloud platform for greenhouse gas data analysis and collaboration
OpenGHG is a project based on the prototype HUGS platform which aims to be a platform for collaboration and analysis
of greenhouse gas (GHG) data.
The platform will be built on open-source technologies and will allow researchers to collaborate on large datasets by harnessing the
power and scalability of the cloud.
For more information please see our documentation.
Install locally
To run OpenGHG locally you'll need Python 3.8 or later on Linux or MacOS, we don't currently support Windows.
You can install OpenGHG using pip
or conda
, though conda
allows the complete functionality to be accessed at once.
pip
Using To use pip
, first create a virtual environment
python -m venv openghg_env
Then activate the environment
source openghg_env/bin/activate
It's best to make sure you have the most up to date versions of the packages that pip
will use behind the scenes when installing OpenGHG.
pip install --upgrade pip wheel setuptools
Then we can install OpenGHG itself
pip install openghg
Each time you use OpenGHG please make sure to activate the environment using the source
step above.
NOTE: Some functionality is not completely accessible when OpenGHG is installed with
pip
. This only affects some map regridding functionality. See the Additional Functionality section below for more information.
conda
Using To get OpenGHG installed using conda
we'll first create a new environment
conda create --name openghg_env
Then activate the environment
conda activate openghg_env
Then install OpenGHG and its dependencies from our conda channel
and conda-forge.
conda install --channel conda-forge --channel openghg openghg
Note: the xesmf
library is already incorporated into the conda install from vx.x onwards and so does not need to be installed separately.
Create the configuration file
OpenGHG stores object store and user data in a configuration file in the user's home directory at ~/.config/openghg/openghg.conf
. As this sets the path of the object store, the user must
create this file in one of two ways
Command line
Using the openghg
command line tool
openghg --quickstart
OpenGHG configuration
---------------------
Enter path for object store (default /home/gareth/openghg_store):
INFO:openghg.util:Creating config at /home/gareth/.config/openghg/openghg.conf
INFO:openghg.util:Configuration written to /home/gareth/.config/openghg/openghg.conf
Python
Using the create_config
function from the openghg.util
submodule.
from openghg.util import create_config
create_config()
OpenGHG configuration
---------------------
Enter path for object store (default /home/gareth/openghg_store):
INFO:openghg.util:Creating config at /home/gareth/.config/openghg/openghg.conf
INFO:openghg.util:Configuration written to /home/gareth/.config/openghg/openghg.conf
You will be prompted to enter the path to the object store, leaving the prompt empty tells OpenGHG to use the default path in the user's home directory at ~/openghg_store
.
Additional functionality
Some optional functionality is available within OpenGHG to allow for multi-dimensional regridding of map data (openghg.tranform
sub-module). This makes use of the xesmf
package. This Python library is built upon underlying FORTRAN and C libraries (ESMF) which cannot be installed directly within a Python virtual environment.
To use this functionality these libraries must be installed separately. One suggestion for how to do this is as follows.
If still within the created virtual environment, exit this using
deactivate
We will need to create a conda
environment to contain just the additional C and FORTRAN libraries necessary for the xesmf
module (and dependencies) to run. This can be done by installing the esmf
package using conda
conda create --name openghg_add esmf -c conda-forge
Then activate the Python virtual environment in the same way as above:
source openghg_env/bin/activate
Run the following lines to link the Python virtual environment to the installed dependencies, doing so by installing the esmpy
Python wrapper (a dependency of xesmf
):
ESMFVERSION='v'$(conda list -n openghg_add esmf | tail -n1 | awk '{print $2}')
$ export ESMFMKFILE="$(conda env list | grep openghg_add | awk '{print $2}')/lib/esmf.mk"
$ pip install "git+https://github.com/esmf-org/esmf.git@${ESMFVERSION}#subdirectory=src/addon/ESMPy/"
Note: The pip install command above for esmf
module may produce an AttributeError. At present (19/07/2022) an error of this type is expected and may not mean the xesmf
module cannot be installed. This error will be fixed if PR #49 is merged.
Now the dependencies have all been installed, the xesmf
library can be installed within the virtual environment
pip install xesmf
Developers
If you'd like to contribute to OpenGHG please see the contributing section of our documentation. If you'd like to take a look at the source and run the tests follow the steps below.
Clone
git clone https://github.com/openghg/openghg.git
Install dependencies
We recommend you create a virtual environment first
python -m venv openghg_env
Then activate the environment
source openghg_env/bin/activate
Then install the dependencies
cd openghg
pip install --upgrade pip wheel setuptools
pip install -r requirements.txt -r requirements-dev.txt
Next you can install OpenGHG in editable mode using the -e
flag. This installs the package from
the local path and means any changes you make to the code will be immediately available when
using the package.
pip install -e .
OpenGHG should now be installed in your virtual environment.
See above for additional steps to install the xesmf
library as required.
Run the tests
To run the tests
pytest -v tests/
NOTE: Some of the tests require the udunits2 library to be installed.
The udunits
package is not pip
installable so we've added a separate flag to specifically run these tests. If you're on Debian / Ubuntu you can do
sudo apt-get install libudunits2-0
Running CF Checker tests
You can then run the cfchecks
marked tests using
pytest -v --run-cfchecks tests/
Running ICOS tests
Some of our tests retrieve data from the ICOS Carbon Portal and so to avoid load on the ICOS severs these should not be run frequently. They should only be run when working on this functionality or before a release. These tests are marked icos
with pytest.mark
.
pytest -v --run-icos tests/
If all the tests pass then you're good to go. If they don't please open an issue and let us
know some details about your setup.
Documentation
For further documentation and tutorials please visit our documentation.
Community
If you'd like further help or would like to talk to one of the developers of this project, please join
our Gitter at gitter.im/openghg/lobby.
Owner metadata
- Name: OpenGHG
- Login: openghg
- Email: [email protected]
- Kind: organization
- Description:
- Website: https://www.openghg.org
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/67903512?v=4
- Repositories: 7
- Last ynced at: 2023-03-05T03:42:58.184Z
- Profile URL: https://github.com/openghg
GitHub Events
Total
- Create event: 83
- Issues event: 154
- Watch event: 7
- Delete event: 53
- Issue comment event: 182
- Push event: 542
- Gollum event: 78
- Pull request event: 163
- Pull request review event: 412
- Pull request review comment event: 310
- Fork event: 4
Last Year
- Create event: 83
- Issues event: 154
- Watch event: 7
- Delete event: 53
- Issue comment event: 182
- Push event: 542
- Gollum event: 78
- Pull request event: 163
- Pull request review event: 412
- Pull request review comment event: 310
- Fork event: 4
Committers metadata
Last synced: 9 days ago
Total Commits: 4,434
Total Committers: 14
Avg Commits per committer: 316.714
Development Distribution Score (DDS): 0.521
Commits in past year: 1,249
Committers in past year: 11
Avg Commits per committer in past year: 113.545
Development Distribution Score (DDS) in past year: 0.618
Name | Commits | |
---|---|---|
Gareth Jones | o****g@g****m | 2123 |
Rachel Tunnicliffe | r****3@b****k | 910 |
prasad | s****d@y****m | 695 |
Brendan Murphy | b****y@b****k | 506 |
Ben | q****0@b****k | 55 |
Alexandre Danjou | a****o@g****m | 42 |
joe-pitt | j****t@b****k | 23 |
Matt Rigby | m****y@b****k | 20 |
Christopher Woods | c****s@g****m | 17 |
Elena Fillola | e****8@b****k | 15 |
zh21490 | z****0@b****v | 11 |
EricSaboya | e****4@g****m | 10 |
Helene De Longueville | q****4@b****e | 5 |
ro21302 | r****2@b****v | 2 |
Committer domains:
Issue and Pull Request metadata
Last synced: 2 days ago
Total issues: 819
Total pull requests: 643
Average time to close issues: 4 months
Average time to close pull requests: 19 days
Total issue authors: 21
Total pull request authors: 16
Average comments per issue: 1.5
Average comments per pull request: 1.16
Merged pull request: 519
Bot issues: 0
Bot pull requests: 0
Past year issues: 210
Past year pull requests: 200
Past year average time to close issues: about 1 month
Past year average time to close pull requests: 8 days
Past year issue authors: 12
Past year pull request authors: 11
Past year average comments per issue: 0.97
Past year average comments per pull request: 0.46
Past year merged pull request: 154
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- gareth-j (380)
- rt17603 (214)
- brendan-m-murphy (87)
- SutarPrasad (50)
- joe-pitt (28)
- elenafillo (9)
- EricSaboya (9)
- alexdanjou (8)
- mrghg (7)
- aliceramsden (5)
- ag12733 (5)
- qq23840 (4)
- hdelongueville (3)
- hanchawn (3)
- jess-randell (1)
Top Pull Request Authors
- gareth-j (253)
- rt17603 (155)
- SutarPrasad (101)
- brendan-m-murphy (78)
- alexdanjou (15)
- mrghg (10)
- joe-pitt (9)
- EricSaboya (6)
- elenafillo (5)
- qq23840 (3)
- hdelongueville (2)
- pearson01 (2)
- achhayapathak (1)
- aliceramsden (1)
- Brelage (1)
Top Issue Labels
- enhancement (287)
- bug (191)
- tidy (110)
- high-priority (88)
- storage-and-metadata (67)
- documentation (62)
- fine first issue (47)
- question (43)
- analysis (33)
- umbrella (25)
- user-request (22)
- low-priority (21)
- refactor (15)
- overview task (14)
- search-and-retrieve (13)
- CodeRetreatDec22 (12)
- new feature (11)
- parsing/transform (10)
- obspack (9)
- cloud (8)
- help wanted (7)
- bugfix (7)
- release (6)
- duplicate (6)
- github_workflows (5)
- investigate (5)
- wishlist (4)
- zarr (4)
- plotting (4)
- packaging (3)
Top Pull Request Labels
- enhancement (105)
- bugfix (58)
- tidy (30)
- documentation (16)
- high-priority (10)
- release (9)
- new feature (5)
- github_workflows (4)
- analysis (3)
- refactor (3)
- obs_dashboard (3)
- bug (2)
- question (2)
- deprecation (2)
- storage-and-metadata (2)
- packaging (2)
- CodeRetreatDec22 (1)
- help wanted (1)
- plotting (1)
- icos_retrieve (1)
Package metadata
- Total packages: 1
-
Total downloads:
- pypi: 588 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 24
- Total maintainers: 1
pypi.org: openghg
OpenGHG: A platform for greenhouse gas data analysis
- Homepage: https://github.com/openghg/openghg
- Documentation: https://www.openghg.org
- Licenses: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS
- Latest release: 1.0.0 (published about 3 years ago)
- Last Synced: 2025-05-15T23:06:50.069Z (2 days ago)
- Versions: 24
- Dependent Packages: 0
- Dependent Repositories: 1
- Downloads: 588 Last month
-
Rankings:
- Dependent packages count: 7.306%
- Stargazers count: 13.919%
- Forks count: 15.414%
- Average: 16.745%
- Dependent repos count: 22.077%
- Downloads: 25.007%
- Maintainers (1)
Dependencies
- netcdf4 *
- numpy *
- pandas *
- paramiko *
- tables *
- tblib *
- uvloop *
- xarray *
- addict *
- cdsapi *
- dask *
- flake8 *
- folium *
- icoscp *
- lazy_import *
- matplotlib *
- mypy ==0.930
- nc-time-axis *
- netcdf4 *
- numexpr *
- numpy *
- pandas *
- paramiko *
- plotly *
- pre-commit *
- pytest >=6.2.5
- pytest-cov *
- pytest-mock *
- pytest-tornasync *
- pyvis *
- rapidfuzz *
- requests >=2.25
- requests-mock *
- scipy *
- tinydb *
- tqdm *
- types-PyYAML *
- types-paramiko *
- types-requests *
- urllib3 >=1.26.3
- xarray >=0.18.2
- Jinja2 *
- jupytext *
- myst-nb *
- nbsphinx *
- notebook *
- pydata-sphinx-theme *
- sphinx *
- sphinx-autodoc-typehints *
- sphinx-issues >=3.0.1
- sphinx_rtd_theme *
- sphinxcontrib-programoutput *
- addict *
- cdsapi *
- dask *
- fdk *
- lazy_import *
- matplotlib *
- nc-time-axis *
- netcdf4 *
- numexpr *
- numpy *
- pandas *
- paramiko *
- pyvis *
- rapidfuzz *
- requests >=2.25
- scipy *
- tinydb *
- tqdm *
- urllib3 >=1.26.3
- uvloop *
- xarray >=0.18.2
- addict *
- cdsapi *
- dask *
- folium *
- h5netcdf *
- h5py *
- icoscp *
- lazy_import *
- matplotlib *
- nc-time-axis *
- netcdf4 *
- numexpr *
- numpy *
- pandas *
- paramiko *
- plotly *
- pyvis *
- rapidfuzz *
- requests >=2.25
- scipy *
- tinydb *
- tqdm *
- urllib3 >=1.26.3
- xarray >=0.18.2
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- conda-incubator/setup-miniconda v2 composite
- pypa/gh-action-pypi-publish release/v1 composite
- openghg/openghg-base latest build
- fnproject/python 3.8.5-dev build
- fnproject/python 3.8.5 build
- chryswoods/acquire-base latest build
- addict
- dask
- h5netcdf
- ipywidgets
- matplotlib
- msgpack-python
- nbformat
- nc-time-axis
- netcdf4
- numexpr
- numpy
- openghg_defs
- pandas <2.0
- pip
- plotly
- python >=3.8
- pyvis
- rapidfuzz
- requests >=2.25
- rich
- scipy
- tinydb
- toml
- urllib3 >=1.26.3
- xarray
- xesmf >=0.7
Score: 14.621298687394724