Skip to main content

High-performance Atmospheric Radiation Package

Project description

Pyharp: Python-first High-performance Atmosphere Radiation Package

build License

Pyharp is the one-stop tool for calculating the radiation flux of planetary atmospheres, from terrestrial to giant planets. Detailed documentation and examples are available at https://pyharp.readthedocs.io.

Installation

Pyharp can be installed via pip:

pip install pyharp

We support Linux and Mac operation systems with Python version 3.9+.


Supported opacities

Pyharp has built-in functionalities that work with various opacity sources. The following table summaries off-the-shelf opacities.

Opacity Name Tested Peer Reviewed References
Premix H2 molecule YES NO [1]
H2-He continuum YES YES [2]
CO2 molecule YES NO
CO2 continuum YES NO
H2O molecule YES NO
H2O continuum YES NO
N2 molecule YES NO
N2 continuum YES NO
Grey (user implement) YES NO
(More coming) ... ...

Supported radiative transfer solvers

You can choose the backend radiative transfer solver to use by Pyharp. Here are the available options:

Radiative Transfer Solver Tested Peer Reviewed References
DISORT YES YES [1]
Two-steam (Toon-McKay) NO NO

Development

If you want to further develop Pyharp, you will need to install it locally, which allows you to modify the source code and test. Open a Linux or Mac terminal and clone this repo using the following command:

git clone https://github.com/chengcli/pyharp

This will copy all source files into your local computer. You will need to install a few system libraries before installing Pyharp. All following instructions are executed under the pyharp/ directory.

System required for building locally

  • Python 3.9+
  • Linux or macOS
  • netCDF
  • python virtual environment (venv)

MacOS installation

brew install netcdf

RedHat installation

sudo yum install netcdf

Ubuntu installation

sudo apt-get install libnetcdf-dev

Build C++ library

After you completed the installation steps, you can build the pyharp library. We will build the package in-place, meaning that the build (binary files) are located under pyharp/build/bin. To do so, make a new directory named build

mkdir build

All build files will be generated and placed under this directory. It is completely safe to delete the whole directory if you want another build. cd to build and cmake

cd build
cmake ..

This command tells the cmake command to look for CMakeFiles.txt in the parent directory, and start configuring the compile environment. Then compile the code by

make -j4

This comman will use 4 cores to compile the code in parallel. Once complete, all executable files will be placed in build/bin.

Build python package locally (dev mode)

The python library can be installed by running the following command in the root directory:

pip install -e .

Test the installation

To test the installation, import pyharp in a python shell:

import pyharp

The build is successful if you do not see any error messages.


Contributing

Contributions are welcome! Please open an issue or PR if you’d like to:

  • Find a bug
  • Suggest new functions
  • Add examples
  • Improve documentation
  • Expand test coverage

Contact

Maintained by @chengcli — feel free to reach out with ideas, feedback, or collaboration proposals.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyharp-1.8.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (22.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyharp-1.8.1-cp313-cp313-macosx_15_0_arm64.whl (4.3 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

pyharp-1.8.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (22.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyharp-1.8.1-cp312-cp312-macosx_15_0_arm64.whl (4.3 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

pyharp-1.8.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (21.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyharp-1.8.1-cp311-cp311-macosx_15_0_arm64.whl (4.3 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

pyharp-1.8.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (21.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyharp-1.8.1-cp310-cp310-macosx_15_0_arm64.whl (4.3 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

pyharp-1.8.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (21.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyharp-1.8.1-cp39-cp39-macosx_15_0_arm64.whl (4.3 MB view details)

Uploaded CPython 3.9macOS 15.0+ ARM64

File details

Details for the file pyharp-1.8.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-1.8.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e8c5c29cbad9e22910a339edd4825463e4436ecdd7460bb2470c578fe3816f79
MD5 cb243879f4421d7ae16883c81e8368c2
BLAKE2b-256 530d1fe76561dba5175eab1d5d51ba835a086a3c3d669fe9bf04b71828bd2491

See more details on using hashes here.

File details

Details for the file pyharp-1.8.1-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pyharp-1.8.1-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 59b2f0cb1c880606bac4ed70475361e0287fb151f8c6ef34a77d88a64cd055ca
MD5 b616b41febb6ae7fa87760a27e8cf52a
BLAKE2b-256 8be0d969ba51222d26a4a9b970e85a07edad23a786549fdfc1a2ad1b378ebb03

See more details on using hashes here.

File details

Details for the file pyharp-1.8.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-1.8.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0a36c95febd9feee4dad8faa1e1fb9adf191be67d647d3ae5839d0710535c502
MD5 ba8fa693dee96fda1702a1a6ef4d0e86
BLAKE2b-256 ffb885577ac5f4b5eebf4517bc8b83e452a61f4c2f70cbb720a98c3c2064b389

See more details on using hashes here.

File details

Details for the file pyharp-1.8.1-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pyharp-1.8.1-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 3b4778b348c5778602e794bd5e7571938b14f8661244d8803c4e77b0b5f8a5af
MD5 f4aa0f7e1e6bdc786b9e0c7441377162
BLAKE2b-256 6bd17b3b5a783d317547eaf9617aa629444e9a02ec46ece6f99ee6a83b3d5232

See more details on using hashes here.

File details

Details for the file pyharp-1.8.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-1.8.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cf7e9afa87f9590749ed5b7161c14c0a8b3dea696ec586525c3530d5d7c87810
MD5 e0fb496582d77a60ef350fca00cbeb5a
BLAKE2b-256 1c33a703634ae782e72b66ae61dbbeeb015f0b96183aaeaa965333ede0ac0e5a

See more details on using hashes here.

File details

Details for the file pyharp-1.8.1-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pyharp-1.8.1-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 477893395a919bb133139748c209bc7ba42dbae8ea8d08f07a58c033e39480c5
MD5 240bf53303630cd5a9521b662213b568
BLAKE2b-256 d0265f322588c76e0101f66367416a5eeea1eed7f6fd9d217cf322bdf4d61ea6

See more details on using hashes here.

File details

Details for the file pyharp-1.8.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-1.8.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bc7e4be005d0bff3d76bb06a8dd3afa8961a94a94ef82d668678525e17e6443c
MD5 5070f8727ce21456f2ecd828d3c029a5
BLAKE2b-256 7f2e5d6dc2f8c98f0ead8f1f3023c62f765bf0481686dcc7946e921cce98ee00

See more details on using hashes here.

File details

Details for the file pyharp-1.8.1-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pyharp-1.8.1-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 90dac7c51586f5fd20cd153f1e400db54e31dd257f330f6b055b326ad56de7d2
MD5 f995f213b5ccaa3e84967d7acb05e982
BLAKE2b-256 c3a09d98366c029d21bff72d75718790bbcc8b9da9a47613ab3d8066f1003011

See more details on using hashes here.

File details

Details for the file pyharp-1.8.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-1.8.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8de2d007dae93ec534864008fd5272c2536b3edff4ab3d8243b33fcd68bce148
MD5 311b38e056ecfdb998c8dd935aa97fb9
BLAKE2b-256 c5e059bed32555835a389d1a287eb8c0fd5005addbdfcb30f26b7665e82e4a01

See more details on using hashes here.

File details

Details for the file pyharp-1.8.1-cp39-cp39-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pyharp-1.8.1-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 c16984012c3e29e84cd2c6d2518ff61ad4ed9a37740656fc086055b13ead7f14
MD5 226acbbf01f0dccc30ff0df9386bed07
BLAKE2b-256 8a02dd4b74385279690ab03ce62be37725cb43b1fe9b7a5d373774427fe7c185

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page