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

aggregate_temporal(_period): handling of empty intervals #263

Closed
jdries opened this issue Jun 11, 2021 · 3 comments · Fixed by #265
Closed

aggregate_temporal(_period): handling of empty intervals #263

jdries opened this issue Jun 11, 2021 · 3 comments · Fixed by #265

Comments

@jdries
Copy link
Contributor

jdries commented Jun 11, 2021

One use case for aggregate_temporal is to create data with fixed time intervals. Meaning if I set the period to 'week', I want exactly one observation every week. In practice, this is often combined with e.g. linear interpolation, to fill nodata values in case a given observation was clouded.

However, with the current spec, it is not clear what needs to happen if a given interval doesn't intersect with data in the input datacube? Does the returned datacube have an observation filled with 'nodata' for that interval, or is there no observation at all?

For my current use case, I would like it to be filled with nodata, but this is not necessarily the default case (not sure there).
Do we need a parameter or clarification to pin down the desired behaviour?

@jdries jdries added this to the 1.2.0 milestone Jun 11, 2021
@m-mohr
Copy link
Member

m-mohr commented Jun 14, 2021

VITO is the only implementation right now, so it seems reasonable to simply clarify the behavior in the process. For me, no-data seems to be the most reasonable choice. (outdated, see comment below)

What other options would a parameter allow? The default can still be no-data so if there's no other use-case yet, I'd just stick with no-data and add the parameter with no-data as default once required.

I'll create a PR...

@m-mohr
Copy link
Member

m-mohr commented Jun 14, 2021

Actually, this is implicitly clear: All reducers return null (no-data) if an empty array is passed. So it's basically a user-defined behavior, reducers should also be called by back-ends for "empty" intervals and pass an empty array. It's then up to the reducer (and the user) to decide what to do. By default, this is null (no-data). So I'm not even sure we need to do something here, maybe only clarify that empty array should still be computed? @jdries

m-mohr added a commit that referenced this issue Jun 14, 2021
…reducers are also executed for intervals/periods with no data. #263
@m-mohr
Copy link
Member

m-mohr commented Jun 14, 2021

See #265

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants