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-1.8.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (24.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyharp-1.8.5-cp313-cp313-macosx_15_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

pyharp-1.8.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (24.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyharp-1.8.5-cp312-cp312-macosx_15_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

pyharp-1.8.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (24.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyharp-1.8.5-cp311-cp311-macosx_15_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

pyharp-1.8.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (24.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyharp-1.8.5-cp310-cp310-macosx_15_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

pyharp-1.8.5-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (24.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyharp-1.8.5-cp39-cp39-macosx_15_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.9macOS 15.0+ ARM64

File details

Details for the file pyharp-1.8.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-1.8.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 eb7b24e5f2d279f65170cb7362f161e97f044964cf7dfb0e0679de54c85c5bc1
MD5 11e94be96728299abf7c70bc678b08d6
BLAKE2b-256 b94c98bb711ee54dec02dda51fcb2be46338274b7145f7ae1aae61cdf936e294

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.5-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b4b4be6250640da8c720cbfbcfb3cf0436f8428c0b47f9a234da9b061e2939b4
MD5 bc333ec53255f96fa748bfafc6c5e4a8
BLAKE2b-256 908c376c724af6efce44cd05475cd2950e2e961b6316bf0e9ee28a4c9fccc495

See more details on using hashes here.

File details

Details for the file pyharp-1.8.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-1.8.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7e726e75b2706258673ae014560eae808387b3bf5b2511f2a02cb0dd6fa03ba1
MD5 54ddede228f9ca64134c07b08fbc5e0c
BLAKE2b-256 8a3c0ae3c1539f57d50cf72952e138dff3f0d993b36a26b36a71201a2ba10932

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.5-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 2bc5244316b572e443bebce8e41171e793db8a7180d25b976977259a94194954
MD5 25bf20e01527d8bb0fb0eb5474779287
BLAKE2b-256 8603ab64b7358ee67913714a07a446b0df9ca55115d10d39402a79753fdbe75b

See more details on using hashes here.

File details

Details for the file pyharp-1.8.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-1.8.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ad7a8033db2bb2cf1add7aa517a30454c410acdcb40a57bc8a5a86830e0a9eb9
MD5 be972e3a90a552f5c05fa2db8ff41a2a
BLAKE2b-256 f772871afc440ef3f5b6731ef5dd062c16e97b8cc234305bf2be3cfc43f1b6a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.5-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 29cbd8a523d7ccdcd619a136fca3b48f808b2293c7e7e62f8a29ce9ad48e5462
MD5 521462403953bdc15102676db19a01d6
BLAKE2b-256 0bd4a46a3034625b0e26adc856ca10b25ca332c20dbf934b75ea4a894ed36c5d

See more details on using hashes here.

File details

Details for the file pyharp-1.8.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-1.8.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1273e89e37a7de9e9bdf5f5f6ae5a19a855486ed1ef013bc23610fe4840246c4
MD5 a28b183acd76d0fa189d5275bd46da5e
BLAKE2b-256 760f32ed250a84847d0564eada94e85e43580c2d334121d8385793c637395604

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.5-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 5eb6899bcdca99cf76ad86c466a567376be86f460f9e1d845f95f26968657570
MD5 b0ba24a1754ed609933701a6415c4b0c
BLAKE2b-256 4032edcc87077bdcddeab094cf018650d79463053eeaf31fc5d2f176a6ffc33b

See more details on using hashes here.

File details

Details for the file pyharp-1.8.5-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-1.8.5-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 893ef5bb30e873b1acf6e326167991421d92f8eca117ec8083e993c63bc8dcba
MD5 59a8e1d3d32c557be06de334ce7db0ee
BLAKE2b-256 b3988d14206b9b5f38072f1543d736f0a486caf7ca1670a7cf1462c83537d444

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.5-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 2f01542e812d285c7171e08148c64cec506bb0d255ab93286832e3b8612d1e30
MD5 5327add67c2ae397d11d90ed45b5b454
BLAKE2b-256 0abd2a0eaa0dca827de8ffbcde052eb38df92e25067102ca771bca377e523e70

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