rapid2 2.0.0b1__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 (41) hide show
  1. rapid2-2.0.0b1/LICENSE +24 -0
  2. rapid2-2.0.0b1/PKG-INFO +266 -0
  3. rapid2-2.0.0b1/README.md +209 -0
  4. rapid2-2.0.0b1/pyproject.toml +97 -0
  5. rapid2-2.0.0b1/setup.cfg +4 -0
  6. rapid2-2.0.0b1/src/rapid2/__init__.py +79 -0
  7. rapid2-2.0.0b1/src/rapid2/cli/__init__.py +0 -0
  8. rapid2-2.0.0b1/src/rapid2/cli/_cmpncf.py +315 -0
  9. rapid2-2.0.0b1/src/rapid2/cli/_cpllsm.py +278 -0
  10. rapid2-2.0.0b1/src/rapid2/cli/_dgldas2.py +290 -0
  11. rapid2-2.0.0b1/src/rapid2/cli/_m3rivtoqext.py +161 -0
  12. rapid2-2.0.0b1/src/rapid2/cli/_rapid2.py +238 -0
  13. rapid2-2.0.0b1/src/rapid2/cli/_sandboxqext.py +172 -0
  14. rapid2-2.0.0b1/src/rapid2/cli/_zeroqinit.py +151 -0
  15. rapid2-2.0.0b1/src/rapid2/core/__init__.py +0 -0
  16. rapid2-2.0.0b1/src/rapid2/core/chck_bas.py +139 -0
  17. rapid2-2.0.0b1/src/rapid2/core/chck_cpl.py +85 -0
  18. rapid2-2.0.0b1/src/rapid2/core/make_0bi_tbl.py +88 -0
  19. rapid2-2.0.0b1/src/rapid2/core/make_CCC_mat.py +102 -0
  20. rapid2-2.0.0b1/src/rapid2/core/make_Mus_mat.py +108 -0
  21. rapid2-2.0.0b1/src/rapid2/core/make_Net_mat.py +92 -0
  22. rapid2-2.0.0b1/src/rapid2/core/make_Wdw_mat.py +166 -0
  23. rapid2-2.0.0b1/src/rapid2/core/prep_Qex_ncf.py +169 -0
  24. rapid2-2.0.0b1/src/rapid2/core/prep_Qfi_ncf.py +108 -0
  25. rapid2-2.0.0b1/src/rapid2/core/prep_Qou_ncf.py +169 -0
  26. rapid2-2.0.0b1/src/rapid2/core/prep_skl_ncf.py +144 -0
  27. rapid2-2.0.0b1/src/rapid2/core/read_bas_vec.py +77 -0
  28. rapid2-2.0.0b1/src/rapid2/core/read_con_vec.py +84 -0
  29. rapid2-2.0.0b1/src/rapid2/core/read_cpl_vec.py +99 -0
  30. rapid2-2.0.0b1/src/rapid2/core/read_crd_vec.py +91 -0
  31. rapid2-2.0.0b1/src/rapid2/core/read_kpr_vec.py +83 -0
  32. rapid2-2.0.0b1/src/rapid2/core/read_nml_tbl.py +109 -0
  33. rapid2-2.0.0b1/src/rapid2/core/read_std_vec.py +156 -0
  34. rapid2-2.0.0b1/src/rapid2/core/read_xpr_vec.py +83 -0
  35. rapid2-2.0.0b1/src/rapid2/core/updt_Mus_Qou.py +131 -0
  36. rapid2-2.0.0b1/src/rapid2.egg-info/PKG-INFO +266 -0
  37. rapid2-2.0.0b1/src/rapid2.egg-info/SOURCES.txt +39 -0
  38. rapid2-2.0.0b1/src/rapid2.egg-info/dependency_links.txt +1 -0
  39. rapid2-2.0.0b1/src/rapid2.egg-info/entry_points.txt +8 -0
  40. rapid2-2.0.0b1/src/rapid2.egg-info/requires.txt +16 -0
  41. rapid2-2.0.0b1/src/rapid2.egg-info/top_level.txt +1 -0
