-
Notifications
You must be signed in to change notification settings - Fork 41
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
lower memory footprint for "fill the demSeOth with zeroes so that oneRegi tests work" #639
Conversation
v_demSeOth <- readGDX(gdx, c("v_demSeOth","vm_demSeOth"), field = "l", restore_zeros = T)[, y, ] * pm_conv_TWa_EJ | ||
# SE demand of specific energy system technologies (ensure that all regions have a value) | ||
v_demSeOth <- readGDX(gdx, c("v_demSeOth", "vm_demSeOth"), field = "l", restore_zeros = FALSE)[, y, ] * pm_conv_TWa_EJ | ||
matrixRegionsYears <- new.magpie(cells_and_regions = getRegions(dataoc), years = y, fill = 0, sets = getSets(v_demSeOth, fulldim = FALSE)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it is necessary to create a dummy magclass object just for the matching here. Usually, the reference ref
passed to matchDim
is the magclass object you want to bind v_demSeOth
to (i.e. which causes mbind
to crash).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey,
I tried to matchDim v_demSeOth with tmp1, but the dimension names don't match. That's why i used an intermediate named object.
What would be a more fitting solution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Falk's solution here: #644
@fbenke-pik For reproducibility, the error happens with the gdx
Error traceback is
|
Following @orichters' comment in #637, this PR reduces the memory footprint: v_demSeOth is now filled with zeroes up to a size 19x21x3 (the previous version filled it to 24000 instead of 3).