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

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

pyharp-1.7.8-cp313-cp313-macosx_15_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

pyharp-1.7.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (22.5 MB view details)

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

pyharp-1.7.8-cp312-cp312-macosx_15_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

pyharp-1.7.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (22.4 MB view details)

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

pyharp-1.7.8-cp311-cp311-macosx_15_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

pyharp-1.7.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (22.3 MB view details)

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

pyharp-1.7.8-cp310-cp310-macosx_15_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

pyharp-1.7.8-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (22.3 MB view details)

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

pyharp-1.7.8-cp39-cp39-macosx_15_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.9macOS 15.0+ ARM64

File details

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

File metadata

File hashes

Hashes for pyharp-1.7.8-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3859eae23169ca841cc333d51418fb362c349657e47a43d8e8dcbea76d3f0a11
MD5 87d1d67918e75f4e1839b8c9e379ef95
BLAKE2b-256 fd8dbfa30eb7305c2298dc62d96f4d7c788d41dac532f6b53afe7954386dbeda

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.7.8-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b947a6ea937eb64fd9bbd290c073f4fecbf0bee7905309e02eff1fd2f13bcbfc
MD5 adaa123503ce4b2a8afacfa9903a1cf5
BLAKE2b-256 77635f5feab50587b00991325aeb2bc38f39091c4fe4c137389eba96d2185392

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.7.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 aaa0737b3ebda468c45bbb591f609267b6cc232b91ac1572cffbf611ca3b4885
MD5 e7621e8399019301b00465e422126988
BLAKE2b-256 40de2923df3f84dc1739e7b802a0f74645646ffe7e49487d151671f9c798acbe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.7.8-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 d53a82d093adb24172f8f8fa5d53f1aceb4c932a269da6715cf549728fb37b3b
MD5 b05e0f343bd04e96aa40eff8b14e07c1
BLAKE2b-256 00f842acc1569a802119fe187ea399766efe22543828212f4654720cee7fd3bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.7.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2eca301bbf6f7e5784b3e06f5817bf7977ec0c4a02b54dc0c68ed4c9cab61b4c
MD5 c3ea0d28604cde2edff8d81e568f731f
BLAKE2b-256 22cb26dcbd1062a255e81e3c0c3cde77023a45b18d9ed9cabf7c7257ea6f48a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.7.8-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 75f0641b02b1b4044066b5f83d2be28379b463a53f9f9e41f21fe4bfc71ac680
MD5 e2242acf82116fef373cae524d03a8e7
BLAKE2b-256 78c7126f67157b4d1f8d1f628213b0c0f1be3c52030d7f6af9a955160fe903c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.7.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 34e19857841101be70482c66aaeae45b1424305883fae8cf459515962b668574
MD5 a7c8d63c926273bf0cc7d68a9c0de634
BLAKE2b-256 4994bf48fdfc88e5f7a689772fa370052d82e83d708e1218afd66d835e30e901

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.7.8-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 32ab0d68b4891a0a269f7d99d717d0dad50d5853f4a4401448aed5d853987459
MD5 c22bee63943ae91506c71e7deff4ea4b
BLAKE2b-256 aab2ee03dc150ddf857f1e63bf68b7a9b517e6c32ad4be4c5bcaae9434a2e0d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.7.8-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 880a182448dd5b7707d455684fcefe0c0f9c9cc26c1610f5cdd1b9706a2b56f7
MD5 468bdb66c1251b618f89be85a8a419e0
BLAKE2b-256 ddffc9e6782ed0b63fcd2c771a0343513729253873e55f4e7e70ec38481e3b21

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.7.8-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 99eb2542daa4be54dd54ab19f0e2e5209c86f454325d12dbce2f8106571b94ac
MD5 934d00370738a56d1f1dbf9fb42aec89
BLAKE2b-256 aeeeb423e96abfd9006d12c3e6dcb234d2f37efcbb6fca6182f0efbab544f63d

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