Skip to content

Releases: NREL/Marmot

Marmot v0.11.0

18 Nov 22:10
6d8bdbf
Compare
Choose a tag to compare

Marmot Open-Source Release v0.11.0

This release has been tested against many different PLEXOS and ReEDS databases to limit the possibility of bugs; however, some may still exist.
To report a bug, please open an Issue on the Marmot GitHub repo so that we can address it in a following release.

  • To clone this release, use the following command:
    git clone --recurse-submodules git@github.com:NREL/Marmot.git --branch v0.11.0

  • If you have already cloned Marmot, you can checkout this release using the following two commands:
    git fetch --all --tags
    git checkout tags/v0.11.0

What's Changed

New Contributors

Full Changelog: v0.10.0...v0.11.0

Features

Release 0.11.0 adds in the ability to format SIIP and ReEDS India results and expands the plotting capabilities of the software.
The following are the main new features that have been added in this release:

  • ReEDS_India formatter added: It is not possible to format a limited number of ReEDS India properties using Marmot. The full list of properties that can be formatted can be seen here.
  • SIIP formatter added: The full list of properties that can be formatted can be seen here.
  • Read formatted data from csv files: Allows data to be read in from a csv if it is missing from the formatted h5 file. Format of data must adhere to the standard Marmot formats for each data class, e.g generator, line etc. By default this setting is turned off but can be switched on using the read_csv_properties entry in the config.yml. These csv files should be saved in the csv_properties folder which will be created in the Marmot_Solutions_folder.
    Filename should be of the following pattern:
    • {scenario}_{plx_prop_name}.csv
    • An example of a line_Net_Import: Base DA_line_Net_Import.csv
      image
  • Added total_cap_facet plot d72e3bf
  • Added total_gen_facet plot 1c0c47d

Changes

  • input_files folder now moved to the top level Marmot folder at Marmot/input_files
  • Renamed 0 column to value
  • GenCategories dataclass now holds gen category lists in plot_data_helper
  • Separates ExtraProperties into individual model classes which all inherit from the ExtraProperties base class. e.g ExtraPLEXOSProperties
  • EXTRA_MARMOT_PROPERTIES now saved in ExtraProperties classes
  • x, y labels now default to empty list rather than a list of empty strings e.g [""]
  • SetupLogger now has a default log config in the event the yml file is missing.
  • Battery Charging accounted for in Load and Demand for PLEXOS

Marmot v0.10.0

22 Apr 03:01
272910d
Compare
Choose a tag to compare

Marmot Open-Source Release v0.10.0

This release has been tested against many different PLEXOS and ReEDS databases to limit the possibility of bugs; however, some may still exist.
To report a bug, please open an Issue on the Marmot GitHub repo so that we can address it in a following release.

  • To clone this release, use the following command:
    git clone --recurse-submodules git@github.com:NREL/Marmot.git --branch v0.10.0

  • If you have already cloned Marmot, you can checkout this release using the following two commands:
    git fetch --all --tags
    git checkout tags/v0.10.0

What's Changed

Full Changelog: v0.9.0...v0.10.0

Features

Release 0.10.0 adds in the ability to format ReEDS results and expands the plotting capabilities of the software. It also includes a new and improved documentation website found here https://nrel.github.io/Marmot/index.html
The following are the main new features that have been added in this release:

  • ReEDS formatter added: It is not possible to format a limited number of ReEDS properties using Marmot. The full list of properties that can be formatted can be seen here.
    Properties to format are selected with the reeds_properties.csv and works in the same way as the plexos_properties.csv. For information see the docs here

  • New code entry part to run formatter and plotter: To start the formatter and plotter the user should now run either run_marmot_formatter.py or run_marmot_plotter.py from the Marmot/bin directory

  • New ExtraProperties class will now create custom properties for Marmot, these include generator_Curtailment, region_Demand and any annualized property. These properties are created automatically and are not selected in the *_properties.csv files.

  • Load and Demand legend names can now be adjusted through config.yml 35c99ed

  • New Plotting settings

    • Timeseries Plot Resolution: The resolution to plot timeseries figures at. Current available options are Interval and Annual. If the value is left blank and the plot creates a timeseries, Marmot will default to plotting interval data.
    • Group by Scenario or Year-Scenario: Effect data that has been grouped into bar plots or diurnal line plots. If grouping by Year-Scenario the year will be identified from the input data timestamp and appended to the Scenarios name. This is useful when plotting data which covers multiple years such as ReEDS.

