Skip to content

Commit

Permalink
update for csv_output (#828)
Browse files Browse the repository at this point in the history
  • Loading branch information
AminTorabi-NOAA authored Aug 15, 2024
1 parent bb7d6ec commit 452a35b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/troute-network/troute/nhd_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -2070,12 +2070,11 @@ def write_flowveldepth_csv_pkl(stream_output_directory, file_name,
'velocity': velocity.iloc[:, i],
'depth': depth.iloc[:, i],
'nudge': nudge_df.iloc[:, i]
})
}, index=flow.index)
df_list.append(df_temp)

# Concatenate all temporary DataFrames vertically
df = pd.concat(df_list)
df.index.name = 'feature_id'

df['current_time'] = pd.to_datetime(df['t0']) + pd.to_timedelta(df['time'])
df = df[['current_time', 'flow', 'velocity', 'depth', 'nudge']]
Expand Down Expand Up @@ -2269,6 +2268,7 @@ def mask_find_seg(mask_list, nexus_dict, poi_crosswalk):
return nex_id, seg_id

def updated_flowveldepth(flowveldepth, nex_id, seg_id, mask_list):
flowveldepth = flowveldepth.copy(deep=True)
flowveldepth.index.name = 'featureID'
flowveldepth['Type'] = 'wb'
flowveldepth.set_index('Type', append=True, inplace=True)
Expand Down

0 comments on commit 452a35b

Please sign in to comment.