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

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

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

Uploaded CPython 3.13macOS 15.0+ ARM64

pyharp-1.9.3-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.3-cp312-cp312-macosx_15_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

pyharp-1.9.3-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.3-cp311-cp311-macosx_15_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

pyharp-1.9.3-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.3-cp310-cp310-macosx_15_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

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

File metadata

File hashes

Hashes for pyharp-1.9.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ff5ed976ffee30db7b1a52dabdc040336c58f587efd9d69355cacb0bb869902a
MD5 3eec7b76a87e7a63f86d6b9e5e9db8ed
BLAKE2b-256 2fafb5f76db7efed12cb3cd932471dcd4bea6db3d88bd0f20f2e48b7671d5e14

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.9.3-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 ffbfbd26fcde36c6e16a9b6b6af40502142aabfb7f001f4cc43f7eb7a91f2ccb
MD5 ced4ce80a91a3890bc8ac125f3e09c60
BLAKE2b-256 d751c7a92f613721046b86f7cdf9bbcd713401f00caa7e3f24afff13280b222f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.9.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d91c44134106d6a8ffb2a0e3dd072f654fe1c1507b7776d2d76e4baf6244f7a3
MD5 3b56a40e4fc909335b67abd4ccf94cd4
BLAKE2b-256 8a18c70573471214c9c2f45d29683f98975d2176236cb8c525fa55eef6489454

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.9.3-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 2a5f6fcec149674e5cc769ac5ef991ce30fd1be1b3e48d870a81dca15e473911
MD5 311fbf9f1e64548ae43a098f45471e30
BLAKE2b-256 9a3c451faa81c257222eae1430f98e91b5e19c6adeaa65d2488495f56265ac07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.9.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ea5703d922ff5c536b5c1a76d5536209f72c34d0aedc35611ee2f300c5180316
MD5 7c54479e3f87dc63349fb335494cec30
BLAKE2b-256 ab714f565912ced3c79c9820557a683a0f0e06ea43dfecf5dccc6f0e6355550c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.9.3-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 86a9125c76b510ea0b721066f920fd4ed33e73a9540818e6027f079e36b7473c
MD5 c1116375f1726734523bb0d009e5d1fe
BLAKE2b-256 50cff3755cd6b1c59954645dc924ef3d12f4a9aaa7b3e26f98c1b7b4a9a57c38

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.9.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c7ecfd395845741be279391fff044db0e4363895973902da992b212a5fabe644
MD5 e4a4a6fe924d3b07e8e8a1928adbf68a
BLAKE2b-256 f9776a4c4dbed2a61afcaca795a3c15dd71b95bc114721d4cfdb55e10449268e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.9.3-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b4c4cad2ede9c57852cd931ddd8193d7d6c6dfe16afb9eefdea3e0e743511793
MD5 d9801fb33dba13849ebf2467dc88716e
BLAKE2b-256 7380d958d64615347558567cc95a85ade20bb542e1379a31aefb193d0f9aaefa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.9.3-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4819bc5a9490a07a3000642ac9b2a0d1ec7dc7d3013c60bcc30afa04a5a93f87
MD5 0cfe3b472fffd8396757b65c5186abc9
BLAKE2b-256 9c8f2a924a450b385f7906b4205653fc7d64215126a8c25a65a1607068aee679

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyharp-1.9.3-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 eec562a3af9a3bc2a5e133872886f8fab86cf75826724939e77c2062c428d50b
MD5 06fc34403f882f21406b09967fa4cd79
BLAKE2b-256 ae9e9faea14cf32d35498b254bd12539758a1dcc8234bfab8013089af8a0bb47

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