Please note that at this time the model can only be run on NREL's Kestrel HPC system. Though a
savvy user could recreate our data in their own computing environment and update the
internal pointers in the example configuration at examples/larimer_county_btm_baseline_2025.toml
and examples/model_config.toml.
-
Install Anaconda or Miniconda (recommended) if not already installed.
-
Clone the repository
git clone https://github.com/NREL/dwind.git
-
Navigate to the dwind repository.
cd /path/to/dwind -
Create your dwind environment using our recommended settings and all required dependencies.
conda env create -f environment.yml
dWind relies on 2 configuration files: 1) a system-wise setting that can be shared among a team,
and 2) a run-specific configuration file. Both will be described below.
The primary model configuration should look exactly like (or be compatible with)
examples/model_config.toml to ensure varying fields are read correctly throughout the model.
Internally, dWind is able to convert the following data to adhere to internal usage:
- Any field with "DIR" is converted to a Python
pathlib.Pathobject for robust file handling - SQL credentials and constructor strings are automatically formed in the
[sql]table for easier construction of generic connection strings. Specifically the{USER}and{PASSWORD}fields get replaced with their corresponding setting in the same table.
Configuration, the primary class handling this data allows for dot notation and dictionary-style
attribute calling at all levels of nesting. This means, config.pysam.outputs.btm and
config.pysam.outputs["btm"] are equivalent. This makes for more intuitive dynamic attribute
fetching when updating the code for varying cases.
The run-specific configuration should look like examples/larimer_county_btm_baseline_2025.toml,
which controls all the dynamic model settings, HPC configurations, and a pointer to the primary
model configuration described above.
dwind has a robust CLI interface allowing for the usage of python path/to/dwind/dwind/main.py or
by directly callingdwind. For more details on using the CLI, use the --help flag, or visit our
CLI documentation page https://nrel.github.io/dwind/cli.html
To run the model, it is recommended to use the following workflow from your analysis folder.
-
Start a new
screensession on Kestrel.screen -S <analysis-name>
-
Load your conda environment with dwind installed.
module load conda conda activate <env_name>
-
Navigate to your analysis folder if your relative data locations in your run configuration are relative to the analysis folder.
cd /path/to/analysis/location -
Run the model.
dwind run config examples/larimer_county_btm_baseline_2025.toml
-
Disconnect your screen
Ctrl+a+dand wait for the analysis to complete and view your results.