rapid2-2.0.0b1/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ Copyright (c) 2024-2024, Cedric H. David
2
+
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+ * Redistributions of source code must retain the above copyright notice, this
8
+ list of conditions and the following disclaimer.
9
+ * Redistributions in binary form must reproduce the above copyright notice,
10
+ this list of conditions and the following disclaimer in the documentation
11
+ and/or other materials provided with the distribution.
12
+ * The name Cedric H. David may not be used to endorse or promote products
13
+ derived from this software without specific prior written permission.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
+ DISCLAIMED. IN NO EVENT SHALL CEDRIC H. DAVID BE LIABLE FOR ANY DIRECT,
19
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
20
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
22
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
23
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,266 @@
1
+ Metadata-Version: 2.4
2
+ Name: rapid2
3
+ Version: 2.0.0b1
4
+ Summary: Routing Application for Programmed Integration of Discharge
5
+ Author-email: "Cedric H. David" <cedric.david@jpl.nasa.gov>
6
+ License: Copyright (c) 2024-2024, Cedric H. David
7
+
8
+ All rights reserved.
9
+
10
+ Redistribution and use in source and binary forms, with or without
11
+ modification, are permitted provided that the following conditions are met:
12
+ * Redistributions of source code must retain the above copyright notice, this
13
+ list of conditions and the following disclaimer.
14
+ * Redistributions in binary form must reproduce the above copyright notice,
15
+ this list of conditions and the following disclaimer in the documentation
16
+ and/or other materials provided with the distribution.
17
+ * The name Cedric H. David may not be used to endorse or promote products
18
+ derived from this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL CEDRIC H. DAVID BE LIABLE FOR ANY DIRECT,
24
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
28
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+
31
+ Project-URL: Repository, https://github.com/c-h-david/rapid2.git
32
+ Keywords: river,network,routing,hydrology,muskingum,discharge
33
+ Classifier: Development Status :: 4 - Beta
34
+ Classifier: Intended Audience :: Science/Research
35
+ Classifier: License :: OSI Approved :: BSD License
36
+ Classifier: Operating System :: OS Independent
37
+ Classifier: Programming Language :: Python :: 3.11
38
+ Classifier: Topic :: Scientific/Engineering :: Hydrology
39
+ Description-Content-Type: text/markdown
40
+ License-File: LICENSE
41
+ Requires-Dist: netCDF4>=1.7.2
42
+ Requires-Dist: numpy>=2.4.4
43
+ Requires-Dist: scipy>=1.14.1
44
+ Requires-Dist: tqdm>=4.67.1
45
+ Requires-Dist: earthaccess>=0.14.0
46
+ Requires-Dist: pyyaml>=6.0.3
47
+ Provides-Extra: dev
48
+ Requires-Dist: pymarkdownlnt; extra == "dev"
49
+ Requires-Dist: yamllint; extra == "dev"
50
+ Requires-Dist: hadolint-bin; extra == "dev"
51
+ Requires-Dist: ruff; extra == "dev"
52
+ Requires-Dist: mypy; extra == "dev"
53
+ Requires-Dist: types-PyYAML; extra == "dev"
54
+ Requires-Dist: scipy-stubs; extra == "dev"
55
+ Requires-Dist: types-tqdm; extra == "dev"
56
+ Dynamic: license-file
57
+
58
+ # RAPID
59
+
60
+ <!-- pyml disable-num-lines 2 no-inline-html -->
61
+ <!-- pyml disable-num-lines 1 line-length -->
62
+ <img src="https://raw.githubusercontent.com/c-h-david/rapid2/main/img/icon_rapid_network.svg" alt="RAPID network icon" width="80"/>
63
+
64
+ [![License (3-Clause BSD)][BDG_BSD3CL]][URL_LICENS]
65
+
66
+ [![Contributor Covenant][BDG_CONDUC]][URL_CONDUC]
67
+
68
+ [![Code of Collab][BDG_COLLAB]][URL_COLLAB]
69
+
70
+ [![SLIM][BDG___SLIM]][URL___SLIM]
71
+
72
+ [![GitHub CI Status][BDG_GHA_CL]][URL_GHA_CL]
73
+
74
+ [![GitHub CI Status][BDG_GHA_CI]][URL_GHA_CI]
75
+
76
+ [![GitHub CI Status][BDG_GHA_CD]][URL_GHA_CD]
77
+
78
+ [![Docker Images][BDG_DKRIMG]][URL_DKRIMG]
79
+
80
+ The Routing Application for Programmed Integration of Discharge (RAPID) is a
81
+ river network routing model. Given external inflow to rivers, this model can
82
+ compute the flow of water everywhere in river networks made out of many
83
+ thousands of reaches.
84
+
85
+ > **Note:** While the underlying RAPID routing methodology is highly mature and
86
+ > battle-tested in operational environments, this specific Python 3 codebase
87
+ > (RAPID2) is currently in Beta (v2.0.0b1) and under active development.
88
+
89
+ Notable links:
90
+
91
+ - [RAPID website][URL_RAPHUB]
92
+ - [Discussion Board][URL_DISCUS]
93
+ - [Issue Tracker][URL_ISSUES]
94
+
95
+ ## Features
96
+
97
+ Notable features of the RAPID model:
98
+
99
+ - Open Source
100
+ - Described in peer-reviewed papers
101
+ - Has been used in 100+ studies published in international peer-reviewed
102
+ journals
103
+ - Operationally implemented at world-class research centers
104
+
105
+ ## Contents
106
+
107
+ - [Quick Start](#quick-start)
108
+ - [Changelog](#changelog)
109
+ - [FAQ](#frequently-asked-questions-faq)
110
+ - [Contributing Guide](#contributing)
111
+ - [License](#license)
112
+ - [Support](#support)
113
+
114
+ ## Quick Start
115
+
116
+ This guide provides a quick way to get started with our project. Please see the
117
+ [RAPID website][URL_RAPHUB] for a more comprehensive information.
118
+
119
+ ### Requirements
120
+
121
+ - `git`
122
+ - `python3.11`
123
+ - `pip3`
124
+
125
+ ### Setup Instructions
126
+
127
+ ```bash
128
+ git clone https://github.com/c-h-david/rapid2
129
+ cd rapid2
130
+ pip install .
131
+ ```
132
+
133
+ ### Run Instructions
134
+
135
+ ```bash
136
+ rapid2 --namelist namelist_Sandbox.yml
137
+ ```
138
+
139
+ ### Usage Examples
140
+
141
+ Below is an example of what `namelist_Sandbox.yml` should include:
142
+
143
+ ```yaml
144
+ ---
145
+ Qex_ncf: './input/Sandbox/Qext_Sandbox_19700101_19700110.nc4'
146
+ Q00_ncf: './input/Sandbox/Qinit_Sandbox_19700101_19700110.nc4'
147
+
148
+ con_csv: './input/Sandbox/rapid_connect_Sandbox.csv'
149
+ kpr_csv: './input/Sandbox/k_Sandbox.csv'
150
+ xpr_csv: './input/Sandbox/x_Sandbox.csv'
151
+
152
+ bas_csv: './input/Sandbox/riv_bas_id_Sandbox.csv'
153
+
154
+ IS_dtR: 900
155
+
156
+ Qou_ncf: './output/Sandbox/Qout_Sandbox_19700101_19700110_tst.nc4'
157
+ Qfi_ncf: './output/Sandbox/Qfinal_Sandbox_19700101_19700110_tst.nc4'
158
+ ```
159
+
160
+ ### Build Instructions
161
+
162
+ If you would like to build an Operating System to run RAPID2 from scratch,
163
+ we recommend Debian-based distributions and software packages for the
164
+ Advanced Packaging Tool (APT) are summarized in
165
+ [`requirements.apt`][URL_REQAPT]
166
+ to be installed with `apt-get`. All packages can be installed at once
167
+ using:
168
+
169
+ ```bash
170
+ sudo apt-get install -y --no-install-recommends \
171
+ $(grep -v -E '(^#|^$)' requirements.apt)
172
+ ```
173
+
174
+ > Alternatively, one may install the APT packages listed in
175
+ > [`requirements.apt`][URL_REQAPT]
176
+ > one by one, for example:
177
+ >
178
+ > ```bash
179
+ > sudo apt-get install -y --no-install-recommends python3.11
180
+ > ```
181
+
182
+ Also make sure that `python3` points to `python3.11`:
183
+
184
+ ```bash
185
+ sudo rm -f /usr/bin/python3
186
+ sudo ln -s /usr/bin/python3.11 /usr/bin/python3
187
+ ```
188
+
189
+ If you would like to run in a virtual environment:
190
+
191
+ ```bash
192
+ python3 -m venv $HOME/venv
193
+ export PATH=$HOME/venv/bin:$PATH
194
+ ```
195
+
196
+ ### Test Instructions
197
+
198
+ See our [`TESTING.md`][URL_TSTING] for a description of our tests.
199
+
200
+ ## Changelog
201
+
202
+ See our [`CHANGELOG.md`][URL_CHGLOG] for a history of our changes.
203
+
204
+ See our [releases page][URL_RELEAS] for our key versioned releases.
205
+
206
+ ## Frequently Asked Questions (FAQ)
207
+
208
+ Questions about our project? Please see our [Discussion Board][URL_DISCUS].
209
+
210
+ ## Contributing
211
+
212
+ Interested in contributing to our project? Please see:
213
+
214
+ - [`CONTRIBUTING.md`][URL_CONTRI]
215
+ - [`CODE_OF_CONDUCT.md`][URL_CONDUC]
216
+ - [`CODE_OF_COLLAB.md`][URL_COLLAB]
217
+ - [`GOVERNANCE.md`][URL_GOVERN]
218
+
219
+ ## License
220
+
221
+ We use a Berkeley Software Distribution 3-Clause license:
222
+ [`LICENSE`][URL_LICENS]
223
+
224
+ ## Support
225
+
226
+ The prefered way to interact with RAPID2 and its community is to do so through
227
+ our public online resources:
228
+
229
+ - [RAPID website][URL_RAPHUB]
230
+ - [Discussion Board][URL_DISCUS]
231
+ - [Issue Tracker][URL_ISSUES]
232
+
233
+ For sensitive matters that cannot be shared publicly, contact
234
+ [Cédric H. David][URL_GITCHD]
235
+
236
+ <!-- pyml disable-num-lines 30 line-length -->
237
+ [BDG_BSD3CL]: https://img.shields.io/badge/license-BSD%203--Clause-yellow.svg
238
+ [BDG_CONDUC]: https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg
239
+ [BDG_COLLAB]: https://img.shields.io/badge/Code%20of%20Collab-DRAFT-violet.svg
240
+ [BDG___SLIM]: https://img.shields.io/badge/Best%20Practices%20from-SLIM-blue
241
+ [BDG_GHA_CL]: https://github.com/c-h-david/rapid2/actions/workflows/CL.yml/badge.svg
242
+ [BDG_GHA_CI]: https://github.com/c-h-david/rapid2/actions/workflows/CI.yml/badge.svg
243
+ [BDG_GHA_CD]: https://github.com/c-h-david/rapid2/actions/workflows/CD.yml/badge.svg
244
+ [BDG_DKRIMG]: https://img.shields.io/badge/docker-images-blue?logo=docker
245
+
246
+ [URL_LICENS]: https://github.com/c-h-david/rapid2/blob/main/LICENSE
247
+ [URL_CONDUC]: https://github.com/c-h-david/rapid2/blob/main/CODE_OF_CONDUCT.md
248
+ [URL_COLLAB]: https://github.com/c-h-david/rapid2/blob/main/CODE_OF_COLLAB.md
249
+ [URL___SLIM]: https://nasa-ammos.github.io/slim/
250
+ [URL_GHA_CL]: https://github.com/c-h-david/rapid2/actions/workflows/CL.yml
251
+ [URL_GHA_CI]: https://github.com/c-h-david/rapid2/actions/workflows/CI.yml
252
+ [URL_GHA_CD]: https://github.com/c-h-david/rapid2/actions/workflows/CD.yml
253
+ [URL_DKRIMG]: https://hub.docker.com/r/chdavid/rapid2/tags
254
+
255
+ [URL_RAPHUB]: http://rapid-hub.org/
256
+ [URL_DISCUS]: https://github.com/c-h-david/rapid2/discussions
257
+ [URL_ISSUES]: https://github.com/c-h-david/rapid2/issues
258
+ [URL_REQAPT]: https://github.com/c-h-david/rapid2/blob/main/requirements.apt
259
+ [URL_TSTING]: https://github.com/c-h-david/rapid2/blob/main/TESTING.md
260
+ [URL_CHGLOG]: https://github.com/c-h-david/rapid2/blob/main/CHANGELOG.md
261
+ [URL_RELEAS]: https://github.com/c-h-david/rapid2/releases
262
+ [URL_CONTRI]: https://github.com/c-h-david/rapid2/blob/main/CONTRIBUTING.md
263
+ [URL_CONDUC]: https://github.com/c-h-david/rapid2/blob/main/CODE_OF_CONDUCT.md
264
+ [URL_COLLAB]: https://github.com/c-h-david/rapid2/blob/main/CODE_OF_COLLAB.md
265
+ [URL_GOVERN]: https://github.com/c-h-david/rapid2/blob/main/GOVERNANCE.md
266
+ [URL_GITCHD]: https://github.com/c-h-david
@@ -0,0 +1,209 @@
1
+ # RAPID
2
+
3
+ <!-- pyml disable-num-lines 2 no-inline-html -->
4
+ <!-- pyml disable-num-lines 1 line-length -->
5
+ <img src="https://raw.githubusercontent.com/c-h-david/rapid2/main/img/icon_rapid_network.svg" alt="RAPID network icon" width="80"/>
6
+
7
+ [![License (3-Clause BSD)][BDG_BSD3CL]][URL_LICENS]
8
+
9
+ [![Contributor Covenant][BDG_CONDUC]][URL_CONDUC]
10
+
11
+ [![Code of Collab][BDG_COLLAB]][URL_COLLAB]
12
+
13
+ [![SLIM][BDG___SLIM]][URL___SLIM]
14
+
15
+ [![GitHub CI Status][BDG_GHA_CL]][URL_GHA_CL]
16
+
17
+ [![GitHub CI Status][BDG_GHA_CI]][URL_GHA_CI]
18
+
19
+ [![GitHub CI Status][BDG_GHA_CD]][URL_GHA_CD]
20
+
21
+ [![Docker Images][BDG_DKRIMG]][URL_DKRIMG]
22
+
23
+ The Routing Application for Programmed Integration of Discharge (RAPID) is a
24
+ river network routing model. Given external inflow to rivers, this model can
25
+ compute the flow of water everywhere in river networks made out of many
26
+ thousands of reaches.
27
+
28
+ > **Note:** While the underlying RAPID routing methodology is highly mature and
29
+ > battle-tested in operational environments, this specific Python 3 codebase
30
+ > (RAPID2) is currently in Beta (v2.0.0b1) and under active development.
31
+
32
+ Notable links:
33
+
34
+ - [RAPID website][URL_RAPHUB]
35
+ - [Discussion Board][URL_DISCUS]
36
+ - [Issue Tracker][URL_ISSUES]
37
+
38
+ ## Features
39
+
40
+ Notable features of the RAPID model:
41
+
42
+ - Open Source
43
+ - Described in peer-reviewed papers
44
+ - Has been used in 100+ studies published in international peer-reviewed
45
+ journals
46
+ - Operationally implemented at world-class research centers
47
+
48
+ ## Contents
49
+
50
+ - [Quick Start](#quick-start)
51
+ - [Changelog](#changelog)
52
+ - [FAQ](#frequently-asked-questions-faq)
53
+ - [Contributing Guide](#contributing)
54
+ - [License](#license)
55
+ - [Support](#support)
56
+
57
+ ## Quick Start
58
+
59
+ This guide provides a quick way to get started with our project. Please see the
60
+ [RAPID website][URL_RAPHUB] for a more comprehensive information.
61
+
62
+ ### Requirements
63
+
64
+ - `git`
65
+ - `python3.11`
66
+ - `pip3`
67
+
68
+ ### Setup Instructions
69
+
70
+ ```bash
71
+ git clone https://github.com/c-h-david/rapid2
72
+ cd rapid2
73
+ pip install .
74
+ ```
75
+
76
+ ### Run Instructions
77
+
78
+ ```bash
79
+ rapid2 --namelist namelist_Sandbox.yml
80
+ ```
81
+
82
+ ### Usage Examples
83
+
84
+ Below is an example of what `namelist_Sandbox.yml` should include:
85
+
86
+ ```yaml
87
+ ---
88
+ Qex_ncf: './input/Sandbox/Qext_Sandbox_19700101_19700110.nc4'
89
+ Q00_ncf: './input/Sandbox/Qinit_Sandbox_19700101_19700110.nc4'
90
+
91
+ con_csv: './input/Sandbox/rapid_connect_Sandbox.csv'
92
+ kpr_csv: './input/Sandbox/k_Sandbox.csv'
93
+ xpr_csv: './input/Sandbox/x_Sandbox.csv'
94
+
95
+ bas_csv: './input/Sandbox/riv_bas_id_Sandbox.csv'
96
+
97
+ IS_dtR: 900
98
+
99
+ Qou_ncf: './output/Sandbox/Qout_Sandbox_19700101_19700110_tst.nc4'
100
+ Qfi_ncf: './output/Sandbox/Qfinal_Sandbox_19700101_19700110_tst.nc4'
101
+ ```
102
+
103
+ ### Build Instructions
104
+
105
+ If you would like to build an Operating System to run RAPID2 from scratch,
106
+ we recommend Debian-based distributions and software packages for the
107
+ Advanced Packaging Tool (APT) are summarized in
108
+ [`requirements.apt`][URL_REQAPT]
109
+ to be installed with `apt-get`. All packages can be installed at once
110
+ using:
111
+
112
+ ```bash
113
+ sudo apt-get install -y --no-install-recommends \
114
+ $(grep -v -E '(^#|^$)' requirements.apt)
115
+ ```
116
+
117
+ > Alternatively, one may install the APT packages listed in
118
+ > [`requirements.apt`][URL_REQAPT]
119
+ > one by one, for example:
120
+ >
121
+ > ```bash
122
+ > sudo apt-get install -y --no-install-recommends python3.11
123
+ > ```
124
+
125
+ Also make sure that `python3` points to `python3.11`:
126
+
127
+ ```bash
128
+ sudo rm -f /usr/bin/python3
129
+ sudo ln -s /usr/bin/python3.11 /usr/bin/python3
130
+ ```
131
+
132
+ If you would like to run in a virtual environment:
133
+
134
+ ```bash
135
+ python3 -m venv $HOME/venv
136
+ export PATH=$HOME/venv/bin:$PATH
137
+ ```
138
+
139
+ ### Test Instructions
140
+
141
+ See our [`TESTING.md`][URL_TSTING] for a description of our tests.
142
+
143
+ ## Changelog
144
+
145
+ See our [`CHANGELOG.md`][URL_CHGLOG] for a history of our changes.
146
+
147
+ See our [releases page][URL_RELEAS] for our key versioned releases.
148
+
149
+ ## Frequently Asked Questions (FAQ)
150
+
151
+ Questions about our project? Please see our [Discussion Board][URL_DISCUS].
152
+
153
+ ## Contributing
154
+
155
+ Interested in contributing to our project? Please see:
156
+
157
+ - [`CONTRIBUTING.md`][URL_CONTRI]
158
+ - [`CODE_OF_CONDUCT.md`][URL_CONDUC]
159
+ - [`CODE_OF_COLLAB.md`][URL_COLLAB]
160
+ - [`GOVERNANCE.md`][URL_GOVERN]
161
+
162
+ ## License
163
+
164
+ We use a Berkeley Software Distribution 3-Clause license:
165
+ [`LICENSE`][URL_LICENS]
166
+
167
+ ## Support
168
+
169
+ The prefered way to interact with RAPID2 and its community is to do so through
170
+ our public online resources:
171
+
172
+ - [RAPID website][URL_RAPHUB]
173
+ - [Discussion Board][URL_DISCUS]
174
+ - [Issue Tracker][URL_ISSUES]
175
+
176
+ For sensitive matters that cannot be shared publicly, contact
177
+ [Cédric H. David][URL_GITCHD]
178
+
179
+ <!-- pyml disable-num-lines 30 line-length -->
180
+ [BDG_BSD3CL]: https://img.shields.io/badge/license-BSD%203--Clause-yellow.svg
181
+ [BDG_CONDUC]: https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg
182
+ [BDG_COLLAB]: https://img.shields.io/badge/Code%20of%20Collab-DRAFT-violet.svg
183
+ [BDG___SLIM]: https://img.shields.io/badge/Best%20Practices%20from-SLIM-blue
184
+ [BDG_GHA_CL]: https://github.com/c-h-david/rapid2/actions/workflows/CL.yml/badge.svg
185
+ [BDG_GHA_CI]: https://github.com/c-h-david/rapid2/actions/workflows/CI.yml/badge.svg
186
+ [BDG_GHA_CD]: https://github.com/c-h-david/rapid2/actions/workflows/CD.yml/badge.svg
187
+ [BDG_DKRIMG]: https://img.shields.io/badge/docker-images-blue?logo=docker
188
+
189
+ [URL_LICENS]: https://github.com/c-h-david/rapid2/blob/main/LICENSE
190
+ [URL_CONDUC]: https://github.com/c-h-david/rapid2/blob/main/CODE_OF_CONDUCT.md
191
+ [URL_COLLAB]: https://github.com/c-h-david/rapid2/blob/main/CODE_OF_COLLAB.md
192
+ [URL___SLIM]: https://nasa-ammos.github.io/slim/
193
+ [URL_GHA_CL]: https://github.com/c-h-david/rapid2/actions/workflows/CL.yml
194
+ [URL_GHA_CI]: https://github.com/c-h-david/rapid2/actions/workflows/CI.yml
195
+ [URL_GHA_CD]: https://github.com/c-h-david/rapid2/actions/workflows/CD.yml
196
+ [URL_DKRIMG]: https://hub.docker.com/r/chdavid/rapid2/tags
197
+
198
+ [URL_RAPHUB]: http://rapid-hub.org/
199
+ [URL_DISCUS]: https://github.com/c-h-david/rapid2/discussions
200
+ [URL_ISSUES]: https://github.com/c-h-david/rapid2/issues
201
+ [URL_REQAPT]: https://github.com/c-h-david/rapid2/blob/main/requirements.apt
202
+ [URL_TSTING]: https://github.com/c-h-david/rapid2/blob/main/TESTING.md
203
+ [URL_CHGLOG]: https://github.com/c-h-david/rapid2/blob/main/CHANGELOG.md
204
+ [URL_RELEAS]: https://github.com/c-h-david/rapid2/releases
205
+ [URL_CONTRI]: https://github.com/c-h-david/rapid2/blob/main/CONTRIBUTING.md
206
+ [URL_CONDUC]: https://github.com/c-h-david/rapid2/blob/main/CODE_OF_CONDUCT.md
207
+ [URL_COLLAB]: https://github.com/c-h-david/rapid2/blob/main/CODE_OF_COLLAB.md
208
+ [URL_GOVERN]: https://github.com/c-h-david/rapid2/blob/main/GOVERNANCE.md
209
+ [URL_GITCHD]: https://github.com/c-h-david
@@ -0,0 +1,97 @@
1
+ # *****************************************************************************
2
+ # pyproject.toml
3
+ # *****************************************************************************
4
+
5
+ # Purpose:
6
+ # This file acts as a Python project configuration file for packaging-related
7
+ # tools and for other tools.
8
+ # Author:
9
+ # Cedric H. David, 2025-2025
10
+
11
+
12
+ # *****************************************************************************
13
+ # Project configuration
14
+ # *****************************************************************************
15
+ [build-system]
16
+ requires = ["setuptools>=61.0"]
17
+ build-backend = "setuptools.build_meta"
18
+
19
+ [project]
20
+ name = "rapid2"
21
+ version = "2.0.0.b1"
22
+ license = {file = "LICENSE"}
23
+ readme = "README.md"
24
+ description = "Routing Application for Programmed Integration of Discharge"
25
+ authors = [{name = "Cedric H. David", email = "cedric.david@jpl.nasa.gov"}]
26
+ keywords = [
27
+ "river",
28
+ "network",
29
+ "routing",
30
+ "hydrology",
31
+ "muskingum",
32
+ "discharge",
33
+ ]
34
+ classifiers = [
35
+ "Development Status :: 4 - Beta",
36
+ "Intended Audience :: Science/Research",
37
+ "License :: OSI Approved :: BSD License",
38
+ "Operating System :: OS Independent",
39
+ "Programming Language :: Python :: 3.11",
40
+ "Topic :: Scientific/Engineering :: Hydrology",
41
+ ]
42
+
43
+ dependencies = [
44
+ "netCDF4>=1.7.2",
45
+ "numpy>=2.4.4",
46
+ "scipy>=1.14.1",
47
+ "tqdm>=4.67.1",
48
+ "earthaccess>=0.14.0",
49
+ "pyyaml>=6.0.3",
50
+ ]
51
+
52
+ [project.optional-dependencies]
53
+ dev = [
54
+ "pymarkdownlnt",
55
+ "yamllint",
56
+ "hadolint-bin",
57
+ "ruff",
58
+ "mypy",
59
+ "types-PyYAML", # <--- Adds mypy support for pyyaml
60
+ "scipy-stubs", # <--- Adds mypy support for scipy.sparse
61
+ "types-tqdm", # <--- Adds mypy support for tqdm
62
+ ]
63
+
64
+ [project.urls]
65
+ Repository = "https://github.com/c-h-david/rapid2.git"
66
+
67
+ [project.scripts]
68
+ rapid2 = "rapid2.cli._rapid2:main"
69
+ dgldas2 = "rapid2.cli._dgldas2:main"
70
+ m3rivtoqext = "rapid2.cli._m3rivtoqext:main"
71
+ zeroqinit = "rapid2.cli._zeroqinit:main"
72
+ sandboxqext = "rapid2.cli._sandboxqext:main"
73
+ cpllsm = "rapid2.cli._cpllsm:main"
74
+ cmpncf = "rapid2.cli._cmpncf:main"
75
+
76
+ [tool.ruff]
77
+ line-length = 79
78
+ target-version = "py311"
79
+
80
+ [tool.ruff.lint]
81
+ select = ["E", "F", "I", "B"]
82
+
83
+ [tool.ruff.format]
84
+ quote-style = "double"
85
+ indent-style = "space"
86
+ line-ending = "lf"
87
+ docstring-code-format = true
88
+
89
+ [tool.mypy]
90
+ python_version = "3.11"
91
+ strict = true
92
+ exclude = ["build"]
93
+
94
+
95
+ # *****************************************************************************
96
+ # End
97
+ # *****************************************************************************
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,79 @@
1
+ # *****************************************************************************
2
+ # __init__.py
3
+ # *****************************************************************************
4
+
5
+ # Purpose:
6
+ # This file used in Python to define packages and initialize their namespaces.
7
+ # Author:
8
+ # Cedric H. David, 2025-2025
9
+
10
+
11
+ # *****************************************************************************
12
+ # Initialization
13
+ # *****************************************************************************
14
+
15
+ # -----------------------------------------------------------------------------
16
+ # Dynamic Package Versioning
17
+ # -----------------------------------------------------------------------------
18
+ import importlib.metadata
19
+
20
+ try:
21
+ __version__ = importlib.metadata.version("rapid2")
22
+ except importlib.metadata.PackageNotFoundError:
23
+ __version__ = "unknown"
24
+
25
+ # -----------------------------------------------------------------------------
26
+ # Top-Level API Facade
27
+ # -----------------------------------------------------------------------------
28
+ from .core.chck_bas import chck_bas
29
+ from .core.chck_cpl import chck_cpl
30
+ from .core.make_0bi_tbl import make_0bi_tbl
31
+ from .core.make_CCC_mat import make_CCC_mat
32
+ from .core.make_Mus_mat import make_Mus_mat
33
+ from .core.make_Net_mat import make_Net_mat
34
+ from .core.make_Wdw_mat import make_Wdw_mat
35
+ from .core.prep_Qex_ncf import prep_Qex_ncf
36
+ from .core.prep_Qfi_ncf import prep_Qfi_ncf
37
+ from .core.prep_Qou_ncf import prep_Qou_ncf
38
+ from .core.prep_skl_ncf import prep_skl_ncf
39
+ from .core.read_bas_vec import read_bas_vec
40
+ from .core.read_con_vec import read_con_vec
41
+ from .core.read_cpl_vec import read_cpl_vec
42
+ from .core.read_crd_vec import read_crd_vec
43
+ from .core.read_kpr_vec import read_kpr_vec
44
+ from .core.read_nml_tbl import read_nml_tbl
45
+ from .core.read_std_vec import read_std_vec
46
+ from .core.read_xpr_vec import read_xpr_vec
47
+ from .core.updt_Mus_Qou import updt_Mus_Qou
48
+
49
+ # -----------------------------------------------------------------------------
50
+ # Explicit Public Interface
51
+ # -----------------------------------------------------------------------------
52
+ __all__ = [
53
+ "__version__",
54
+ "chck_bas",
55
+ "chck_cpl",
56
+ "make_0bi_tbl",
57
+ "make_CCC_mat",
58
+ "make_Mus_mat",
59
+ "make_Net_mat",
60
+ "make_Wdw_mat",
61
+ "prep_Qex_ncf",
62
+ "prep_Qfi_ncf",
63
+ "prep_Qou_ncf",
64
+ "prep_skl_ncf",
65
+ "read_bas_vec",
66
+ "read_con_vec",
67
+ "read_cpl_vec",
68
+ "read_crd_vec",
69
+ "read_kpr_vec",
70
+ "read_nml_tbl",
71
+ "read_std_vec",
72
+ "read_xpr_vec",
73
+ "updt_Mus_Qou",
74
+ ]
75
+
76
+
77
+ # *****************************************************************************
78
+ # End
79
+ # *****************************************************************************
File without changes