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: use correct subdimension index for delay aux vars #92

Merged
merged 1 commit into from
Jul 24, 2021

Conversation

ToddFincannon
Copy link
Collaborator

@ToddFincannon ToddFincannon commented Jul 24, 2021

Fixes #91

The delay test generated NaN values for aux vars subscripted with a subdimension. Aux vars are generated as part of internal delay equation generation. They are added in the analysis stage after the model vars have already been read. The problem was that vars on a subdimension must be separated into individually indexed vars, and this was not being done for the generated aux vars. There is a mechanism to add "non a-to-a" (separated vars in XMILE terminology) after the initial scan of model variables. This was used to add separated aux vars and get the correct refid for references. The DELAY1 and DELAY3 functions both needed this change in somewhat different variations. I regenerated the variable listing too to account for the new aux vars. The delay test now passes without the NaN error messages.

@chrispcampbell chrispcampbell changed the title fix: use correct subdimension index for delay aux vars (#91) fix: use correct subdimension index for delay aux vars Jul 24, 2021
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.

I don't have a full understanding of how (sub)dimensions are handled in SDE, so I will trust that this is the correct fix. I do see that the tests now pass without the messages that were seen earlier (noted in the issue), so it looks like this is fixed. Will merge it shortly.

@chrispcampbell chrispcampbell merged commit 7158b0f into develop Jul 24, 2021
@chrispcampbell chrispcampbell deleted the todd/91-delay-nan branch July 24, 2021 19:09
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.

NaN values in output in the delay test model
2 participants