Summary
b_inputs.gms is almost 7000 lines long, of which almost 2000 lines are just for reading in ~270 .csv files. .csv files are also much less storage-space-efficient than numeric formats like .h5. To support the long-term aspiration of a free software base (i.e. not GAMS) for ReEDS and make the ReEDS inputs more portable, we'd like to start moving away from .csv files for intermediate data handling in ReEDS. (We'd still use them for user-facing input files, but less for reading data into GAMS.)
Overview of proposed structure
1103 on the old repo tried something similar in terms of simplifying b_inputs.gms, but was never merged, and still relied on .csv files. Here, the idea is that instead of writing .csv files from the input_processing scripts, we create an inputs.h5 container, write the inputs to that, convert it to inputs.gdx, and then load it into b_inputs.gms in one line. A graphical outline of the proposed structure is below:
Components
Then we would start moving other data processing from b_inputs.py into upstream python scripts, but that will be tracked in a separate issue.
(moved from https://github.nrel.gov/ReEDS/ReEDS-2.0/issues/1947)
Summary
b_inputs.gmsis almost 7000 lines long, of which almost 2000 lines are just for reading in ~270.csvfiles..csvfiles are also much less storage-space-efficient than numeric formats like.h5. To support the long-term aspiration of a free software base (i.e. not GAMS) for ReEDS and make the ReEDS inputs more portable, we'd like to start moving away from.csvfiles for intermediate data handling in ReEDS. (We'd still use them for user-facing input files, but less for reading data into GAMS.)Overview of proposed structure
1103 on the old repo tried something similar in terms of simplifying
b_inputs.gms, but was never merged, and still relied on.csvfiles. Here, the idea is that instead of writing.csvfiles from theinput_processingscripts, we create aninputs.h5container, write the inputs to that, convert it toinputs.gdx, and then load it intob_inputs.gmsin one line. A graphical outline of the proposed structure is below:Components
inputs.h5container and the functions to write to it easily (start from thewrite_input_to_h5()function)h5_to_gdx.pyscript to convertinputs.h5toinputs.gdxand loadinputs.gdxintob_inputs.gmsgamspy,gams.transfer, andgdxpdsto see which is fastest and use the winner forh5_to_gdx.pyinput_processingscripts to write toinputs.h5instead of.csvfilesThen we would start moving other data processing from
b_inputs.pyinto upstream python scripts, but that will be tracked in a separate issue.(moved from https://github.nrel.gov/ReEDS/ReEDS-2.0/issues/1947)