There is a newer version of the record available.

Published January 17, 2026 | Version v2
Model Open

SOLWEIG-GPU: GPU-Accelerated Thermal Comfort Modeling Framework

Description

This is an outdated version. Please use the latest version

 

Please check the GitHub repository the the latest version of the software: GitHub

Read the detailed documentation: Documentation

-- Model installation:

conda create -n solweig python=3.10
conda activate solweig
conda install -c conda-forge gdal cudnn pytorch timezonefinder matplotlib pyqt=5 sip
pip install solweig-gpu

-- The 'Input_raster' folder contains 3 files required by SOLWEIG-GPU:


1. Building_DSM.tif
2. DEM.tif
3. Trees.tif
4. Landcover.tif (optional)

-- SOLWEIG-GPU can be meteorologically forced in 3 ways:


1. Using own meteorological (.txt) file
2. ERA-5 reanalysis
3. Weather Research and Forecasting (WRF) output files. Make sure that the filenames are formatted as wrfout_d0x_yyyy-mm-dd_hh_mm_ss or wrfout_d0x_yyyy-mm-dd_hh:mm:ss or wrfout_d0x_yyyy-mm-dd_hh.

Preferred filename is wrfout_d0x_yyyy-mm-dd_hh_mm_ss as this works across operating systems.

-- The 'Forcing_data' folder contains sample data for all forcing methods.

Below are the examples to run the model with the sample data provided

Example 1: WRF

from solweig_gpu import thermal_comfort

thermal_comfort(
    base_path='/path/to/input',
    selected_date_str='2020-08-13',
    building_dsm_filename='Building_DSM.tif',
    dem_filename='DEM.tif',
    trees_filename='Trees.tif',
    landcover_filename = None,
    tile_size =1000,
    overlap = 100,
    use_own_met=False,
    own_met_file='/path/to/met.txt',  #Placeholfer as use_own_met = False
    start_time='2020-08-13 06:00:00',
    end_time=  '2020-08-14 05:00:00',
    data_source_type ='wrfout',
    data_folder='/path/to/era5_or_wrfout',
    save_tmrt=False, #True if you want to save TMRT, likewise below
    save_svf=False,
    save_kup=False,
    save_kdown=False,
    save_lup=False,
    save_ldown=False,
    save_shadow=False
)

** The model simulation date is 2020-08-13
** The start and end dates provided to the model are 2020-08-13 06:00:00 UTC and 2020-08-14 05:00:00 UTC, respectively. These are start and end time of wrfout in UTC.
     In local time it is 2020-08-13 01:00:00 to 2020-08-13 23:00:00 (Austin, TX). UTC to local time conversion will be done internally.

** The tile_size depends on the RAM of the GPU but can be set to 1000 in the example.

** overlap is set to 100 pixels meaning the raster size will be 1100*1100 pixels. The additional 100 pixels are for shadow transfer between the tiles.

Example 2: ERA5

** For the ERA-5, the sample data provided is from 2020-08-13 06:00:00 UTC to 2020-08-13 23:00:00 UTC. So the simulation will run from 2020-08-13 01:00:00to 2020-08-13 18:00:00 local time (Austin, TX)


from solweig_gpu import thermal_comfort

thermal_comfort(
    base_path='/path/to/input',
    selected_date_str='2020-08-13',
    building_dsm_filename='Building_DSM.tif',
    dem_filename='DEM.tif',
    trees_filename='Trees.tif',
    landcover_filename = None,
    tile_size =1000,
    overlap = 100,
    use_own_met=False,
    own_met_file='/path/to/met.txt',  #Placeholder as use_own_met=False
    start_time='2020-08-13 06:00:00',
    end_time=  '2020-08-13 23:00:00',
    data_source_type='ERA5',
    data_folder='/path/to/era5_or_wrfout',
    save_tmrt=False, #True if you want to save TMRT, likewise below
    save_svf=False,
    save_kup=False,
    save_kdown=False,
    save_lup=False,
    save_ldown=False,
    save_shadow=False
)


Example 3: own met file

from solweig_gpu import thermal_comfort

thermal_comfort(
    base_path='/path/to/input',
    selected_date_str='2020-08-13',
    building_dsm_filename='Building_DSM.tif',
    dem_filename='DEM.tif',
    trees_filename='Trees.tif',
    landcover_filename = None,
    tile_size =1000,
    overlap = 100,
    use_own_met= True,
    own_met_file='/path/to/met.txt',
    start_time='2020-08-13 06:00:00', # Placeholder
    end_time=  '2020-08-13 23:00:00', # Placeholder
    data_source_type='ERA5', # Placeholder
    data_folder='/path/to/era5_or_wrfout', # Placeholder
    save_tmrt=False, #True if you want to save TMRT, likewise below
    save_svf=False,
    save_kup=False,
    save_kdown=False,
    save_lup=False,
    save_ldown=False,
    save_shadow=False
)

Files

Input_rasters.zip

Files (11.2 GB)

Name Size Download all
md5:97de4e5afa0c039b55984ddf6a9c6774
11.1 GB Preview Download
md5:3da64b3eeb71a6838057674838c6c4a7
94.9 MB Preview Download
md5:01973c7081e4bc2ff4a0a191216c45ad
4.1 kB Preview Download
md5:16ca533a78874eaaee01b7c7ec9f084d
43.0 MB Preview Download

Additional details

Funding

National Oceanic and Atmospheric Administration
National Integrated Heat Health Information System (NIHHIS) NA21OAR4310146

Software

Repository URL
https://github.com/nvnsudharsan/SOLWEIG-GPU
Programming language
Python
Development Status
Active