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.
Fix, simplify, and make more transparent the logic for loading non-public SWEAP/SPC data
New logic is
try
downloading from sweap server looking for files with a "psp" prefixException
as such andtry
looking for remaining files with a "spp" prefixException
try one more time in the public directory (spdf).This also enforces that the try/except handling checks the error is the one raised on purpose (for any future debugging) and prints the error message, handles the case when the user calls a trange with datetimes rather than strings.
I also removed the if/else statement for last_version to simplify things - I couldn't see how it was necessary as last_version was being passed to the download function in all cases.