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.8-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (26.8 MB view details)

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

pyharp-1.8.8-cp313-cp313-macosx_15_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

pyharp-1.8.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (26.9 MB view details)

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

pyharp-1.8.8-cp312-cp312-macosx_15_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

pyharp-1.8.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (26.7 MB view details)

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

pyharp-1.8.8-cp311-cp311-macosx_15_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

pyharp-1.8.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (26.6 MB view details)

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

pyharp-1.8.8-cp310-cp310-macosx_15_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

pyharp-1.8.8-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (26.6 MB view details)

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

pyharp-1.8.8-cp39-cp39-macosx_15_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.9macOS 15.0+ ARM64

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.8-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7e25e259de91709dcc8ba6c2c025362846fca6d6b5c3c1340c686128afe71b76
MD5 db2a29a512339f4d85d33baa146d7423
BLAKE2b-256 d86c6c6427366047b2873b8181c8b542d503e8c98524c98f233648b47a891b96

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.8-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 ed1523be788c1d2e5b5f39c137771c7bfa02d139bafcabf11bafecf2f313cba9
MD5 2999dc25b24be68b3580bb5774ddce51
BLAKE2b-256 39bfc72de0120f0212f04c51e4d4dbac5248f69ae759102278ae56bdbb72d469

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 033604b21c7a8f3d075d9cc46f410c5ef75c8a4b164df6a83184d3e43cc68a7d
MD5 4901e45cab379b2b5dfe0c06fd7e7ad6
BLAKE2b-256 dd530fa195a0762ca53466e3a28f9dd6608a3b5fa27a8fcc042b99ef0e6ecf90

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.8-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 7ac332041ba12b95247a33a5fe6daea112522ebc9b7d72ef7d885d9e48d75dc4
MD5 03c447ab227a9446a67ef79e39d4e804
BLAKE2b-256 94189202cdc3d2cfceddd3cc2488feec87bae86df0232914316bc72197f853ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 09e4b9902c84cdc49e9e3d3311c37215ec5409e407b99560294d4a788f726ef5
MD5 937c6493c9b7cc6223a96d9a490da458
BLAKE2b-256 920f9c4261794fbf87a046bc616a097c837468679d3ec292fab89124ae78ba21

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.8-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b7e7ca7df9d77794c137f9d8b2e73bb704d57224aa33ccc6a0c112a0d73aa53c
MD5 bbc7d07283d78b5107133c5c69078cf5
BLAKE2b-256 b7e39de32c976ed33bf93d501addf0a97d07201b30c1778f1fae176458d0e7c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 995ff6f55590899218fbc48a3e0a5d4ed31d6c5db788948d710bf05aa4539be2
MD5 7ca609cd6ec729b9726cfe6f04e3036a
BLAKE2b-256 870cf2f17810a9bad3b1e44d1ffed1933257ec5dbfc6fd4db9736a2d2c54ddba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.8-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 6aba39f3656ee4aa2e13527454aef9f939e14709f153413724a36092e55f6063
MD5 2b7178edb65c3fc4c18a44103e60dbd9
BLAKE2b-256 e71a5ea3fd42d452deba98c609729e3a76c15eb0467d5ae2a6f29b3f0ed6968e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.8-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 201857b465cb1d31e071d2e487a821a92efcc756a682d4ab6e8a221a5128270a
MD5 ed3168ab5d2196564d5d77da4363c7cb
BLAKE2b-256 a6cbadf36341a836f4bfafde4b40bd3b8246324839740889b020e52b5d730f62

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.8-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 ab197f18cfe71418477ea3433681f9d87121e120ff3cf083f9f5a87d53b7bed2
MD5 8701d828127b952614fd4389e72a797f
BLAKE2b-256 88019106a7ab7998df56f674453d00e7f46d43b812fb557c89a2a377f6deb12f

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