Notable Changes

  • All mapping file names have been moved from the config.yml to Marmot_user_defined_inputs.csv 3ef42ab
  • input_files folder now holds all input files and mapping_files folder, located in Marmot/marmot ff11aa0
  • Plot annotations are now set with their own plotting method 9834918
  • Formatters and Process class moved to model specific modules, each formatter now has its own module 21f0426
  • meta_data.py renamed to read_metadata.py and moved to metamanagers package fdee302
  • Created utils package. Moved mconfig.py here. 774fbfc
  • logging class moved to its own module in utils
  • Created definitions.py to handle file paths and constants
  • PlotDataHelper renamed to MPlotDataHelper c92d038
  • Each plotting module now has a unique class, e.g GenerationStack, these replace the MPlot classes 1387272

Potential Issues

Due to ReEDS results outputs not having versions associated with them, older versions of the tool may fail to format several properties with Marmot initially. This will likely be caused by differing column arrangements or missing column data for certain properties including some storage and emissions results. If you run into this problem, please open an issue and we can help you fix it.

Marmot v0.9.0

21 Mar 03:38
d036353
Compare
Choose a tag to compare

Marmot Open-Source Release v0.9.0

This release has been tested against many different PLEXOS databases to limit the possibility of bugs; however, some may still exist.
To report a bug, please open an Issue on the Marmot GitHub repo so that we can address it in a following release.

  • To clone this release, use the following command:
    git clone --recurse-submodules git@github.com:NREL/Marmot.git --branch v0.9.0

  • If you have already cloned Marmot, you can checkout this release using the following two commands:
    git fetch --all --tags
    git checkout tags/v0.9.0

Features

Release 0.9.0 brings many improvements to Marmot including significant changes to the internal api to simply the creation of plots.
Input sheets have been simplified and streamlined, config options have been expanded and a documentation page has been set up.
The following are the main new features that have been added in this release:

  • Category and ordered_gen files have been combined into a single file, ordered_gen_categories.csv. Generator technologies can be placed into specific categories by including a TRUE value in the corresponding cell. Five categories are included by default; however the user is free to add any new categories as they see fit. The category vre column is still used to determine technologies which belong to the curtailment property. #1
    image

  • Users can now select a subset of generation to plot in the new ordered_gen_categories.csv. Use new AGG_TECH input in the user_defined_inputs.csv and include column name from ordered_gen_categories file to select subset. For example, entering vre will only plot technologies which are marked as TRUE in vre column of ordered_gen_categories.

  • A documentation page has been created for Marmot. It currently includes installation instructions, two tutorials and a detailed explanation of all classes and methods used within the code. The documentation can be viewed here #15

  • Expanded Marmot's formatter to allow formatting of simulation results other than PLEXOS, each models formatting will now be self-contained within its own Process class #22. Updates have been made to the user_defined_inputs to allow selection of simulation model.

  • The formatter has also been expanded to allow formatting of PLEXOS results other than ST, such as MT and LT. If not specified ST results will be processed. Each block of data will be saved to its own formatted h5 file and the type will be appended to the filename, e.g model_formatted_MT.h5
    image

  • Several plots can now be modified with external data read from a csv file. The data will be appended to the final dataframe before plotting. Path to custom data files are passed in via the plot_select.csv. Custom data files should have the same format as the final output data csv's, the usual format is scenarios in index, generator techs as column names. However, this format may not hold true for all plots in the future. Therefore, using this feature may involve some trial and error.
    Custom Data Files can be added into the following plots:

    production_cost: prod_cost
    production_cost: sys_cost
    production_cost: detailed_gen_cost
    production_cost : sys_cost_type
    emissions : total_emissions_by_type

  • Net Imports can now be calculated by subtracting generation and unserved energy from load.
    This functionality can be turned on/off using the config.yml file for both total and time-series generation plots.
    image
    image

  • Example data folder now included with Marmot. This folder contains several h5plexos files to experiment with and see the capabilities of Marmot #9

