Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gb/bias nc #181

Merged
merged 15 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
use handle features method in extract error
  • Loading branch information
grantbuster committed Dec 13, 2023
commit 90e44b6f404b94b455b3a39c5f2076840319570c
4 changes: 2 additions & 2 deletions sup3r/preprocessing/data_handling/h5_data_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ def extract_feature(cls,
try:
fdata = handle[(feature, time_slice, *(raster_index.flatten(),))]
except ValueError as e:
hfeatures = cls.get_handle_features(file_paths)
msg = (f'Requested feature "{feature}" cannot be extracted from '
f'source data that has available variables: '
f'{handle.dsets}.')
f'source data that has handle features: {hfeatures}.')
logger.exception(msg)
raise ValueError(msg) from e

Expand Down
4 changes: 2 additions & 2 deletions sup3r/preprocessing/data_handling/nc_data_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,9 @@ def extract_feature(cls,
time_slice)

else:
available = [str(var) for var in handle.variables]
hfeatures = cls.get_handle_features(file_paths)
msg = (f'Requested feature "{feature}" cannot be extracted from '
f'source data that has available variables: {available}.')
f'source data that has handle features: {hfeatures}.')
logger.exception(msg)
raise ValueError(msg)

Expand Down