Documentation | Installation | Gracklepy Installation | Usage Guide | Integration Guide | Contributing | Getting Help
Grackle is a chemistry and radiative cooling library for astrophysical simulations and models. The core library provides interfaces for C, C++ and Fortran simulation codes. The project also offers the Gracklepy package to provide Python bindings.
Features
Grackle provides functions to update chemistry species; solve radiative cooling and update internal energy; and calculate cooling time, temperature, pressure, and ratio of specific heats (γ). The library offers
two options for primordial chemistry and cooling. It can (i) evolve a non-equilibrium chemistry network OR (ii) use tabulated cooling rates calculated with the photo-ionization code, Cloudy.
tabulated metal cooling rates calculated with Cloudy.
photo-heating and photo-ionization (with optional self-shielding corrections) from either the Faucher-Giguere et al. (2009) or Haardt & Madau (2012) UV backgrounds.
support for user-provided arrays of volumetric and specific heating rates.
Our method paper provides more information.
Projects that provide out-of-the-box support for Grackle
Grackle is a popular tool (the method paper has over 300 citations) and has been used in a wide variety of calculations. Below, we list open source projects that provide out-of-the-box support for Grackle:
ChaNGa, Cholla, Enzo, Enzo-E, Gamer, Gasoline, GIZMO, Swift
We welcome PRs to add your simulation code (or python package) to this list.
Getting Grackle
Currently, the core Grackle library must be built from source. If you only need Grackle as a dependency of a simulation code and that code is built with CMake, then that code’s build system might be configured to automatically fetch, build, and link Grackle into the code for you (Enzo-E is an example of a code configured in this manner).
If you contribute to a simulation code, our Integration Guide provides guidance on simplifying the process (for you and your users) of configuring your code to use Grackle.
Building the Core Grackle Library From Source
Grackle requires a C99 compiler, a Fortran compiler, and HDF5 (1.6 or newer). On most platforms, compilation with the CMake build system (3.16 or newer) is as simple as:
cmake -B build # configure the build-directory
cmake --build ./build # perform the build
You can invoke the examples from within the build/examples directory (we’re adding support to let you run them from anywhere). To build Grackle as a shared lib, replace the first command with cmake -DBUILD_SHARED_LIBS=ON -Bbuild. To install Grackle, invoke cmake --install ./build [--prefix <prefix/path>] (the optional part lets you specify an install-path).
For more details (especially if you encounter any errors), see our comprehensive Installation Guide. It provides more context for inexperienced CMake users, describes additional configuration options (relevant if you encounter issues), and describes Grackle’s “classic” build-system.
Installing Gracklepy
The easiest way to get Gracklepy is to invoke the following command
~/grackle $ pip install gracklepy
This will download a pre-built version (called a wheel) of Gracklepy from PyPI. This should “just work,” unless you use a highly unusual system (if it fails please let us know).
Be aware that the vast majority of Grackle calculation requires Grackle’s data files. At this time you must download manually download these files (see the installation guide); we’re working on streamlining this in the future.
For more about installation (and downloading data files), see our Gracklepy installation guide .
NOTE: Gracklepy was formerly known as Pygrackle. If you previously installed Pygrackle, you should uninstall it before you install GracklePy.
Getting Started
To help you start using Grackle, we provide:
example Grackle programs written in C, C++, and Fortran
an Integration Guide (for linking Grackle)
a curated guide for the Gracklepy examples
Contributing
Grackle is a community project! We welcome patches, features, and bugfixes from any member of the community! For more details, please see our Constribution Guide and our Code of Conduct
Citing Grackle
If you use Grackle please cite it. More instructions are provided here.
Metadata
Release files for gracklepy 1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gracklepy-1.2.tar.gz | 348.2 kB | Details |
Built distributions (wheels)
Total release size: 53.5 MB
Release files / gracklepy-1.2.tar.gz
| Download URL | gracklepy-1.2.tar.gz |
|---|---|
| Size | 348.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9da5fc4a2ca2dc9739f6042f09d546fed583d6d0ac9cdfb5e4bfb9cadbbae969
|
|
BLAKE2b-256 checksum How to use checksums |
c07b2ff3458bd01cd6d6a1425bf9de7d88ef6c38df4787b3318783a0b8f371b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2025.
Transparency logRelease files / gracklepy-1.2-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | gracklepy-1.2-cp313-cp313-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 3.6 MB |
| Tags | CPython 3.13 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
88c8077b580b526d00975acda751a76376de48996952922d771e68c10afae3dd
|
|
BLAKE2b-256 checksum How to use checksums |
30aef3a592fc30bbab235986e161350f27d8f482a3e0fea943f134144a13cbcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2025.
Transparency logRelease files / gracklepy-1.2-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | gracklepy-1.2-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
6a5658431bd12504538fad469b8ac1d59cb32fe4fed5475ad845fa7c43499654
|
|
BLAKE2b-256 checksum How to use checksums |
31c9940e20661808e716443ba738be73795f1736d40c2a88fadba2179a09dc37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2025.
Transparency logRelease files / gracklepy-1.2-cp313-cp313-macosx_12_0_arm64.whl
| Download URL | gracklepy-1.2-cp313-cp313-macosx_12_0_arm64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.13 macOS 12.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2f24c093fcb98f48d1f291371caab85f6fc28c121a89a1cc05ece8bb81d1851c
|
|
BLAKE2b-256 checksum How to use checksums |
129a2055473ab07aaa47f7aa8074c76ed658a25374d7d7b9c6741cd9e70f47c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2025.
Transparency logRelease files / gracklepy-1.2-cp313-cp313-macosx_10_14_x86_64.whl
| Download URL | gracklepy-1.2-cp313-cp313-macosx_10_14_x86_64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | CPython 3.13 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
2059ab846204fbaa7337204f407ed8bfde18b8c051ef9c7acb42902c6e7bc2b9
|
|
BLAKE2b-256 checksum How to use checksums |
40dc5574c1f9f2839163bb5115b3f5885237e9c38c1dac85c63a5a5ed28d2274
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2025.
Transparency logRelease files / gracklepy-1.2-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | gracklepy-1.2-cp312-cp312-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 3.6 MB |
| Tags | CPython 3.12 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
3dc3cb239a7a5b8fc02d8d7d744d80100c412bd14d320a5a79de1ed50f51f33c
|
|
BLAKE2b-256 checksum How to use checksums |
fc21d268794a54cc4c08142334ee571c8df3bb4c6ebc27863cc363b764462e13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2025.
Transparency logRelease files / gracklepy-1.2-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | gracklepy-1.2-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
28f138c1c5f8d1f846e37079569f6c80f55a1f1849b63eebd0d14aa3897aaa0f
|
|
BLAKE2b-256 checksum How to use checksums |
1b4f5a0b2ec07541145e6faca84fc4d84d090e4f1206adfd6c8913672aea331a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2025.
Transparency logRelease files / gracklepy-1.2-cp312-cp312-macosx_12_0_arm64.whl
| Download URL | gracklepy-1.2-cp312-cp312-macosx_12_0_arm64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.12 macOS 12.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
3ec0c4ba20e055d22778bc2746d2f8ef158702b555d1d82781e930fcb8b90d2b
|
|
BLAKE2b-256 checksum How to use checksums |
8d741cb8072a71a14e24eafc292a1f2b90f92ca53502e42e0a19de4551c3a3a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2025.
Transparency logRelease files / gracklepy-1.2-cp312-cp312-macosx_10_14_x86_64.whl
| Download URL | gracklepy-1.2-cp312-cp312-macosx_10_14_x86_64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | CPython 3.12 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
3fc9e4d980ce728b289165f3901c9bbb9b107e16e2a22ad6195e1f95d0704cfb
|
|
BLAKE2b-256 checksum How to use checksums |
4172efe480d11b160f84be6b0d59c171530a452da4614974067d16c1e7592e6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2025.
Transparency logRelease files / gracklepy-1.2-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | gracklepy-1.2-cp311-cp311-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 3.6 MB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
b7fdaa85e9beb67387887fe3d3b2453f9826474a341555d5b3eb1aff0b19f690
|
|
BLAKE2b-256 checksum How to use checksums |
43af6e4cedead489e5caacbd91195038d5892b6b1e0978b02726e71c8a6b44cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2025.
Transparency logRelease files / gracklepy-1.2-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | gracklepy-1.2-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
e6c92b762d26cf185148d0af17134ce634f69ff1fb2c5fd071e2e7f66b976e6e
|
|
BLAKE2b-256 checksum How to use checksums |
88af02090b3a1777639244fecba8946c0096b1746c0ae78583e76ac5a55d28f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2025.
Transparency logRelease files / gracklepy-1.2-cp311-cp311-macosx_12_0_arm64.whl
| Download URL | gracklepy-1.2-cp311-cp311-macosx_12_0_arm64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.11 macOS 12.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f562b1cb0fd245962a2fe97f01ef87c05f55e96dd85b38221c72862368ac3562
|
|
BLAKE2b-256 checksum How to use checksums |
488e30ec48e5217d0ed55eda808ca346294fb1363bc99ff66fd4edb2991667f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2025.
Transparency logRelease files / gracklepy-1.2-cp311-cp311-macosx_10_14_x86_64.whl
| Download URL | gracklepy-1.2-cp311-cp311-macosx_10_14_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.11 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
264d4218633dc426a88ff27ad05eddc7e0527aa18ee7b766738427ca24618f7c
|
|
BLAKE2b-256 checksum How to use checksums |
d8d4a702d791f7774bae68a2283db16e79365c8ba6e6d6325b03bfcf6aa2a21a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2025.
Transparency logRelease files / gracklepy-1.2-cp310-cp310-musllinux_1_2_x86_64.whl
| Download URL | gracklepy-1.2-cp310-cp310-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 3.6 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
da29539c7b011f7970542f65556cd6337c0d9050ed83f7fb42289549602b9d6b
|
|
BLAKE2b-256 checksum How to use checksums |
37d685b015489bd833225bb9773dd1e36bf9dde51bed9f7c12043a8752b160c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2025.
Transparency logRelease files / gracklepy-1.2-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | gracklepy-1.2-cp310-cp310-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ac7625978204e789f31261a5d42cbf99efc83d1bb54e00f9e2108835b66e4f1b
|
|
BLAKE2b-256 checksum How to use checksums |
7c2e1e9550fb9814fd27cde96b452fd81d4a88bfa7cf09107d0619af4bc727e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2025.
Transparency logRelease files / gracklepy-1.2-cp310-cp310-macosx_12_0_arm64.whl
| Download URL | gracklepy-1.2-cp310-cp310-macosx_12_0_arm64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.10 macOS 12.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e5af38dee8735bb1b749c47972e6c057510b548b7bd854a44809eda81c017fd6
|
|
BLAKE2b-256 checksum How to use checksums |
f11056bee783d8337ba7c610ed4494897e22cd88dcd38b909c473a24f5cbfa5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2025.
Transparency logRelease files / gracklepy-1.2-cp310-cp310-macosx_10_14_x86_64.whl
| Download URL | gracklepy-1.2-cp310-cp310-macosx_10_14_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.10 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
29e8e92c9415bfa5dc07ff0991e5bb38b49422b77d3ead4819d117f9c2c78e80
|
|
BLAKE2b-256 checksum How to use checksums |
0c7116dd0af1655b8269b59748fc3acacb313541b9b88c0e8dcd52114fecdae7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2025.
Transparency log