Changes

  • No need to provide units and multiplier in plexos_properties.csv, UNITS_CONVERSION dict added to module level of formatter simplifying user input.
    image
  • gen_names is no longer used in the formatter. All renaming and categorizing of generation technologies now takes place in the plotter. This eliminates the need to re-format after any updates to technology names #2.
  • scenario/filename is now passed to metadata. Metadata can now be retrieved for individual scenarios within plotting modules. Metadata class will keep h5 file in memory until a new file is passed to it through its methods. #12
  • marmot_plot_functions.py split into 3 new modules and added to new plotutils package/folder.

Plot Data Management Changes

  • plot_data_helper.py now has most of the functions used to format and manipulate data for plotting. All functions are now methods of class PlotDataHelper.
  • PlotDataHelper class within plot_data_helper is inherited by all MPlot classes to reduce number of arguments needed to be passed.
  • exception classes moved to plot_exceptions.py
  • Data retrieved from formatted h5 files now saved directly within PlotDataHelper class as the class inherits python dictionary class
  • Removed self.mplot_data_dict attribute
  • Renamed method get_data to get_formatted_data
  • Data now retrieved by self['prop_name'] within plotting modules

Plotting Changes

  • All matplotlib plotting code now saved in plot_library.py module which contains two classes SetupSubplot and PlotLibrary.

  • SetupSubplot sets up the main figure and subplots for use in Marmot and expands the functionality of matplotlib by adding further methods to quickly build plots.

  • PlotLibrary contains a library of commonly used plotting methods. It inherits the SetupSubplot class and takes all the same arguments as it.

  • All plots now use either the SetupSubplot or PlotLibrary class to create figure and axs objects. Instantiation of either class defines the dimensions (nrows, ncols) of a figure and its subplots. This is achieved by building on top of matplotlib.pyplot.subplots and preserves all functionality of that function.

  • All arguments are optional and by default calling SetupSubplot() or PlotLibrary() which inherits SetupSubplot, will create a
    1x1 figure with a figsize defined in the config.yml file. The following are some common values to pass when creating various
    plots:

    1x1 figure: SetupSubplot()
    1xN figure: SetupSubplot(nrows=1, ncols=N, sharey=True)
    MxN figure: SetupSubplot(nrows=M, ncols=N, sharey=True, squeeze=False, ravel_axs=True)

  • New methods include add_legend() which will handle most legend creation including multi-faceted subplots. Legend position can now be set through the config.yml file

Bug Fixes

  • fixed no data in region errors + v0.5 fixes cbb5e8b
  • Value Error: Attempt to get argmax of an empty sequence #17

Marmot v0.8.0

09 Sep 22:25
4f97426
Compare
Choose a tag to compare

Marmot Open Source Release v0.8.0

This release has been tested against many different PLEXOS databases to limit the possibility of bugs, however some may still exist.
To report a bug, please open an Issue on the Marmot GitHub repo so that we can address it in a following release.

  • To clone this release use the following command:
    git clone --recurse-submodules git@github.com:NREL/Marmot.git --branch v0.8.0

  • If you have already cloned Marmot you can checkout this release using the following two commands:
    git fetch --all --tags
    git checkout tags/v0.8.0

Features

  • x-axes label rotation on bar plots x-axes labels can now be rotated from the default 0 degrees to prevent overlap of labels. By default Marmot will begin rotating the labels to an angle of 45 degrees when more than 6 bars are plotted. These defaults can be adjusted in the config.yml file. For more details please see the additional configuration settings section of the readme.
    image

  • 9 New Plots

    • Average Diurnal Unserved Energy (Line Plot)
    • Average Diurnal Curtailment (Line Plot)
    • Stacked Gen Peak RE (Stacked Area Plot)
    • Stacked Gen Peak Unserved Energy (Stacked Area Plot)
    • Stacked Gen Peak Curtailment (Stacked Area Plot)
    • Monthly Total Generation (Bar Plot)
    • Monthly Total Variable Renewable Generation (Bar Plot)
    • Monthly Total Variable Renewable Percentage Generation (Bar Plot)
    • Total Generation Piechart
  • Custom Tick-labels can now be applied to every bar plot (except Diff and non scenario named bar plots (e.g Capacity Factor). Passing a list of values to Tick_labels in the Marmot_user_defined_inputs.csv will replace the existing label names. This is useful if you need to rename your scenarios.

  • A reduced list of generators can be included in the ordered_gen.csv to limit the technologies that are plotted e.g (only plot Gas or Hydro). Marmot will print a warning message if there are generators missing from the ordered list that are in the gen_names.csv "New" column. This message can be ignored if you are you are down-selecting technology types on purpose. To point to a custom ordered_gen.csv see the additional configuration settings section of the readme.

Changes

  • If a custom log directory is passed, the Marmot Formatter and Plotter will now create the directory if it does not already exist.
  • Improved code flow
  if pd.isna(start_date_range) == False: 

Replaced with

   if pd.notna(start_date_range):

Bug Fixes

  • Removed extraneous self. declarations in marmot_plot_main which could cause the plotter to crash when called as a module
  • Bugs in Total_installed_capacity - total_cap_diff method fixed. Plot is again available to use.

Marmot v0.7.0 Official Stable Release

09 Sep 00:50
Compare
Choose a tag to compare

This is the second official release of Marmot and brings it to v0.7.0

This release has been tested against many different PLEXOS databases to limit the possibility of bugs, however some may still exist.
To report a bug, please open an Issue on the Marmot GitHub repo so that we can address it in a following release.

  • To clone this release use the following command:
    git clone --recurse-submodules git@github.com:NREL/Marmot.git --branch v0.7.0

  • If you have already cloned Marmot you can checkout this release using the following two commands:
    git fetch --all --tags
    git checkout tags/v0.7.0

Features

  • Meta Data Now Saved to Formatted h5: Meta data for each scenario is now copied over to the processed HDF5 output file created in marmot_h5_formatter.py. Meta data used for plotting is obtained from this file, so the original PLEXOS solution file is no longer necessary to run marmot_plot_main.py. The processed HDF5 file includes meta data from each partition in a given scenario in case there are subtle changes between different partitions. (https://github.nrel.gov/PCM/Marmot/issues/126)

  • Four New Plots, New capability to plot nodal prices: (https://github.nrel.gov/PCM/Marmot/issues/135)

    • Node Price Duration Curve
    • Node Price Time-series
    • Node Price Histogram
    • Node Price Histogram Difference (compare all scenarios vs a reference case)

Changes

  • Figures are now saved using the same format. Previously, two different formats were used to create and save figures. Code written to create new plots will have to follow this format seen below. In the initial creation of a plot, both the figure and axis is assigned to the plot. (https://github.nrel.gov/PCM/Marmot/issues/107)
fig1, ax = plt.subplots(figsize=(self.x,self.y))
cap_started_all_scenarios.T.plot.bar(stacked = False, rot=0,
                                 color = self.color_list,edgecolor='black', linewidth='0.1', ax=ax)
ax.spines['right'].set_visible(False)
ax.spines['top'].set_visible(False)

Bug Fixes

Marmot v0.6.0 Official Stable Release

09 Sep 00:48
Compare
Choose a tag to compare

This is the first official release of Marmot and brings it to v0.6.0

This release has been tested against many different PLEXOS databases to limit the possibility of bugs, however some may still exist.
To report a bug, please open an Issue on the Marmot GitHub repo so that we can address it in a following release.

  • To clone this release use the following command:
    git clone --recurse-submodules git@github.com:NREL/Marmot.git --branch v0.6.0

  • If you have already cloned Marmot you can checkout this release using the following two commands:
    git fetch --all --tags
    git checkout tags/v0.6.0

Features

  • Users now have more control over finer figure and plot creation settings. These include things such as adjusting fonts and their positions, setting output figure format, adjusting energy and capacity units through auto-unit conversion, changing default input files names and many more. For more details please see the additional configuration settings section of the readme.

  • Marmot can now be imported and used as a module in other python projects and is now being used by the ReEDS2_PLEXOS translator. See the importing and running marmot as a module section of the readme for more details.

  • Marmots output csv's now contain energy and capacity units in the headers.

  • Titles containing the Region/Zone name of the figure data can now be added to all figures, this can optionally be turned off if desired. See additional configuration settings for more details.

Changes

  • Marmot_Solutions_folder is now an optional input in the Marmot_user_defined_inputs.csv. If no value is included, plots and data will save to the PLEXOS_Solutions_folder.

  • Setting Facet_xlabels and Facet_ylabels is no longer required (but still advised) to create Facet plots. If no values are included Marmot will default to a 3 plot wide by unlimited long figure based on the scenarios selected.

Bug Fixes