siim-lem 0.9.4__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.
Files changed (133) hide show
  1. siim_lem-0.9.4/LICENSE +21 -0
  2. siim_lem-0.9.4/MANIFEST.in +23 -0
  3. siim_lem-0.9.4/PKG-INFO +117 -0
  4. siim_lem-0.9.4/README.md +66 -0
  5. siim_lem-0.9.4/docs/api/analytical.md +37 -0
  6. siim_lem-0.9.4/docs/api/core.md +123 -0
  7. siim_lem-0.9.4/docs/api/fastscape.md +35 -0
  8. siim_lem-0.9.4/docs/api/index.md +44 -0
  9. siim_lem-0.9.4/docs/api/model1d.md +15 -0
  10. siim_lem-0.9.4/docs/api/model2d.md +77 -0
  11. siim_lem-0.9.4/docs/api/support.md +21 -0
  12. siim_lem-0.9.4/docs/conf.py +66 -0
  13. siim_lem-0.9.4/docs/figures/ice_surface_registration.pdf +0 -0
  14. siim_lem-0.9.4/docs/figures/ice_surface_registration.png +0 -0
  15. siim_lem-0.9.4/docs/figures/make_ice_surface_registration_figure.py +252 -0
  16. siim_lem-0.9.4/docs/getting_started/first_1d_run.md +50 -0
  17. siim_lem-0.9.4/docs/getting_started/first_2d_run.md +36 -0
  18. siim_lem-0.9.4/docs/getting_started/install.md +70 -0
  19. siim_lem-0.9.4/docs/guides/concepts.md +71 -0
  20. siim_lem-0.9.4/docs/guides/configuring_a_run.md +142 -0
  21. siim_lem-0.9.4/docs/guides/fastscape_processes.md +78 -0
  22. siim_lem-0.9.4/docs/guides/outputs_and_io.md +189 -0
  23. siim_lem-0.9.4/docs/guides/parameter_reference.md +203 -0
  24. siim_lem-0.9.4/docs/index.md +74 -0
  25. siim_lem-0.9.4/docs/references.bib +52 -0
  26. siim_lem-0.9.4/docs/references.md +5 -0
  27. siim_lem-0.9.4/docs/requirements.txt +18 -0
  28. siim_lem-0.9.4/pyproject.toml +105 -0
  29. siim_lem-0.9.4/setup.cfg +4 -0
  30. siim_lem-0.9.4/siim/__init__.py +58 -0
  31. siim_lem-0.9.4/siim/_core/__init__.py +1 -0
  32. siim_lem-0.9.4/siim/_core/carve.py +281 -0
  33. siim_lem-0.9.4/siim/_core/diffusion.py +52 -0
  34. siim_lem-0.9.4/siim/_core/driver.py +264 -0
  35. siim_lem-0.9.4/siim/_core/eroders.py +723 -0
  36. siim_lem-0.9.4/siim/_core/flexure.py +143 -0
  37. siim_lem-0.9.4/siim/_core/hillslope.py +189 -0
  38. siim_lem-0.9.4/siim/_core/outputs.py +65 -0
  39. siim_lem-0.9.4/siim/_core/params.py +28 -0
  40. siim_lem-0.9.4/siim/_core/router.py +80 -0
  41. siim_lem-0.9.4/siim/_core/routing.py +641 -0
  42. siim_lem-0.9.4/siim/_core/skeleton.py +802 -0
  43. siim_lem-0.9.4/siim/_core/solvers.py +685 -0
  44. siim_lem-0.9.4/siim/_core/step.py +813 -0
  45. siim_lem-0.9.4/siim/_output.py +24 -0
  46. siim_lem-0.9.4/siim/analytical/__init__.py +42 -0
  47. siim_lem-0.9.4/siim/analytical/core.py +392 -0
  48. siim_lem-0.9.4/siim/analytical/profiles.py +1206 -0
  49. siim_lem-0.9.4/siim/analytical/regime.py +731 -0
  50. siim_lem-0.9.4/siim/analytical/steady_state.py +805 -0
  51. siim_lem-0.9.4/siim/constants.py +288 -0
  52. siim_lem-0.9.4/siim/escarpment.py +221 -0
  53. siim_lem-0.9.4/siim/fastscape/__init__.py +232 -0
  54. siim_lem-0.9.4/siim/fastscape/forcing.py +110 -0
  55. siim_lem-0.9.4/siim/fastscape/processes.py +915 -0
  56. siim_lem-0.9.4/siim/forcing.py +119 -0
  57. siim_lem-0.9.4/siim/plotting/__init__.py +29 -0
  58. siim_lem-0.9.4/siim/plotting/_render.py +1328 -0
  59. siim_lem-0.9.4/siim/plotting/basins.py +402 -0
  60. siim_lem-0.9.4/siim/plotting/diagnostics.py +87 -0
  61. siim_lem-0.9.4/siim/plotting/landscape.py +1138 -0
  62. siim_lem-0.9.4/siim/plotting/maps.py +163 -0
  63. siim_lem-0.9.4/siim/plotting/profiles.py +349 -0
  64. siim_lem-0.9.4/siim/siim1d.py +2304 -0
  65. siim_lem-0.9.4/siim/siim2d.py +1676 -0
  66. siim_lem-0.9.4/siim/tests/__init__.py +0 -0
  67. siim_lem-0.9.4/siim/tests/_kernel_adapters.py +134 -0
  68. siim_lem-0.9.4/siim/tests/conftest.py +45 -0
  69. siim_lem-0.9.4/siim/tests/data/reference/A_dinf_flexoff.npz +0 -0
  70. siim_lem-0.9.4/siim/tests/data/reference/A_dinf_flexon.npz +0 -0
  71. siim_lem-0.9.4/siim/tests/data/reference/A_single_flexoff.npz +0 -0
  72. siim_lem-0.9.4/siim/tests/data/reference/A_single_flexon.npz +0 -0
  73. siim_lem-0.9.4/siim/tests/data/reference/B_dinf_blstep.npz +0 -0
  74. siim_lem-0.9.4/siim/tests/data/reference/B_dinf_flexoff.npz +0 -0
  75. siim_lem-0.9.4/siim/tests/data/reference/B_dinf_flexon.npz +0 -0
  76. siim_lem-0.9.4/siim/tests/data/reference/B_single_blstep.npz +0 -0
  77. siim_lem-0.9.4/siim/tests/data/reference/B_single_flexoff.npz +0 -0
  78. siim_lem-0.9.4/siim/tests/data/reference/B_single_flexon.npz +0 -0
  79. siim_lem-0.9.4/siim/tests/data/reference/C_dinf_flexoff.npz +0 -0
  80. siim_lem-0.9.4/siim/tests/data/reference/C_dinf_flexon.npz +0 -0
  81. siim_lem-0.9.4/siim/tests/data/reference/C_single_flexoff.npz +0 -0
  82. siim_lem-0.9.4/siim/tests/data/reference/C_single_flexon.npz +0 -0
  83. siim_lem-0.9.4/siim/tests/data/reference/capture_snapshots.py +466 -0
  84. siim_lem-0.9.4/siim/tests/data/reference/router_diag.npz +0 -0
  85. siim_lem-0.9.4/siim/tests/data/reference/router_glaciated_modeC.npz +0 -0
  86. siim_lem-0.9.4/siim/tests/data/reference/router_xtilt.npz +0 -0
  87. siim_lem-0.9.4/siim/tests/test_adapter_conformance.py +114 -0
  88. siim_lem-0.9.4/siim/tests/test_analytical_oracle_router.py +44 -0
  89. siim_lem-0.9.4/siim/tests/test_analytical_profiles.py +667 -0
  90. siim_lem-0.9.4/siim/tests/test_base_level.py +624 -0
  91. siim_lem-0.9.4/siim/tests/test_baseline.py +367 -0
  92. siim_lem-0.9.4/siim/tests/test_carve_width.py +438 -0
  93. siim_lem-0.9.4/siim/tests/test_channel_cache.py +73 -0
  94. siim_lem-0.9.4/siim/tests/test_coulomb_wall.py +84 -0
  95. siim_lem-0.9.4/siim/tests/test_d8_dinf_cardinal_parity.py +47 -0
  96. siim_lem-0.9.4/siim/tests/test_d8_receiver_parity.py +199 -0
  97. siim_lem-0.9.4/siim/tests/test_denudation.py +323 -0
  98. siim_lem-0.9.4/siim/tests/test_dinf_routing.py +379 -0
  99. siim_lem-0.9.4/siim/tests/test_driver_vs_xsimlab.py +187 -0
  100. siim_lem-0.9.4/siim/tests/test_extracted_funcs_pure.py +256 -0
  101. siim_lem-0.9.4/siim/tests/test_field_forcing.py +72 -0
  102. siim_lem-0.9.4/siim/tests/test_flexure_twin.py +227 -0
  103. siim_lem-0.9.4/siim/tests/test_forcing_contract.py +173 -0
  104. siim_lem-0.9.4/siim/tests/test_h_diffusion_parity.py +153 -0
  105. siim_lem-0.9.4/siim/tests/test_hillslope_diffusion_twin.py +85 -0
  106. siim_lem-0.9.4/siim/tests/test_hillslope_tridiagonal.py +113 -0
  107. siim_lem-0.9.4/siim/tests/test_ice_display.py +618 -0
  108. siim_lem-0.9.4/siim/tests/test_lake_fill_1d.py +68 -0
  109. siim_lem-0.9.4/siim/tests/test_landscape_plot.py +439 -0
  110. siim_lem-0.9.4/siim/tests/test_limit_cycle_smoke.py +50 -0
  111. siim_lem-0.9.4/siim/tests/test_melt_debt.py +200 -0
  112. siim_lem-0.9.4/siim/tests/test_mode_c.py +111 -0
  113. siim_lem-0.9.4/siim/tests/test_mode_names.py +199 -0
  114. siim_lem-0.9.4/siim/tests/test_outflow_bc.py +459 -0
  115. siim_lem-0.9.4/siim/tests/test_output_paths.py +24 -0
  116. siim_lem-0.9.4/siim/tests/test_parallel_erode.py +53 -0
  117. siim_lem-0.9.4/siim/tests/test_parameter_contracts.py +38 -0
  118. siim_lem-0.9.4/siim/tests/test_persistence.py +171 -0
  119. siim_lem-0.9.4/siim/tests/test_plotting_robustness.py +146 -0
  120. siim_lem-0.9.4/siim/tests/test_precip_timeseries.py +151 -0
  121. siim_lem-0.9.4/siim/tests/test_public_api.py +82 -0
  122. siim_lem-0.9.4/siim/tests/test_reference_snapshots.py +91 -0
  123. siim_lem-0.9.4/siim/tests/test_regime.py +392 -0
  124. siim_lem-0.9.4/siim/tests/test_router_contract.py +167 -0
  125. siim_lem-0.9.4/siim/tests/test_routing_relax.py +174 -0
  126. siim_lem-0.9.4/siim/tests/test_solver_bcs.py +789 -0
  127. siim_lem-0.9.4/siim/tests/test_standalone_no_fastscape.py +58 -0
  128. siim_lem-0.9.4/siim/tests/test_trunk_surface.py +242 -0
  129. siim_lem-0.9.4/siim_lem.egg-info/PKG-INFO +117 -0
  130. siim_lem-0.9.4/siim_lem.egg-info/SOURCES.txt +131 -0
  131. siim_lem-0.9.4/siim_lem.egg-info/dependency_links.txt +1 -0
  132. siim_lem-0.9.4/siim_lem.egg-info/requires.txt +29 -0
  133. siim_lem-0.9.4/siim_lem.egg-info/top_level.txt +1 -0
