ras-commander 0.47.0__py3-none-any.whl → 0.49.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.47.0
3
+ Version: 0.49.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,7 +61,7 @@ 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 rtree pyproj shapely xarray rasterio
64
+ pip install h5py numpy pandas requests tqdm scipy xarray geopandas matplotlib ras-commander ipython psutil shapely fiona pathlib rtree
65
65
  pip install --upgrade ras-commander
66
66
  ```
67
67
 
@@ -118,26 +118,56 @@ Certainly! I'll provide you with an updated Key Components section and Project O
118
118
  - `RasUnsteady`: Manages unsteady flow file operations
119
119
  - `RasUtils`: Contains utility functions for file operations and data management
120
120
  - `RasExamples`: Manages and loads HEC-RAS example projects
121
- - `RasHdf`: Provides utilities for working with HDF files in HEC-RAS projects
121
+
122
+ ### New Components:
123
+ - `HdfBase`: Core functionality for HDF file operations
124
+ - `HdfBndry`: Enhanced boundary condition handling
125
+ - `HdfMesh`: Comprehensive mesh data management
126
+ - `HdfPlan`: Plan data extraction and analysis
127
+ - `HdfResultsMesh`: Advanced mesh results processing
128
+ - `HdfResultsPlan`: Plan results analysis
129
+ - `HdfResultsXsec`: Cross-section results processing
130
+ - `HdfStruc`: Structure data management
131
+ - `HdfPipe`: Pipe network analysis tools
132
+ - `HdfPump`: Pump station analysis capabilities
133
+ - `HdfFluvialPluvial`: Fluvial-pluvial boundary analysis
134
+ - `RasMapper`: RASMapper interface
135
+ - `RasToGo`: Go-Consequences integration
136
+ - `HdfPlot` & `HdfResultsPlot`: Specialized plotting utilities
137
+
138
+ ## Project Organization Diagram
122
139
 
123
140
  ## Project Organization Diagram
124
141
 
125
142
  ```
126
143
  ras_commander
127
- ├── .github
128
- │ └── workflows
129
- │ └── python-package.yml
130
144
  ├── ras_commander
131
145
  │ ├── __init__.py
132
146
  │ ├── _version.py
147
+ │ ├── Decorators.py
148
+ │ ├── LoggingConfig.py
133
149
  │ ├── RasCmdr.py
134
150
  │ ├── RasExamples.py
135
151
  │ ├── RasGeo.py
136
- │ ├── RasHdf.py
137
152
  │ ├── RasPlan.py
138
153
  │ ├── RasPrj.py
139
154
  │ ├── RasUnsteady.py
140
- │ └── RasUtils.py
155
+ │ ├── RasUtils.py
156
+ │ ├── RasToGo.py
157
+ │ ├── RasGpt.py
158
+ │ ├── HdfBase.py
159
+ │ ├── HdfBndry.py
160
+ │ ├── HdfMesh.py
161
+ │ ├── HdfPlan.py
162
+ │ ├── HdfResultsMesh.py
163
+ │ ├── HdfResultsPlan.py
164
+ │ ├── HdfResultsXsec.py
165
+ │ ├── HdfStruc.py
166
+ │ ├── HdfPipe.py
167
+ │ ├── HdfPump.py
168
+ │ ├── HdfFluvialPluvial.py
169
+ │ ├── HdfPlot.py
170
+ │ └── HdfResultsPlot.py
141
171
  ├── examples
142
172
  │ ├── 01_project_initialization.py
143
173
  │ ├── 02_plan_operations.py
@@ -236,10 +266,45 @@ plan_number = "01"
236
266
  runtime_data = RasHdf.get_runtime_data(plan_number, ras_object=custom_ras)
237
267
  print(runtime_data)
238
268
  ```
239
-
240
269
  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
270
 
242
271
 
272
+ ### Infrastructure Analysis
273
+ ```python
274
+ from ras_commander import HdfPipe, HdfPump
275
+
276
+ # Analyze pipe network
277
+ pipe_network = HdfPipe.get_pipe_network(hdf_path)
278
+ conduits = HdfPipe.get_pipe_conduits(hdf_path)
279
+
280
+ # Analyze pump stations
281
+ pump_stations = HdfPump.get_pump_stations(hdf_path)
282
+ pump_performance = HdfPump.get_pump_station_summary(hdf_path)
283
+ ```
284
+
285
+ ### Advanced Results Analysis
286
+ ```python
287
+ from ras_commander import HdfResultsMesh
288
+
289
+ # Get maximum water surface and velocity
290
+ max_ws = HdfResultsMesh.get_mesh_max_ws(hdf_path)
291
+ max_vel = HdfResultsMesh.get_mesh_max_face_v(hdf_path)
292
+
293
+ # Visualize results
294
+ from ras_commander import HdfResultsPlot
295
+ HdfResultsPlot.plot_results_max_wsel(max_ws)
296
+ ```
297
+
298
+ ### Fluvial-Pluvial Analysis
299
+ ```python
300
+ from ras_commander import HdfFluvialPluvial
301
+
302
+ boundary = HdfFluvialPluvial.calculate_fluvial_pluvial_boundary(
303
+ hdf_path,
304
+ delta_t=12 # Time threshold in hours
305
+ )
306
+
307
+
243
308
  ## Documentation
244
309
 
245
310
  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=V6RGpKmnX5E6XzAJPcexcPtC2Qfy56XpJi_Vq4KEV7o,10243
5
+ ras_commander/HdfInfiltration.py,sha256=QVigQJjYeQNutbazGHhbTmEuIVCb9gIb2f4yM-wyUtQ,15269
6
+ ras_commander/HdfMesh.py,sha256=Yyom3i46AQFqI9cvhUyc5vh_g98aKAAsAjx7akuzsXw,18299
7
+ ras_commander/HdfPipe.py,sha256=m-yvPL2GIP23NKt2tcwzOlS7khvgcDPGAshlTPMUAeI,32154
8
+ ras_commander/HdfPlan.py,sha256=NW6g2kS74y44Ci1P9iMo7IKUfR0eYOaJn1QbzsRM1co,10415
9
+ ras_commander/HdfPlot.py,sha256=m4hbVkRbLW5a515jnM-iHSt5CLgtLSn5yxSpzRmgCGk,3337
10
+ ras_commander/HdfPump.py,sha256=Vc2ff16kRISR7jwtnaAqxI0p-gfBSuZKzR3rQbBLQoE,12951
11
+ ras_commander/HdfResultsMesh.py,sha256=RIwifjvVU3DuO4SpRvPsse7io9TpiJljAuNJe_K82wM,31316
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=5bYd_5KMlf81bXsiu2mABBlw0USMhcu5uRv8DIYJSFE,2317
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.49.0.dist-info/LICENSE,sha256=_pbd6qHnlsz1iQ-ozDW_49r86BZT6CRwO2iBtw0iN6M,457
31
+ ras_commander-0.49.0.dist-info/METADATA,sha256=EAK_gweDEyFXD8yvAFAywr33gxm7pFrGh37pdTrCrXU,18278
32
+ ras_commander-0.49.0.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
33
+ ras_commander-0.49.0.dist-info/top_level.txt,sha256=i76S7eKLFC8doKcXDl3aiOr9RwT06G8adI6YuKbQDaA,14
34
+ ras_commander-0.49.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=Ca0Yd8Vk7Em2xJz9sM5IXkvCiH5Qm0DKrJcookGYmgw,13765
5
- ras_commander/HdfMesh.py,sha256=StNPryl4XSG7hREv-zQgUyNI_jiVde7vTmQ4ek2cSvQ,14777
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.47.0.dist-info/LICENSE,sha256=_pbd6qHnlsz1iQ-ozDW_49r86BZT6CRwO2iBtw0iN6M,457
27
- ras_commander-0.47.0.dist-info/METADATA,sha256=0nLreN8rEM7JdISbLkdiPN6DUGOylEAAIuIqj9gfFmE,15972
28
- ras_commander-0.47.0.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
29
- ras_commander-0.47.0.dist-info/top_level.txt,sha256=i76S7eKLFC8doKcXDl3aiOr9RwT06G8adI6YuKbQDaA,14
30
- ras_commander-0.47.0.dist-info/RECORD,,