Skip to content

Commit b56c973

Browse files
committed
Docstring and whitespace fixes
1 parent 793131e commit b56c973

27 files changed

+93
-54
lines changed

pysteps/advection/interface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
method are passed as a dictionary.
1313
1414
The output of each method is an array R_e that includes the time series of extrapolated
15-
fields of shape (num_timesteps, m, n).
16-
"""
15+
fields of shape (num_timesteps, m, n)."""
1716

1817
def get_method(name):
1918
"""Return a callable function for the extrapolation method corresponding to
@@ -30,6 +29,7 @@ def get_method(name):
3029
| semilagrangian | implementation of the semi-Lagrangian method of |
3130
| | Germann et al. (2002) |
3231
+-------------------+--------------------------------------------------------+
32+
3333
"""
3434
if name is None:
3535
def donothing(R, V, num_timesteps, *args, **kwargs):

pysteps/cascade/bandpass_filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def filter_uniform(shape, n):
4949
it assumes to be a square domain.
5050
n : int
5151
Not used. Needed for compatibility with the filter interface.
52+
5253
"""
5354
result = {}
5455

@@ -195,4 +196,3 @@ def g(x):
195196
central_freqs.append(l/2)
196197

197198
return weight_funcs, central_freqs
198-

pysteps/cascade/decomposition.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def decomposition_fft(X, filter, **kwargs):
6262
out : ndarray
6363
A dictionary described in the module documentation. The parameter n is
6464
determined from the filter (see bandpass_filters.py).
65+
6566
"""
6667
MASK = kwargs.get("MASK", None)
6768

pysteps/io/archive.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def find_by_date(date, root_path, path_fmt, fn_pattern, fn_ext, timestep,
3737
object. Otherwise, return a tuple of two lists, the first one for the
3838
file names and the second one for the correspondign timestemps. The lists
3939
are sorted in ascending order with respect to timestamp.
40+
4041
"""
4142
filenames = []
4243
timestamps = []

pysteps/io/importers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def import_bom_rf3(filename, **kwargs):
101101
A three-element tuple containing the rainfall field in mm/h imported
102102
from the Bureau RF3 netcdf, the quality field and the metadata. The
103103
quality field is currently set to None.
104+
104105
"""
105106
if not netcdf4_imported:
106107
raise Exception("netCDF4 not imported")
@@ -214,6 +215,7 @@ def import_fmi_pgm(filename, **kwargs):
214215
A three-element tuple containing the reflectivity composite in dBZ
215216
and the associated quality field and metadata. The quality field is
216217
currently set to None.
218+
217219
"""
218220
if not pyproj_imported:
219221
raise Exception("pyproj not imported")
@@ -337,6 +339,7 @@ def import_mch_gif(filename, **kwargs):
337339
A three-element tuple containing the precipitation field in mm/h imported
338340
from a MeteoSwiss gif file and the associated quality field and metadata.
339341
The quality field is currently set to None.
342+
340343
"""
341344
if not pil_imported:
342345
raise Exception("PIL not imported")
@@ -460,6 +463,7 @@ def import_odim_hdf5(filename, **kwargs):
460463
quantity and the associated quality field and metadata. The quality
461464
field is read from the file if it contains a dataset whose quantity
462465
identifier is 'QIND'.
466+
463467
"""
464468
if not h5py_imported:
465469
raise Exception("h5py not imported")

pysteps/io/readers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def read_timeseries(inputfns, importer, **kwargs):
2020
out : tuple
2121
A three-element tuple containing the precipitation fields read, the quality fields,
2222
and associated metadata.
23+
2324
"""
2425

2526
# check for missing data

pysteps/noise/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Miscellaneous utility functions related to generating stochastic perturbations."""
1+
"""Miscellaneous utility functions related to generation of stochastic perturbations."""
22

33
import numpy as np
44
try:
@@ -66,6 +66,7 @@ def compute_noise_stddev_adjs(R, R_thr_1, R_thr_2, F, decomp_method, num_iter,
6666
out : list
6767
A list containing the standard deviation adjustment factor for each
6868
cascade level.
69+
6970
"""
7071

7172
MASK = R >= R_thr_1

pysteps/nowcasts/extrapolation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def forecast(R, V, num_timesteps, extrap_method="semilagrangian", extrap_kwargs=
3636
See also
3737
--------
3838
pysteps.advection.interface
39+
3940
"""
4041
_check_inputs(R, V)
4142

pysteps/nowcasts/steps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def forecast(R, V, n_timesteps, n_ens_members, n_cascade_levels, R_thr=None,
2323
use_probmatching=True, mask_method="incremental", callback=None,
2424
return_output=True, seed=None, num_workers=None, extrap_kwargs={},
2525
filter_kwargs={}, noise_kwargs={}, vel_pert_kwargs={}):
26-
"""Generate a nowcast ensemble by using the STEPS method described in
27-
:cite:`Seed2003`, :cite:`BPS2006` and :cite:`SPN2013`.
26+
"""Generate a nowcast ensemble by using the Short-Term Ensemble Prediction
27+
System (STEPS) method.
2828
2929
Parameters
3030
----------

pysteps/optflow/interface.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def get_method(name):
3030
| | method of Bruhn et al., 2005 from IPOL |
3131
| | (http://www.ipol.im/pub/art/2015/44) |
3232
+-------------------+--------------------------------------------------------+
33+
3334
"""
3435
if name is None:
3536
def donothing(R, *args, **kwargs):

0 commit comments

Comments
 (0)