Conversation
… GDAL to verify the files instead
…_dir>) to retry only failed downloads without re-querying CMR; exits cleanly if the file is missing or empty Pagination: Replaced single page_size=2000 query with a paginated loop, so searches returning more than 2000 granules are handled correctly CMR query timeouts: Added 60s timeout on CMR queries to prevent the script from hanging when CMR is slow or unresponsive CMR loop guard: Added a validity check on each CMR response — breaks the pagination loop on invalid or empty responses instead of looping forever Date order validation: Added check that start date is not after end date; exits with a clear error message Per-file retry logic: Each file is retried up to 3 times before being marked as failed, instead of failing the entire granule on first error Downloads: Files are downloaded to a temp path and renamed to the final name only on success, preventing partial files from appearing complete Partial granule preservation: On failure, successfully downloaded files are kept and only the failed URLs are written to failed_downloads.txt; the entire granule directory is no longer deleted curl compatibility fix: Replaced attribute[]= query syntax with attribute=, which caused curl to return exit code 3 on some systems (e.g., CentOS) Cloud coverage filter: Fixed cloud coverage filter — changed type from float to int and applied it correctly (was commented out / broken in upstream) Improved messaging: Distinct end-of-run messages for: 0 granules found (with CMR status note), successful run, successful re-run, and partial failures with re-run instructions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This script is updated by Junchang