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

Uploaded CPython 3.13macOS 15.0+ ARM64

pyharp-1.8.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (24.4 MB view details)

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

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

Uploaded CPython 3.12macOS 15.0+ ARM64

pyharp-1.8.6-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.6-cp311-cp311-macosx_15_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

pyharp-1.8.6-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.6-cp310-cp310-macosx_15_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

pyharp-1.8.6-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (24.2 MB view details)

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

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

File metadata

File hashes

Hashes for pyharp-1.8.6-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c3008b5c8659ec039df56ffa5f627e20deb25630e1a4e2a43f9abe73fe4f242a
MD5 2113097723130cc59dcbd338f08aaa61
BLAKE2b-256 47df8407440f3cece57f78db39ff51112bf23bba76d1fb6fd4d0f790d2857126

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.6-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 a1b60404c85dc3f1218e5fbfcd2ba7c70a11987243607032c04096b0ba483073
MD5 497f2133df8729e8b53d4b8d73471c52
BLAKE2b-256 89f1f7fc3ea3043ebc0eb37d45777c601f79f9457e6ccabddc5e6920978cee92

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 041cad6016adee31d3586b124fe3f75d91c01a9257af0363647f6da070446568
MD5 60254fe474ea25cafbc02b8668ff241c
BLAKE2b-256 d8bb021f97cf772a5a93e94576c1f465f5542503b626ddefb098043a35a0dac2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.6-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 e447edded3f7088182f7d6a3abf952429be52534d2cace02752c6d83252f440b
MD5 31f7daf54ba53f8d6f9401b406399586
BLAKE2b-256 0de6393edd0fee72f62133eed3a94f85f157c88180aba574fe69ad433003e582

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d3ea0e8951bfcbb9a7272aac7c42cee1c14c2c350bda7b5c8289774d3e3e9b55
MD5 64d3b30335f6638bfaee28b5b90b701c
BLAKE2b-256 9068a8f54af2d1957bf701da9283785cc2179847c337fc3898f15ba7b6038d70

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.6-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 8c921fe67315c0da41941d23e62a39a2e7d20b5eb34cb167338e2e14a93e83b8
MD5 c5a63638cdafbe44b492f454b1e353ee
BLAKE2b-256 f6b4a94dfbe4af8d3c9a5c3d172beda6ea076005ba68b4e0e134976af37acf21

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.6-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 06752fd14e6b8f91d1c0f516948ad56c168d6d8f8b98145d4ddc9c3048356188
MD5 ab5ed0e962538577a270f06d9bd3b6ec
BLAKE2b-256 dffe45deef3faff97584e31700cec03659c49845dc6c0ca38b8da80e7fa6053d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.6-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 4fea41dabf388b2130fddf33f6e4895e1ca3da4a2f0a679a3abd2d21c042eb08
MD5 a4abb2314932d86101c542b44ad1b224
BLAKE2b-256 9a3a443fe5a6bf27843f3b74130f5dc9f06d4229b08791af6abf13dcb4a23e6f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.6-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7f563c89da2d9845abd7ca443fd0136548d3e6e68fab6c9b727f92eb8263f555
MD5 01b8a1c669c5bcd6504e24dd6056301a
BLAKE2b-256 d7a355d28c84d5d12e91af9b186be088e47900d6c012c0ea13157ee03cc498af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.6-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 1383e04f852b6833244fbd8925f453edcf380ac1dd891eb177080c9df3aa1de5
MD5 e8b8553c4b3c5589e88abb76af04d882
BLAKE2b-256 a620ec74d363bc67173d87c7b420a27e944f1d5ae0a8584edd13be58d5585532

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