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

Add option to fix netCDF issues #17 #18

Merged
merged 2 commits into from
Sep 12, 2022
Merged

Add option to fix netCDF issues #17 #18

merged 2 commits into from
Sep 12, 2022

Conversation

m-mohr
Copy link
Collaborator

@m-mohr m-mohr commented Sep 12, 2022

This adds an option to fix the _Unsiged issues in some older netCDF files.

See #17 for details. I'll add comments with concerns. Most of the changes in the code are just indentation.

@m-mohr m-mohr linked an issue Sep 12, 2022 that may be closed by this pull request
raise Exception(
f"The dataset contains an invalid platform identifier: {dataset.platform_ID}"
)
with Dataset(asset_href, "a", format="NETCDF4") as dataset:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always opening the files for reading is not ideal. On the other hand, scaling the variables manually also doesn't seem ideal.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷 Since there is now an option to fix the netcdf, always opening them for append seems OK.

@m-mohr m-mohr mentioned this pull request Sep 12, 2022
@m-mohr m-mohr marked this pull request as ready for review September 12, 2022 13:04
raise Exception(
f"The dataset contains an invalid platform identifier: {dataset.platform_ID}"
)
with Dataset(asset_href, "a", format="NETCDF4") as dataset:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷 Since there is now an option to fix the netcdf, always opening them for append seems OK.

src/stactools/goes_glm/stac.py Outdated Show resolved Hide resolved
@m-mohr m-mohr merged commit 63e998d into main Sep 12, 2022
@m-mohr m-mohr deleted the fixnetcdf branch September 12, 2022 14:46
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

Successfully merging this pull request may close these issues.

Item creation failures
2 participants