-
Notifications
You must be signed in to change notification settings - Fork 9
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
NPI-3689 Restructure IAU2000 download functionality #74
base: main
Are you sure you want to change the base?
NPI-3689 Restructure IAU2000 download functionality #74
Conversation
…variant option to use when dates can be accomodated by multiple variants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've discovered a couple errors coming up that I think shouldn't be, based on my inputs?
Something to look at next week perhaps
variants = get_iau2000_file_variants_for_dates(start_epoch=start_epoch) | ||
if len(variants) != 1: | ||
raise NotImplementedError( | ||
"Legacy wrapper for IAU2000 file download failed. Exactly one file variant should be returned based on " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I seem to hit this error whenever I put through a start date older than 90 days:
In [23]: download_iau2000_file(download_dir=dwn_dir, start_epoch=st2)
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
Cell In[23], line 1
----> 1 download_iau2000_file(download_dir=dwn_dir, start_epoch=st2)
File /data/gnssanalysis/gnssanalysis/gn_download.py:1094, in download_iau2000_file(download_dir, start_epoch, if_file_present)
1092 variants = get_iau2000_file_variants_for_dates(start_epoch=start_epoch)
1093 if len(variants) != 1:
-> 1094 raise NotImplementedError(
1095 "Legacy wrapper for IAU2000 file download failed. Exactly one file variant should be returned based on "
1096 f"a single date ({start_epoch})."
1097 )
1098 variant = variants.pop()
1099 download_iau2000_variant(download_dir=download_dir, iau2000_file_variant=variant, if_file_present=if_file_present)
NotImplementedError: Legacy wrapper for IAU2000 file download failed. Exactly one file variant should be returned based on a single date (2024-10-23 06:00:00).
When I run the get_iau2000_file_variants_for_dates()
function with just the start_epoch
above, I get back two variants (rather than one)
logging.error("Failed to download IAU2000 file from CDDIS.", ex) | ||
|
||
|
||
def get_iau2000_file_variants_for_dates( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I run this with a single date (a start_epoch
) a little over 90 days ago, I get two variants back, rather than one
Separate IAU2000 file variant selection logic from download functionality and improve selection logic to allow passing a date range rather than a single date.