<jupyter_start><jupyter_text>General informationThis python module uses the following external packages:- pandas- pyam (https://github.com/IAMconsortium/pyam)- nomenclature (https://github.com/openENTRANCE/nomenclature)- gdxpds (https://github.com/NREL/gdx-pandas)  File structure of the module- __this_file__ : Jupyter notebook with general guidelines- /genesysmod_to_iamc : Folder with actual conversion scripts - /genesysmod_to_iamc/mappings/ : Folder with mappings of GENeSYS-MOD variables to openEntrance nomenclature - /genesysmod_to_iamc/inputs/ : Folder with original GENeSYS-MOD pathway results - /genesysmod_to_iamc/out/ : Folder with generated csv files in openEntrance format  Changes to the scripts required to run the conversionThis script uses gdxpds which was unable to succesfully locate the GAMS directory in its newsest version. Therefore, the path to GAMS needed to be set manually. You will need to change the directory such that it correctly points to you installed GAMS distribution. The variable is called *DEF_GAMS_DIR* and is set in the file *genesysmod_to_iamc/\_statics.py*.  GENeSYS-MOD to openEntrance converterThis jupyter notebook shows an exemplary conversion of GENeSYS-MOD results to the common openEntrance data fromat. The outputs of the scripts in this module will be csv files, that represent GENeSYS-MOD data in openEntrance nomenclature. First, the corresponding scripts will be imported as module to this notebook:<jupyter_code>import genesysmod_to_iamc<jupyter_output>Unable to load gdxcc with default GAMS directory 'None'. You may need to explicitly call gdxpds.load_gdxcc(gams_dir) before importing pandas to avoid a library conflict.<jupyter_text>Next, the actual result file conversion can be started by calling ```genesysmod_to_iamc.generate_data(FileName : str)```. For the ease of use, the module ```genesysmod_to_iamc``` also includes a enumeration ```Pathways``` that includes references to the filenames for the openEntrance Pathways:```class Pathways(Enum):    TF = "TechnoFriendly"    DT = "DirectedTransition"    GD = "GradualDevelopment"    SC = "SocietalCommitment"    ``` Furthermore, ```genesysmod_to_iamc.generate_data(FileName : str)``` has three optional parameters ```generate_series_data```, ```generate_load_factors``` and ```combine_outputs``` that all default to ```False```. If ```generate_series_data``` is set to ```True```, full hourly demand time series for Final Energy|Residential and Commercial|Electricity, Final Energy|Industry|Electricity, Final Energy|Transportation|Electricity, Final Energy|Electricity, Final Energy|Residential and Commercial and Final Energy|Industry will be generated. Full hourly demand series will be written to an extra file. **Note:** setting this parameter will significantly increase the computing time.If ```generate_load_factors``` is set to ```True```, full hourly load series for Solar PV, Wind Onshore and Wind Offshore will be generated. Full hourly load series will be written to an extra file. **Note:** setting this parameter will significantly increase the computing time.If ```combine_outputs``` is set to ```True```, the different result files for a pathway (yearly, hourly, load factors) can be combined to one single file.<jupyter_code>generate_series_data = False
generate_load_factors = False
combine_outputs = True<jupyter_output><empty_output><jupyter_text>Example creation of TechnoFriendly (TF) Pathway results:<jupyter_code>genesysmod_to_iamc.generate_data(genesysmod_to_iamc.Pathways.TF.value, 
                                 generate_series_data, 
                                 generate_load_factors, 
                                 combine_outputs)<jupyter_output><empty_output><jupyter_text>And for the other pathways:<jupyter_code>genesysmod_to_iamc.generate_data(genesysmod_to_iamc.Pathways.SC.value, 
                                 generate_series_data, 
                                 generate_load_factors, 
                                 combine_outputs)
genesysmod_to_iamc.generate_data(genesysmod_to_iamc.Pathways.GD.value, 
                                 generate_series_data, 
                                 generate_load_factors, 
                                 combine_outputs)
genesysmod_to_iamc.generate_data(genesysmod_to_iamc.Pathways.DT.value, 
                                 generate_series_data, 
                                 generate_load_factors, 
                                 combine_outputs)<jupyter_output><empty_output><jupyter_text>Results will be written to ```\GENEeSYS-MOD\scripts\genesysmod_to_iamc\out```. The following line of code creates a unified Excel-File with all pathways combined:<jupyter_code>genesysmod_to_iamc.generate_combined_excel()<jupyter_output>pyam.core - INFO: Reading file `C:\Users\tbura\Documents\openEntrance_linkages\GENEeSYS-MOD\scripts\genesysmod_to_iamc\out\TechnoFriendly_combined.csv`
INFO:pyam.core:Reading file `C:\Users\tbura\Documents\openEntrance_linkages\GENEeSYS-MOD\scripts\genesysmod_to_iamc\out\TechnoFriendly_combined.csv`
pyam.core - INFO: Reading file `C:\Users\tbura\Documents\openEntrance_linkages\GENEeSYS-MOD\scripts\genesysmod_to_iamc\out\DirectedTransition_combined.csv`
INFO:pyam.core:Reading file `C:\Users\tbura\Documents\openEntrance_linkages\GENEeSYS-MOD\scripts\genesysmod_to_iamc\out\DirectedTransition_combined.csv`
pyam.core - INFO: Reading file `C:\Users\tbura\Documents\openEntrance_linkages\GENEeSYS-MOD\scripts\genesysmod_to_iamc\out\GradualDevelopment_combined.csv`
INFO:pyam.core:Reading file `C:\Users\tbura\Documents\openEntrance_linkages\GENEeSYS-MOD\scripts\genesysmod_to_iamc\out\GradualDevelopment_combined.csv`
pyam.core - INFO: Reading file `C:\Users\tbura\Documents\openEntrance_linkages\GE[...]
{'fraction_non_alphanumeric': 0.07844498438042347, 'fraction_numerical': 0.0, 'mean_word_length': 4.391019644527596, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 15, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '383264', 'license': 'Apache-2.0', 'n_tokens_mistral': 1748, 'n_tokens_neox': 1647, 'n_words': 449, 'path': 'GENeSYS-MOD/scripts/genesysmod_to_oE.ipynb', 'repo_name': 'stianbacke/linkages', 'size': '5762'}