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

write.config.xml.ED2() doesn't use correct ED2 default dataset. #3080

Closed
Aariq opened this issue Dec 22, 2022 · 0 comments · Fixed by #3081
Closed

write.config.xml.ED2() doesn't use correct ED2 default dataset. #3080

Aariq opened this issue Dec 22, 2022 · 0 comments · Fixed by #3081

Comments

@Aariq
Copy link
Collaborator

Aariq commented Dec 22, 2022

Bug Description

Because the datasets history, history.r46, etc. are non-exported, data() doesn't work on them. Current code to find the correct dataset based on the <revision> tag is therefore broken

data(list=histfile, package = 'PEcAn.ED2', envir = environment())

Proposed solution

Internal data should be referenced with packagename:::dataset, so I'll replace the non-functioning code with a switch() statement like:

edhistory <- switch(revision, "85" = PEcAn.ED2:::history.r85, ...)
@Aariq Aariq self-assigned this Dec 22, 2022
mdietze added a commit that referenced this issue Jan 19, 2023
Bug fix for #3080 (write.config.xml.ED2() not using <revision> tag correctly)
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.

1 participant