PythonicDISORT 1.7__tar.gz → 1.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PythonicDISORT
3
- Version: 1.7
3
+ Version: 1.9
4
4
  Summary: Discrete Ordinates Solver for the (1D) Radiative Transfer Equation in a single or multi-layer atmosphere.
5
5
  Author-email: Dion HO Jia Xu <dh3065@columbia.edu>
6
6
  Project-URL: Homepage, https://github.com/LDEO-CREW/Pythonic-DISORT
@@ -26,15 +26,15 @@ Requires-Dist: matplotlib>=3.6.0; extra == "notebook-dependencies"
26
26
  # Introduction
27
27
  The PythonicDISORT package is a Discrete Ordinates Solver for the (1D) Radiative Transfer Equation
28
28
  in a plane-parallel, horizontally homogeneous atmosphere.
29
- It is coded entirely in Python 3 and is a reimplementation instead of a wrapper.
30
- While PythonicDISORT has been optimized for speed, it will naturally be slower than similar FORTRAN algorithms.
31
- On the other hand, PythonicDISORT should be easier to install, use, and modify than FORTRAN-based Discrete Ordinates Solvers.
32
-
33
- PythonicDISORT is based on Stamnes' FORTRAN DISORT (see References, in particular [2, 3, 8]) and has its main features: multi-layer solver,
34
- delta-_M_ scaling, Nakajima-Tanaka (NT) corrections, only flux option, direct beam source, isotropic internal source (blackbody emission),
35
- Dirichlet boundary conditions (diffuse flux boundary sources), Bi-Directional Reflectance Function (BDRF) for surface reflection,
36
- and interpolation with respect to polar angle.
37
- 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.
29
+ It is coded entirely in Python 3 and is not a wrapper.
30
+ PythonicDISORT has been optimized for speed and **as of v1.8 is one-third the speed of FORTRAN DISORT while being NumPy and Scipy only**.
31
+ PythonicDISORT is intended to be easier to install, use, and modify than FORTRAN-based Discrete Ordinates Solvers.
32
+
33
+ PythonicDISORT is based on Stamnes' FORTRAN DISORT (see References, in particular [2, 3, 8]),
34
+ as of v1.8 the only **missing features** are $\delta$-M+ scaling (PythonicDISORT instead implements NT corrections),
35
+ the Chapman function for near-horizon solar angles, and pseudo-spherical corrections.
36
+ On the other hand, we added a subroutine to compute actinic fluxes to satisfy a user request,
37
+ added analytic integration with respect to optical depth, and improved the handling of singularities.
38
38
  Further feature requests as well as feedback are welcome.
39
39
 
40
40
  You may contact me, Dion, through dh3065@columbia.edu.
@@ -70,8 +70,11 @@ These notebooks double up as examples of how to use PythonicDISORT. The tests wh
70
70
  * Test Problem 7: Absorption + Scattering + All Possible Sources, Lambertian and Hapke Surface Reflectivities (one layer)
71
71
  * Test Problem 8: Absorbing / Isotropic-Scattering Medium (multiple layers)
72
72
  * Test Problem 9: General Emitting / Absorbing / Scattering Medium (multiple layers)
73
- * Test Problem 11: Single-Layer vs. Multiple Layers (no corresponding Jupyter Notebook)
74
- * Test Problem I: Antiderivative / integration functionality (no corresponding Jupyter Notebook)
73
+
74
+ (no corresponding Jupyter Notebook)
75
+ * Test Problem 11: Single-Layer vs. Multiple Layers
76
+ * Test Problem I: Antiderivative / integration functionality
77
+ * Test Problem NT: NT Correction + Interpolation functionality
75
78
 
76
79
  # Installation
77
80
 
@@ -97,7 +100,14 @@ is required to properly run the last section (section 6).
97
100
  ## Compatibility
98
101
 
99
102
  The PythonicDISORT package should be system agnostic given its minimal dependencies and pure Python code.
100
- Everything in the repository was built and tested on Windows 11.
103
+ Everything in the repository was built and tested on Windows 11. It is written and tuned for double-precision.
104
+
105
+ **Known issue:** if SciPy uses Intel MKL 2024.2.x (check with `conda list mkl`), Python may crash
106
+ when `NQuad >= 44` and `NLayers >= use_banded_solver_NLayers` (default 10).
107
+ This is a bug in MKL's banded solver `dgbsv`, which `scipy.linalg.solve_banded` calls, and we observed it on Windows 11 with an AMD CPU.
108
+ To avoid it, either set the environment variable `MKL_CBWR=COMPATIBLE` before starting Python
109
+ (for a conda environment: `conda env config vars set MKL_CBWR=COMPATIBLE`, then reactivate),
110
+ or install an unaffected MKL version (2024.1.0 and 2025.3.0 worked in our tests) or OpenBLAS.
101
111
 
102
112
  # Acknowledgements
103
113
 
@@ -4,15 +4,15 @@
4
4
  # Introduction
5
5
  The PythonicDISORT package is a Discrete Ordinates Solver for the (1D) Radiative Transfer Equation
6
6
  in a plane-parallel, horizontally homogeneous atmosphere.
7
- It is coded entirely in Python 3 and is a reimplementation instead of a wrapper.
8
- While PythonicDISORT has been optimized for speed, it will naturally be slower than similar FORTRAN algorithms.
9
- On the other hand, PythonicDISORT should be easier to install, use, and modify than FORTRAN-based Discrete Ordinates Solvers.
10
-
11
- PythonicDISORT is based on Stamnes' FORTRAN DISORT (see References, in particular [2, 3, 8]) and has its main features: multi-layer solver,
12
- delta-_M_ scaling, Nakajima-Tanaka (NT) corrections, only flux option, direct beam source, isotropic internal source (blackbody emission),
13
- Dirichlet boundary conditions (diffuse flux boundary sources), Bi-Directional Reflectance Function (BDRF) for surface reflection,
14
- and interpolation with respect to polar angle.
15
- 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.
7
+ It is coded entirely in Python 3 and is not a wrapper.
8
+ PythonicDISORT has been optimized for speed and **as of v1.8 is one-third the speed of FORTRAN DISORT while being NumPy and Scipy only**.
9
+ PythonicDISORT is intended to be easier to install, use, and modify than FORTRAN-based Discrete Ordinates Solvers.
10
+
11
+ PythonicDISORT is based on Stamnes' FORTRAN DISORT (see References, in particular [2, 3, 8]),
12
+ as of v1.8 the only **missing features** are $\delta$-M+ scaling (PythonicDISORT instead implements NT corrections),
13
+ the Chapman function for near-horizon solar angles, and pseudo-spherical corrections.
14
+ On the other hand, we added a subroutine to compute actinic fluxes to satisfy a user request,
15
+ added analytic integration with respect to optical depth, and improved the handling of singularities.
16
16
  Further feature requests as well as feedback are welcome.
17
17
 
18
18
  You may contact me, Dion, through dh3065@columbia.edu.
@@ -48,8 +48,11 @@ These notebooks double up as examples of how to use PythonicDISORT. The tests wh
48
48
  * Test Problem 7: Absorption + Scattering + All Possible Sources, Lambertian and Hapke Surface Reflectivities (one layer)
49
49
  * Test Problem 8: Absorbing / Isotropic-Scattering Medium (multiple layers)
50
50
  * Test Problem 9: General Emitting / Absorbing / Scattering Medium (multiple layers)
51
- * Test Problem 11: Single-Layer vs. Multiple Layers (no corresponding Jupyter Notebook)
52
- * Test Problem I: Antiderivative / integration functionality (no corresponding Jupyter Notebook)
51
+
52
+ (no corresponding Jupyter Notebook)
53
+ * Test Problem 11: Single-Layer vs. Multiple Layers
54
+ * Test Problem I: Antiderivative / integration functionality
55
+ * Test Problem NT: NT Correction + Interpolation functionality
53
56
 
54
57
  # Installation
55
58
 
@@ -75,7 +78,14 @@ is required to properly run the last section (section 6).
75
78
  ## Compatibility
76
79
 
77
80
  The PythonicDISORT package should be system agnostic given its minimal dependencies and pure Python code.
78
- Everything in the repository was built and tested on Windows 11.
81
+ Everything in the repository was built and tested on Windows 11. It is written and tuned for double-precision.
82
+
83
+ **Known issue:** if SciPy uses Intel MKL 2024.2.x (check with `conda list mkl`), Python may crash
84
+ when `NQuad >= 44` and `NLayers >= use_banded_solver_NLayers` (default 10).
85
+ This is a bug in MKL's banded solver `dgbsv`, which `scipy.linalg.solve_banded` calls, and we observed it on Windows 11 with an AMD CPU.
86
+ To avoid it, either set the environment variable `MKL_CBWR=COMPATIBLE` before starting Python
87
+ (for a conda environment: `conda env config vars set MKL_CBWR=COMPATIBLE`, then reactivate),
88
+ or install an unaffected MKL version (2024.1.0 and 2025.3.0 worked in our tests) or OpenBLAS.
79
89
 
80
90
  # Acknowledgements
81
91
 
@@ -8,7 +8,7 @@ dependencies = [
8
8
  "scipy>=1.8.0",
9
9
  ]
10
10
  name = "PythonicDISORT"
11
- version = "1.7"
11
+ version = "1.9"
12
12
  authors = [
13
13
  { name="Dion HO Jia Xu", email="dh3065@columbia.edu" },
14
14
  ]