Skip to content

Commit

Permalink
updating time on csv output (#818)
Browse files Browse the repository at this point in the history
  • Loading branch information
AminTorabi-NOAA authored Aug 6, 2024
1 parent c2cd1b4 commit 5865910
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/troute-network/troute/nhd_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -2076,6 +2076,9 @@ def write_flowveldepth_csv_pkl(stream_output_directory, file_name,
# 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']]

# File format handling
file_format = file_name.split('.')[-1]
Expand Down

0 comments on commit 5865910

Please sign in to comment.