Maintenance scheduled for Thursday, September 24th at 15:00 MDT. Expected downtime <1 hour.

Merge branch 'plan-profile-exception' into 'master'

Plan profile exception

Closes #34

See merge request mdomanski/fluegg!29
parents cf8a560f ba23c4b5
......@@ -413,12 +413,16 @@ class SimulationParameters:
# Hecras Mode
elif d['hydraulic_mode'] == 'hecras':
with RASProject(d['hecras_path']) as rp:
plan_name = d['hecras_plan']
rp.set_current_plan(plan_name)
profile_name = d['hecras_profile']
temperature = d['hecras_temperature']
hydraulic_df = rp.hydraulic_model_data(
profile_name, temperature)
try:
plan_name = d['hecras_plan']
rp.set_current_plan(plan_name)
profile_name = d['hecras_profile']
temperature = d['hecras_temperature']
hydraulic_df = rp.hydraulic_model_data(
profile_name, temperature)
except:
raise ValueError(
"Either the HEC-RAS plan or profile is missing or is broken.")
temperature = hydraulic_df['Temp_C'].mean()
......
Markdown is supported
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