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

Uploaded CPython 3.13macOS 15.0+ ARM64

pyharp-1.8.7-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (26.8 MB view details)

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

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

Uploaded CPython 3.12macOS 15.0+ ARM64

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

Uploaded CPython 3.11macOS 15.0+ ARM64

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

Uploaded CPython 3.10macOS 15.0+ ARM64

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

File metadata

File hashes

Hashes for pyharp-1.8.7-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ad325b1aa2c31c12a392e6fba80fc3410876a02126aeebbd1b81f3cdd0655830
MD5 7ec18d10f911ba378e9cf577f6c1708b
BLAKE2b-256 42dd273ebd4f983b88ee9d760b4e75b3c535cec1770b1188326dc6b2ea67e13b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.7-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 ecabd97446ccfc49b50c52440c5b4d8a3e571df3b9b2874b2a37180bcc839448
MD5 973e4bbc513a30006ab5d86bb429228d
BLAKE2b-256 18f7a2f6512c66009a31ede3764a972fd5c87a78df90be0a8bb59731e6820d8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.7-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 837efa061ad6f57b6ccf3d775bb68db61a0d46b549487021052554c9335309b2
MD5 47eee55389695efd4d7f980a4fb5aa91
BLAKE2b-256 ac9241cc7f3e5a14928137adaa01011ef317160c69b58b17e5a356985bcbe71b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.7-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 912f508e48e41231cbc928f4b84006b682fdc96f4ad970c8c4c1a24668647954
MD5 02696d296f129812fd6b8dc0d739d302
BLAKE2b-256 553fdd33d16fa9fe647b18469226fe25d8883f75dc7541492d58a567ba3dfee5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.7-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 93c49c791e19e2f70d9097fd25692403ad73e8dc6ef2e9e8854acfd843063ad4
MD5 6b61173b45187b8f5e92ed46ba0042cb
BLAKE2b-256 21b249c0985a45f6417f59369d1143f31c3f7e5b6bdfd00bd327454e9cdb5afc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.7-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 130c109d06618fe652cf6806c1cf9e3bff0869c9496c78823bcbac19384e29c5
MD5 1f9a705a4830a7a513884ad3e11f8fc7
BLAKE2b-256 3d761f286b84caa25dd2d7f3af6c32036f56bfaba17dfac00bd3b8cad6bf5772

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.7-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5bd56d6580da78eeba6b4de9ec958c17f6badcc5bfc4b07f7fed1de950738248
MD5 6c555df6a6a2a23ab17bedca6c9a453c
BLAKE2b-256 0b3e753199ea8edb4982e41a85f5d1f065512f8c603a5f5b14cc05e74d837aa1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.7-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 65bd0a8ede9b75c1fcdef0b3154c1eac50702e932534f0820e1ef94accee8e49
MD5 dfad1b6d8b3c06f633097bf3e8892a71
BLAKE2b-256 073ad9a183eee61a818f96290ec390952d425ed73bf04bc1e55cca34eb67883a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.7-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4750c4b437a5e9d75cbbf038fd10fa40781c1bf96bf4ae8f27668d555c46a008
MD5 e992f7acb769c2195a64b0ddeee65bff
BLAKE2b-256 dd037a760d1295fe8b6133c7a64c24752b9af8e3f4f58dbd2c7967fca6c69554

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.8.7-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 9e2480fa0cdbf977092d4feafba8d9f389ff55f050326f3896f1e86387d1f4f1
MD5 d2cff967c9727fe28e34348b5d8eb129
BLAKE2b-256 d79e6219ccf9a7047acebb62369df643853968a90aa5e5648bb55a105c7e8001

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