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

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

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

Uploaded CPython 3.13macOS 15.0+ ARM64

pyharp-1.10.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (28.2 MB view details)

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

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

Uploaded CPython 3.12macOS 15.0+ ARM64

pyharp-1.10.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (28.0 MB view details)

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

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

Uploaded CPython 3.11macOS 15.0+ ARM64

pyharp-1.10.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (27.9 MB view details)

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

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

File metadata

File hashes

Hashes for pyharp-1.10.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b62a94666d80f8102e18efc15d86570939ec48cfe91515a375f6ca7483cc4f3e
MD5 2bc5d9f12d85169696c7de308a4270f9
BLAKE2b-256 54213dc57ae84615347ecd8e9472dbcc268dc4447ad35d9e0e45b8ff4b1fe2d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.10.1-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 eb483eb4b49db8e539e575f7398c2b2216a2e2f9e2a05ffda2c8f0701c3d7943
MD5 fcbd967a52585ec7a5098181a32f7cb8
BLAKE2b-256 72c73f136603a2c985762c431071c46808f8751763b2bbcb3555963e70cdc9ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.10.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 57b9eb44de4a6f417010c8f408d8b71e806e004affbcb2d29c8fe69154bb1474
MD5 ef55ce27a54c937fb291c45edfd0352d
BLAKE2b-256 1e4889f4225d9e4e9b28a5cedf913ad5843f9fd7f8dcd488f5d0e25178415e83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.10.1-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 bc7e45026e786cf5eb2eb56dd92359c226fbc417e45754aadb9c68fc80e1821b
MD5 261c9766b0db4daf7d17b5fc77de6162
BLAKE2b-256 98765216e5b4b4facc63e88538c25da8c052af84df07b4a55f4fe3fd7c8a428f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.10.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9c48d5d553507a10ff0749f9883cbb09801d1a64d0cb7c762c98fec091df6495
MD5 102490ad177ab8d7466783fd8bfdfe2a
BLAKE2b-256 e3de09239a44a639cbe61a236abb45469b401e79258cd908dff4f825d4e34874

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.10.1-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 05078d96546a1bdc16a366eec97706d2d18b5b3cdb2fc0c790ed8915b5a60c2f
MD5 f08c0e85625a3ba78857a61f93da3b87
BLAKE2b-256 110838923395175be1610119a38c05546bd70429bd743268a9df489265047eb5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.10.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fe5e910ca34bfafec75ca9bad7622e1f87126ae6b084cfc51e80da465caa22b2
MD5 8ac16734340508e0b95f13dda032e7de
BLAKE2b-256 07c05cc36243ac336df94bc5d2c889423b949f9b90c989f2a84db9b57e6cb2fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.10.1-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b1f6844d3f1accf9f709adfc4c2dd47db1c8202b727640939b4fcfb02bd4958a
MD5 f94d4c53b0819fa8d6d02b91ce56e79e
BLAKE2b-256 996be7b796cfc1871e24d3b7634b234693649d3a48a90f77790373182a25d638

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