PyPSA / atlite

atlite: A Lightweight Python Package for Calculating Renewable Power Potentials and Time Series
https://atlite.readthedocs.io
MIT License
283 stars 100 forks source link

fix: disable_progressbar in compute_availabilitymatrix #356

Closed Irieo closed 4 months ago

Irieo commented 4 months ago

Changes proposed in this Pull Request

The function compute_availabilitymatrix() includes an option to disable the progress bar (disable_progressbar). However, for non-parallel computation path (i.e., when nprocesses is None, the code uses tqdm directly, w/o passing the disable_progressbar check. This PR fixes it. User is informed if progress bar is disabled.

Why bother: it seems that progress bar makes computation much slower. For a test case (UA, solar availability matrix, local computation, nprocesses is None) disabling progress bar speeds the process from 2000 seconds to 760 seconds. Similar behavior was observed for other atlite processes, such as build_renewable_profiles (rumor evidence).

Closes #pypsa-eur/1090

Checklist