PythonicDISORT
PythonicDISORT: A Python reimplementation of the Discrete Ordinate Radiative Transfer package DISORT - Published in JOSS (2024)
Science Score: 100.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 7 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: sciencedirect.com, joss.theoj.org -
✓Committers with academic emails
1 of 3 committers (33.3%) from academic institutions -
✓Institutional organization owner
Organization ldeo-crew has institutional domain (crew.ldeo.columbia.edu) -
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Keywords from Contributors
Repository
Discrete Ordinates Solver for the (1D) Radiative Transfer Equation in a single or multi-layer plane-parallel atmosphere. Coded entirely in Python 3. Based on Stamnes' FORTRAN DISORT (see references in the Jupyter Notebook) and has its main features.
Basic Info
- Host: GitHub
- Owner: LDEO-CREW
- License: mit
- Language: Jupyter Notebook
- Default Branch: main
- Homepage: https://pythonic-disort.readthedocs.io/en/latest/
- Size: 9.89 MB
Statistics
- Stars: 21
- Watchers: 1
- Forks: 4
- Open Issues: 6
- Releases: 30
Topics
Metadata Files
README.md
Introduction
The PythonicDISORT package is a Discrete Ordinates Solver for the (1D) Radiative Transfer Equation in a plane-parallel, horizontally homogeneous atmosphere. It is coded entirely in Python 3 and is a reimplementation instead of a wrapper. While PythonicDISORT has been optimized for speed, it will naturally be slower than similar FORTRAN algorithms. On the other hand, PythonicDISORT should be easier to install, use, and modify than FORTRAN-based Discrete Ordinates Solvers.
PythonicDISORT is based on Stamnes' FORTRAN DISORT (see References, in particular [2, 3, 8]) and has its main features: multi-layer solver, delta-M scaling, Nakajima-Tanaka (NT) corrections, only flux option, direct beam source, isotropic internal source (blackbody emission), Dirichlet boundary conditions (diffuse flux boundary sources), Bi-Directional Reflectance Function (BDRF) for surface reflection, and interpolation with respect to polar angle. In addition, we added a subroutine to compute actinic fluxes to satisfy a user request, and integration with respect to optical depth was also added. Further feature requests as well as feedback are welcome.
You may contact me, Dion, through dh3065@columbia.edu.
The GitHub repository is https://github.com/LDEO-CREW/Pythonic-DISORT.
Accompanying Journal of Open Source Software paper: https://joss.theoj.org/papers/10.21105/joss.06442.
Documentation
https://pythonic-disort.readthedocs.io/en/latest/
Also see the accompanying Jupyter Notebook Pythonic-DISORT.ipynb in the docs directory
of our GitHub repository.
This Jupyter Notebook provides comprehensive documentation, suggested inputs, explanations,
mathematical derivations and verification tests.
It is highly recommended that new users read the non-optional parts of sections 1 and 2.
PyTest and examples of how to use PythonicDISORT
Not only are there verification tests in Pythonic-DISORT.ipynb,
most of the test problems in Stamnes' disotest.f90 (download DISORT 4.0.99 from http://www.rtatmocn.com/disort/) have also been recreated and enhanced.
In these tests, the solutions from PythonicDISORT are compared against solutions
from a F2PY-wrapped Stamnes' DISORT (version 4.0.99; wrapper inspired by https://github.com/kconnour/pyRT_DISORT). With PyTest installed, execute the console command pytest
in the pydisotest directory to run these tests. The pydisotest directory also contains Jupyter Notebooks to show the implementation of each test.
These notebooks double up as examples of how to use PythonicDISORT. The tests which have been implemented are:
- Test Problem 1: Isotropic Scattering
- Test Problem 2: Rayleigh Scattering, Beam Source
- Test Problem 3: Henyey-Greenstein Scattering
- Test Problem 4: Haze-L Scattering, Beam Source
- Test Problem 5: Cloud C.1 Scattering, Beam Source
- Test Problem 6: No Scattering, Increasingly Complex Sources (relevant for modeling longwave radiation)
- Test Problem 7: Absorption + Scattering + All Possible Sources, Lambertian and Hapke Surface Reflectivities (one layer)
- Test Problem 8: Absorbing / Isotropic-Scattering Medium (multiple layers)
- Test Problem 9: General Emitting / Absorbing / Scattering Medium (multiple layers)
- Test Problem 11: Single-Layer vs. Multiple Layers (no corresponding Jupyter Notebook)
Installation
- From PyPI:
pip install PythonicDISORT - From Conda-forge: (TODO: need to first publish on Conda-forge)
- By cloning repository:
pip install .in thePythonic-DISORTdirectory;pip install -r all_optional_dependencies.txtto install all optional dependencies (see Requirements to run PythonicDISORT)
Requirements to run PythonicDISORT
- Python 3.8+
numpy >= 1.8.0scipy >= 1.8.0- (OPTIONAL)
pytest >= 6.2.5(Required to use the commandpytest, see PyTest and examples of how to use PythonicDISORT)
(OPTIONAL) Additional requirements to run the Jupyter Notebook
autograd >= 1.5jupyter > 1.0.0notebook > 6.5.2matplotlib >= 3.6.0
In addition, a F2PY-wrapped Stamnes' DISORT, or equivalent, is required to properly run the last section (section 6).
Compatibility
The PythonicDISORT package should be system agnostic given its minimal dependencies and pure Python code. Everything in the repository was built and tested on Windows 11.
Acknowledgements
I acknowledge funding from NSF through the Learning the Earth with Artificial intelligence and Physics (LEAP) Science and Technology Center (STC) (Award #2019625) under which this package was initially created.
References
1) S. Chandrasekhar. 1960. Radiative Transfer.
2) Knut Stamnes and S-Chee Tsay and Warren Wiscombe and Kolf Jayaweera. 1988. Numerically stable algorithm for discrete-ordinate-method radiative transfer in multiple scattering and emitting layered media. http://opg.optica.org/ao/abstract.cfm?URI=ao-27-12-2502.
3) Stamnes, S.. 1999. LLLab disort website. http://www.rtatmocn.com/disort/.
4) Knut Stamnes and Paul Conklin. 1984. A new multi-layer discrete ordinate approach to radiative transfer in vertically inhomogeneous atmospheres. https://www.sciencedirect.com/science/article/pii/0022407384900311.
5) W. J. Wiscombe. 1977. The Delta–M Method: Rapid Yet Accurate Radiative Flux Calculations for Strongly Asymmetric Phase Functions. https://journals.ametsoc.org/view/journals/atsc/34/9/1520-046919770341408tdmrya20co2.xml.
6) J. H. Joseph and W. J. Wiscombe and J. A. Weinman. 1976. The Delta-Eddington Approximation for Radiative Flux Transfer. https://journals.ametsoc.org/view/journals/atsc/33/12/1520-046919760332452tdeafr20co2.xml.
7) Sykes, J. B.. 1951. Approximate Integration of the Equation of Transfer. https://doi.org/10.1093/mnras/111.4.377.
8) Stamnes, Knut and Tsay, Si-Chee and Wiscombe, Warren and Laszlo, Istvan and Einaudi, Franco. 2000. General Purpose Fortran Program for Discrete-Ordinate-Method Radiative Transfer in Scattering and Emitting Layered Media: An Update of DISORT.
9) Z. Lin and S. Stamnes and Z. Jin and I. Laszlo and S.-C. Tsay and W.J. Wiscombe and K. Stamnes. 2015. Improved discrete ordinate solutions in the presence of an anisotropically reflecting lower boundary: Upgrades of the DISORT computational tool. https://www.sciencedirect.com/science/article/pii/S0022407315000679.
10) Trefethen, L. N.. 1996. Finite difference and spectral methods for ordinary and partial differential equations. https://people.maths.ox.ac.uk/trefethen/pdetext.html.
11) Knut Stamnes. 1982. On the computation of angular distributions of radiation in planetary atmospheres. https://www.sciencedirect.com/science/article/pii/0022407382900966.
12) T. Nakajima and M. Tanaka. 1988. Algorithms for radiative intensity calculations in moderately thick atmospheres using a truncation approximation. https://www.sciencedirect.com/science/article/pii/0022407388900313.
13) Connour, Kyle and Wolff, Michael. 2020. pyRT_DISORT: A pre-processing front-end to help make DISORT simulations easier in Python. https://github.com/kconnour/pyRT_DISORT.
Owner
- Name: Clouds, Radiant Energy, and Water at Lamont-Doherty Earth Observatory
- Login: LDEO-CREW
- Kind: organization
- Location: United States of America
- Website: https://crew.ldeo.columbia.edu
- Repositories: 2
- Profile: https://github.com/LDEO-CREW
JOSS Publication
PythonicDISORT: A Python reimplementation of the Discrete Ordinate Radiative Transfer package DISORT
Authors
Tags
Radiative Transfer Discrete Ordinates Method Atmospheric Science Climate Models DISORTCitation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: PythonicDISORT
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Dion J. X.
family-names: Ho
email: dh3065@columbia.edu
affiliation: Columbia University, Department of Applied Physics and Applied Mathematics
orcid: 'https://orcid.org/0009-0000-5829-5081'
repository-code: 'https://github.com/LDEO-CREW/Pythonic-DISORT'
abstract: >-
PythonicDISORT is a Discrete Ordinates Solver for the (1D) Radiative Transfer
Equation in a single or multi-layer plane-parallel atmosphere.
It is coded entirely in Python 3 and is based on Stamnes'
FORTRAN DISORT (see references in the Jupyter Notebook)
and has its main features.
keywords:
- Python
- Radiative Transfer
- Discrete Ordinates Method
- Atmospheric Science
- Climate Science
- DISORT
license: MIT
date-released: 2023-05-30
GitHub Events
Total
- Create event: 18
- Release event: 8
- Issues event: 4
- Watch event: 8
- Delete event: 13
- Issue comment event: 6
- Push event: 39
- Pull request event: 18
- Fork event: 1
Last Year
- Create event: 18
- Release event: 8
- Issues event: 4
- Watch event: 8
- Delete event: 13
- Issue comment event: 6
- Push event: 39
- Pull request event: 18
- Fork event: 1
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Dion Ho Jia Xu | d****o@h****m | 94 |
| dependabot[bot] | 4****] | 10 |
| Robert Pincus | R****s@c****u | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 13
- Total pull requests: 22
- Average time to close issues: 6 months
- Average time to close pull requests: 11 days
- Total issue authors: 3
- Total pull request authors: 2
- Average comments per issue: 0.69
- Average comments per pull request: 0.32
- Merged pull requests: 10
- Bot issues: 0
- Bot pull requests: 21
Past Year
- Issues: 2
- Pull requests: 21
- Average time to close issues: N/A
- Average time to close pull requests: 12 days
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.33
- Merged pull requests: 9
- Bot issues: 0
- Bot pull requests: 21
Top Authors
Issue Authors
- dhjx1996 (15)
- RobertPincus (1)
- simonrp84 (1)
Pull Request Authors
- dependabot[bot] (33)
- RobertPincus (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 75 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 31
- Total maintainers: 1
pypi.org: pythonicdisort
Discrete Ordinates Solver for the (1D) Radiative Transfer Equation in a single or multi-layer atmosphere.
- Homepage: https://github.com/LDEO-CREW/Pythonic-DISORT
- Documentation: https://pythonicdisort.readthedocs.io/
- License: MIT License
-
Latest release: 1.0.3
published 9 months ago
