-
Notifications
You must be signed in to change notification settings - Fork 94
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
Seasonal/recurrent searches #488
Comments
Because of the leap years, would it be possible to use mm-dd?
And that brings me to another thing!
|
Ok, that is exactly the thing! |
No worries! I think we should fix that and implement the recurrent search even if we are off by a day in leap years. In the case of COGs we can have a very streamlined workflow with xarray:
|
For reference, this CMR temporal range feature is documented (you have to look very closely) under Temporal Range searches. Specifically, it is shown in this easily-missed example at the end of the list of examples:
It can also be seen in this example under the section "Find collections with temporal" (unlinked sub-heading):
and again under the section "Finding granules with temporal" (again, unlinked):
Unfortunately, when spanning multiple years with one or more leap years in the range, there appears to be no way to deal with the day offset for days of the year on or after the leap days because the CMR simply expects Julian (ordinal) days as the 3rd and 4th values in the range. In other words, using @betolink's example, day 182 is July 1 in non-leap years, but June 30 in leap years. Since you cannot tell the CMR to use 182 or 183 (depending on leap years). There seems to be no convenient way to deal with this. If necessary, you would likely need to adjust your day range and do a bit of filtering of the query results if you need very specific dates. Regardless, if we really want to be complete with what the CMR supports, in addition to being able to specify both Julian dates, we must also be able to specify only one of the Julian days (start or end), which is what the examples above seem to show, and which the following working examples show:
Notice that the only difference between these 2 examples is that the first one starts with Julian day 10, and the second one ends with Julian day 10. Regardless, I agree that being able to specify the Julian days as MM-DD values would be helpful, but we should support both formats because there may very well be cases where a user is given the Julian days to use, not the MM-DD values, which would require the reverse conversion if only MM-DD format were supported. Finally, I suggest that if we stick with the tuple format (a more specific structure might be more helpful, but that's for another discussion), that we do not specify the Julian days as a nested tuple, but rather at the top of the tuple, e.g.: |
A common search pattern is a seasonal search, e.g. Landsat scenes from July for the last 10 years. This is supported by CMR(although is not well documented) and will allow us to search without having to use for loops.
Will return all HLS scenes from July for the last 10 years with max cloud coverage of 20%. I think this is very useful, however the
182, 212
range is not straight forward to calculate, maybe we need to parse a date and use it with caution as leap years will have a different offset.The text was updated successfully, but these errors were encountered: