From a3aaaf14b222f3f90a5a3ba68a60d0d45780b79e Mon Sep 17 00:00:00 2001 From: AminTorabi-NOAA Date: Wed, 14 Aug 2024 22:46:10 -0400 Subject: [PATCH 1/2] update for csv_output --- src/troute-network/troute/nhd_io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/troute-network/troute/nhd_io.py b/src/troute-network/troute/nhd_io.py index b948b379f..a30f3d1cf 100644 --- a/src/troute-network/troute/nhd_io.py +++ b/src/troute-network/troute/nhd_io.py @@ -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']] @@ -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) From 513774df105f08316e61a891ee78a942874d7fbe Mon Sep 17 00:00:00 2001 From: AminTorabi-NOAA Date: Thu, 15 Aug 2024 12:40:36 -0400 Subject: [PATCH 2/2] fix to issue 829 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 3cfb7d2e9..6ae078abe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ pip>=22.1.0 setuptools>=64.0,<69.0 wheel -numpy +numpy>=1.21.0,<2.0.0 Cython>3,!=3.0.4 pandas >=1.1.5, <=2.2.0 xarray