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

fix: get direct data offset from the separated dimension #114

Merged
merged 11 commits into from
Sep 27, 2021

Conversation

ToddFincannon
Copy link
Collaborator

@ToddFincannon ToddFincannon commented Sep 16, 2021

Fixes #113.

See #113 for details. New case added to the directdata model.

@ToddFincannon ToddFincannon added this to the 0.6.0 milestone Sep 16, 2021
@chrispcampbell chrispcampbell changed the title get direct data offset from the separated dimension fix: get direct data offset from the separated dimension Sep 23, 2021
Base automatically changed from todd/111-ref-expand to develop September 27, 2021 21:54
Copy link
Contributor

@chrispcampbell chrispcampbell left a comment

Choose a reason for hiding this comment

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

@ToddFincannon Looks good to me. I added one non-blocking comment about error handling but it's more a thought for another day. I'll merge this one shortly.

let ind = sub(this.var.subscripts[0])
indexNum = ind.value
if (this.var.separationDims.length > 1) {
console.error(`WARNING: direct data variable ${this.var.varName} separated on more than one dimension`)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not a blocking comment because I think we have other existing cases like this (treating unexpected cases as a soft warning), but I wonder if we should make this and similar cases a hard error (exit with non-zero code). At some point it might be good to revisit error handling in SDE to be a bit more fail-fast and consistent with error reporting mechanisms, but that's for another day.

@chrispcampbell chrispcampbell merged commit ebbaa01 into develop Sep 27, 2021
@chrispcampbell chrispcampbell deleted the todd/113-direct-data branch September 27, 2021 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Direct data read fails when data dimension is not the first subscript
2 participants