siim_lem-0.9.4/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Eric Deal
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,23 @@
1
+ # Keep direct development-checkout source distributions on the same public
2
+ # boundary as the release exporter. Include public documentation, package
3
+ # tests, and their reference data even before a newly added file is committed.
4
+ recursive-include docs *.bib *.md *.pdf *.png *.py *.txt
5
+ recursive-include siim/tests *.npz *.py
6
+
7
+ prune _memory
8
+ prune docs/dev
9
+ prune docs/_build
10
+ prune escarpment_code
11
+ prune notebooks
12
+ prune paper_drafts
13
+ prune siim/tests/data/reference_local
14
+ prune tools
15
+ prune .github
16
+
17
+ exclude CLAUDE.md
18
+ exclude for_thea.zip
19
+
20
+ global-exclude .DS_Store
21
+ global-exclude *.py[cod]
22
+ global-exclude *.nb[ci]
23
+ global-exclude __pycache__
@@ -0,0 +1,117 @@
1
+ Metadata-Version: 2.4
2
+ Name: siim-lem
3
+ Version: 0.9.4
4
+ Summary: Sliding Ice Incision Model (siim): coupled glacial-fluvial landscape evolution.
5
+ Author: Eric Deal
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/ericdealgeomorph/siim
8
+ Project-URL: Documentation, https://github.com/ericdealgeomorph/siim/tree/main/docs
9
+ Project-URL: Repository, https://github.com/ericdealgeomorph/siim
10
+ Project-URL: Issues, https://github.com/ericdealgeomorph/siim/issues
11
+ Project-URL: Changelog, https://github.com/ericdealgeomorph/siim/blob/main/CHANGELOG.md
12
+ Keywords: geomorphology,glacier,landscape evolution,numerical modeling
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Topic :: Scientific/Engineering
22
+ Classifier: Topic :: Scientific/Engineering :: Physics
23
+ Requires-Python: >=3.12
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: numpy
27
+ Requires-Dist: scipy
28
+ Requires-Dist: numba
29
+ Requires-Dist: matplotlib
30
+ Requires-Dist: tqdm
31
+ Requires-Dist: xarray
32
+ Requires-Dist: pandas
33
+ Provides-Extra: fastscape
34
+ Requires-Dist: fastscape; extra == "fastscape"
35
+ Requires-Dist: xarray-simlab; extra == "fastscape"
36
+ Provides-Extra: test
37
+ Requires-Dist: pytest; extra == "test"
38
+ Requires-Dist: mpmath; extra == "test"
39
+ Provides-Extra: docs
40
+ Requires-Dist: sphinx>=8; extra == "docs"
41
+ Requires-Dist: furo; extra == "docs"
42
+ Requires-Dist: myst-nb; extra == "docs"
43
+ Requires-Dist: sphinxcontrib-bibtex; extra == "docs"
44
+ Requires-Dist: ipykernel; extra == "docs"
45
+ Provides-Extra: release
46
+ Requires-Dist: build; extra == "release"
47
+ Requires-Dist: twine; extra == "release"
48
+ Provides-Extra: dev-parity
49
+ Requires-Dist: fastscapelib; extra == "dev-parity"
50
+ Dynamic: license-file
51
+
52
+ # siim — Sliding Ice Incision Model
53
+
54
+ Coupled glacial–fluvial landscape evolution. `siim` models bedrock incision by
55
+ sliding ice and rivers together, resolving how glaciers and channels jointly
56
+ shape mountain topography over geologic time. It ships three coordinated front
57
+ ends over one physical core:
58
+
59
+ - **`siim.siim1d`** — fast 1D longitudinal-profile model
60
+ - **`siim.siim2d`** — full 2D landscape-evolution model (in-house driver, D8/D-inf
61
+ routing, FFT flexure, ADI hillslope diffusion)
62
+ - **`siim.analytical`** — closed-form steady-state profiles and regime diagrams
63
+ from the underlying theory
64
+
65
+ Python with NumPy/SciPy/Numba — no Fortran and no framework lock-in for the
66
+ standalone models.
67
+
68
+ ## Install
69
+
70
+ ```bash
71
+ pip install siim-lem
72
+ ```
73
+
74
+ `siim` runs the full 1D and 2D models standalone on NumPy 2. An optional adapter
75
+ lets you drive the 2D model through [fastscape](https://fastscape.org)/xsimlab
76
+ instead of the built-in driver; that stack is conda-only:
77
+
78
+ ```bash
79
+ conda env create -f environment.yml # optional fastscape adapter
80
+ ```
81
+
82
+ Requires Python ≥ 3.12.
83
+
84
+ ## Quickstart
85
+
86
+ ```python
87
+ from siim import siim2d
88
+
89
+ params = {
90
+ 'U': 1e-3, # rock uplift rate (m/yr)
91
+ 'zELA': 1500, 'P': 2, 'beta': 1e-2, # climate: ELA + mass balance
92
+ 'ce': 2e-5, 'Ko': 1e-6, # glacial + fluvial erodibility
93
+ 'Lx': 100e3, 'Ly': 50e3, # domain size (m)
94
+ 'nx': 201, 'ny': 101, # grid
95
+ 'T': 5e6, 'nt': 501, 'nt_out': 51, # 5 Myr run
96
+ 'seed': 0, # reproducible initial relief noise
97
+ 'mode': 'C', # bed-memory + sub-grid glacier carving
98
+ }
99
+
100
+ model = siim2d.siim(params)
101
+ model.run()
102
+ model.plot.landscape(i=-1) # final topography
103
+ ```
104
+
105
+ The 1D model (`from siim.siim1d import siim`) and the analytical solutions
106
+ (`from siim.analytical import GeneralProfile`) follow the same shape. See the
107
+ [documentation](https://github.com/ericdealgeomorph/siim/tree/main/docs) for the full parameter reference,
108
+ guides, and the theory background.
109
+
110
+ ## Citing
111
+
112
+ If you use `siim`, please cite it via [`CITATION.cff`](CITATION.cff). A methods
113
+ paper is in preparation.
114
+
115
+ ## License
116
+
117
+ [MIT](LICENSE) © Eric Deal
@@ -0,0 +1,66 @@
1
+ # siim — Sliding Ice Incision Model
2
+
3
+ Coupled glacial–fluvial landscape evolution. `siim` models bedrock incision by
4
+ sliding ice and rivers together, resolving how glaciers and channels jointly
5
+ shape mountain topography over geologic time. It ships three coordinated front
6
+ ends over one physical core:
7
+
8
+ - **`siim.siim1d`** — fast 1D longitudinal-profile model
9
+ - **`siim.siim2d`** — full 2D landscape-evolution model (in-house driver, D8/D-inf
10
+ routing, FFT flexure, ADI hillslope diffusion)
11
+ - **`siim.analytical`** — closed-form steady-state profiles and regime diagrams
12
+ from the underlying theory
13
+
14
+ Python with NumPy/SciPy/Numba — no Fortran and no framework lock-in for the
15
+ standalone models.
16
+
17
+ ## Install
18
+
19
+ ```bash
20
+ pip install siim-lem
21
+ ```
22
+
23
+ `siim` runs the full 1D and 2D models standalone on NumPy 2. An optional adapter
24
+ lets you drive the 2D model through [fastscape](https://fastscape.org)/xsimlab
25
+ instead of the built-in driver; that stack is conda-only:
26
+
27
+ ```bash
28
+ conda env create -f environment.yml # optional fastscape adapter
29
+ ```
30
+
31
+ Requires Python ≥ 3.12.
32
+
33
+ ## Quickstart
34
+
35
+ ```python
36
+ from siim import siim2d
37
+
38
+ params = {
39
+ 'U': 1e-3, # rock uplift rate (m/yr)
40
+ 'zELA': 1500, 'P': 2, 'beta': 1e-2, # climate: ELA + mass balance
41
+ 'ce': 2e-5, 'Ko': 1e-6, # glacial + fluvial erodibility
42
+ 'Lx': 100e3, 'Ly': 50e3, # domain size (m)
43
+ 'nx': 201, 'ny': 101, # grid
44
+ 'T': 5e6, 'nt': 501, 'nt_out': 51, # 5 Myr run
45
+ 'seed': 0, # reproducible initial relief noise
46
+ 'mode': 'C', # bed-memory + sub-grid glacier carving
47
+ }
48
+
49
+ model = siim2d.siim(params)
50
+ model.run()
51
+ model.plot.landscape(i=-1) # final topography
52
+ ```
53
+
54
+ The 1D model (`from siim.siim1d import siim`) and the analytical solutions
55
+ (`from siim.analytical import GeneralProfile`) follow the same shape. See the
56
+ [documentation](https://github.com/ericdealgeomorph/siim/tree/main/docs) for the full parameter reference,
57
+ guides, and the theory background.
58
+
59
+ ## Citing
60
+
61
+ If you use `siim`, please cite it via [`CITATION.cff`](CITATION.cff). A methods
62
+ paper is in preparation.
63
+
64
+ ## License
65
+
66
+ [MIT](LICENSE) © Eric Deal
@@ -0,0 +1,37 @@
1
+ # Analytical steady state
2
+
3
+ ```{eval-rst}
4
+ .. automodule:: siim.analytical
5
+ ```
6
+
7
+ ## Math kernel — `siim.analytical.core`
8
+
9
+ ```{eval-rst}
10
+ .. automodule:: siim.analytical.core
11
+ :members:
12
+ :show-inheritance:
13
+ ```
14
+
15
+ ## Profile classes — `siim.analytical.profiles`
16
+
17
+ ```{eval-rst}
18
+ .. automodule:: siim.analytical.profiles
19
+ :members:
20
+ :show-inheritance:
21
+ ```
22
+
23
+ ## Physical front end — `siim.analytical.steady_state`
24
+
25
+ ```{eval-rst}
26
+ .. automodule:: siim.analytical.steady_state
27
+ :members:
28
+ :show-inheritance:
29
+ ```
30
+
31
+ ## Regime map — `siim.analytical.regime`
32
+
33
+ ```{eval-rst}
34
+ .. automodule:: siim.analytical.regime
35
+ :members:
36
+ :show-inheritance:
37
+ ```
@@ -0,0 +1,123 @@
1
+ # Numerical core — `siim._core`
2
+
3
+ The fastscape-free numerical kernels shared by the 1D profile model and the 2D
4
+ landscape model. Most use NumPy/Numba; spectral flexure uses SciPy. They need no
5
+ fastscape, xsimlab, or Matplotlib, so the numerics remain testable without the
6
+ optional adapter or plotting layer. The 1D and 2D models build one
7
+ `GlacialParams` record and an integer `law_code` and call the step skeletons
8
+ directly.
9
+
10
+ ## Per-run parameter record — `siim._core.params`
11
+
12
+ ```{eval-rst}
13
+ .. automodule:: siim._core.params
14
+ :members:
15
+ :show-inheritance:
16
+ ```
17
+
18
+ ## Step skeletons (law_code switch) — `siim._core.skeleton`
19
+
20
+ ```{eval-rst}
21
+ .. automodule:: siim._core.skeleton
22
+ :members:
23
+ :private-members:
24
+ ```
25
+
26
+ ## Scalar Newton solvers & ice-thickness closures — `siim._core.solvers`
27
+
28
+ ```{eval-rst}
29
+ .. automodule:: siim._core.solvers
30
+ :members:
31
+ :private-members:
32
+ ```
33
+
34
+ ## 2D erosion loops — `siim._core.eroders`
35
+
36
+ ```{eval-rst}
37
+ .. automodule:: siim._core.eroders
38
+ :members:
39
+ :private-members:
40
+ ```
41
+
42
+ ## Sub-grid glacier-width carving — `siim._core.carve`
43
+
44
+ ```{eval-rst}
45
+ .. automodule:: siim._core.carve
46
+ :members:
47
+ :private-members:
48
+ ```
49
+
50
+ ## Explicit H diffusion — `siim._core.diffusion`
51
+
52
+ ```{eval-rst}
53
+ .. automodule:: siim._core.diffusion
54
+ :members:
55
+ :private-members:
56
+ ```
57
+
58
+ ## Hillslope diffusion (ADI) — `siim._core.hillslope`
59
+
60
+ In-house alternating-direction-implicit hillslope diffuser (topography), the
61
+ standalone replacement for fastscapelib-fortran's `fs.diffusion`. Distinct from
62
+ `siim._core.diffusion` (the ice-thickness FD diffuser above).
63
+
64
+ ```{eval-rst}
65
+ .. automodule:: siim._core.hillslope
66
+ :members:
67
+ :private-members:
68
+ ```
69
+
70
+ ## Spectral flexure — `siim._core.flexure`
71
+
72
+ In-house `scipy.fft` thin-plate flexure solve on the native grid, the standalone
73
+ replacement for fastscapelib-fortran's `fs.flexure`.
74
+
75
+ ```{eval-rst}
76
+ .. automodule:: siim._core.flexure
77
+ :members:
78
+ :private-members:
79
+ ```
80
+
81
+ ## Flow routing & accumulation primitives — `siim._core.routing`
82
+
83
+ ```{eval-rst}
84
+ .. automodule:: siim._core.routing
85
+ :members:
86
+ :private-members:
87
+ ```
88
+
89
+ ## Composition-chain step functions — `siim._core.step`
90
+
91
+ Framework-free extractions of the 2D model's per-step composition chain (one
92
+ `self`-free function per `siim.fastscape` process `run_step` body). The xsimlab
93
+ adapter shells and the standalone driver call the same functions.
94
+
95
+ ```{eval-rst}
96
+ .. automodule:: siim._core.step
97
+ :members:
98
+ :private-members:
99
+ ```
100
+
101
+ ## In-house time loop — `siim._core.driver`
102
+
103
+ The standalone driver: siim's own merged step loop + two-cadence snapshot,
104
+ calling the same step functions the adapter shells call. Selected via
105
+ `run(driver='inhouse')` (default `constants.DRIVER_DEFAULT`).
106
+
107
+ ```{eval-rst}
108
+ .. automodule:: siim._core.driver
109
+ :members:
110
+ :private-members:
111
+ ```
112
+
113
+ ## Output packing — `siim._core.outputs`
114
+
115
+ Packs the driver's step buffers into the exact `ds_out` contract
116
+ (variable names, `(time, y, x)` dims, dtypes, coords) that
117
+ `siim.siim2d.siim._unpack_outputs` reads.
118
+
119
+ ```{eval-rst}
120
+ .. automodule:: siim._core.outputs
121
+ :members:
122
+ :private-members:
123
+ ```
@@ -0,0 +1,35 @@
1
+ # fastscape integration — `siim.fastscape`
2
+
3
+ The public, composable surface for using siim's glacial-erosion physics inside
4
+ your own fastscape/xsimlab model: the assembly helpers (`glacial_processes`,
5
+ `glacial_model`) and the `@xs.process` classes they wire in. This is the
6
+ **optional adapter** (`pip install siim[fastscape]`; conda for the Fortran
7
+ backend) — the standalone `siim.siim2d` model runs its own in-house driver and
8
+ does not require it, though `siim2d(...).run(driver='xsimlab')` will drive the
9
+ model through this adapter when the stack is present.
10
+
11
+ ## Public surface — `siim.fastscape`
12
+
13
+ ```{eval-rst}
14
+ .. automodule:: siim.fastscape
15
+
16
+ .. autofunction:: siim.fastscape.glacial_processes
17
+
18
+ .. autofunction:: siim.fastscape.glacial_model
19
+ ```
20
+
21
+ ## Glacial processes — `siim.fastscape.processes`
22
+
23
+ ```{eval-rst}
24
+ .. automodule:: siim.fastscape.processes
25
+ :members:
26
+ :show-inheritance:
27
+ ```
28
+
29
+ ## Forcing processes — `siim.fastscape.forcing`
30
+
31
+ ```{eval-rst}
32
+ .. automodule:: siim.fastscape.forcing
33
+ :members:
34
+ :show-inheritance:
35
+ ```
@@ -0,0 +1,44 @@
1
+ # API reference
2
+
3
+ ```{eval-rst}
4
+ .. autosummary::
5
+
6
+ siim
7
+ siim.analytical
8
+ siim.analytical.core
9
+ siim.analytical.profiles
10
+ siim.analytical.regime
11
+ siim.analytical.steady_state
12
+ siim.constants
13
+ siim.forcing
14
+ siim._core.params
15
+ siim._core.skeleton
16
+ siim._core.solvers
17
+ siim._core.eroders
18
+ siim._core.carve
19
+ siim._core.diffusion
20
+ siim._core.routing
21
+ siim.siim1d
22
+ siim.siim2d
23
+ siim.fastscape
24
+ siim.fastscape.processes
25
+ siim.fastscape.forcing
26
+ siim.plotting
27
+ siim.plotting.maps
28
+ siim.plotting.profiles
29
+ siim.plotting.landscape
30
+ siim.plotting.basins
31
+ siim.plotting.diagnostics
32
+ siim.escarpment
33
+ ```
34
+
35
+ ```{toctree}
36
+ :maxdepth: 1
37
+
38
+ analytical
39
+ model1d
40
+ model2d
41
+ fastscape
42
+ core
43
+ support
44
+ ```
@@ -0,0 +1,15 @@
1
+ # 1D profile model
2
+
3
+ The constructor accepts a parameter dictionary; see
4
+ {doc}`../guides/parameter_reference` for every key and resolved default.
5
+
6
+ ```{eval-rst}
7
+ .. automodule:: siim.siim1d
8
+
9
+ .. autoclass:: siim.siim1d.siim
10
+ :members: run, rms_vs_analytical
11
+ :show-inheritance:
12
+
13
+ .. autoclass:: siim.siim1d.siim_plotter
14
+ :members:
15
+ ```
@@ -0,0 +1,77 @@
1
+ # 2D landscape model
2
+
3
+ The constructor accepts a parameter dictionary; see
4
+ {doc}`../guides/parameter_reference` for every key and mode-dependent default.
5
+
6
+ ## Wrapper / dispatch — `siim.siim2d`
7
+
8
+ ```{eval-rst}
9
+ .. automodule:: siim.siim2d
10
+
11
+ .. autoclass:: siim.siim2d.siim
12
+ :members: run, save, load, extract_channel, strahler_order
13
+ :show-inheritance:
14
+
15
+ .. autofunction:: siim.siim2d.load
16
+ ```
17
+
18
+ The standalone driver uses the fastscape-free numerical core for routing,
19
+ ice-thickness closure, erosion, sub-grid carving, diffusion, and flexure; see
20
+ {doc}`core`. Optional xsimlab process shells around the same step functions are
21
+ documented in {doc}`fastscape`.
22
+
23
+ ## Plotting — `siim.plotting`
24
+
25
+ ```{eval-rst}
26
+ .. automodule:: siim.plotting
27
+ :members:
28
+ :show-inheritance:
29
+ ```
30
+
31
+ ### Raw 2D fields — `siim.plotting.maps`
32
+
33
+ ```{eval-rst}
34
+ .. automodule:: siim.plotting.maps
35
+ :members:
36
+ :show-inheritance:
37
+ ```
38
+
39
+ ### Channel profiles & cross-sections — `siim.plotting.profiles`
40
+
41
+ ```{eval-rst}
42
+ .. automodule:: siim.plotting.profiles
43
+ :members:
44
+ :show-inheritance:
45
+ ```
46
+
47
+ ### Deluxe landscape — `siim.plotting.landscape`
48
+
49
+ ```{eval-rst}
50
+ .. automodule:: siim.plotting.landscape
51
+ :members:
52
+ :show-inheritance:
53
+ ```
54
+
55
+ ### Basin & channel diagnostics — `siim.plotting.basins`
56
+
57
+ ```{eval-rst}
58
+ .. automodule:: siim.plotting.basins
59
+ :members:
60
+ :show-inheritance:
61
+ ```
62
+
63
+ ### Steady-state diagnostics — `siim.plotting.diagnostics`
64
+
65
+ ```{eval-rst}
66
+ .. automodule:: siim.plotting.diagnostics
67
+ :members:
68
+ :show-inheritance:
69
+ ```
70
+
71
+ ## Escarpment variant — `siim.escarpment`
72
+
73
+ ```{eval-rst}
74
+ .. automodule:: siim.escarpment
75
+ :members:
76
+ :show-inheritance:
77
+ ```
@@ -0,0 +1,21 @@
1
+ # Constants and support modules
2
+
3
+ ## Package entry — `siim`
4
+
5
+ ```{eval-rst}
6
+ .. automodule:: siim
7
+ ```
8
+
9
+ ## Constants — `siim.constants`
10
+
11
+ ```{eval-rst}
12
+ .. automodule:: siim.constants
13
+ :members:
14
+ ```
15
+
16
+ ## Time-varying forcing builders — `siim.forcing`
17
+
18
+ ```{eval-rst}
19
+ .. automodule:: siim.forcing
20
+ :members:
21
+ ```
@@ -0,0 +1,66 @@
1
+ # Sphinx configuration for the siim documentation.
2
+ #
3
+ # Local build (from an environment with docs/requirements.txt installed):
4
+ # python -m sphinx -W -b html docs docs/_build/html
5
+ # The standard 1D/2D stack is installed on Read the Docs. Optional adapter or
6
+ # presentation dependencies that are absent are mocked so autodoc can still
7
+ # import their public modules.
8
+ import importlib.util
9
+ import os
10
+ import sys
11
+
12
+ sys.path.insert(0, os.path.abspath('..')) # repo root (editable installs too)
13
+
14
+ project = 'siim'
15
+ author = 'Eric Deal'
16
+ copyright = '2026, Eric Deal'
17
+
18
+ extensions = [
19
+ 'myst_nb', # markdown + (optional) notebook pages
20
+ 'sphinx.ext.autodoc',
21
+ 'sphinx.ext.autosummary',
22
+ 'sphinx.ext.napoleon',
23
+ 'sphinx.ext.mathjax',
24
+ 'sphinx.ext.viewcode',
25
+ 'sphinx.ext.intersphinx',
26
+ 'sphinxcontrib.bibtex',
27
+ ]
28
+
29
+ # Mock only optional adapter/presentation dependencies that are actually
30
+ # missing. NumPy/SciPy are hard requirements and are never mocked.
31
+ autodoc_mock_imports = [
32
+ m for m in ('numba', 'xsimlab', 'fastscape', 'matplotlib', 'mpl_toolkits',
33
+ 'pandas', 'tqdm')
34
+ if importlib.util.find_spec(m) is None
35
+ ]
36
+
37
+ autosummary_generate = False # module pages are hand-written (docs/api/)
38
+ autodoc_member_order = 'bysource'
39
+
40
+ napoleon_google_docstring = False
41
+ napoleon_numpy_docstring = True
42
+
43
+ myst_enable_extensions = ['dollarmath', 'amsmath']
44
+ # Execute notebook pages (markdown notebooks carrying a kernelspec — e.g. the
45
+ # 1D getting-started walkthrough) at build time so the examples stay tested.
46
+ # The quick 1D notebook page executes during the build. The larger 2D example
47
+ # remains plain Markdown so documentation builds do not run a landscape model.
48
+ nb_execution_mode = 'auto'
49
+ nb_execution_raise_on_error = True # a broken example fails the build
50
+ nb_execution_timeout = 300 # allow for numba JIT on the first run
51
+ nb_output_stderr = 'remove' # keep tqdm/progress bars out of the render
52
+
53
+ bibtex_bibfiles = ['references.bib']
54
+
55
+ intersphinx_mapping = {
56
+ 'python': ('https://docs.python.org/3', None),
57
+ 'numpy': ('https://numpy.org/doc/stable/', None),
58
+ }
59
+
60
+ templates_path = []
61
+ # Internal development notes are not part of the rendered public documentation;
62
+ # exclude that tree and common generated files.
63
+ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '**/__pycache__', 'dev/**']
64
+
65
+ html_theme = 'furo'
66
+ html_title = 'siim'