From 1cc8fb0cdc4d03fecfad36792ef22d66333f0b47 Mon Sep 17 00:00:00 2001 From: mgarrouste Date: Wed, 4 Oct 2023 17:18:19 -0400 Subject: [PATCH] clean up unused data --- use_cases/LWR_FT_2023/data/ENC_DF.csv | 38 ------------- use_cases/LWR_FT_2023/data/ENC_JF.csv | 38 ------------- use_cases/LWR_FT_2023/data/ENC_MG.csv | 38 ------------- use_cases/LWR_FT_2023/data/data_cleaner.ipynb | 7 +++ ... => plot_braidwood_hist_elec_prices.ipynb} | 0 use_cases/LWR_FT_2023/run/functions.py | 56 ------------------- 6 files changed, 7 insertions(+), 170 deletions(-) delete mode 100644 use_cases/LWR_FT_2023/data/ENC_DF.csv delete mode 100644 use_cases/LWR_FT_2023/data/ENC_JF.csv delete mode 100644 use_cases/LWR_FT_2023/data/ENC_MG.csv rename use_cases/LWR_FT_2023/data/{plot_braidwood.ipynb => plot_braidwood_hist_elec_prices.ipynb} (100%) diff --git a/use_cases/LWR_FT_2023/data/ENC_DF.csv b/use_cases/LWR_FT_2023/data/ENC_DF.csv deleted file mode 100644 index f379af6d..00000000 --- a/use_cases/LWR_FT_2023/data/ENC_DF.csv +++ /dev/null @@ -1,38 +0,0 @@ -Energy Prices Transportation Diesel Fuel,,, -East North Central Region,,, -Unit,$ 2020 /gal,, -https://www.eia.gov/outlooks/aeo/data/browser/#/?id=3-AEO2021®ion=1-3&cases=highogs~aeo2020ref&start=2019&end=2050&f=A&linechart=~~~~~~highogs-d120120a.30-3-AEO2021.1-3~aeo2020ref-d112119a.30-3-AEO2021.1-3&map=aeo2020ref-d112119a.3-3-AEO2021.1-3&sourcekey=0,,, -14:34:09 GMT-0600 (Mountain Daylight Time),,, -Source: U.S. Energy Information Administration,,, -Year,high,ref,low -2050,2.26039008,2.697682501,2.840894672 -2049,2.24331928,2.679174638,2.830208243 -2048,2.226181403,2.658805945,2.814620043 -2047,2.21887446,2.630521348,2.814394112 -2046,2.207092675,2.601179323,2.800662646 -2045,2.191290016,2.598930898,2.768022259 -2044,2.166272876,2.55319294,2.750901005 -2043,2.148055212,2.530154279,2.711609813 -2042,2.135768184,2.510677604,2.668571323 -2041,2.126826342,2.466168572,2.661693884 -2040,2.11276031,2.444165916,2.670655393 -2039,2.072203669,2.444681461,2.623115838 -2038,2.088648417,2.417941156,2.607279934 -2037,2.067643604,2.392454595,2.586206874 -2036,2.04583738,2.372641013,2.54499234 -2035,2.053384068,2.343073409,2.538158448 -2034,2.085146249,2.313974289,2.524695992 -2033,2.070004059,2.292216646,2.479701383 -2032,2.0513645,2.245952608,2.417628482 -2031,2.02489824,2.224050275,2.367901024 -2030,2.008744042,2.192159207,2.313506506 -2029,1.966509305,2.177527528,2.276387882 -2028,1.942826916,2.152408778,2.226418104 -2027,1.915629247,2.112323197,2.177463612 -2026,1.855060486,2.106655251,2.109243041 -2025,1.833676741,2.061747385,2.035434126 -2024,1.797903755,2.042893251,1.951210017 -2023,1.755418855,1.994899493,1.851861043 -2022,1.612367177,1.980377852,1.643020773 -2021,1.519573251,1.943275032,1.519573251 -2020,1.528877403,1.935693577,1.528877403 \ No newline at end of file diff --git a/use_cases/LWR_FT_2023/data/ENC_JF.csv b/use_cases/LWR_FT_2023/data/ENC_JF.csv deleted file mode 100644 index eabab6e8..00000000 --- a/use_cases/LWR_FT_2023/data/ENC_JF.csv +++ /dev/null @@ -1,38 +0,0 @@ -Energy Prices Transportation Jet Fuel,,, -East North Central Region,,, -https://www.eia.gov/outlooks/aeo/data/browser/#/?id=3-AEO2021®ion=1-3&cases=highogs~aeo2020ref&start=2019&end=2050&f=A&linechart=~~~~highogs-d120120a.29-3-AEO2021.1-3~aeo2020ref-d112119a.29-3-AEO2021.1-3&map=aeo2020ref-d112119a.3-3-AEO2021.1-3&sourcekey=0,,, -14:33:53 GMT-0600 (Mountain Daylight Time),,, -Unit,2020 $ /gal,, -Source: U.S. Energy Information Administration,,, -Year,high,ref,low -2050,1.748649344,2.247290435,2.331665398 -2049,1.729615667,2.236148128,2.318063354 -2048,1.706633171,2.207266503,2.292651658 -2047,1.697031106,2.167236647,2.291278453 -2046,1.682091862,2.118100705,2.274050155 -2045,1.662474357,2.111937121,2.246008724 -2044,1.631015637,2.062487389,2.224745127 -2043,1.602642184,2.035081401,2.182318884 -2042,1.581543459,2.01108632,2.131990219 -2041,1.565908726,1.966315762,2.116033492 -2040,1.545472903,1.936932801,2.123511602 -2039,1.49875249,1.926371133,2.0784587 -2038,1.507317815,1.894142976,2.056705048 -2037,1.480204767,1.870201105,2.021961893 -2036,1.454586953,1.842105894,1.970586575 -2035,1.459259632,1.813669661,1.946452602 -2034,1.47005784,1.782280102,1.925925399 -2033,1.453613108,1.749031385,1.871471992 -2032,1.431113262,1.707104313,1.812476709 -2031,1.395114489,1.686953568,1.755453043 -2030,1.372978226,1.646376914,1.705357613 -2029,1.332112049,1.625789095,1.651318947 -2028,1.298525272,1.600780518,1.600435166 -2027,1.268321715,1.547906206,1.544843954 -2026,1.211574695,1.543409905,1.470986223 -2025,1.181711477,1.491954146,1.402753938 -2024,1.169827535,1.498741551,1.321276469 -2023,1.12787027,1.469430828,1.217886402 -2022,1.048395411,1.472544125,1.075137926 -2021,0.95826625,1.462399705,0.95826625 -2020,0.876763373,1.476753866,0.876763373 \ No newline at end of file diff --git a/use_cases/LWR_FT_2023/data/ENC_MG.csv b/use_cases/LWR_FT_2023/data/ENC_MG.csv deleted file mode 100644 index 9f466e3a..00000000 --- a/use_cases/LWR_FT_2023/data/ENC_MG.csv +++ /dev/null @@ -1,38 +0,0 @@ -Energy Prices Transportation Motor Gasoline,,, -East North Central Region,,, -Unit,$ 2020/gal,, -https://www.eia.gov/outlooks/aeo/data/browser/#/?id=3-AEO2021®ion=1-3&cases=highogs~aeo2020ref&start=2019&end=2050&f=A&linechart=~~highogs-d120120a.28-3-AEO2021.1-3~aeo2020ref-d112119a.28-3-AEO2021.1-3&map=aeo2020ref-d112119a.3-3-AEO2021.1-3&sourcekey=0,,, -14:33:35 GMT-0600 (Mountain Daylight Time),,, -Source: U.S. Energy Information Administration,,, -Year,high,ref,low -2050,1.83176,2.41334,2.40459 -2049,1.81466,2.3928,2.39596 -2048,1.79722,2.36773,2.38759 -2047,1.78837,2.33352,2.39015 -2046,1.77802,2.28026,2.37137 -2045,1.77026,2.27441,2.3431 -2044,1.74904,2.2363,2.32212 -2043,1.7325,2.21431,2.28789 -2042,1.72141,2.19227,2.25271 -2041,1.72419,2.15027,2.24346 -2040,1.70842,2.13125,2.24838 -2039,1.69272,2.12254,2.2105 -2038,1.68884,2.08601,2.19561 -2037,1.66723,2.05723,2.17632 -2036,1.64271,2.05088,2.13413 -2035,1.6388,2.0182,2.10619 -2034,1.66587,1.99078,2.09139 -2033,1.62316,1.94717,2.04344 -2032,1.60686,1.90725,1.99925 -2031,1.58529,1.88213,1.95953 -2030,1.5941,1.86337,1.91393 -2029,1.5401,1.83257,1.85464 -2028,1.51156,1.79969,1.81964 -2027,1.49407,1.79006,1.77412 -2026,1.45039,1.7588,1.71388 -2025,1.44918,1.74131,1.6794 -2024,1.46031,1.71235,1.63597 -2023,1.47615,1.74441,1.61298 -2022,1.48661,1.75571,1.5279 -2021,1.46127,1.75608,1.46127 -2020,1.38061,1.7566,1.38061 \ No newline at end of file diff --git a/use_cases/LWR_FT_2023/data/data_cleaner.ipynb b/use_cases/LWR_FT_2023/data/data_cleaner.ipynb index d7f21c30..d19d4d81 100644 --- a/use_cases/LWR_FT_2023/data/data_cleaner.ipynb +++ b/use_cases/LWR_FT_2023/data/data_cleaner.ipynb @@ -1,5 +1,12 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The goal of this notebook is to pre-process electricity market data to use it for ARMA training" + ] + }, { "cell_type": "code", "execution_count": 1, diff --git a/use_cases/LWR_FT_2023/data/plot_braidwood.ipynb b/use_cases/LWR_FT_2023/data/plot_braidwood_hist_elec_prices.ipynb similarity index 100% rename from use_cases/LWR_FT_2023/data/plot_braidwood.ipynb rename to use_cases/LWR_FT_2023/data/plot_braidwood_hist_elec_prices.ipynb diff --git a/use_cases/LWR_FT_2023/run/functions.py b/use_cases/LWR_FT_2023/run/functions.py index 65fe99b7..5a29c195 100644 --- a/use_cases/LWR_FT_2023/run/functions.py +++ b/use_cases/LWR_FT_2023/run/functions.py @@ -118,35 +118,6 @@ def find_lower_nearest_idx(array, value): idx = i return idx -def co2_supply_curve_comb(data,meta): - """ - Determines the cost of CO2 as a function of the quantity asked for, - For HTSE and FT combined component cases - Based on preliminary data from D. Wendt analysis for Braidwood NPP - @ In, data, dict, request for data - @ In, meta, dict, state information - @ Out, data, dict, filled data - @ In, meta, dict, state information - """ - co2_cost = 0 - comp_cap = meta['HERON']['RAVEN_vars']['htse_ft_capacity'] #MWe (negative value) - elec_to_h2_rate = 25.13 #kg-H2/MWe - h2_to_co2_rate = 6.58/1.06 #kg-Co2/kg-h2 - comp_cap = np.abs(comp_cap) - co2_demand_year = 365*24*comp_cap*elec_to_h2_rate*h2_to_co2_rate #(kg-CO2/year) neg - # Get the data for the NPP - labels = meta['HERON']['Case'].get_labels() - location = labels['location'] - location_path = '../data/'+str(location)+'_co2.csv' - df = pd.read_csv(os.path.join(os.path.dirname(__file__), location_path)) - cost_data = df.iloc[:,-1].to_numpy() - co2_demand_data = df.iloc[:,-2].to_numpy() - diff = np.absolute(co2_demand_data-co2_demand_year) - idx = np.argmin(diff) - co2_cost = cost_data[idx] - data = {'reference_price': -co2_cost*co2_demand_year} - return data, meta - def co2_supply_curve(data, meta): """ Determines the cost of CO2 as a function of the quantity asked for, @@ -174,33 +145,6 @@ def co2_supply_curve(data, meta): data = {'reference_price': -co2_cost*co2_demand_year} return data, meta -def co2_supply_curve_test(data, meta): - """ - Determines the cost of CO2 as a function of the quantity asked for, - Based on data from D. Wendt analysis on CO2 feedstock - @ In, data, dict, request for data - @ In, meta, dict, state information - @ Out, data, dict, filled data - @ In, meta, dict, state information - """ - co2_cost = 0 - ft_cap = meta['HERON']['RAVEN_vars']['ft_capacity'] #kg-H2 - h2_rate = 1.06 - co2_rate = 6.58 - co2_demand_year = 365*24*np.abs(ft_cap)*co2_rate/h2_rate #(kg/year) - # Get the data for the NPP - labels = meta['HERON']['Case'].get_labels() - location = labels['location'] - location_path = '../data/'+str(location)+'_co2.csv' - df = pd.read_csv(os.path.join(os.path.dirname(__file__), location_path)) - cost_data = df.iloc[:,-1].to_numpy() - co2_demand_data = df.iloc[:,-2].to_numpy() - diff = np.absolute(co2_demand_data-co2_demand_year) - idx = np.argmin(diff) - co2_cost = cost_data[idx] - data = {'reference_price': -co2_cost*co2_demand_year} - return data, meta - def jet_fuel_price(data, meta): """ Determines the price of jet fuel given the year of the simulation