• 79 views | 2 messages Discussion: LEAP
    Topic: Access to OSeMOSYS File?Subscribe | Previous | Next
  • Bri Gibs 2/27/2017

    Hi, since our dataset is fairly large and I keep crashing LEAP, we were considering using LEAP as a OSeMOSYS file generator, running the code in OSeMOSYS, then just working with the automatically generated output file from OSeMOSYS.

    Is it possible to access the OSeMOSYS file that LEAP generates?

    EDIT: Never mind, I found how to do this! :)

  • Charlie Heaps 2/27/2017
      Best Response

    1 Like

    For those who come after you, let me note that the way to do this is to check the "Keep Intermediate Results" box in the General: Basic Parameters: Optimization screen. If you do that, LEAP will not erase the temporary data files it generates for OSeMOSYS, and it also won't erase the temporary results files that OSeMOSYS writes and which are read back into LEAP as the results of the optimization calculation.

    Look for files called OpDataXXX.txt and OpResultsXXX.txt in the area folder where "XXX" is the unique numeric ID of each scenario being calculated. The folder will also contains a file called osemosys.txt which is the actual model file that is run by LEAP.

    Note that when looking at the data and results files, you will see that the various LEAP elements (fuels, branches, effects, scenarios, regions, etc.) are indicated by IDs in the data files. However, LEAP does add a section of comments at the top of the data files that show how these IDs map to information in LEAP. For example, you will see a section like this one below (lines starting with the "#" character are comments):

    # EMISSIONS (The various pollutants produced from the module)
    set EMISSION := E2 E3 E4 E5 E7 E8 E13;
    # Summary of Set: EMISSION
    # E2 = Carbon Dioxide
    # E3 = Carbon Monoxide
    # E4 = Methane
    # E5 = Non Methane Volatile Organic Compounds
    # E7 = Nitrogen Oxides
    # E8 = Nitrous Oxide
    # E13 = Sulfur Dioxide

    # TECHNOLOGIES (The list of processes being optimized, the fuels feeding those processes, plus a dummy technology (Unserved) for unserved electric demands.)
    set TECHNOLOGY := P584 P591 P598 P605 S2 S13 S29 S31 Unserved;
    # Summary of Set: TECHNOLOGY
    # P584 = NGCC
    # P591 = Wind
    # P598 = Coal
    # P605 = Hydro
    # S2 = Natural Gas
    # S13 = Coal Bituminous
    # S29 = Wind
    # S31 = Hydro
    # Unserved = Unserved

    # FUELS (the set of fuels that appear as either an input or output fuel in a LEAP Module)
    set FUEL := F1 F2 F13 F29 F31;
    # Summary of Set: FUEL
    # F1 = Electricity
    # F2 = Natural Gas
    # F13 = Coal Bituminous
    # F29 = Wind
    # F31 = Hydro

    # YEARS (the years to be calculated)
    set YEAR := 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020;
    # REGIONS
    set REGION := R1;
    # Summary of Set: REGION
    # R1 = Region 1