Skip to content

Commit

Permalink
Merge pull request #182 from aaraney/fix-180
Browse files Browse the repository at this point in the history
Resolve Nwm client IndexError: invalid index to scalar variable. (#180)
  • Loading branch information
jarq6c authored Mar 16, 2022
2 parents 3a490cb + 1b74081 commit fcd012d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/nwm_client/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ install_requires =
numpy>=1.20.0
pandas
xarray
h5netcdf
h5netcdf>=0.14.0
hydrotools.caches>=0.1.2
beautifulsoup4
requests
Expand Down
2 changes: 1 addition & 1 deletion python/nwm_client/src/hydrotools/nwm_client/gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def get_DataFrame(
df = ds[['reference_time', 'time', 'streamflow']].to_dataframe().reset_index()

# Extract scale factor
scale_factor = ds['streamflow'].scale_factor[0]
scale_factor = ds['streamflow'].scale_factor

# Scale data
df.loc[:, 'streamflow'] = df['streamflow'].mul(scale_factor)
Expand Down

0 comments on commit fcd012d

Please sign in to comment.