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

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.13macOS 15.0+ ARM64

pyharp-2.0.0-cp312-cp312-manylinux_2_27_x86_64.whl (26.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.12macOS 15.0+ ARM64

pyharp-2.0.0-cp311-cp311-manylinux_2_27_x86_64.whl (26.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.11macOS 15.0+ ARM64

pyharp-2.0.0-cp310-cp310-manylinux_2_27_x86_64.whl (26.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.10macOS 15.0+ ARM64

pyharp-2.0.0-cp39-cp39-manylinux_2_27_x86_64.whl (26.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64

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

File metadata

File hashes

Hashes for pyharp-2.0.0-cp313-cp313-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 640a82c82079aa365ba140eaf50df8a66470edc8c678dedaed9242ed28e75495
MD5 96765145e399f05fb810b8a3823857db
BLAKE2b-256 88f50b19dd6a9ccdb9106c47d8d5a9a0b821cdce812d442a597af898d92238bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.0-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 8807eb6320a399818ac53f850294daf8f74cf02c739e279c47e4239f20498a18
MD5 60a34739bcbf5022f810e7792db110c2
BLAKE2b-256 d2eba8b24164ce54b1a6823dae165481442939222a48c60ff37a000891316355

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.0-cp312-cp312-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 7ea1edaf0b41e1c7f43571cb4641c4db01071e1082d399c1e0360364d6ef859f
MD5 91b71791725ad7420ac3ebf7033f83c8
BLAKE2b-256 f830e2dd68d05f0d3ec25faed8a53581cd0d6bdf1fdf961f832ec46979362631

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.0-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 88d422f8b32f3a13177a306ef607398e62c1f167c3c46a97bb0efaeda73bb6b8
MD5 3eacd4ed2cddd0bcbaa04d558b9cbf58
BLAKE2b-256 2c7e6535650d7300c06d5d1d9191b889e4c59dd316f4d0045db15798055fc9d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.0-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 4d2d4682ffd3d9dfab9466dd70c62c2627fa53968519aaffc3aece046eb17c08
MD5 99bc5d3a34d6d48149e99d61a938e629
BLAKE2b-256 9c5e04765d26275729c222cf09f33723a4952a79ffd61445175556cc81f9337c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.0-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 7724eea3d7c61d86a0415d913e0415aee8bebf68863b14133ffd53901ef3b2ae
MD5 7d1ca5eb1951f0743d9589d1ba8c9d75
BLAKE2b-256 008b455628df12ccb0065f0c9f79f2461bc4fcab2de4f9846f53d0a604654f15

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.0-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 a067581f7c6d907808002e1bd7cd539056daf04657576ad65b42c289e9554fc4
MD5 6d648699c930296b981e0d891733ad9d
BLAKE2b-256 5acc1a25bea9bbaf24b05f3e951e2a301332167649eea0c01d81dba1a922c33c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.0-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 615e9518de2840913664417ddbba0b15dfea377f7f7d6ea4e9cd7cab45d50ea5
MD5 286ce15d4b665311b955f32a8b1f863b
BLAKE2b-256 3921e2f7e9770de0af4859cd266031602f9078a7bed42beda62dc6b5210d0c8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.0-cp39-cp39-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 d5119b60f54f8dfff2279408e815949fcd3ee2c4760cc7308b8843f480357a3a
MD5 d2d923241b0faa9dd3c11c23ad5c189b
BLAKE2b-256 210ff3c78d1b87f4fd1ae8003d465de2c0f42117dd9c7284ceb15c4b6495cbad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-2.0.0-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 5c3740ce6fe734e14262e9fd5a0cfa62402a5f140d9a39764eab3283cdafe65f
MD5 383469804d716f5e28215273ba0eeb00
BLAKE2b-256 521667f2d2a07e76b49d794c43fb9d7d4cb3a1f940f92b5a0683bcec2169dfcd

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