ras-commander 0.48.0__py3-none-any.whl → 0.50.0__py3-none-any.whl

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.
ras_commander/RasPrj.py CHANGED
@@ -37,6 +37,40 @@ Example:
37
37
 
38
38
  logger.debug("Additional debug information")
39
39
  # Function logic here
40
+
41
+ -----
42
+
43
+ All of the methods in this class are class methods and are designed to be used with instances of the class.
44
+
45
+ List of Functions in RasPrj:
46
+ - initialize()
47
+ - _load_project_data()
48
+ - _get_geom_file_for_plan()
49
+ - _parse_plan_file()
50
+ - _parse_unsteady_file()
51
+ - _get_prj_entries()
52
+ - _parse_boundary_condition()
53
+ - is_initialized (property)
54
+ - check_initialized()
55
+ - find_ras_prj()
56
+ - get_project_name()
57
+ - get_prj_entries()
58
+ - get_plan_entries()
59
+ - get_flow_entries()
60
+ - get_unsteady_entries()
61
+ - get_geom_entries()
62
+ - get_hdf_entries()
63
+ - print_data()
64
+ - get_plan_value()
65
+ - get_boundary_conditions()
66
+
67
+ Functions in RasPrj that are not part of the class:
68
+ - init_ras_project()
69
+ - get_ras_exe()
70
+
71
+
72
+
73
+
40
74
  """
41
75
  import os
42
76
  import re
ras_commander/RasToGo.py CHANGED
@@ -1,6 +1,22 @@
1
1
  """
2
2
  RasToGo module provides functions to interface HEC-RAS with go-consequences.
3
3
  This module helps prepare and format RAS data for use with go-consequences.
4
+
5
+
6
+ -----
7
+
8
+ All of the methods in this class are static and are designed to be used without instantiation.
9
+
10
+ List of Functions in RasToGo:
11
+
12
+ TO BE IMPLEMENTED:
13
+ - Adding stored maps in rasmaapper for a results file
14
+ - Editing the terrain name for stored maps, so that a reduced resolution terrain can be used for mapping
15
+ - Re-computing specific plans using the floodplain mapping option to generate stored maps
16
+ - Using the stored map output to call go-consequences and compute damages
17
+ - Comparisons of go-consequences outputs based on RAS plan number
18
+ - include optional argument with polygons defining areas of interest
19
+
4
20
  """
5
21
 
6
22
  import logging
@@ -21,6 +21,21 @@ Example:
21
21
  def my_function():
22
22
  logger.debug("Additional debug information")
23
23
  # Function logic here
24
+
25
+ -----
26
+
27
+ All of the methods in this class are static and are designed to be used without instantiation.
28
+
29
+ List of Functions in RasUnsteady:
30
+ - update_flow_title()
31
+ - update_restart_settings()
32
+ - extract_boundary_and_tables()
33
+ - print_boundaries_and_tables()
34
+ - identify_tables()
35
+ - parse_fixed_width_table()
36
+ - extract_tables()
37
+ - write_table_to_file()
38
+
24
39
  """
25
40
  import os
26
41
  from pathlib import Path
ras_commander/RasUtils.py CHANGED
@@ -20,6 +20,37 @@ Example:
20
20
  def my_function():
21
21
  logger.debug("Additional debug information")
22
22
  # Function logic here
23
+
24
+ -----
25
+
26
+ All of the methods in this class are static and are designed to be used without instantiation.
27
+
28
+ List of Functions in RasUtils:
29
+ - create_directory()
30
+ - find_files_by_extension()
31
+ - get_file_size()
32
+ - get_file_modification_time()
33
+ - get_plan_path()
34
+ - remove_with_retry()
35
+ - update_plan_file()
36
+ - check_file_access()
37
+ - convert_to_dataframe()
38
+ - save_to_excel()
39
+ - calculate_rmse()
40
+ - calculate_percent_bias()
41
+ - calculate_error_metrics()
42
+ - update_file()
43
+ - get_next_number()
44
+ - clone_file()
45
+ - update_project_file()
46
+ - decode_byte_strings()
47
+ - perform_kdtree_query()
48
+ - find_nearest_neighbors()
49
+ - consolidate_dataframe()
50
+ - find_nearest_value()
51
+ - horizontal_distance()
52
+
53
+
23
54
  """
24
55
  import os
25
56
  from pathlib import Path
ras_commander/__init__.py CHANGED
@@ -36,6 +36,12 @@ from .HdfUtils import HdfUtils
36
36
  from .HdfXsec import HdfXsec
37
37
  from .HdfPump import HdfPump
38
38
  from .HdfPipe import HdfPipe
39
+ from .HdfInfiltration import HdfInfiltration
40
+ from .RasMapper import RasMapper
41
+
42
+ # Import plotting classes
43
+ from .HdfPlot import HdfPlot
44
+ from .HdfResultsPlot import HdfResultsPlot
39
45
 
40
46
  # Define __all__ to specify what should be imported when using "from ras_commander import *"
41
47
  __all__ = [
@@ -51,6 +57,10 @@ __all__ = [
51
57
  "HdfXsec",
52
58
  "HdfPump",
53
59
  "HdfPipe",
60
+ "HdfPlot",
61
+ "HdfResultsPlot",
62
+ "HdfInfiltration",
63
+ "RasMapper",
54
64
  "standardize_input",
55
65
  "ras",
56
66
  "init_ras_project",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ras-commander
3
- Version: 0.48.0
3
+ Version: 0.50.0
4
4
  Summary: A Python library for automating HEC-RAS operations
5
5
  Home-page: https://github.com/billk-FM/ras-commander
6
6
  Author: William M. Katzenmeyer
@@ -61,10 +61,13 @@ Create a virtual environment with conda or venv (ask ChatGPT if you need help)
61
61
 
62
62
  In your virtual environment, install ras-commander using pip:
63
63
  ```
64
- pip install h5py numpy pandas requests tqdm scipy xarray geopandas matplotlib ras-commander ipython psutil shapely fiona pathlib rtree
64
+ pip install h5py numpy pandas requests tqdm scipy xarray geopandas matplotlib ras-commander ipython psutil shapely fiona pathlib rtree rasterstats
65
65
  pip install --upgrade ras-commander
66
66
  ```
67
67
 
68
+ **Tested with Python 3.11**
69
+
70
+
68
71
  If you have dependency issues with pip (especially if you have errors with numpy), try clearing your local pip packages 'C:\Users\your_username\AppData\Roaming\Python\' and then creating a new virtual environment.
69
72
 
70
73
 
@@ -118,26 +121,56 @@ Certainly! I'll provide you with an updated Key Components section and Project O
118
121
  - `RasUnsteady`: Manages unsteady flow file operations
119
122
  - `RasUtils`: Contains utility functions for file operations and data management
120
123
  - `RasExamples`: Manages and loads HEC-RAS example projects
121
- - `RasHdf`: Provides utilities for working with HDF files in HEC-RAS projects
124
+
125
+ ### New Components:
126
+ - `HdfBase`: Core functionality for HDF file operations
127
+ - `HdfBndry`: Enhanced boundary condition handling
128
+ - `HdfMesh`: Comprehensive mesh data management
129
+ - `HdfPlan`: Plan data extraction and analysis
130
+ - `HdfResultsMesh`: Advanced mesh results processing
131
+ - `HdfResultsPlan`: Plan results analysis
132
+ - `HdfResultsXsec`: Cross-section results processing
133
+ - `HdfStruc`: Structure data management
134
+ - `HdfPipe`: Pipe network analysis tools
135
+ - `HdfPump`: Pump station analysis capabilities
136
+ - `HdfFluvialPluvial`: Fluvial-pluvial boundary analysis
137
+ - `RasMapper`: RASMapper interface
138
+ - `RasToGo`: Go-Consequences integration
139
+ - `HdfPlot` & `HdfResultsPlot`: Specialized plotting utilities
140
+
141
+ ## Project Organization Diagram
122
142
 
123
143
  ## Project Organization Diagram
124
144
 
125
145
  ```
126
146
  ras_commander
127
- ├── .github
128
- │ └── workflows
129
- │ └── python-package.yml
130
147
  ├── ras_commander
131
148
  │ ├── __init__.py
132
149
  │ ├── _version.py
150
+ │ ├── Decorators.py
151
+ │ ├── LoggingConfig.py
133
152
  │ ├── RasCmdr.py
134
153
  │ ├── RasExamples.py
135
154
  │ ├── RasGeo.py
136
- │ ├── RasHdf.py
137
155
  │ ├── RasPlan.py
138
156
  │ ├── RasPrj.py
139
157
  │ ├── RasUnsteady.py
140
- │ └── RasUtils.py
158
+ │ ├── RasUtils.py
159
+ │ ├── RasToGo.py
160
+ │ ├── RasGpt.py
161
+ │ ├── HdfBase.py
162
+ │ ├── HdfBndry.py
163
+ │ ├── HdfMesh.py
164
+ │ ├── HdfPlan.py
165
+ │ ├── HdfResultsMesh.py
166
+ │ ├── HdfResultsPlan.py
167
+ │ ├── HdfResultsXsec.py
168
+ │ ├── HdfStruc.py
169
+ │ ├── HdfPipe.py
170
+ │ ├── HdfPump.py
171
+ │ ├── HdfFluvialPluvial.py
172
+ │ ├── HdfPlot.py
173
+ │ └── HdfResultsPlot.py
141
174
  ├── examples
142
175
  │ ├── 01_project_initialization.py
143
176
  │ ├── 02_plan_operations.py
@@ -236,10 +269,45 @@ plan_number = "01"
236
269
  runtime_data = RasHdf.get_runtime_data(plan_number, ras_object=custom_ras)
237
270
  print(runtime_data)
238
271
  ```
239
-
240
272
  This class simplifies the process of extracting and analyzing data from HEC-RAS HDF output files, supporting tasks such as post-processing and result visualization.
241
273
 
242
274
 
275
+ ### Infrastructure Analysis
276
+ ```python
277
+ from ras_commander import HdfPipe, HdfPump
278
+
279
+ # Analyze pipe network
280
+ pipe_network = HdfPipe.get_pipe_network(hdf_path)
281
+ conduits = HdfPipe.get_pipe_conduits(hdf_path)
282
+
283
+ # Analyze pump stations
284
+ pump_stations = HdfPump.get_pump_stations(hdf_path)
285
+ pump_performance = HdfPump.get_pump_station_summary(hdf_path)
286
+ ```
287
+
288
+ ### Advanced Results Analysis
289
+ ```python
290
+ from ras_commander import HdfResultsMesh
291
+
292
+ # Get maximum water surface and velocity
293
+ max_ws = HdfResultsMesh.get_mesh_max_ws(hdf_path)
294
+ max_vel = HdfResultsMesh.get_mesh_max_face_v(hdf_path)
295
+
296
+ # Visualize results
297
+ from ras_commander import HdfResultsPlot
298
+ HdfResultsPlot.plot_results_max_wsel(max_ws)
299
+ ```
300
+
301
+ ### Fluvial-Pluvial Analysis
302
+ ```python
303
+ from ras_commander import HdfFluvialPluvial
304
+
305
+ boundary = HdfFluvialPluvial.calculate_fluvial_pluvial_boundary(
306
+ hdf_path,
307
+ delta_t=12 # Time threshold in hours
308
+ )
309
+
310
+
243
311
  ## Documentation
244
312
 
245
313
  For detailed usage instructions and API documentation, please refer to the [Comprehensive Library Guide](Comprehensive_Library_Guide.md).
@@ -0,0 +1,34 @@
1
+ ras_commander/Decorators.py,sha256=M5r5cHz_yy9YTHNEoytO9uwWbv_S-YYUk2QHNamJJJs,5848
2
+ ras_commander/HdfBase.py,sha256=bJtSWdDUP4MYJ8QgkcixBEDFMSlslUdmVFHZxWMGMDM,11603
3
+ ras_commander/HdfBndry.py,sha256=gcNr22vHNjEiWYigz-4aKUEYUi__3bRl4AeRAQQEmjs,12553
4
+ ras_commander/HdfFluvialPluvial.py,sha256=Bscvv0KBGnl05U7hH9RmsGqtPANDdTxgLwo7kXbTmTU,14281
5
+ ras_commander/HdfInfiltration.py,sha256=QVigQJjYeQNutbazGHhbTmEuIVCb9gIb2f4yM-wyUtQ,15269
6
+ ras_commander/HdfMesh.py,sha256=R_O8tMsQvzbepa3hy1psO9t7TmYyMndnyZSh3602rFY,18683
7
+ ras_commander/HdfPipe.py,sha256=m-yvPL2GIP23NKt2tcwzOlS7khvgcDPGAshlTPMUAeI,32154
8
+ ras_commander/HdfPlan.py,sha256=NW6g2kS74y44Ci1P9iMo7IKUfR0eYOaJn1QbzsRM1co,10415
9
+ ras_commander/HdfPlot.py,sha256=7MNI5T9qIz-Ava1RdlnB6O9oJElE5BEB29QVF5Y2Xuc,3401
10
+ ras_commander/HdfPump.py,sha256=Vc2ff16kRISR7jwtnaAqxI0p-gfBSuZKzR3rQbBLQoE,12951
11
+ ras_commander/HdfResultsMesh.py,sha256=T1afgFsJ1NaqmOJEJfMUBm1ZZ5pwbd82aAqeEkHNaLk,30959
12
+ ras_commander/HdfResultsPlan.py,sha256=HoN3wvhj1wtkW-M20UHH9skntDqEvJEgeYeO_QBLF2w,11974
13
+ ras_commander/HdfResultsPlot.py,sha256=ylzfT78CfgoDO0XAlRwlgMNRzvNQYBMn9eyXyBfjv_w,7660
14
+ ras_commander/HdfResultsXsec.py,sha256=-P7nXnbjOLAeUnrdSC_lJQSfzrlWKmDF9Z5gEjmxbJY,13031
15
+ ras_commander/HdfStruc.py,sha256=yzD4_eZLgwZDS3GdYVWqd85jRpdlRdVdbHHfPYTmwjA,12703
16
+ ras_commander/HdfUtils.py,sha256=AbfV5RwbFyNR1SFGKO_izmVtRnDx68u_4wep5FK14xU,14814
17
+ ras_commander/HdfXsec.py,sha256=uuogrJjRFytNHxmluQVuB57X1lILo1Y15wtc_VaHMX8,26809
18
+ ras_commander/LoggingConfig.py,sha256=p1OJkQj5dsDdyBQqF0HWsvbsU88n9cYOc3YB2MMBYiw,2666
19
+ ras_commander/RasCmdr.py,sha256=N2PI5n0P3ClLUPOPNcONJHGJYF-fIU5o0GXwHv4VATE,25271
20
+ ras_commander/RasExamples.py,sha256=eYlRKryCG88FN5p23TnA1-E2Bxuaz3OxjdHPHJSqdB8,17006
21
+ ras_commander/RasGeo.py,sha256=M0sVNKlWmmbve8iMXLWq25WgbxqLWBo7_1oDg_rALzU,5607
22
+ ras_commander/RasGpt.py,sha256=N_7p2nucWrBBXdB2k2ZKvOeOdXNmFD9dIY3W7_5i5nw,1206
23
+ ras_commander/RasMapper.py,sha256=A7xupixCmgXFiSfQs3oWBMBstrO8XcxieMeZWKTcbPQ,3271
24
+ ras_commander/RasPlan.py,sha256=jt0adLtwGjrKC90uuBXYgHpVyV3cKgD1Q_zkKiI04fc,52742
25
+ ras_commander/RasPrj.py,sha256=QLt8f__M0jguzva7C2J0uNFLR7v8t_MIeZpIXcCN4Tw,36851
26
+ ras_commander/RasToGo.py,sha256=TKujfaV1xQhFaOddF4g2ogGy6ky-CLlfelSMPD2J3Nk,1223
27
+ ras_commander/RasUnsteady.py,sha256=NWZbmB3-HT0W00K4-zxFN9OF8H_HlOY64nM72sHicWg,31154
28
+ ras_commander/RasUtils.py,sha256=P2-aBL61kdRINsjnBpstZVD6VVc7hI_D3RUXqr6ldmc,34863
29
+ ras_commander/__init__.py,sha256=vhnZQaejmyFVFP5fcYxAc4A562o8KFcnZNkcY6J5xwY,2068
30
+ ras_commander-0.50.0.dist-info/LICENSE,sha256=_pbd6qHnlsz1iQ-ozDW_49r86BZT6CRwO2iBtw0iN6M,457
31
+ ras_commander-0.50.0.dist-info/METADATA,sha256=Hjc2Tbk_T7EmArxWMbPzQels8FShtQ2ojkjLd73X6jw,18323
32
+ ras_commander-0.50.0.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
33
+ ras_commander-0.50.0.dist-info/top_level.txt,sha256=i76S7eKLFC8doKcXDl3aiOr9RwT06G8adI6YuKbQDaA,14
34
+ ras_commander-0.50.0.dist-info/RECORD,,
@@ -1,30 +0,0 @@
1
- ras_commander/Decorators.py,sha256=i5AEQbe7JeI8Y3O_dQ5OO4Ab0KO5SiZTiysFBGxqTRU,4978
2
- ras_commander/HdfBase.py,sha256=HV5ccV9QH2lz4ZRYqK2d7_S833cTSUcostzxxSPb4O4,7129
3
- ras_commander/HdfBndry.py,sha256=29SAcn-LGf3QiNCeRmlT7JsGI94Dwl9NMm-zHNBuXlA,20752
4
- ras_commander/HdfFluvialPluvial.py,sha256=5OwYYEoLRJ4gfzi4kOBPO9_LVI_OyqW-Z8Jr7POOr34,13965
5
- ras_commander/HdfMesh.py,sha256=lNzEN7npA4KXUB9ZLyCMRk-EuL0oPD6J5MPZYamV7xU,14657
6
- ras_commander/HdfPipe.py,sha256=StL7D5hgdknzwS8VRSd9Rg_U9VOstepDvYvquLYCLOs,34348
7
- ras_commander/HdfPlan.py,sha256=DDnkMZ4Px4_4Netb7rLyxpDG1N-C742Yce4fDmNZAVo,6977
8
- ras_commander/HdfPump.py,sha256=LPQPjOL6dWpJBW2F9pQVzNyqQL1XvNvUmjtf_hDygV4,10486
9
- ras_commander/HdfResultsMesh.py,sha256=BLKCarZES9t2_L0lbPnCeVtaF2MhFH-ZRw6Kjsl-fuY,31264
10
- ras_commander/HdfResultsPlan.py,sha256=-4tTMLiSkuOs3pKn7sA_1RoGmBxaG8jMUJ9qvVlc2Q0,17299
11
- ras_commander/HdfResultsXsec.py,sha256=KOmsGlkZ2mr0aN55ZFu4T119MiMtLb5i5Sd9CMhHvj8,10516
12
- ras_commander/HdfStruc.py,sha256=zT5cgGKw83QnBTXqfHO2BkKKXV8cJ1A9N8_n7h9ZSJk,11510
13
- ras_commander/HdfUtils.py,sha256=Qz7uHqQRYPb4N214QU5q6p12i8Z9dhY80bcZUbOIM-s,20384
14
- ras_commander/HdfXsec.py,sha256=wnqNFD9vQjAHgU5w8FFu9MrJhEZXxeDdg6FLM-B4VLw,26427
15
- ras_commander/LoggingConfig.py,sha256=5bYd_5KMlf81bXsiu2mABBlw0USMhcu5uRv8DIYJSFE,2317
16
- ras_commander/RasCmdr.py,sha256=qZtdvwQnZxOjhU3pZWRCJ80aH5QWOJD_F7P_05geSHA,25020
17
- ras_commander/RasExamples.py,sha256=FDit6FWzTQbv42Xx0gtSJB17HDeol_eykxV0qVpnwIk,16688
18
- ras_commander/RasGeo.py,sha256=x7eFvUQ_dPZxAVq2Gw_GIRzn-Cf7DLKZDTwk1fjrkf8,5395
19
- ras_commander/RasGpt.py,sha256=1Nitlf5QyeBQo8Q8I8pJKaTtQ0GdsBQA71LIKUAOycA,839
20
- ras_commander/RasPlan.py,sha256=fVuWQL6bnRCoHm-WiWv2mWZ8vTsDXn1BxcwUf03ma8s,51276
21
- ras_commander/RasPrj.py,sha256=Ppmv3Yx_iN1ARKWC_dfSGVhdi4tHIuapDSdLbuAAGLU,36084
22
- ras_commander/RasToGo.py,sha256=UiUbvpjcAxAkWdSc-9Yywy7eOkGJaTHs24p4cjiL7co,588
23
- ras_commander/RasUnsteady.py,sha256=4j5Ga5hP8LepgR93uywjUjOEDhznLF7UnNtRmBS5d48,30779
24
- ras_commander/RasUtils.py,sha256=NBMxTHWHoTH2MJzqJ0y1_00fgKSS1GnNuEikwZ3Pqzs,34153
25
- ras_commander/__init__.py,sha256=-8mrN9qNbKiK0RfgCJasORkzuIKPHmY6RfYLzZqm2ok,1804
26
- ras_commander-0.48.0.dist-info/LICENSE,sha256=_pbd6qHnlsz1iQ-ozDW_49r86BZT6CRwO2iBtw0iN6M,457
27
- ras_commander-0.48.0.dist-info/METADATA,sha256=sEeBUJL0yGQez4hOPSqMr39IWLOzqMK90hLiaVFT45k,16020
28
- ras_commander-0.48.0.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
29
- ras_commander-0.48.0.dist-info/top_level.txt,sha256=i76S7eKLFC8doKcXDl3aiOr9RwT06G8adI6YuKbQDaA,14
30
- ras_commander-0.48.0.dist-info/RECORD,,