pik-piam / remind2

The remind2 package contains the REMIND-specific routines for data and model output manipulation.
0 stars 40 forks source link

lower memory footprint for "fill the demSeOth with zeroes so that oneRegi tests work" #639

Closed lecfab closed 1 month ago

lecfab commented 1 month ago

Following @orichters' comment in https://github.com/pik-piam/remind2/pull/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).

lecfab commented 1 month ago

@fbenke-pik For reproducibility, the error happens with the gdx /p/tmp/fabricel/powerRealizations/output/testOneRegi/fulldata.gdx:

Error in mbind(tmp1, setNames(dimSums(mselect(v_demSeOth, all_enty = "seh2"),  : 
  Cannot handle objects! Spatial as well as data dimensions differ!
  Differences from first mbind() input:
  spatial:
      missing: `LAM`, `OAS`, `SSA`, `NEU`, ...
       having: `EUR`
  data:
      missing: `SE (EJ/yr)`, `SE|Biomass (EJ/yr)`, `SE|Electricity (EJ/yr)`, `SE|Electricity|Combined Heat and Power w/o CC (EJ/yr)`, ...
       adding: `SE|Input|Hydrogen|Other Energy System Consumption (EJ/yr)`

Error traceback is

  1. convGDX2MIF(gdx)
  2. convGDX2MIF.R#53: mbind(output, reportSE(gdx, regionSubsetList, t)[, t, ])
  3. reportSE(gdx, regionSubsetList, t)
  4. reportSE.R#401: mbind(tmp1, setNames(dimSums(mselect(v_demSeOth, all_enty = "seh2"), dim = 3), "SE|Input|Hydrogen|Other Energy System Consumption (EJ/yr)"))