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.10+.


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.10+
  • 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-2.2.0-cp313-cp313-manylinux_2_27_x86_64.whl (31.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.13macOS 15.0+ ARM64

pyharp-2.2.0-cp312-cp312-manylinux_2_27_x86_64.whl (31.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.12macOS 15.0+ ARM64

pyharp-2.2.0-cp311-cp311-manylinux_2_27_x86_64.whl (31.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.11macOS 15.0+ ARM64

pyharp-2.2.0-cp310-cp310-manylinux_2_27_x86_64.whl (31.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.10macOS 15.0+ ARM64

File details

Details for the file pyharp-2.2.0-cp313-cp313-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-2.2.0-cp313-cp313-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 ddc189a1701643aba7c4d9ce6b924ea340b92da2e2d984cc6aa16e5bafc36fdf
MD5 580afce656aba477187200195206782a
BLAKE2b-256 eef3b295dec9296343d63c4c544153bb2172d068c087636da796561e71c8a891

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.2.0-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 c08197734c2117f59fe4f884080771cddff642e343a1acf0e285dd62aa12c7d1
MD5 9214bae2589b9c138639d4697f33cd1b
BLAKE2b-256 aa27bb8d774643c3799ade0b6321f69186518d2cf78b60659be0db383fb7f43b

See more details on using hashes here.

File details

Details for the file pyharp-2.2.0-cp312-cp312-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-2.2.0-cp312-cp312-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 f8eb9a979e2ffc15d28f3e711f46d859f5b6f0447ea1690fcc2487397c27945c
MD5 6dcdba5947a476dd45c911dbeaa8d317
BLAKE2b-256 39844e101796982e4afb524867bc70edc1cd1f5c6ba198921065f901cb06e9d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.2.0-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 c5434d7f6ec4f4c6ad4270eec19aef59517a2e8270193310f2cf6164f52cf4a0
MD5 dce01a14ad163894e5ecbd68ed6da735
BLAKE2b-256 8c4a63481b2b7d76f505eca465d2cdefff4a93a2cda6abefd4fddd913e5bb98c

See more details on using hashes here.

File details

Details for the file pyharp-2.2.0-cp311-cp311-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-2.2.0-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 60da7cf84414fb29076f8788cb4acdde528c836c87d61545498f6ec395121279
MD5 e6453fa847fdaa2f707bc76244ca4bac
BLAKE2b-256 89e9aeed87e9ff40c7912c90bbeffb46e8e72e6599e085a566e1f0c7a2c7a053

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.2.0-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 8627032719ba2056cf9dc8a882bdcccb8954eb257e08397f0e8e2ebfddbc9b88
MD5 3d8c87b5c981cd71446c41473b667a48
BLAKE2b-256 a71ef0629441519a4204caec8218eb53de27f05a1e22c29901ec62698deba126

See more details on using hashes here.

File details

Details for the file pyharp-2.2.0-cp310-cp310-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-2.2.0-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 9b922748dd14c710e6796a0ca168b91ba506c9ae4fabe45bde39db7304c52b3f
MD5 b4166cbc567af9cfef9eb7f8161fb649
BLAKE2b-256 5dbc9f7b3fd348178671c31a53bcfd5eddea116daba3acf94de859e3293d1938

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.2.0-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 896059bbac51d6bc0b63b4182de12d2951a646648cff4cfdf069ecd7e120c337
MD5 724c6c4f58f6fe6a26ad5dfd77b5e2c3
BLAKE2b-256 81e30b74a34516f2656036eda0155e533885cebe42296ad54d7e6172b578649d

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