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.5-cp313-cp313-manylinux_2_27_x86_64.whl (26.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64

pyharp-1.9.5-cp311-cp311-manylinux_2_27_x86_64.whl (26.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64

pyharp-1.9.5-cp310-cp310-manylinux_2_27_x86_64.whl (26.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64

pyharp-1.9.5-cp39-cp39-manylinux_2_27_x86_64.whl (26.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64

File details

Details for the file pyharp-1.9.5-cp313-cp313-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-1.9.5-cp313-cp313-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 06f7d5da449b09514142ea33cfd15873bb080a79220ae217759a5f1db26ad9e6
MD5 3f050dcee3b5cc5bf4e8a1e47b79bb4a
BLAKE2b-256 aae05aee1c63858c816608b48e71a4d0c2b5c5f302e8540d6e6da051a05661f4

See more details on using hashes here.

File details

Details for the file pyharp-1.9.5-cp312-cp312-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-1.9.5-cp312-cp312-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 79681dad05d27fe526bb17b7674f0a119b7d8f455e1a8a9ea6ced611d9b21698
MD5 e5bfd458d2525311fc04b10dd1bad4fa
BLAKE2b-256 e2957df9f503aef9b6c959cbec2fabd8d48b30088aaa12846e0cd833597cbb6b

See more details on using hashes here.

File details

Details for the file pyharp-1.9.5-cp311-cp311-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-1.9.5-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 ec338deb7e88ba2e5b9579cdc5ee9d1ea1d45a8216cc63262b468cc88bf1fe1f
MD5 416e65f8cf162aa8e1b6eab78f03c144
BLAKE2b-256 1b95839f84c1648134e5e6aad1d76a07f2aed42853d3739e7095d8da270bd231

See more details on using hashes here.

File details

Details for the file pyharp-1.9.5-cp310-cp310-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-1.9.5-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 fa987f3c8acd20f5a711af21e77f8e18ebe2a8b815c221c9a131af15e9539a9a
MD5 567ea9520fe22c8c9a47b85451288bbb
BLAKE2b-256 eb55bad2a885b0b7a5acd9ab459ee56dfedb5853faf54d7210ea2836d3111022

See more details on using hashes here.

File details

Details for the file pyharp-1.9.5-cp39-cp39-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for pyharp-1.9.5-cp39-cp39-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 aef8e9206a0ea3f7c91f68f900e4314a1ac40e12335b63d236f642bf4a359910
MD5 3d7250dc96a364dce4f9f47c46270d52
BLAKE2b-256 708bd4b2240d38934fbdc96416286a2c2d7a920e138969e371f9c6052b03af15

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