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.5-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.5-cp313-cp313-macosx_15_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

pyharp-2.0.5-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.5-cp312-cp312-macosx_15_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

pyharp-2.0.5-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.5-cp311-cp311-macosx_15_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

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

File metadata

File hashes

Hashes for pyharp-2.0.5-cp313-cp313-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 844ed84e7135f38c578b6f63897ba5c554ba50452a85cd7dbed78d2a9378a399
MD5 f388fa970006d465c44d1c1cc04c39da
BLAKE2b-256 cc239120fbc09ba136bec2639104b23b01389e51c11053ba3ce485dd7c71d94a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.5-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 05ab4babff1a50701bf57c3e20a140bd6f4f1857b57d8b5cc12e2cfccdd569cc
MD5 d157700fd816d8a922d5c702ab5d1d25
BLAKE2b-256 cecd8b9740288848c6cac8f16170642ba5da5171edbaa6ae5cb9af0e58686505

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.5-cp312-cp312-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 5ee695ac90ed3240997b2ab0c1256537a2b27ec78502ca935434a0a17e7027e9
MD5 ed10bae288ed1426953a570c83cc400b
BLAKE2b-256 c5c18e73f2cff5c22a60dfa40773f8ac8c97f2ab09d9703bc1014a7e8da65a1a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.5-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 7a39f35762a24322f5d36ac6571bbd59fae01d5737bffd35369130b93dd9a5c0
MD5 2f953567e5fd420e1bfc761b4848a1d0
BLAKE2b-256 1341ca48d6879fb402bb9e081e89985cfc8df900a46aa0bd29546428c6e2b06b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.5-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 2f59bb6f283e2f696b605293c13cf4a3bafca4bd6eb49ac5274f96b3758e8032
MD5 16d95603900fcbaa6a16d39086001cc5
BLAKE2b-256 e8a290a4cef41162f8d4f8e9325e30ad27523e24902fb4ddf42f3bd310419482

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.5-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 0045d4e4f698524488f30e1f78d7c8749642ff80ac81f734a6bbf4b8634626e9
MD5 76774ea0480ee7056693ce7e31e8c61a
BLAKE2b-256 a8cd33fcd84bfafba27df10959242490933209b3df89bf91e53900c60ffc913c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.5-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 7386b0cd06d4cf108af0444f8a329d52182bb1fe2dd8fe1311e7beafa84f1c5a
MD5 7cd1bd63b00dd5ca98ce122675079083
BLAKE2b-256 904592749631fde070a777d3c4ad947a6bb419ebcf7ce871ec749cea56e863d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.5-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 6982f5e1331669555d59551560c5aaa34152814e764c9c61b14d6e26ed3e16ee
MD5 c3948f32103a643f52e37c960aea7a26
BLAKE2b-256 75710a3e335992bc634e69507c98af0ed3c0b399ec93fd8ac40e5f1339983f2b

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