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

unit consistency checks are not ensemble-constrained #106

Closed
corviday opened this issue Oct 29, 2019 · 0 comments · Fixed by #169
Closed

unit consistency checks are not ensemble-constrained #106

corviday opened this issue Oct 29, 2019 · 0 comments · Fixed by #169

Comments

@corviday
Copy link
Contributor

corviday commented Oct 29, 2019

This issue is not causing any current problems, but it is unintuitive behavior and can be quite confusing when debugging.

The data API collects all files that match the parameters passed to it by URL:

  • model
  • ensemble
  • timescale
  • variable

And then constructs a separate timeseries for each run that matches the parameters. Before constructing each run's timeseries, it checks that all variable in that run have the same units, using get_units_from_run_object, filtering datasets by the following parameters:

  • run
  • variable

Notably, get_units_from_run_object does not filter by ensemble. This means that while timeseries are constructed only from the datasets contained in an ensemble, an error will be thrown if any file in the database, even one not in the ensemble, uses incorrect or conflicting units for that variable. This is pretty unintuitive.

Practically speaking, this issue would be 95% resolved if the backend accepted synonymous units using a units library (#105), though get_units_from_run_object and its helpers could also be modified to accept an ensemble and search only within it, to make them behave more intuitively when used by within-ensemble API endpoints to construct timeseries.

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.

3 participants