Commit fa815283 authored by Domanski, Marian M.'s avatar Domanski, Marian M.
Browse files

add results of notebook runs

parent 97a44afc
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
%% Cell type:code id: tags:
``` python
from fluegg.ras import RASProject
```
%% Cell type:code id: tags:
``` python
help(RASProject)
```
%% Output
Help on class RASProject in module fluegg.ras:\n\nclass RASProject(builtins.object)\n | RASProject(project_file_path)\n | \n | RAS project.\n | \n | After use, call close() to keep the RAS process from lingering. The\n | RASProject interface facilitates the use of the with-statement. See\n | below for an example.\n | \n | ```\n | with RASProject(project_file_path) as rp:\n | hydrauilc_data = rp.hydraulic_model_data('Unsteady')\n | ```\n | \n | \n | Parameters\n | ----------\n | project_file_path : str\n | Path to RAS project file\n | \n | Notes\n | -----\n | The values in the output of hydraulic_model_data are in metric units. If\n | the quantities in the RAS project are in English units, the output will be\n | converted.\n | \n | Methods defined here:\n | \n | __enter__(self)\n | Runs on creation of class instance\n | \n | __exit__(self, *args)\n | Runs on deletion of class instance\n | \n | __init__(self, project_file_path)\n | Initialize self. See help(type(self)) for accurate signature.\n | \n | close(self)\n | Close the RAS controller\n | \n | current_plan_name(self)\n | Returns the current plan name\n | \n | Returns\n | -------\n | str\n | \n | current_reach_name(self)\n | Returns the current reach name\n | \n | Returns\n | -------\n | str\n | \n | current_river_name(self)\n | Returns the current river name\n | \n | Returns\n | -------\n | str\n | \n | hydraulic_model_data(self, profile_name, temperature=22)\n | Returns a pandas.DataFrame containing hydraulic data for the specified profile.\n | \n | If 'Unsteady' is specified for profile_name, the index of the DataFrame will be a pandas.MultiIndex\n | \n | Parameters\n | ----------\n | profile_name : str\n | Name of profile. The name must be in the list of profiles or 'Unsteady'. If 'Unsteady', the\n | RAS profile must have an associated unsteady file.\n | temperature : float\n | Water temperature\n | \n | Returns\n | -------\n | pandas.DataFrame\n | \n | plan_names(self)\n | Returns a list of plan names in this RAS project.\n | \n | Returns\n | -------\n | list\n | \n | profile_names(self)\n | Returns a list of profile names in this RAS project.\n | \n | Returns\n | -------\n | list\n | \n | project_units(self)\n | Returns the RAS project units.\n | \n | Returns\n | -------\n | str\n | \n | reach_names(self)\n | Returns a list of reach names in this RAS project.\n | \n | Returns\n | -------\n | list\n | \n | river_names(self)\n | Returns a list of river names in this RAS project.\n | \n | Returns\n | -------\n | list\n | \n | set_current_plan(self, plan_name)\n | Sets the current plan name for this RAS project.\n | \n | Parameters\n | ----------\n | plan_name : str\n | Plan name. The plan name must be in the list of plan names of this project.\n | \n | ----------------------------------------------------------------------\n | Static methods defined here:\n | \n | ras_controller_loaded()\n | Returns whether the RAS controller is loaded\n | \n | ----------------------------------------------------------------------\n | Data descriptors defined here:\n | \n | __dict__\n | dictionary for instance variables (if defined)\n | \n | __weakref__\n | list of weak references to the object (if defined)\n\n
%% Cell type:code id: tags:
``` python
project_file_path = r'..\test\data\ras\steadyflume\rectangular-flume.prj'
with RASProject(project_file_path) as rp:
plan_name = rp.current_plan_name()
project_profile_names = rp.profile_names()
print("Current plan name: {}".format(plan_name))
print("Profile names\n----------")
for pn in project_profile_names:
print(" {}".format(pn))
```
%% Output
Current plan name: case1\nProfile names\n----------\n PF 1\n
%% Cell type:code id: tags:
``` python
profile_name = project_profile_names[0]
temperature = 22
with RASProject(project_file_path) as rp:
hydraulic_data = rp.hydraulic_model_data(profile_name, temperature)
hydraulic_data
```
%% Cell type:code id: tags:
%% Output
``` python
```
Depth_m Q_cms Vmag_mps CumlDistance_km Ustar_mps Vvert_mps \\n1 1.835397 24.999996 0.136210 5.0 0.013188 0 \n2 1.835564 24.999996 0.136198 15.0 0.013187 0 \n3 1.835687 24.999996 0.136189 20.0 0.013186 0 \n\n Vlat_mps Temp_C \n1 0 22 \n2 0 22 \n3 0 22
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment