diff --git a/ReEDS_Augur/diagnostic_plots.py b/ReEDS_Augur/diagnostic_plots.py index d0f0bbec..03870e6c 100644 --- a/ReEDS_Augur/diagnostic_plots.py +++ b/ReEDS_Augur/diagnostic_plots.py @@ -1304,8 +1304,8 @@ def main(sw, debug=False): import argparse parser = argparse.ArgumentParser( description='Create the necessary 8760 and capacity factor data for hourly resolution') - parser.add_argument('--reeds_path', help='ReEDS-2.0 directory') - parser.add_argument('--casedir', help='ReEDS-2.0/runs/{case} directory') + parser.add_argument('--reeds_path', help='ReEDS directory') + parser.add_argument('--casedir', help='ReEDS/runs/{case} directory') parser.add_argument('--t', type=int, default=2050, help='solve year to plot') parser.add_argument('--iteration', '-i', type=int, default=-1, help='iteration to plot (default of -1 means latest iteration)') diff --git a/ReEDS_Augur/prep_data.py b/ReEDS_Augur/prep_data.py index 8f4febfc..c1bab198 100644 --- a/ReEDS_Augur/prep_data.py +++ b/ReEDS_Augur/prep_data.py @@ -105,7 +105,7 @@ def errorcheck_reeds2pras(casedir, csvout, h5out): def main(t, casedir, iteration=0): #%%### DEBUGGING: Inputs # t = 2020 - # reeds_path = os.path.expanduser('~/github2/ReEDS-2.0') + # reeds_path = os.path.expanduser('~/github2/ReEDS') # casedir = os.path.join(reeds_path,'runs','v20230214_PRMaugurM0_Pacific_d7fIrh4_CC_y2012') #%%### Get inputs from ReEDS diff --git a/ReEDS_Augur/run_pras.jl b/ReEDS_Augur/run_pras.jl index a44e86f6..b4958ad0 100644 --- a/ReEDS_Augur/run_pras.jl +++ b/ReEDS_Augur/run_pras.jl @@ -18,11 +18,11 @@ function parse_commandline() @ArgParse.add_arg_table s begin "--reeds_path" - help = "Path to ReEDS-2.0 folder" + help = "Path to ReEDS folder" arg_type = String required = true "--reedscase" - help = "Path to ReEDS run (usually .../ReEDS-2.0/runs/{casename})" + help = "Path to ReEDS run (usually .../ReEDS/runs/{casename})" arg_type = String required = true "--solve_year" @@ -441,11 +441,11 @@ end #%% Procedure if abspath(PROGRAM_FILE) == @__FILE__ #%% Inputs for debugging - # julia --project=/path/to/ReEDS-2.0 --threads=1 + # julia --project=/path/to/ReEDS --threads=1 # args = Dict( - # "reeds_path" => "/path/to/ReEDS-2.0", + # "reeds_path" => "/path/to/ReEDS", # "reedscase" => ( - # "/path/to/ReEDS-2.0/runs/" + # "/path/to/ReEDS/runs/" # *"runname"), # "solve_year" => 2035, # "weather_year" => 2007, diff --git a/ReEDS_Augur/stress_periods.py b/ReEDS_Augur/stress_periods.py index 905a710b..e643db68 100644 --- a/ReEDS_Augur/stress_periods.py +++ b/ReEDS_Augur/stress_periods.py @@ -17,7 +17,7 @@ import reeds # #%% Debugging -# sw['reeds_path'] = os.path.expanduser('~/github/ReEDS-2.0/') +# sw['reeds_path'] = os.path.expanduser('~/github/ReEDS/') # sw['casedir'] = os.path.join(sw['reeds_path'],'runs','v20230123_prmM3_Pacific_d7sIrh4sh2_y2') # import importlib # importlib.reload(functions) @@ -604,7 +604,7 @@ def main(sw, t, iteration=0, logging=True): # if __name__ == '__main__': # #%%### option to run script directly for debugging -# casedir = "/path/to/ReEDS-2.0/runs/runname" +# casedir = "/path/to/ReEDS/runs/runname" # t = 2030 # previous solve year # iteration = 0 # # load switches diff --git a/c_supplymodel.gms b/c_supplymodel.gms index 029d53f1..d0a5d102 100644 --- a/c_supplymodel.gms +++ b/c_supplymodel.gms @@ -465,7 +465,7 @@ eq_loadsite_siting(loadsitereg,t) * --------------------------------------------------------------------------- *The following 3 equations apply to the flexibility of load in ReEDS, originally developed -*as part of the EFS study in ReEDS heritage and adapted for ReEDS-2.0 here. +*as part of the EFS study in ReEDS heritage and adapted for ReEDS here. * Additional work has been done to represent flexible load as a generator + storage * with boundaries on how many timeslices this generator may shift. See equations diff --git a/d_solve_iterate.py b/d_solve_iterate.py index d22675fe..3b222cdd 100644 --- a/d_solve_iterate.py +++ b/d_solve_iterate.py @@ -14,7 +14,7 @@ def run_reeds(casepath, t, onlygams=False, iteration=0): """ """ # #%% Arguments for testing - # casepath = os.path.expanduser('~/github/ReEDS-2.0/runs/v20230512_prasM0_ERCOT') + # casepath = os.path.expanduser('~/github/ReEDS/runs/v20230512_prasM0_ERCOT') # t = 2020 # onlygams = 0 # iteration = 0 diff --git a/docs/source/developer_best_practices.md b/docs/source/developer_best_practices.md index 9547bc02..43f1e0cf 100644 --- a/docs/source/developer_best_practices.md +++ b/docs/source/developer_best_practices.md @@ -3,7 +3,7 @@ The following naming, rounding, and coding conventions apply to all new code contributed to ReEDS. Because these conventions were established after initial development, you may notice inconsistencies in the existing codebase--that's expected. The goal is consistency going forward, not comprehensiveness. -Using the Ruff Python linter is recommended to improve code quality. To get started with Ruff, see the guide on [Installing Ruff](https://docs.astral.sh/ruff/installation/). Once installed, you can check for errors using the following command from the base ReEDS-2.0 directory: `ruff check`. If you need more information on a specific error, see the [Ruff Rules](https://docs.astral.sh/ruff/rules/). +Using the Ruff Python linter is recommended to improve code quality. To get started with Ruff, see the guide on [Installing Ruff](https://docs.astral.sh/ruff/installation/). Once installed, you can check for errors using the following command from the base ReEDS directory: `ruff check`. If you need more information on a specific error, see the [Ruff Rules](https://docs.astral.sh/ruff/rules/). Since we have not yet adopted strict formatting guidelines, do not make code *formatting* changes to existing scripts using Ruff; use only the linter. @@ -227,7 +227,7 @@ The goal is to keep ReEDS as lightweight as possible to facilitate faster clonin ## Version Control and Testing ### ReEDS Versioning & Releases -This section outlines the current ReEDS approach to versioning. You can find current and past ReEDS versions here: {{ '[ReEDS-2.0 Releases]({}/releases)'.format(base_github_url) }} +This section outlines the current ReEDS approach to versioning. You can find current and past ReEDS versions here: {{ '[ReEDS Releases]({}/releases)'.format(base_github_url) }} #### Versioning overview @@ -332,7 +332,7 @@ If you would like to see what the documentation will look like when developing l 2. Run the command `make html` to build the documentation locally - Ensure you have the 'reeds2' environment activated -3. Open `/ReEDS-2.0/docs/build/html/index.html` to view the documentation. +3. Open `/ReEDS/docs/build/html/index.html` to view the documentation. - If you make changes and wish to see how they are reflected in the documentation, you can run the `make html` command again and refresh the window you already have open 4. If you would like to remove the generated html files, you can run the command `make clean` from the "docs/" folder @@ -348,7 +348,7 @@ If you would like to see what the documentation will look like when developing l 2. Request access to the ReEDS Zotero library from Brian, Patrick, or Wesley 3. If you add any new references to the ReEDS Zotero library and cite them in the ReEDS docs, you'll need to: - a. Replace the contents of ReEDS-2.0/docs/source/references.bib with the contents of the .bib file at {your path}. Make sure to export your .bib file in a "Better BibTex" format. + a. Replace the contents of ReEDS/docs/source/references.bib with the contents of the .bib file at {your path}. Make sure to export your .bib file in a "Better BibTex" format. To add an in-text citation, find the citation key of the citation you would like to add in Zotero. @@ -596,8 +596,8 @@ When using the python debugger, you will need to set a configuration. Here's an "program": "${file}", "console": "integratedTerminal", "args": [ - "/Users/kminderm/ReEDS-2.0", - "/Users/kminderm/ReEDS-2.0/runs/main_Pacific/inputs_case" + "/Users/kminderm/ReEDS", + "/Users/kminderm/ReEDS/runs/main_Pacific/inputs_case" ], "purpose": ["debug-in-terminal"] }, diff --git a/docs/source/documentation_tools/README.md b/docs/source/documentation_tools/README.md index 07edd3f7..e3c98732 100644 --- a/docs/source/documentation_tools/README.md +++ b/docs/source/documentation_tools/README.md @@ -1,11 +1,11 @@ ### How to Use Sources Documentation 1. Before running the .bat script, please ensure the sources.csv file is closed. If open, the script will be unable to replace the file and will throw an error. -2. Run **generate_sources_md_file.bat** script (for Mac and Linux users **generate_sources_md_file.sh**)located within the documentation_tools folder (ReEDS-2.0/docs/source/documentation_tools). You will need navigate to that directory prior to running. +2. Run **generate_sources_md_file.bat** script (for Mac and Linux users **generate_sources_md_file.sh**)located within the documentation_tools folder (ReEDS/docs/source/documentation_tools). You will need navigate to that directory prior to running. 3. This will run the first script **generate_new_sources.py**. generating a new **sources.csv** file at the top directory of the repository, please note,the existing sources.csv in your Repository root will be renamed to sources_{timestamp}.csv format. This can be deleted manually if no longer required; or can be held on to if required for comparison. Tree change files are generated in the documentations_tools folder to indicate files not included in the prior sources file (**sources_files_added.csv**), files removed from the prior sources file (**sources_files_deleted.csv**), and files not included in the sources file because they aren't committed (**sources_untracked_files.csv**). These change files should not be committed and can be deleted when no longer needed. 4. Once this has finished running, please proceed to update relevant fields in the *sources.csv* file 5. Once relevant fields have been updated, please save sources.csv and close it. -6. Run **generate_markdown.bat** (for Mac and Linux users **generate_markdown.sh**)located within the documentation_tools folder. This will generate a README file *sources_documentation.md* with all the Source files and their details for the Repository by running the script **generate_markdown.py**. The markdown file will be generated in the ReEDS-2.0/docs/source/ location. +6. Run **generate_markdown.bat** (for Mac and Linux users **generate_markdown.sh**)located within the documentation_tools folder. This will generate a README file *sources_documentation.md* with all the Source files and their details for the Repository by running the script **generate_markdown.py**. The markdown file will be generated in the ReEDS/docs/source/ location. 7. Commit and push the updated **sources.csv** and **sources_documentation.md** files. --- diff --git a/docs/source/faq.md b/docs/source/faq.md index 445771a3..a5f89bc3 100644 --- a/docs/source/faq.md +++ b/docs/source/faq.md @@ -80,7 +80,7 @@ If you'd like to reduce the model solve time, consider making some of the follow Every year we target June 1 for the bulk of model changes to be completed, which allows us to meet the hard deadline for having a working, updated version of the model by June 30. We typically make minor updates to the model over the summer and tag a final version for that year in August or September. This version is then used to produce the Standard Scenarios and Cambium data products. -Additionally, changes are made throughout the year and a new version is created and published roughly every month. You can find current and past ReEDS versions here: {{ '[ReEDS-2.0 Releases]({}/releases)'.format(base_github_url) }} +Additionally, changes are made throughout the year and a new version is created and published roughly every month. You can find current and past ReEDS versions here: {{ '[ReEDS Releases]({}/releases)'.format(base_github_url) }} If you would like to run ReEDS with a previous version, you can either download the source code directly or check out that version using the tag. diff --git a/docs/source/postprocessing_tools.md b/docs/source/postprocessing_tools.md index 0c9367b7..0f2266c9 100644 --- a/docs/source/postprocessing_tools.md +++ b/docs/source/postprocessing_tools.md @@ -82,19 +82,19 @@ The first case in the list is treated as the base case, and other cases are all Example for two cases: ```bash -python postprocessing/compare_cases.py /Users/username/github/ReEDS-2.0/runs/v20250310_main_USA /Users/username/github/ReEDS-2.0/runs/v20250310_newthing_USA +python postprocessing/compare_cases.py /Users/username/github/ReEDS/runs/v20250310_main_USA /Users/username/github/ReEDS/runs/v20250310_newthing_USA ``` Example for three cases: ```bash -python postprocessing/compare_cases.py /Users/username/github/ReEDS-2.0/runs/v20250310_main_USA /Users/username/github/ReEDS-2.0/runs/v20250310_newthing1_USA /Users/username/github/ReEDS-2.0/runs/v20250310_newthing2_USA +python postprocessing/compare_cases.py /Users/username/github/ReEDS/runs/v20250310_main_USA /Users/username/github/ReEDS/runs/v20250310_newthing1_USA /Users/username/github/ReEDS/runs/v20250310_newthing2_USA ``` Example for a .csv file of cases: ```bash -python postprocessing/compare_cases.py /Users/username/github/ReEDS-2.0/postprocessing/example.csv +python postprocessing/compare_cases.py /Users/username/github/ReEDS/postprocessing/example.csv ``` ### Run PRAS: `postprocessing/run_reeds2pras.py` diff --git a/docs/source/reeds_training_homework.md b/docs/source/reeds_training_homework.md index f984daad..aa65f230 100644 --- a/docs/source/reeds_training_homework.md +++ b/docs/source/reeds_training_homework.md @@ -18,10 +18,10 @@ orphan: true 5. Add a new column with 'ERCOT_BA' in row 1. - Copy the contents of rows 2-6 from the ERCOT_county column - Replace 'z3109' with 'z134' in row 5 (`GSw_ZoneSet`) - - Save `cases_examples.csv` in the ReEDS-2.0 folder (you can overwrite the existing file) + - Save `cases_examples.csv` in the ReEDS folder (you can overwrite the existing file) 6. Open VS Code - - Open the folder where your repo is located (File -> Open Folder -> navigate to ReEDS-2.0 folder) + - Open the folder where your repo is located (File -> Open Folder -> navigate to ReEDS folder) - Open a new terminal and activate the reeds2 environment 7. Start a new run @@ -33,7 +33,7 @@ orphan: true ### 1. Review the results -1. Navigate to 'ReEDS-2.0/runs/{your run name}/outputs/reeds-report' and open 'report.html' +1. Navigate to 'ReEDS/runs/{your run name}/outputs/reeds-report' and open 'report.html' 2. Learn to create your own plots of the results using bokehpivot - See [Bokeh Pivot](../postprocessing_tools.md#bokehpivot) @@ -67,10 +67,10 @@ Create an informal slide deck with the following results: 4. Change the ‘ignore’ row value to be 1 for all columns except ‘Western_BA_Decarb’ which you can either set to 0 or leave blank -5. Save `cases_examples.csv` in ReEDS-2.0 folder +5. Save `cases_examples.csv` in ReEDS folder 6. Open VS Code - - Open the folder where your repo is located (File -> Open Folder -> navigate to ReEDS-2.0 folder) + - Open the folder where your repo is located (File -> Open Folder -> navigate to ReEDS folder) - Open a new terminal and activate the reeds2 environment 7. Start a new run diff --git a/docs/source/setup.md b/docs/source/setup.md index 2c178e4b..449516d5 100644 --- a/docs/source/setup.md +++ b/docs/source/setup.md @@ -162,7 +162,7 @@ The ReEDS source code is hosted on GitHub at python retail_rate_calculations.py v20200806_retailtest_MidCase` + - `D:\username\ReEDS\postprocessing\retail_rate_module> python retail_rate_calculations.py v20200806_retailtest_MidCase` ## Outputs diff --git a/postprocessing/retail_rate_module/ferc_distadmin.py b/postprocessing/retail_rate_module/ferc_distadmin.py index 849588cc..3ffbe161 100644 --- a/postprocessing/retail_rate_module/ferc_distadmin.py +++ b/postprocessing/retail_rate_module/ferc_distadmin.py @@ -226,7 +226,7 @@ def get_ferc_costs( Indicate whether to write results as csv or pickle (default = csv), or enter False to skip writing of results inflationpath : str - Filepath to ReEDS-2.0/runs/{casename}/inputs_case/inflation.csv + Filepath to ReEDS/runs/{casename}/inputs_case/inflation.csv (required) drop_pgesce_20182019 : bool Indicate whether to drop 2018 and 2019 values for 'A&G Oper Injuries & Damages $' @@ -248,9 +248,9 @@ def get_ferc_costs( # aggregation = 'state' # writeout = False # inflationpath = os.path.join( - # os.path.expanduser('~/Documents/ReEDS_/ReEDS-2.0/runs/stdscen_091923_Mid_Case/'), + # os.path.expanduser('~/Documents/ReEDS_/ReEDS/runs/stdscen_091923_Mid_Case/'), # 'inputs_case', 'inflation.csv') - # inflationpath = os.path.join('/','Users','jcarag','ReEDS','RRM_Fixes','ReEDS-2.0', + # inflationpath = os.path.join('/','Users','jcarag','ReEDS','RRM_Fixes','ReEDS', # 'runs','stdscen_091923_DAC_100by2035','inputs_case','inflation.csv') # drop_pgesce_20182019 = True # dollar_year = 2004 diff --git a/postprocessing/retail_rate_module/mean_bias_error.py b/postprocessing/retail_rate_module/mean_bias_error.py index a5aa94bd..d51fdf49 100644 --- a/postprocessing/retail_rate_module/mean_bias_error.py +++ b/postprocessing/retail_rate_module/mean_bias_error.py @@ -1,7 +1,7 @@ """ This script calculates the mean bias error between the bottom-up retail rates and reported state-level retail rates from EIA form 861 and writes the results -to ReEDS-2.0/postprocessing/retail_rate_module/inputs/state-meanbiaserror_rate-aggregation.csv. +to ReEDS/postprocessing/retail_rate_module/inputs/state-meanbiaserror_rate-aggregation.csv. The results are written in ¢/kWh in {out_dollar_year} dollars. """ @@ -32,7 +32,7 @@ out_dollar_year = args.out_dollar_year # #%% Settings for testing/debugging -# reeds_path = os.path.expanduser('~/github2/ReEDS-2.0/') +# reeds_path = os.path.expanduser('~/github2/ReEDS/') # run_dir = os.path.join(reeds_path,'runs','v20210716_main_Ref_2026') # out_dollar_year = 2022 diff --git a/postprocessing/run_reeds2pras.py b/postprocessing/run_reeds2pras.py index 129a6fe5..bdad0b7e 100644 --- a/postprocessing/run_reeds2pras.py +++ b/postprocessing/run_reeds2pras.py @@ -173,7 +173,7 @@ def main( import argparse description = """Run prep_data, ReEDS2PRAS, and PRAS as necessary. Example usage on the HPC: - `case=/projects/reedsweto/github/ReEDS-2.0/runs/v20230524_ntpH0_Pacific` + `case=/projects/reedsweto/github/ReEDS/runs/v20230524_ntpH0_Pacific` `for s in 100 1000; do python postprocessing/run_reeds2pras.py $case -s $s -r; done` """ parser = argparse.ArgumentParser( @@ -229,7 +229,7 @@ def main( switch_mods = args.switch_mods # #%% Inputs for testing - # case = '/Users/pbrown/github2/ReEDS-2.0/runs/v20230605_ntpM1_Pacific' + # case = '/Users/pbrown/github2/ReEDS/runs/v20230605_ntpM1_Pacific' # year = 2026 # iteration = None # samples = 0 diff --git a/postprocessing/tableau/readme.md b/postprocessing/tableau/readme.md index a0a0ce01..c231bd15 100644 --- a/postprocessing/tableau/readme.md +++ b/postprocessing/tableau/readme.md @@ -25,11 +25,11 @@ This folder contains files that facilitate the postprocessing and publication of ### Step 2: Run tableau_viz_suite.py 1. Confirm your inputs: -- Scenario name and filepaths, as shown in `ReEDS-2.0\postprocessing\example.csv`. `tableau_viz_suite.py` will point to this csv to know which scenarios to include. - - Note: the "casename" column in `ReEDS-2.0\postprocessing\example.csv` will become the name shown in the CSV files that you may ultimately publish. It is recommended to choose decipherable scenario names for a general audience not familiar with your scenario matrix. For example, instead of "Scenario1" you may call it "MidDemand_RefTransmission_DefaultPolicy". Each value in the "casename" column must be unique. -- Description of your suite of scenarios, to be used in the Tableau workbook: `ReEDS-2.0\postprocessing\tableau\scenarios.csv`. This should correspond to the scenarios used in `ReEDS-2.0\postprocessing\example.csv` in the "casename" column. If you do not populate `ReEDS-2.0\postprocessing\tableau\scenarios.csv`, the script will attempt to automatically assign metadata of your scenarios based on the cases.csv switches they used. This is imperfect for publication ready datasets but works well for quick analyses and interrim results. If the script cannot populate `ReEDS-2.0\postprocessing\tableau\scenarios.csv` automatically, the script will break. +- Scenario name and filepaths, as shown in `ReEDS\postprocessing\example.csv`. `tableau_viz_suite.py` will point to this csv to know which scenarios to include. + - Note: the "casename" column in `ReEDS\postprocessing\example.csv` will become the name shown in the CSV files that you may ultimately publish. It is recommended to choose decipherable scenario names for a general audience not familiar with your scenario matrix. For example, instead of "Scenario1" you may call it "MidDemand_RefTransmission_DefaultPolicy". Each value in the "casename" column must be unique. +- Description of your suite of scenarios, to be used in the Tableau workbook: `ReEDS\postprocessing\tableau\scenarios.csv`. This should correspond to the scenarios used in `ReEDS\postprocessing\example.csv` in the "casename" column. If you do not populate `ReEDS\postprocessing\tableau\scenarios.csv`, the script will attempt to automatically assign metadata of your scenarios based on the cases.csv switches they used. This is imperfect for publication ready datasets but works well for quick analyses and interrim results. If the script cannot populate `ReEDS\postprocessing\tableau\scenarios.csv` automatically, the script will break. - Note: Each value in the "Scenario Name" column must be unique. This is what is visible in the Tableau workbooks. -- Technology mapping and cost mapping are pulled from the bokehpivot csvs (see `ReEDS-2.0\postprocessing\bokehpivot\in\reeds2`). To change those settings, alter the mappings in the bokehpivot csvs. +- Technology mapping and cost mapping are pulled from the bokehpivot csvs (see `ReEDS\postprocessing\bokehpivot\in\reeds2`). To change those settings, alter the mappings in the bokehpivot csvs. - No additional packages are needed beyond the default ReEDS environment. 2. Run tableau_viz_suite.py @@ -44,7 +44,7 @@ python postprocessing/tableau/tableau_viz_suite.py ../example.csv --years [2025, However, it has has not been configured to submit jobs on Kestrel because even with suites of 100+ runs, it only takes a couple minutes to process. ``` -3. Expected outputs: expected output is a directory of csvs and shapefiles `ReEDS-2.0\postprocessing\tableau\out\report-{datetime}`. +3. Expected outputs: expected output is a directory of csvs and shapefiles `ReEDS\postprocessing\tableau\out\report-{datetime}`. ### Step 3: Load your data into template Tableau workbook @@ -53,7 +53,7 @@ However, it has has not been configured to submit jobs on Kestrel because even w 3. You may also be asked to "Allow Extension" in a pop-up box. Click "OK". That extension is needed for the workbook to function properly. 4. On the bottom left hand corner, click on "Data Source". Under "Connections", in the top-left hand corner, click on the down arrow next to "Scenarios". Click "Edit Connection". -Change the directory to the location of the csv files you produced with `tableau_viz_suite.py`. Default location is `ReEDS-2.0\postprocessing\tableau\out\report-{datetime}`. Do this for each of the "Connections" in the workbook. For the `ReEDS_Study_Results_Charts.twbx` workbook, this is "Scenarios", "CSV Files" and "Hierarchy". For the `ReEDS_Study_Results_Maps.twbx` workbook, this is "Scenarios", "CSV Files", "Transmission Endpoints", "US_PCA" and "Hierarchy". +Change the directory to the location of the csv files you produced with `tableau_viz_suite.py`. Default location is `ReEDS\postprocessing\tableau\out\report-{datetime}`. Do this for each of the "Connections" in the workbook. For the `ReEDS_Study_Results_Charts.twbx` workbook, this is "Scenarios", "CSV Files" and "Hierarchy". For the `ReEDS_Study_Results_Maps.twbx` workbook, this is "Scenarios", "CSV Files", "Transmission Endpoints", "US_PCA" and "Hierarchy". - Note: When altering the path for the `hierarchy.csv` file, point the path to the Tableau script outputs (ex. postprocessing/tableau/out/report-*), not `inputs/hierarchy.csv`. 5. Clicking into this folder will automatically update the data. You should now see the new data populated throughout the notebook if you click to the other tabs, which are referred to as "Dashboards" in Tableau. 6. If you do not see your data populating the "Dashboards", there are a couple common culprits. @@ -80,7 +80,7 @@ Change the directory to the location of the csv files you produced with `tableau ## Troubleshooting -`tableau_viz_suite.py` relies on the `ReEDS-2.0/reeds` functions and functions in bokehpivot. Errors may be derived from broken functionality there. +`tableau_viz_suite.py` relies on the `ReEDS/reeds` functions and functions in bokehpivot. Errors may be derived from broken functionality there. ## Known Incompatibilities - Mixed resolution scenarios - this postprocessing pipeline is currently only configured diff --git a/postprocessing/tableau/tableau_viz_suite.py b/postprocessing/tableau/tableau_viz_suite.py index 5e0e679f..96ff771b 100644 --- a/postprocessing/tableau/tableau_viz_suite.py +++ b/postprocessing/tableau/tableau_viz_suite.py @@ -510,10 +510,10 @@ def export(dictin,output_dir): description='Create the necessary csv files for Tableau to ingest and visualize from ReEDS outputs') parser.add_argument( '--reeds_path', default=os.path.abspath(os.path.join(os.path.dirname(__file__), '../..')), - help='ReEDS-2.0 directory') + help='ReEDS directory') parser.add_argument( '--tableau_path', default=os.path.expanduser('~\Documents\My Tableau Repository'), - help='ReEDS-2.0 directory') + help='ReEDS directory') parser.add_argument( 'caselist', type=str, nargs='+', help=('space-delimited list of cases to plot, OR shared casename prefix, ' @@ -561,9 +561,9 @@ def export(dictin,output_dir): #%%### Inputs for debugging # reeds_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..')) - # caselist = r'C:\Users\ahamilto\Documents\GitHub\ReEDS-2.0\postprocessing\example.csv' + # caselist = r'C:\Users\ahamilto\Documents\GitHub\ReEDS\postprocessing\example.csv' # years = list(range(2025-2050)) - # python tableau_viz_suite.py C:\Users\ahamilto\Documents\GitHub\ReEDS-2.0\postprocessing\example.csv --reeds_path C:\Users\ahamilto\Documents\GitHub\ReEDS-2.0 + # python tableau_viz_suite.py C:\Users\ahamilto\Documents\GitHub\ReEDS\postprocessing\example.csv --reeds_path C:\Users\ahamilto\Documents\GitHub\ReEDS #%%###os globals this_dir_path = os.path.dirname(os.path.realpath(__file__)) diff --git a/preprocessing/atb_updates_processing/ReEDS_ATB_InputDataUpdate.py b/preprocessing/atb_updates_processing/ReEDS_ATB_InputDataUpdate.py index 123ac95b..fbd173af 100644 --- a/preprocessing/atb_updates_processing/ReEDS_ATB_InputDataUpdate.py +++ b/preprocessing/atb_updates_processing/ReEDS_ATB_InputDataUpdate.py @@ -5,11 +5,11 @@ """ How to use this script. -1. Copy the latest ATB csv (flattened version)- currently located here //nrelnas01/reeds/ReEDS_ATB_InputDataUpdate into your folder ~/ReEDS-2.0/input_processing/atb_updates_processing/input_files +1. Copy the latest ATB csv (flattened version)- currently located here //nrelnas01/reeds/ReEDS_ATB_InputDataUpdate into your folder ~/ReEDS/input_processing/atb_updates_processing/input_files -2. Copy the latest 20YY_CSP_occ_vs_tes_duration_formatted csv (flattened version) currently located here //nrelnas01/reeds/ReEDS_ATB_InputDataUpdate into your folder ~/ReEDS-2.0/input_processing/atb_updates_processing/input_files +2. Copy the latest 20YY_CSP_occ_vs_tes_duration_formatted csv (flattened version) currently located here //nrelnas01/reeds/ReEDS_ATB_InputDataUpdate into your folder ~/ReEDS/input_processing/atb_updates_processing/input_files -3. Copy the historic data csvs (previous year) from ~ReEDS-2.0/inputs/plant_characteristics into the ~/ReEDS-2.0/input_processing/atb_updates_processing/input_files +3. Copy the historic data csvs (previous year) from ~ReEDS/inputs/plant_characteristics into the ~/ReEDS/input_processing/atb_updates_processing/input_files For example if this is ATB 2022 updates to ReEDS the previous year historic data would the 2021 historic data csvs, and the necessary files would be (year will change!) 1. battery_ATB_2021_moderate.csv 2. conv_ATB_2021.csv @@ -29,9 +29,9 @@ uncomment the final `#run_updates()` call in the script and then run the entire script. If it is successful, you will get a successful completion message as an output. -7. Copy the formatted ReEDS input csvs to the *~/ReEDS-2.0/inputs/plant_characteristics* folder. +7. Copy the formatted ReEDS input csvs to the *~/ReEDS/inputs/plant_characteristics* folder. -8. Add appropriate formatted ReEDS input csv file names to the *~/ReEDS-2.0/inputs/plant_characteristics/dollaryear.csv* file. +8. Add appropriate formatted ReEDS input csv file names to the *~/ReEDS/inputs/plant_characteristics/dollaryear.csv* file. """ import pandas as pd @@ -945,7 +945,7 @@ def run_updates(): None """ - successful_completion_message = "ReEDS ATB Input Updates complete! \n Be sure to 1) copy the formatted csvs to the ~/ReEDS-2.0/inputs/plant_characteristics folder, \n and 2) Add appropriate formatted ReEDS input csv file names to the ~/ReEDS-2.0/inputs/plant_characteristics/dollaryear.csv file." + successful_completion_message = "ReEDS ATB Input Updates complete! \n Be sure to 1) copy the formatted csvs to the ~/ReEDS/inputs/plant_characteristics folder, \n and 2) Add appropriate formatted ReEDS input csv file names to the ~/ReEDS/inputs/plant_characteristics/dollaryear.csv file." #run necessary setup and retrieve variables needed for for updates input_dir, output_dir, df_atb, atb_year, atb_first_year, atb_last_year, dollar_yr_conv, crpyears, case, atb_filters, atb_scenarios = updates_setup() diff --git a/reeds/log.py b/reeds/log.py index 2dee9a4a..9816d719 100755 --- a/reeds/log.py +++ b/reeds/log.py @@ -68,7 +68,7 @@ def toc(tic, year, process, path=''): def get_solve_times(path=''): """Get all solve times, disaggregated by GAMS/barrier/crossover/remainder. Disaggregation only works when using CPLEX as the solver.""" - # path = '/Users/pbrown/github/ReEDS-2.0/runs/v20240111_stressM0_stress_WECC_crossover' + # path = '/Users/pbrown/github/ReEDS/runs/v20240111_stressM0_stress_WECC_crossover' lengths = { 'gams': {}, 'barrier': {}, diff --git a/reeds/output_calc.py b/reeds/output_calc.py index a641bfe5..90f585dc 100644 --- a/reeds/output_calc.py +++ b/reeds/output_calc.py @@ -719,7 +719,7 @@ def calc_transmission_capacity(case,levels): return intraregional, interregional def get_level_map(case): - # for all regions available in ReEDS-2.0/inputs/hierarchy.csv, map them to a clean display name + # for all regions available in ReEDS/inputs/hierarchy.csv, map them to a clean display name level_map = pd.read_csv( os.path.join(reeds_path, 'postprocessing', 'plots', 'level_map.csv'), index_col='raw').squeeze(1) diff --git a/reeds/reedsplots.py b/reeds/reedsplots.py index da1013b1..c853ac64 100644 --- a/reeds/reedsplots.py +++ b/reeds/reedsplots.py @@ -2034,7 +2034,7 @@ def plot_interreg_transfer_cap_ratio( """Plot interregional transfer capability / peak demand over time""" ### Inputs for debugging # case = ( - # '/Users/pbrown/github2/ReEDS-2.0/runs/' + # '/Users/pbrown/github2/ReEDS/runs/' # 'v20240212_transopM0_WECC_CPNP_GP1_TFY2035_PTL2035_TRc_MITCg0p3') # casenames = 'base' # level = 'transreg'; tstart=2020; diff --git a/reeds2pras/README.md b/reeds2pras/README.md index daa5ddd5..ca8db808 100644 --- a/reeds2pras/README.md +++ b/reeds2pras/README.md @@ -23,7 +23,7 @@ curl -fsSL https://install.julialang.org | sh winget install --name Julia --id 9NJNWW8PVKMN -e -s msstore ``` -Then, from the ReEDS-2.0 directory, run `julia --project=. instantiate.jl` to ensure proper installation of Julia and the ReEDS2PRAS environment. +Then, from the ReEDS directory, run `julia --project=. instantiate.jl` to ensure proper installation of Julia and the ReEDS2PRAS environment. ## Basic Usage @@ -32,7 +32,7 @@ If you have a completed ReEDS run and a REPL with ReEDS2PRAS (`using ReEDS2PRAS` ```julia using ReEDS2PRAS -reedscase = "/projects/ntps/llavin/ReEDS-2.0/runs/ntpsrerun_Xlim_DemHi_90by2035EarlyPhaseout__core" # path to completed ReEDS run +reedscase = "/projects/ntps/llavin/ReEDS/runs/ntpsrerun_Xlim_DemHi_90by2035EarlyPhaseout__core" # path to completed ReEDS run solve_year = 2035 #need ReEDS Augur data for the input solve year weather_year = 2012 # must be 2007-2013 or 2016-2023 timesteps = 8760 @@ -52,7 +52,7 @@ ReEDS2PRAS can be run for multiple weather years of a completed ReEDS run by pas using ReEDS2PRAS # path to completed ReEDS run -reedscase = "/projects/ntps/llavin/ReEDS-2.0/runs/ntpsrerun_Xlim_DemHi_90by2035EarlyPhaseout__core" +reedscase = "/projects/ntps/llavin/ReEDS/runs/ntpsrerun_Xlim_DemHi_90by2035EarlyPhaseout__core" solve_year = 2035 #need ReEDS Augur data for the input solve year weather_year = 2007 # must be 2007-2013 or 2016-2023 timesteps = 61320 @@ -71,14 +71,14 @@ It is always good practice to include new tests if the current tests don't cover You can run ReEDS2PRAS tests by running: ```shell -cd ReEDS-2.0/reeds2pras/test +cd ReEDS/reeds2pras/test julia --project runtests.jl ``` or ```shell -cd ReEDS-2.0/reeds2pras/test +cd ReEDS/reeds2pras/test julia --project ``` diff --git a/reeds2pras/src/utils/reeds_input_parsing.jl b/reeds2pras/src/utils/reeds_input_parsing.jl index 985936bc..4a83a1f2 100644 --- a/reeds2pras/src/utils/reeds_input_parsing.jl +++ b/reeds2pras/src/utils/reeds_input_parsing.jl @@ -5,7 +5,7 @@ Parameters ---------- x : String - Path to ReEDS case (e.g. "~/github/ReEDS-2.0/runs/name_of_reeds_case") + Path to ReEDS case (e.g. "~/github/ReEDS/runs/name_of_reeds_case") y : Int ReEDS model year diff --git a/run_pcm.py b/run_pcm.py index a7b58ff0..fe035579 100644 --- a/run_pcm.py +++ b/run_pcm.py @@ -298,7 +298,7 @@ def main(casepath, t, switch_mods=switch_mods_default, label='', overwrite=False description='Run ReEDS in PCM mode', formatter_class=argparse.ArgumentDefaultsHelpFormatter, ) - parser.add_argument('casepath', type=str, help='ReEDS-2.0/runs/{case} directory') + parser.add_argument('casepath', type=str, help='ReEDS/runs/{case} directory') parser.add_argument( '--year', '-t', diff --git a/sources.csv b/sources.csv index 22a5f39b..ffa11a35 100644 --- a/sources.csv +++ b/sources.csv @@ -1,5 +1,5 @@ RelativeFilePath,RelativeFolderPath,FileName_new,FileExtension,Description_new,Indices,DollarYear,Citation,Filetype,Units -/cases.csv,/,cases,.csv,Contains the configuration settings for the ReEDS run(s).,,2004,https://github.nrel.gov/ReEDS/ReEDS-2.0/blob/38e6610a8c6a92291804598c95c11b707bf187b9/cases.csv,Switches file, +/cases.csv,/,cases,.csv,Contains the configuration settings for the ReEDS run(s).,,2004,,Switches file, /cases_examples.csv,/,cases_examples,.csv,,,,,, /cases_small.csv,/,cases_small,.csv,Contains settings to run ReEDS at a smaller scale to test operability of the ReEDS model. Turns off several technologies and reduces the model size to significantly improve solve times.,,,,, /cases_standardscenarios.csv,/,cases_standardscenarios,.csv,Contains the configuration settings for the Standard Scenarios ReEDS runs.,,,,StdScen Cases file, diff --git a/sources_documentation.md b/sources_documentation.md index b4b86651..53254f2e 100644 --- a/sources_documentation.md +++ b/sources_documentation.md @@ -96,7 +96,6 @@ - **File Type:** Switches file - **Description:** Contains the configuration settings for the ReEDS run(s). - **Dollar year:** 2004 - - **Citation:** [https://github.nrel.gov/ReEDS/ReEDS-2.0/blob/38e6610a8c6a92291804598c95c11b707bf187b9/cases.csv](https://github.nrel.gov/ReEDS/ReEDS-2.0/blob/38e6610a8c6a92291804598c95c11b707bf187b9/cases.csv) --- - [cases_county.csv](/cases_county.csv) diff --git a/tc_phaseout.py b/tc_phaseout.py index b89feeff..eaac63ac 100644 --- a/tc_phaseout.py +++ b/tc_phaseout.py @@ -39,7 +39,7 @@ def calc_tc_phaseout_mult(year, case, use_historical=use_historical): ''' # #%% Debugging # year = 2035 - # case = os.path.expanduser('~/github2/ReEDS-2.0/runs/v20230305_reccM0_ref_seq') + # case = os.path.expanduser('~/github2/ReEDS/runs/v20230305_reccM0_ref_seq') #%% Get switches sw = reeds.io.get_switches(case)