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

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.13macOS 15.0+ ARM64

pyharp-2.0.1-cp312-cp312-manylinux_2_27_x86_64.whl (29.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.12macOS 15.0+ ARM64

pyharp-2.0.1-cp311-cp311-manylinux_2_27_x86_64.whl (29.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.11macOS 15.0+ ARM64

pyharp-2.0.1-cp310-cp310-manylinux_2_27_x86_64.whl (29.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.10macOS 15.0+ ARM64

pyharp-2.0.1-cp39-cp39-manylinux_2_27_x86_64.whl (28.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64

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

File metadata

File hashes

Hashes for pyharp-2.0.1-cp313-cp313-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 2fa4800f4a7797264d233fb3873daff3a909713e299560733b3ce98dd1cea5f4
MD5 9493608c2250a336bdba48a3bbf39f20
BLAKE2b-256 6f5cb7ba045249527f82553685c202be1de9f533f05569be92727cbd9247f870

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.1-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 ac191c494275d117e30a414913651224d6b48415bb6f5986dc5fc19f13a6e960
MD5 1f083f51af691e3d930e2a23befc7a01
BLAKE2b-256 efe8217af425f99ed3ad90d949385c9a25d8a19c4f75b56bce203a72a24e895f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.1-cp312-cp312-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 e9024f9fc1102fc8d4dd299f8e900f084e1080f6b16df3d0f7dd3dd5440426bf
MD5 a4f39661ecf1a5068bc9e780126ab07b
BLAKE2b-256 a3b51e0cef85713dc9a64261f8ae2eaf49005c3682a99e010be0246b356c83b2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.1-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 00fa7143588dd6be55d05fa922f3e1265aeae5087fba9c3f13aaf662438a85fc
MD5 7799d63160b3971caca637bf75d4ca76
BLAKE2b-256 abdf032f054d5cd2a8c359828e8e12216e0c812b208c085cadcfb51f31678116

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.1-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 bd72a686153674dfb02a2f2aea04f079d8087c373c656ce9fa3be5418d7bb50d
MD5 c664d1f56179ea6f5afd724dee447a40
BLAKE2b-256 f35bc70aefdea4931261576f13371706d84776b189e6ed6218bac42b2abcd48d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.1-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 93473dd40d984c14ed5f8c3225ab39e5bad5db6327f6add498bf37c4af3e114d
MD5 fb3128ed656bd6d1d0aef34b5f179641
BLAKE2b-256 5e72aaf729b88f439717958be8c4001bac11d4211d15ab8143ded093d5ab5a32

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.1-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 bfc861d1a2631021925b682b631b18e7d90794b2db89b98428b20043fc5967a3
MD5 9040b08fe14acb0621832f21dd4520f5
BLAKE2b-256 c339c6d736cfe6f1683e4bd9deaaaee126d95856cda58b2020f16d8d74b2c3e5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.1-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 994f6e4517b38418d05b9317e626ef560bc8581f057622a883b2d40758b2b913
MD5 15a09aa05c85422006f9391b883418f1
BLAKE2b-256 3d8b17b2544bff63a836e7b8625f175a656d0005b7f237fc0f1bc30b5519feee

See more details on using hashes here.

File details

Details for the file pyharp-2.0.1-cp39-cp39-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-2.0.1-cp39-cp39-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 014e40b88b38c371ba4a9078ec6dbf76dbec148c3f3719d161485edcf61ef1b7
MD5 2d06e2e502e1039c543283267bc02f23
BLAKE2b-256 8e7591cef80169fe10f932029e97fbdf5ef4c9543281894d7e318fd039443930

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.1-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 32fb83fdf727477c10e45acbedeb03a2f27c83ccd5b3305c4df087a1ba7cd05f
MD5 e461942858c4229e0d10c884b6de2066
BLAKE2b-256 dec0ae1ead277f99b015465659b9ba55a12a42bca2c629fe8303adbb61abc0db

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