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

Improve erorr handling around 0080 and 0001 datasets #29

Open
trey-stafford opened this issue Sep 26, 2024 · 0 comments
Open

Improve erorr handling around 0080 and 0001 datasets #29

trey-stafford opened this issue Sep 26, 2024 · 0 comments

Comments

@trey-stafford
Copy link
Contributor

trey-stafford commented Sep 26, 2024

These datasets produce netcdf files for each day that have groups within for each platform (e.g. a group called F17 for the tbs from F17). Sometimes there is no data for the platform we want data for, but the file still exists.

An OSError is raised if a data file for a day exists but the group we try to access isn't present. The NSIDC-0080 get_nsidc_0001_tbs_from_disk function catches OSError and re-raises as FileNotFoundError, which could be misleading.

The 0080 fetch code does not handle the OSError at all.

Ideally, we wrap the fetch code in a generic exception handler that can re-raise a more appropriate error that client libraries can handle as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant