Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ReEDS_Augur/diagnostic_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)')
Expand Down
2 changes: 1 addition & 1 deletion ReEDS_Augur/prep_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions ReEDS_Augur/run_pras.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions ReEDS_Augur/stress_periods.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion c_supplymodel.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion d_solve_iterate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions docs/source/developer_best_practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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"]
},
Expand Down
4 changes: 2 additions & 2 deletions docs/source/documentation_tools/README.md
Original file line number Diff line number Diff line change
@@ -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.
---

Expand Down
2 changes: 1 addition & 1 deletion docs/source/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
6 changes: 3 additions & 3 deletions docs/source/postprocessing_tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
10 changes: 5 additions & 5 deletions docs/source/reeds_training_homework.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/source/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ The ReEDS source code is hosted on GitHub at <https://github.com/ReEDS-Model/ReE
git lfs install
```

3. Clone the ReEDS-2.0 repository on your desktop. Alternatively, download a ZIP from GitHub ({numref}`figure-github-download`).
3. Clone the ReEDS repository on your desktop. Alternatively, download a ZIP from GitHub ({numref}`figure-github-download`).

```{figure} figs/readme/github-download.png
:name: figure-github-download
Expand Down
6 changes: 3 additions & 3 deletions hourlize/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Hourlize is run by a call to `run_hourlize.py`, which assembles information on t
1. Update settings in `config_base.json` as needed ([details](#config-jsons)), including `load_source`.
1. If running on the HPC, specify run allocation or other submission settings in `inputs/configs/srun_template.sh` ([details](#config-jsons)).
1. Run using `run_hourlize.py load` ([details](#running-hourlize)).
1. Outputs are written to `ReEDS-2.0/inputs/load`.
1. Outputs are written to `ReEDS/inputs/load`.
1. If the results are intended to be used on the main branch, then after testing and quality control, upload the new profiles to the remote host as described in `preprocessing/README.md`.
1. If the results are not intended for general use, they can still be used locally in ReEDS by setting the `GSw_LoadProfiles` switch to the absolute filepath of the resulting hourly demand file.

Expand All @@ -56,7 +56,7 @@ rsync -aPu [username]@kestrel.nlr.gov://shared-projects/rev/projects/seto/fy23/r

### 2. Update the rev_paths files

Update the reV paths file at `ReEDS-2.0/inputs/supply_curve/rev_paths.csv`. Typically this means updating the information for whichever techs (e.g., upv, wind-ons, wind-ofs) and access cases (e.g., reference, open, limited) you want to run.
Update the reV paths file at `ReEDS/inputs/supply_curve/rev_paths.csv`. Typically this means updating the information for whichever techs (e.g., upv, wind-ons, wind-ofs) and access cases (e.g., reference, open, limited) you want to run.

Some details on the additional columns to update:

Expand Down Expand Up @@ -140,7 +140,7 @@ Each entry should be given a `casename` for the supply curve run in the format [

* Supported values for `tech`: upv, wind-ofs, wind-ons.
* Typical values for `access_case`: reference, open, or limited.
* Other values allowed but must match values in `access_case` column of the rev_paths file (typically at `ReEDS-2.0/inputs/supply_curve/rev_paths.csv` but can be specified in `config_base.json`).
* Other values allowed but must match values in `access_case` column of the rev_paths file (typically at `ReEDS/inputs/supply_curve/rev_paths.csv` but can be specified in `config_base.json`).

To link a case to a custom set of config files users can add entries for `config_base` and `config_tech` in the case definition. For example, adding `config_base:test` would link that case to the settings in `config_base_test.json` instead of the typical `config_base.json` file.

Expand Down
2 changes: 1 addition & 1 deletion hourlize/agg_buildings/agg_buildings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#Inputs
bldg_type = 'com' # 'com' for comstock or 'res' for resstock
bldg_path = r'/projects/geohc/jm_ReEDS-2.0/postprocessing/reValue/parallel_agg/outputs/outputs_2025-01-20-15-17-29'
bldg_path = r'/projects/geohc/jm_ReEDS/postprocessing/reValue/parallel_agg/outputs/outputs_2025-01-20-15-17-29'
bldg_tech = 'upgrade0'

shutil.copy2(os.path.realpath(__file__), bldg_path)
Expand Down
2 changes: 1 addition & 1 deletion hourlize/simulate_PV_AC.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

### Filepaths
revpath = os.path.expanduser(os.path.join('~','Projects','reV',''))
reeds_path = os.path.expanduser(os.path.join('~','github2','ReEDS-2.0',''))
reeds_path = os.path.expanduser(os.path.join('~','github2','ReEDS',''))
### reV scenario
path_sim = os.path.join(revpath,'scenarios_aux','scen_032_ed1','')
profile_sim = 'dc_profiles'
Expand Down
2 changes: 1 addition & 1 deletion input_processing/WriteHintage.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def main(reeds_path, inputs_case):
print('Starting WriteHintage.py')

# #%% Settings for testing
# reeds_path = os.path.expanduser('~/github/ReEDS-2.0')
# reeds_path = os.path.expanduser('~/github/ReEDS')
# inputs_case = os.path.join(
# reeds_path,'runs','v20231027_yamM0_Z45_h_d_365_transreg_z69_core','inputs_case')

Expand Down
2 changes: 1 addition & 1 deletion input_processing/aggregate_regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ def agg_disagg(filepath, r2aggreg_glob, r_ba_glob, runfiles_row):

######################
### DERIVED INPUTS ###
### Get the case name (ReEDS-2.0/runs/{casename}/inputscase/)
### Get the case name (ReEDS/runs/{casename}/inputscase/)
casename = inputs_case.split(os.sep)[-3]

#%% Set up logger
Expand Down
6 changes: 3 additions & 3 deletions input_processing/calc_financial_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def calc_financial_inputs(inputs_case):
print('Starting calculation of financial parameters')

# #%% Settings for testing
# reeds_path = '/Users/pbrown/github/ReEDS-2.0/'
# reeds_path = '/Users/pbrown/github/ReEDS/'
# inputs_case = os.path.join(reeds_path,'runs','v20220621_NTPm0_ercot_seq_test','inputs_case')

#%% Inputs from switches
Expand Down Expand Up @@ -502,8 +502,8 @@ def calc_financial_inputs(inputs_case):

#%% Parse arguments
parser = argparse.ArgumentParser(description="calc_financial_inputs.py")
parser.add_argument("reeds_path", help="ReEDS-2.0 directory")
parser.add_argument("inputs_case", help="ReEDS-2.0/runs/{case}/inputs_case directory")
parser.add_argument("reeds_path", help="ReEDS directory")
parser.add_argument("inputs_case", help="ReEDS/runs/{case}/inputs_case directory")

args = parser.parse_args()
reeds_path = args.reeds_path
Expand Down
2 changes: 1 addition & 1 deletion input_processing/check_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
description='Check inputs.gdx parameters against objective_function_params.yaml',
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
parser.add_argument('casepath', help='ReEDS-2.0/runs/{case} directory')
parser.add_argument('casepath', help='ReEDS/runs/{case} directory')
args = parser.parse_args()
casepath = args.casepath

Expand Down
4 changes: 2 additions & 2 deletions input_processing/climateprep.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@
inputs_case = args.inputs_case

# #%% Settings for testing ###
# reeds_path = os.path.expanduser('~/github/ReEDS-2.0/')
# reeds_path = os.path.expanduser('~/github/ReEDS/')
# inputs_case = os.path.expanduser(
# '~/github/ReEDS-2.0/runs/v20201208_beyond2050_Climate2100step5/inputs_case/')
# '~/github/ReEDS/runs/v20201208_beyond2050_Climate2100step5/inputs_case/')

#%%#################
### FIXED INPUTS ###
Expand Down
Loading
Loading