dwind 0.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dwind/__init__.py +3 -0
- dwind/btm_sizing.py +129 -0
- dwind/config.py +118 -0
- dwind/helper.py +172 -0
- dwind/loader.py +59 -0
- dwind/model.py +371 -0
- dwind/mp.py +225 -0
- dwind/resource.py +166 -0
- dwind/run.py +288 -0
- dwind/scenarios.py +139 -0
- dwind/valuation.py +1562 -0
- dwind-0.3.dist-info/METADATA +168 -0
- dwind-0.3.dist-info/RECORD +17 -0
- dwind-0.3.dist-info/WHEEL +5 -0
- dwind-0.3.dist-info/entry_points.txt +2 -0
- dwind-0.3.dist-info/licenses/LICENSE.txt +29 -0
- dwind-0.3.dist-info/top_level.txt +1 -0
@@ -0,0 +1,168 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: dwind
|
3
|
+
Version: 0.3
|
4
|
+
Summary: Distributed Wind Generation Model
|
5
|
+
Author-email: Jane Lockshin <jane.lockshin@nrel.gov>, Paritosh Das <paritosh.das@nrel.gov>, Rob Hammond <rob.hammond@nrel.gov>
|
6
|
+
Project-URL: source, https://github.com/NREL/dwind
|
7
|
+
Project-URL: issues, https://github.com/NREL/dwind/issues
|
8
|
+
Keywords: python3,wind-energy,distributed-wind,energy-production
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
11
|
+
Classifier: Natural Language :: English
|
12
|
+
Classifier: Operating System :: OS Independent
|
13
|
+
Classifier: Programming Language :: Python
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
18
|
+
Classifier: Topic :: Scientific/Engineering
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
20
|
+
Classifier: Typing :: Typed
|
21
|
+
Requires-Python: >=3.11
|
22
|
+
Description-Content-Type: text/markdown
|
23
|
+
License-File: LICENSE.txt
|
24
|
+
Requires-Dist: nrel-rex
|
25
|
+
Requires-Dist: numpy
|
26
|
+
Requires-Dist: pandas>=2
|
27
|
+
Requires-Dist: sqlalchemy
|
28
|
+
Requires-Dist: psycopg2
|
29
|
+
Requires-Dist: scipy
|
30
|
+
Requires-Dist: matplotlib
|
31
|
+
Requires-Dist: seaborn
|
32
|
+
Requires-Dist: pyarrow==17
|
33
|
+
Requires-Dist: fastparquet
|
34
|
+
Requires-Dist: h5pyd
|
35
|
+
Requires-Dist: typer
|
36
|
+
Requires-Dist: tomli>=1.1.0; python_version < "3.11"
|
37
|
+
Provides-Extra: dev
|
38
|
+
Requires-Dist: pre-commit; extra == "dev"
|
39
|
+
Requires-Dist: isort; extra == "dev"
|
40
|
+
Requires-Dist: ruff; extra == "dev"
|
41
|
+
Requires-Dist: pytest; extra == "dev"
|
42
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
43
|
+
Dynamic: license-file
|
44
|
+
|
45
|
+
# Distributed Wind Generation Model (dWind)
|
46
|
+
|
47
|
+
Please note that at this time the model can only be run on NREL's Kestrel HPC system. Though a
|
48
|
+
savvy user could recreate our data in their own computing environment and update the
|
49
|
+
internal pointers in the example configuration at `examples/larimer_county_btm_baseline_2025.toml`
|
50
|
+
and `examples/model_config.toml`.
|
51
|
+
|
52
|
+
## Installing dwind
|
53
|
+
|
54
|
+
1. Install Anaconda or Miniconda (recommended) if not already installed.
|
55
|
+
2. Clone the repository
|
56
|
+
|
57
|
+
```bash
|
58
|
+
git clone https://github.com/NREL/dwind.git
|
59
|
+
```
|
60
|
+
|
61
|
+
3. Navigate to the dwind repository.
|
62
|
+
|
63
|
+
```bash
|
64
|
+
cd /path/to/dwind
|
65
|
+
```
|
66
|
+
|
67
|
+
4. Create your dwind environment using our recommended settings and all required dependencies.
|
68
|
+
|
69
|
+
```bash
|
70
|
+
conda env create -f environment.yml
|
71
|
+
```
|
72
|
+
|
73
|
+
## Running
|
74
|
+
|
75
|
+
### Configuring
|
76
|
+
|
77
|
+
`dWind` relies on 2 configuration files: 1) a system-wise setting that can be shared among a team,
|
78
|
+
and 2) a run-specific configuration file. Both will be described below.
|
79
|
+
|
80
|
+
#### Primary model configuration
|
81
|
+
|
82
|
+
The primary model configuration should look exactly like (or be compatible with)
|
83
|
+
`examples/model_config.toml` to ensure varying fields are read correctly throughout the model.
|
84
|
+
|
85
|
+
Internally, `dWind` is able to convert the following data to adhere to internal usage:
|
86
|
+
- Any field with "DIR" is converted to a Python `pathlib.Path` object for robust file handling
|
87
|
+
- SQL credentials and constructor strings are automatically formed in the `[sql]` table for easier
|
88
|
+
construction of generic connection strings. Specifically the `{USER}` and `{PASSWORD}` fields
|
89
|
+
get replaced with their corresponding setting in the same table.
|
90
|
+
|
91
|
+
`Configuration`, the primary class handling this data allows for dot notation and dictionary-style
|
92
|
+
attribute calling at all levels of nesting. This means, `config.pysam.outputs.btm` and
|
93
|
+
`config.pysam.outputs["btm"]` are equivalent. This makes for more intuitive dynamic attribute
|
94
|
+
fetching when updating the code for varying cases.
|
95
|
+
|
96
|
+
#### Run configuration
|
97
|
+
|
98
|
+
The run-specific configuration should look like `examples/larimer_county_btm_baseline_2025.toml`,
|
99
|
+
which controls all the dynamic model settings, HPC configurations, and a pointer to the primary
|
100
|
+
model configuration described above.
|
101
|
+
|
102
|
+
### Run the model
|
103
|
+
|
104
|
+
`dwind` has a robust CLI interface allowing for the usage of `python path/to/dwind/dwind/run.py` or
|
105
|
+
`dwind`. The model currently supports the run prompts:
|
106
|
+
- `dwind run-config <run-configuration.toml>
|
107
|
+
- `dwind run-hpc --arg1 ... --argn` where the `--arg` parameters are used in place of the run TOML
|
108
|
+
file.
|
109
|
+
|
110
|
+
If at any point, further guidance is needed, pass `--help` to `dwind` or any of the subcommands for
|
111
|
+
detailed information on the required and optional inputs.
|
112
|
+
|
113
|
+
To run the model, it is recommended to use the following workflow from your analysis folder.
|
114
|
+
1. Start a new `screen` session on Kestrel.
|
115
|
+
|
116
|
+
```bash
|
117
|
+
screen -S <analysis-name>
|
118
|
+
```
|
119
|
+
|
120
|
+
2. Load your conda environment with dwind installed.
|
121
|
+
|
122
|
+
```bash
|
123
|
+
module load conda
|
124
|
+
conda activate <env_name>
|
125
|
+
```
|
126
|
+
|
127
|
+
3. Navigate to your analysis folder if your relative data locations in your run configuration are
|
128
|
+
relative to the analysis folder.
|
129
|
+
|
130
|
+
```bash
|
131
|
+
cd /path/to/analysis/location
|
132
|
+
```
|
133
|
+
|
134
|
+
4. Run the model.
|
135
|
+
|
136
|
+
```bash
|
137
|
+
dwind run-config examples/larimer_county_btm_baseline_2025.toml
|
138
|
+
```
|
139
|
+
|
140
|
+
5. Disconnect your screen `Ctrl` + `a` + `d` and wait for the analysis to complete and view your
|
141
|
+
results.
|
142
|
+
|
143
|
+
## `dwind` run settings
|
144
|
+
|
145
|
+
### `run-config`
|
146
|
+
|
147
|
+
```bash
|
148
|
+
* config_path TEXT Path to configuration TOML with run and model parameters. [default: None] [required]
|
149
|
+
```
|
150
|
+
|
151
|
+
### `run-hpc`
|
152
|
+
|
153
|
+
```bash
|
154
|
+
* --location TEXT The state, state_county, or priority region to run. [default: None] [required]
|
155
|
+
* --sector [fom|btm] One of fom (front of meter) or btm (back-of-the-meter). [default: None] [required]
|
156
|
+
* --scenario [baseline] The scenario to run (baseline is the current only option). [default: None] [required]
|
157
|
+
* --year INTEGER The assumption year for the analysis. Options are 2022, 2024, and 2025. [default: None] [required]
|
158
|
+
* --repository TEXT Path to the dwind repository to use when running the model. [default: None] [required]
|
159
|
+
* --nodes INTEGER Number of HPC nodes or CPU nodes to run on. -1 indicates 75% of CPU limit. [default: None] [required]
|
160
|
+
* --allocation TEXT HPC allocation name. [default: None] [required]
|
161
|
+
* --memory INTEGER Node memory, in GB (HPC only). [default: None] [required]
|
162
|
+
* --walltime INTEGER Node walltime request, in hours. [default: None] [required]
|
163
|
+
* --feature TEXT Additional flags for the SLURM job, using formatting such as --qos=high or --depend=[state:job_id]. [default: None] [required]
|
164
|
+
* --env TEXT The path to the dwind Python environment that should be used to run the model. [default: None] [required]
|
165
|
+
* --model-config TEXT Complete file name and path of the model configuration file [default: None] [required]
|
166
|
+
* --dir-out TEXT Path to where the chunked outputs should be saved. [default: None] [required]
|
167
|
+
* --stdout-path TEXT The path to write stdout logs. [default: None]
|
168
|
+
```
|
@@ -0,0 +1,17 @@
|
|
1
|
+
dwind/__init__.py,sha256=1SS8cDsZlyc8ptI9EiFCN7kRnI9sqd0sz8D78uMYL8A,55
|
2
|
+
dwind/btm_sizing.py,sha256=cDOHWgS0Mzqyqx9mgct5M6ve33TqQFn5dU3JkFRy2gY,5016
|
3
|
+
dwind/config.py,sha256=KdDj0FjaOLI4XqBE2Q3-SKslRGeFvo49JKFiKlj6kI4,4001
|
4
|
+
dwind/helper.py,sha256=BCYnZYq1aKUZZ5FBEw69Et4nEspG7l7p3X4Qb0VOkV8,6285
|
5
|
+
dwind/loader.py,sha256=DDmaI6scXK8xC15KB7I4F1yF77_vx-bvad65TIV0eik,2239
|
6
|
+
dwind/model.py,sha256=g-MYvIGW0n_uxCQtt5Egt3MRdzuFV7DSlDpZCsaMsZg,15142
|
7
|
+
dwind/mp.py,sha256=TSwv8ql2UtVyZfPmRgbixYbVepQUVKptHgLBgfrnT3Q,8469
|
8
|
+
dwind/resource.py,sha256=l7Oz-yFEmRSbK1CwMUGB16URcxkr1onkKE0nJLIJgWM,6662
|
9
|
+
dwind/run.py,sha256=3AN084jOg0XU9ArTn7LySRs6v0p64-6bQfXqVhJY3sM,8801
|
10
|
+
dwind/scenarios.py,sha256=UOACORe_Sf0a2MialEKAHNAwXHu1bD--0B94az6VNJA,4926
|
11
|
+
dwind/valuation.py,sha256=1QLPm-X_QsxrTHOBSoVHjWWLtafhaqNPCTa2u9sFaqI,61145
|
12
|
+
dwind-0.3.dist-info/licenses/LICENSE.txt,sha256=a6siYqaIG9I77f9adAqiWPBgyL-MGjAorTMa5c1YtUY,1536
|
13
|
+
dwind-0.3.dist-info/METADATA,sha256=GL6UpyyGY-kj6uy3Sf1zB7Y5rYxyFWSYUEs0nd-u_vk,6931
|
14
|
+
dwind-0.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
15
|
+
dwind-0.3.dist-info/entry_points.txt,sha256=i0jOR14bQHIF8Ayw9QTQ2F_lWM9spZWApao58FpgFL4,40
|
16
|
+
dwind-0.3.dist-info/top_level.txt,sha256=fj_esaS-KV1YSmx7yCUoXFiRJ0dHx34B876svoE7NGE,6
|
17
|
+
dwind-0.3.dist-info/RECORD,,
|
@@ -0,0 +1,29 @@
|
|
1
|
+
BSD 3-Clause License
|
2
|
+
|
3
|
+
Copyright (c) 2019, Alliance for Sustainable Energy, LLC
|
4
|
+
All rights reserved.
|
5
|
+
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
8
|
+
|
9
|
+
* Redistributions of source code must retain the above copyright notice, this
|
10
|
+
list of conditions and the following disclaimer.
|
11
|
+
|
12
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
14
|
+
and/or other materials provided with the distribution.
|
15
|
+
|
16
|
+
* Neither the name of the copyright holder nor the names of its
|
17
|
+
contributors may be used to endorse or promote products derived from
|
18
|
+
this software without specific prior written permission.
|
19
|
+
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@@ -0,0 +1 @@
|
|
1
|
+
dwind
|