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

Update datetimes to be tz-aware + bug fixes #627

Merged
merged 22 commits into from
Jun 30, 2024
Merged

Conversation

jlmaurer
Copy link
Collaborator

@jlmaurer jlmaurer commented Jan 17, 2024

Addresses #623

Description

  • Python is forcing us to go to timezone-aware datetimes. This turns out to be a huge pain, because datetimes aren't automatically tz-aware (which is probably a good thing), so they have to be assigned. Thankfully, RAiDER assumes everything is in UTC (Zulu time), so it's fairly easy to go thru and fix this. I've updated datetimes throughout to be tz-aware. This required changing how we represent the valid_range variable for the weather model objects, so "Present" is no longer a valid option for time bounds. Instead, the software automatically pulls today in UTC time.
  • If you call tropo_delay in Python and you don't explicitly set the grid in the AOI object first, _get_delays_on_cube errors out due to missing the xpts and ypts attributes. xpts and ypts are only intermediate variables, they don't actually matter in terms of your output grid, they always get set properly from the command line, and as long as you set the grid properly prior to called tropo_delay you have no problem. However, this easy addition allows a user to skip setting up the intermediate grid.

Motivation and Context

How Has This Been Tested?

  • Added a unit test that replicates the original issue
  • All other unit tests pass

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I have added an explanation of what your changes do and why you'd like us to include them.
  • I have written new tests for your core changes, as applicable.
  • I have successfully ran tests with your changes locally.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@jlmaurer jlmaurer marked this pull request as ready for review January 18, 2024 02:51
@jlmaurer jlmaurer requested a review from bbuzz31 January 18, 2024 02:52
@jlmaurer
Copy link
Collaborator Author

This is waiting for #629 because GMAO is failing.

@jlmaurer
Copy link
Collaborator Author

This is waiting for #629 because GMAO is failing.

This is ready now!

Copy link
Collaborator

@bbuzz31 bbuzz31 left a comment

Choose a reason for hiding this comment

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

LGTM once tests pass (ECMWF down?)

@jlmaurer jlmaurer changed the title Add catch for when calling tropo_delay as a fcn Update datetimes to be tz-aware + bug fixes Jun 27, 2024
@jlmaurer
Copy link
Collaborator Author

There is an issue with dem_stitcher that is causing some of the current test failures, documented here.

@jlmaurer jlmaurer merged commit ef92d75 into dbekaert:dev Jun 30, 2024
7 checks passed
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