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

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

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

Uploaded CPython 3.13macOS 15.0+ ARM64

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

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

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

Uploaded CPython 3.12macOS 15.0+ ARM64

pyharp-1.9.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (26.7 MB view details)

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

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

Uploaded CPython 3.11macOS 15.0+ ARM64

pyharp-1.9.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (26.6 MB view details)

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

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

Uploaded CPython 3.10macOS 15.0+ ARM64

pyharp-1.9.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (26.6 MB view details)

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

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

File metadata

File hashes

Hashes for pyharp-1.9.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 246933ce861fd97a6c44c6ffb03fb8e6f36db519b1cddf9d2a2da37d20385572
MD5 3b1e7b778083d5d1a3b87c14af6296a8
BLAKE2b-256 bea1478ad8c6081ede419ec5fbc9c39b5dbb58aa0614e178b1ced4fcde06e645

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.9.0-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 05b52a637b71d2eefa4e8ae7211eae3f87d1cfe2161654da4b0f1bdfc235afde
MD5 b26ae323ad8cbcee160606754b70136e
BLAKE2b-256 328b02f273eb6173df45a0c13775397dfe159c143d66d4a68b96ede395ecd96f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.9.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f5d9d6b9895af53b7c5d36bdbe64139cd65e0a884345a9ef878cdb90fbc7235c
MD5 24aea23d33daf91ef77c2d0c41b47b12
BLAKE2b-256 4f722039cd76d1e7c841cb971f0804af3363eb5637f1d7764ffcd86316a45c84

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.9.0-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 1d914d977795240cef040c0bff436cbe0412f43e94d6a67f05ffe463d3bffafa
MD5 b05c0d49c043cac08ce4c49b9d15736f
BLAKE2b-256 4e6bbd6cba99009b7682a9adf535395399d66252fbec04088ab5e21e28298041

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.9.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c9d6bf7c77da59def3d6360fcb18b1524d8632731f36f683a0c004116fc4a6fe
MD5 25b902023370e98d4fea86bdc8cfd03a
BLAKE2b-256 dee381359aa745a63f259fc7b02b565d1e58e38e752537083a5f4f25a11a5cb4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.9.0-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 8577684b3c348fd26b64cbb044a69858f38fa596bbe7fbc624612370f3cb8ac4
MD5 c2920b829e9b492b6705d8322dc27bf9
BLAKE2b-256 c14fd75064f8df12c053d3e10545db2d1fa4f8b45b9865c7065cfaeff9d822f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.9.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c7e5acb15f7261c983b82733093bfb413faeab92662b0997aa43a90a2dcba46c
MD5 29d49d617cefb238cdd985ca8a0bdaec
BLAKE2b-256 1da53055b1fbe8de89db2d49d714bfae0ac5154fb981c5b27f0f0a20daa861f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.9.0-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 3b992c377a2a4b1dea8197f78fed2375c18ec01cfefd1651ac96d3e34bef79be
MD5 9ea10a440d8ddd15f1ac943add5a1f38
BLAKE2b-256 64499582c13e82eb5c29f4493b786763fe3237771a0743ffaf1863fe4dbbd169

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.9.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 382b00975dff2897342d0fdb69440fe10a5b05f951fd2cb952dfc61e3e60a563
MD5 2930e9fdded556a612d8bd19df21b30d
BLAKE2b-256 68142ca4995efae4b24702eea6697e6d38a07a57e3c2c885f4bb16af701da9ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.9.0-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 5463b9a8301192e545def5446b4571200d933d0a21fd324f224183758c06bd8c
MD5 e78824bfb4716822898974b26f1c12f9
BLAKE2b-256 5a974d7217eb3329a439ba0df8698a3c996a9472d71fd1a8b8d92e9558661140

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