Skip to content

Commit

Permalink
applied linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Zahra Ghahremani committed Jun 24, 2024
1 parent 5c1d381 commit 72c4ad9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions src/src_adjust_ras2fim_rating.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,13 @@ def create_ras2fim_rating_database(ras_rc_filepath, ras_elev_df, nwm_recurr_file
'5_0_year_recurrence_flow_17C': '5_0_year',
'10_0_year_recurrence_flow_17C': '10_0_year',
'25_0_year_recurrence_flow_17C': '25_0_year',
'50_0_year_recurrence_flow_17C': '50_0_year'
'50_0_year_recurrence_flow_17C': '50_0_year',
},
inplace=True,
)

# convert cfs to cms (x 0.028317)
nwm_recur_df.loc[
:, ['2_0_year', '5_0_year', '10_0_year', '25_0_year', '50_0_year']
] *= 0.028317
nwm_recur_df.loc[:, ['2_0_year', '5_0_year', '10_0_year', '25_0_year', '50_0_year']] *= 0.028317

# merge nwm recurr with ras_rc_df
merge_df = ras_rc_df.merge(nwm_recur_df, how='left', on='feature_id')
Expand Down
6 changes: 2 additions & 4 deletions src/src_adjust_usgs_rating_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,12 @@ def create_usgs_rating_database(usgs_rc_filepath, usgs_elev_df, nwm_recurr_filep
'5_0_year_recurrence_flow_17C': '5_0_year',
'10_0_year_recurrence_flow_17C': '10_0_year',
'25_0_year_recurrence_flow_17C': '25_0_year',
'50_0_year_recurrence_flow_17C': '50_0_year'
'50_0_year_recurrence_flow_17C': '50_0_year',
}
)

# convert cfs to cms (x 0.028317)
nwm_recur_df.loc[
:, ['2_0_year', '5_0_year', '10_0_year', '25_0_year', '50_0_year']
] *= 0.028317
nwm_recur_df.loc[:, ['2_0_year', '5_0_year', '10_0_year', '25_0_year', '50_0_year']] *= 0.028317

# merge nwm recurr with usgs_rc
merge_df = usgs_rc_df.merge(nwm_recur_df, how='left', on='feature_id')
Expand Down

0 comments on commit 72c4ad9

Please sign in to comment.