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

NPI-3689 Restructure IAU2000 download functionality #74

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

treefern
Copy link
Collaborator

Separate IAU2000 file variant selection logic from download functionality and improve selection logic to allow passing a date range rather than a single date.

@treefern treefern requested a review from ronaldmaj January 23, 2025 05:38
@treefern treefern self-assigned this Jan 23, 2025
@treefern treefern marked this pull request as ready for review January 30, 2025 10:04
Copy link
Collaborator

@ronaldmaj ronaldmaj left a 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 "
Copy link
Collaborator

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(
Copy link
Collaborator

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

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.

2 participants