Skip to content

Commit

Permalink
default to no progressbar
Browse files Browse the repository at this point in the history
  • Loading branch information
fneum committed Aug 16, 2024
1 parent 871d739 commit bb568a7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
4 changes: 3 additions & 1 deletion RELEASE_NOTES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ Upcoming Release

- Improved parallelization of ``atlite.convert.build_line_rating`` by adding
keyword arguments for ``dask.compute`` (``dask_kwargs={}``) and an option to
disable the progressbar (``show_progressbar=True``).
disable the progressbar (``show_progress=False``).

- Default to ``show_progress=False`` for performance reasons.

Version 0.2.13
==============
Expand Down
10 changes: 5 additions & 5 deletions atlite/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def convert_and_aggregate(
return_capacity=False,
capacity_factor=False,
capacity_factor_timeseries=False,
show_progress=True,
show_progress=False,
dask_kwargs={},
**convert_kwds,
):
Expand Down Expand Up @@ -91,7 +91,7 @@ def convert_and_aggregate(
capacity_factor_timeseries : boolean
If True, the capacity factor time series of the chosen resource for
each grid cell is computed.
show_progress : boolean, default True
show_progress : boolean, default False
Whether to show a progress bar.
dask_kwargs : dict, default {}
Dict with keyword arguments passed to `dask.compute`.
Expand Down Expand Up @@ -882,7 +882,7 @@ def hydro(
hydrobasins,
flowspeed=1,
weight_with_height=False,
show_progress=True,
show_progress=False,
**kwargs,
):
"""
Expand Down Expand Up @@ -1047,7 +1047,7 @@ def convert_line_rating(


def line_rating(
cutout, shapes, line_resistance, show_progress=True, dask_kwargs={}, **params
cutout, shapes, line_resistance, show_progress=False, dask_kwargs={}, **params
):
"""
Create a dynamic line rating time series based on the IEEE-738 standard.
Expand All @@ -1073,7 +1073,7 @@ def line_rating(
line_resistance : float/series
Resistance of the lines in Ohm/meter. Alternatively in p.u. system in
Ohm/1000km (see example below).
show_progress : boolean, default True
show_progress : boolean, default False
Whether to show a progress bar.
dask_kwargs : dict, default {}
Dict with keyword arguments passed to `dask.compute`.
Expand Down
2 changes: 1 addition & 1 deletion atlite/gis.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ def _process_func(i):


def compute_availabilitymatrix(
cutout, shapes, excluder, nprocesses=None, disable_progressbar=False
cutout, shapes, excluder, nprocesses=None, disable_progressbar=True
):
"""
Compute the eligible share within cutout cells in the overlap with shapes.
Expand Down
4 changes: 2 additions & 2 deletions atlite/hydro.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def find_upstream_basins(meta, hid):
return hids


def determine_basins(plants, hydrobasins, show_progress=True):
def determine_basins(plants, hydrobasins, show_progress=False):
if isinstance(hydrobasins, str):
hydrobasins = gpd.read_file(hydrobasins)

Expand Down Expand Up @@ -81,7 +81,7 @@ def determine_basins(plants, hydrobasins, show_progress=True):


def shift_and_aggregate_runoff_for_plants(
basins, runoff, flowspeed=1, show_progress=True
basins, runoff, flowspeed=1, show_progress=False
):
inflow = xr.DataArray(
np.zeros((len(basins.plants), runoff.indexes["time"].size)),
Expand Down

0 comments on commit bb568a7

Please sign in to comment.