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.0.4-cp313-cp313-manylinux_2_27_x86_64.whl (31.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.13macOS 15.0+ ARM64

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

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.12macOS 15.0+ ARM64

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

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.11macOS 15.0+ ARM64

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

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64

pyharp-2.0.4-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.0.4-cp313-cp313-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-2.0.4-cp313-cp313-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 a19002ef9a805c57a2eb250b17099185408206416a9bf4b5dcdb1ba258bdeb41
MD5 1940c75ccc2cd7c1e21a64180c63d71f
BLAKE2b-256 46de1390889709f99376104663dbae14c07edaa30dba137bfe7f61ebe5af7453

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.4-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 67d6704c3302608176f92c4639d3b9d95a2535368729fa184e857449e9e1ca7f
MD5 b55d2d31ecdd4bb245f7d9fe8519f895
BLAKE2b-256 8fb8f938e084a28281617b5c201cbd794c201aaaafdefc86359b3b0aff3389ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.4-cp312-cp312-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 360d8a159905b9748b852e6a0f85f94ad078e21499600daa099e399fe8c0ae94
MD5 b69675b07c7645e5afb572b19555c315
BLAKE2b-256 61c8b46f5a3570328ecf2e7553392fc53cb6d6f1120e7f6f113cce1b57ef2697

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.4-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 36efebafef7c43ce42705f71ea6f8862dbee0fa86076be3ee77b5905390b0879
MD5 58f1bc18e6d69f645fcb8f9fee336d3f
BLAKE2b-256 e098bed7701317ddbbf2670c0b92a20fd6540c259842ee4bac539f552144bd39

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.4-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 2d0769272329e2cad4e5f3f97a04ecf40a33bb80a023f262f209cf331c87033c
MD5 9f7979d253ad0265ca9665d30b1d0bf5
BLAKE2b-256 8848312aabe068cba731625a62c7fa83111e24c01a1e0e67adfd6aa55fd8fff4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.4-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 0d938a12ed773af030b255b94505e9861ad21f53562c2fcfe7c74c37768974f3
MD5 feb92bbd59b703c4d3beb1e635323be5
BLAKE2b-256 6660db139b59b421741e811f48270da63be4311260571d750535a3a28fe24255

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.4-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 6ab1f941a1f5db8c0a223057daf403560c4b530d22e933704f85f3f0f251735b
MD5 2b089459155008f850babe146aaa6ace
BLAKE2b-256 dcfd9a03250efca8bf51c02a4d18211ab79a1fddc8622895a8b384ce01ef8a81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.4-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 3c19045e753492fa308f067222e6fbf6a6ab8b75eff1b2371dc143ecf934b000
MD5 9b6baf7d7411361007f0856492ee5d45
BLAKE2b-256 306343486f4b67640a6b847519773b3647a67cff7f4a657c6c8706320e5fd700

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