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

Implement small buffer around time in queries #32

Open
torimcd opened this issue Nov 9, 2023 · 0 comments
Open

Implement small buffer around time in queries #32

torimcd opened this issue Nov 9, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@torimcd
Copy link
Collaborator

torimcd commented Nov 9, 2023

All time fields (time, time_str, time_tai) in SWOT hydrology source shapefiles can contain 'no_data' or fillvalues, since these represent the 'time of observation' and there are circumstances under which an observation cannot be recorded for a given reach, node, or lake. To handle this, hydrocron uses the continent pass range start time as the sort key in the database and the time to query on, rather than the observed time.

This means that when a user enters a query with a start_time of 2023-06-01T12:00:00 and an end_time of 2023-12-01T12:00:00, hydrocron will return only records that have a range_start_time within that time range. However, it's possible that a feature was observed at 2023-06-01T12:00:05, but the continent pass started at 2023-06-01T11:59:55. In this case the range_start_time = 2023-06-01T11:59:55 and the feature that was observed within the time bounds of the query won't be included in the results.

Implementing a buffer of 30 seconds before the start_time the user enters will ensure that all observations within the time range the user requests are returned. Note that in some cases this will return features with an observed time that is prior to the start_time entered, but given the repeat time of observations is 21 days, this should occur rarely and will return at most one extra timestep that is within 30s of the time requested.

@torimcd torimcd added the enhancement New feature or request label Nov 9, 2023
@torimcd torimcd self-assigned this Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant