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

Handle missing periods from report functions #13

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

robinhasse
Copy link
Collaborator

In some cases, the gdx file might not contain values for specific periods and variables. For example, in matching runs, there are no flows for the first period. Thus reportConstruction will return a MagPIE object starting at the second period of ttot. This caused conGDX2MIF to fail as it tried to extract all values of ttot. I introduce a new function extendPeriods to replace the extraction. The function also filters the required periods but fill missing periods with NA.

Copy link
Contributor

@ricardarosemann ricardarosemann left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

@robinhasse robinhasse merged commit b32fba3 into pik-piam:main Oct 10, 2024
2 checks passed
@robinhasse robinhasse deleted the extendPeriods branch October 10, 2024 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants