marmot.formatters.formatreeds.ProcessReEDS#
- class ProcessReEDS(input_folder: pathlib.Path, output_file_path: pathlib.Path, *args, process_subset_years: typing.Optional[list] = None, region_mapping: pandas.core.frame.DataFrame = Empty DataFrame Columns: [] Index: [], **kwargs)[source]#
Bases:
marmot.formatters.formatbase.Process
Process ReEDS specific data from a ReEDS result set.
- Parameters
input_folder (Path) – Folder containing csv files.
output_file_path (Path) – Path to formatted h5 output file.
process_subset_years (list, optional) – If provided only process years specified. Defaults to None.
region_mapping (pd.DataFrame, optional) – DataFrame to map custom regions/zones to create custom aggregations. Defaults to pd.DataFrame().
**kwargs – These parameters will be passed to the Process class.
Methods
df_process_generator
(df[, prop, gdx_file])Does any additional processing for generator properties
df_process_line
(df[, prop, gdx_file])Does any additional processing for line properties
df_process_reserves_generators
(df[, prop, ...])Does any additional processing for reserves_generators properties
get_processed_data
(prop_class, prop, ...)Handles the pulling of data from the ReEDS gdx file and then passes the data to one of the formating functions
Merge chronological time intervals with reeds timeslices
output_metadata
(files_list)Add ReEDS specific metadata to formatted h5 file .
Attributes
Prefix of gdx results file
Maps simulation model property names to Marmot property names
UNITS_CONVERSION
Dictionary to convert units to standard values used by Marmot
Dictionary input file names to full filename path
Gets a list of input gdx files within the scenario folders
input_folder
Path to input folder
Gets the property units from data, e.g MW, MWh
Get the ReEDSPropertyColumns dataclass
Get the wind resource (s) to pca/region mapping
- PROPERTY_MAPPING: dict = {'emission_emit_r': 'emission_Production', 'generator_cap_out': 'generator_Installed_Capacity', 'generator_curt_out': 'generator_Curtailment', 'generator_gen_out': 'generator_Generation', 'generator_gen_out_ann': 'generator_Generation_Annual', 'generator_stor_in': 'generator_Pump_Load', 'generator_systemcost_techba': 'generator_Total_Generation_Cost', 'line_losses_tran_h': 'line_Losses', 'line_tran_flow_power': 'line_Flow', 'line_tran_out': 'line_Import_Limit', 'region_load_rt': 'region_Demand', 'reserves_generators_opRes_supply': 'reserves_generators_Provision_Annual', 'reserves_generators_opRes_supply_h': 'reserves_generators_Provision', 'storage_stor_energy_cap': 'storage_Max_Volume'}#
Maps simulation model property names to Marmot property names
- GDX_RESULTS_PREFIX = 'rep_'#
Prefix of gdx results file
- EXTRA_PROPERTIES_CLASS#
- property reeds_prop_cols: marmot.formatters.formatreeds.ReEDSPropertyColumns#
Get the ReEDSPropertyColumns dataclass
- Returns
ReEDSPropertyColumns
- property property_units: dict#
Gets the property units from data, e.g MW, MWh
- Returns
property_units
- Return type
- property wind_resource_to_pca: dict#
Get the wind resource (s) to pca/region mapping
- Returns
wind_resource_to_pca mapping
- Return type
- property data_collection: Dict[str, pathlib.Path]#
Dictionary input file names to full filename path
- Returns
data_collection {filename: fullpath}
- Return type
- output_metadata(files_list: list) None [source]#
Add ReEDS specific metadata to formatted h5 file .
- Parameters
files_list (list) – List of all gdx files in inputs folder in alpha numeric order.
- get_processed_data(prop_class: str, prop: str, timescale: str, model_name: str) pandas.core.frame.DataFrame [source]#
Handles the pulling of data from the ReEDS gdx file and then passes the data to one of the formating functions
- merge_timeseries_block_data(df: pandas.core.frame.DataFrame) pandas.core.frame.DataFrame [source]#
Merge chronological time intervals with reeds timeslices
- Parameters
df (pd.DataFrame) – input dataframe
- Returns
df with merged in timeseries data
- Return type
pd.DataFrame
- df_process_generator(df: pandas.core.frame.DataFrame, prop: Optional[str] = None, gdx_file: Optional[str] = None) pandas.core.frame.DataFrame [source]#
Does any additional processing for generator properties
- df_process_line(df: pandas.core.frame.DataFrame, prop: Optional[str] = None, gdx_file: Optional[str] = None) pandas.core.frame.DataFrame [source]#
Does any additional processing for line properties
- df_process_reserves_generators(df: pandas.core.frame.DataFrame, prop: Optional[str] = None, gdx_file: Optional[str] = None) pandas.core.frame.DataFrame [source]#
Does any additional processing for reserves_generators properties