From 5865910b73865bedf281cd79d7de4463675a2834 Mon Sep 17 00:00:00 2001 From: Amin Torabi <140189926+AminTorabi-NOAA@users.noreply.github.com> Date: Tue, 6 Aug 2024 08:28:59 -0400 Subject: [PATCH] updating time on csv output (#818) --- src/troute-network/troute/nhd_io.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/troute-network/troute/nhd_io.py b/src/troute-network/troute/nhd_io.py index 539e661aa..b948b379f 100644 --- a/src/troute-network/troute/nhd_io.py +++ b/src/troute-network/troute/nhd_io.py @@ -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]