Skip to content

Commit

Permalink
fix(mf5to6.py::segment_data_to_period_data): use nseg column instead …
Browse files Browse the repository at this point in the history
…of dataframe index for segment numbers
  • Loading branch information
aleaf committed Sep 21, 2023
1 parent 118615d commit a5be8ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sfrmaker/mf5to6.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def segment_data_to_period_data(segment_data, reach_data):
# get rno for reach 1s
segroups = rd.groupby('iseg')
reach1IDs = segroups.first()['rno'].to_dict()
prd['rno'] = [reach1IDs[i + 1] for i in prd.index]
prd['rno'] = [reach1IDs[seg] for seg in prd['nseg']]
# prd['rainfall'] = np.random.randn(len(prd))

# distribute other variables to all reaches
Expand Down

0 comments on commit a5be8ee

Please sign in to comment.