This pipeline prepares DEMs, runs WindNinja simulations, and postprocesses the output, including smoothing and mosaicking.
GDAL Multiprocessing Subprocess Numpy
This step generates UTM-projected tiles with overlap for WindNinja input.

(Note: we are cliping out above square tile from 350% overlapped tile. I am generating 350% overlapped tile as I won't have whole input landscape file of CONUS(237GB) into my memory to get data after. I am saving it as intermediatory output and deleting it after getting square tile.)
Edit prepare_dems.py
and set:
input_raster_path = <path for landscape file>
output_directory = <path for output folder>
python3 prepare_dems.py
output_directory/
├── original_tiles/
│ ├── tile_0_x_y.tif
│ ├── tile_1_x_y.tif
│ └── ...
├── temp_albers_tiles/
│ ├── temp_350_albers_0.tif
│ ├── temp_overlap_albers_0.tif
│ ├── temp_utm_overlap_aoi_0_epsgXXXX.tif
│ ├── temp_utm_350_tile_0_epsgXXXX.tif
│ └── ...
├── utm_aoi_tiles/
│ ├── utm_overlap_aoi_0_epsgXXXX.tif
│ ├── utm_overlap_aoi_1_epsgXXXX.tif
│ └── ...
└── final_utm_tiles/
├── 0/
│ ├── dems_folder/
│ │ ├── dem0/
│ │ │ ├── dem0.tif
│ │ │ └── ...
The conus.sbatch
script runs WindNinja simulations on an HPC cluster using Slurm.
Before running the WindNinja simulations, ensure that the paths in conus.sbatch
are correctly set according to your environment:
- SHARED_STORAGE: Path where WindNinja output folder final_utm_tiles is stored
- WINDNINJA_SIF: Path to the Singularity image for WindNinja.
- Scripts and Configs: Ensure
run_caryWnCfg3.py
,run.sh
, andbase_cli.cfg
exist in the specified directory.
SHARED_STORAGE= <path>
WINDNINJA_SIF= <path>
sbatch conus.sbatch
tail -f windninja_pipeline_<job_id>.log
Before running this step, update the paths in postprocess.py
:
base_dir
: Path to the processed WindNinja tiles.aoi_tiles_dir
: Directory containing AOI tiles. (which was generated by prepare_dems scripts(Step 1))output_dir
: Directory where processed outputs will be saved.
Modify these in postprocess.py
:
base_dir = <path>
aoi_tiles_dir = <path>
output_dir = <path>
python3 postprocess.py
output_directory/
├── windNinjax_tiles_momentum/
│ ├── 0/
│ │ ├── dem0_0_5_120m_reproj.tif
│ │ ├── dem0_0_5_120m_clipped.tif
│ │ ├── dem0_0_5_120m.tif
│ │ └── ...
│ ├── 1/
│ │ ├── dem0_0_5_120m_reproj.tif
│ │ ├── dem0_0_5_120m_clipped.tif
│ │ ├── dem0_0_5_120m.tif
│ │ └── ...
│ ├── final_mosaic_w_smoothing_momentum.tif