Skip to content

Commit 1cff4d0

Browse files
committed
Docstring revision for arguments that have a discrete set of allowed values.
1 parent 7d6207d commit 1cff4d0

File tree

13 files changed

+36
-31
lines changed

13 files changed

+36
-31
lines changed

doc/source/nowcasting.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ pysteps\.nowcasts\.interface
99
.. automodule:: pysteps.nowcasts.interface
1010
:members:
1111

12-
pysteps\.nowcasts\.simple\_advection
13-
------------------------------------
12+
pysteps\.nowcasts\.extrapolation
13+
--------------------------------
1414

15-
.. automodule:: pysteps.nowcasts.simple_advection
15+
.. automodule:: pysteps.nowcasts.extrapolation
1616
:members:
1717

1818
pysteps\.nowcasts\.steps

pysteps/cascade/interface.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def get_method(name):
2626
| fft | decomposition based on Fast Fourier Transform (FFT) |
2727
| | and a bandpass filter |
2828
+-------------------+--------------------------------------------------------+
29+
2930
"""
3031
if name.lower() == "fft":
3132
return decomposition.decomposition_fft

pysteps/io/exporters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
metadata : dict
2727
Metadata dictionary containing the projection,x1,x2,y1,y2 and unit
2828
attributes described in the documentation of pysteps.io.importers.
29-
incremental : str
29+
incremental : {'timestep', 'member'}
3030
Allow incremental writing of datasets into the netCDF file. The
3131
available options are: 'timestep'=write a forecast or a forecast
3232
ensemble for a given time step or 'member'=write a forecast sequence

pysteps/io/importers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ def import_odim_hdf5(filename, **kwargs):
445445
446446
Other Parameters
447447
----------------
448-
qty : str
448+
qty : {'RATE', 'ACRR', 'DBZH'}
449449
The quantity to read from the file. The currently supported identitiers
450450
are: 'RATE'=instantaneous rain rate (mm/h), 'ACRR'=hourly rainfall
451451
accumulation (mm) and 'DBZH'=max-reflectivity (dBZ). The default value

pysteps/io/nowcast_importers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
| zerovalue | it is the value assigned to the no rain pixels with the |
5656
| | same unit, transformation and accutime of the data. |
5757
+-------------------+----------------------------------------------------------+
58+
5859
"""
5960

6061
import numpy as np
@@ -92,7 +93,6 @@ def import_netcdf_pysteps(filename, **kwargs):
9293
metadata["leadtimes"] = leadtimes
9394
timestamps = netCDF4.num2date(time_var[:], time_var.units)
9495
metadata["timestamps"] = timestamps
95-
9696

9797
projdef = ""
9898
if "polar_stereographic" in var_names:

pysteps/noise/interface.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def get_method(name):
3232
| | time-dependent velocity perturbations are sampled |
3333
| | from the exponential distribution |
3434
+-------------------+-------------------------------------------------------+
35+
3536
"""
3637
if name.lower() == "parametric":
3738
return fftgenerators.initialize_param_2d_fft_filter, \

pysteps/noise/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ def compute_noise_stddev_adjs(R, R_thr_1, R_thr_2, F, decomp_method, num_iter,
5656
If set to True, compute the statistics conditionally by excluding areas
5757
of no precipitation.
5858
num_workers : int
59-
The number of workers to use for parallel computation. Set to None to use
60-
all available CPUs. Applicable if dask is enabled.
59+
The number of workers to use for parallel computation. Set to None to
60+
use all available CPUs. Applicable if dask is enabled.
6161
6262
Returns
6363
-------

pysteps/nowcasts/extrapolation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ def forecast(R, V, num_timesteps, extrap_method="semilagrangian", extrap_kwargs=
2020
2121
Other Parameters
2222
----------------
23-
extrap_method : str
23+
extrap_method : {'semilagrangian'}
2424
Name of the extrapolation method to use. See the documentation of the
25-
advection module for the available choices.
25+
advection module.
2626
extrap_kwargs : dict
2727
Optional dictionary that is supplied as keyword arguments to the
2828
extrapolation method.

pysteps/nowcasts/steps.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,24 @@ def forecast(R, V, n_timesteps, n_ens_members, n_cascade_levels,
5151
R_thr : float
5252
Specifies the threshold value for minimum observable precipitation
5353
intensity. Must be set if use_probmatching is True or conditional is True.
54-
extrap_method : str
54+
extrap_method : {'semilagrangian'}
5555
Name of the extrapolation method to use. See the documentation of
56-
pysteps.advection for the available choices.
57-
decomp_method : str
56+
pysteps.advection.
57+
decomp_method : {'fft'}
5858
Name of the cascade decomposition method to use. See the documentation
5959
of pysteps.cascade.decomposition.
60-
bandpass_filter_method : str
60+
bandpass_filter_method : {'gaussian', 'uniform'}
6161
Name of the bandpass filter method to use with the cascade decomposition.
6262
See the documentation of pysteps.cascade.bandpass_filters.
63-
noise_method : str
63+
noise_method : {'parametric','nonparametric','ssft','nested'}
6464
Name of the noise generator to use for perturbating the precipitation
6565
field. See the documentation of pysteps.noise.interface.
6666
noise_stddev_adj : bool
6767
Optional adjustment for the standard deviations of the noise fields added
6868
to each cascade level. See pysteps.noise.utils.compute_noise_stddev_adjs.
6969
ar_order : int
70-
The order of the autoregressive model to use.
71-
vel_pert_method : str
70+
The order of the autoregressive model to use. Must be >= 1.
71+
vel_pert_method : {'bps'}
7272
Name of the noise generator to use for perturbing the velocity field. See
7373
the documentation of pysteps.noise.interface.
7474
conditional : bool
@@ -78,7 +78,7 @@ def forecast(R, V, n_timesteps, n_ens_members, n_cascade_levels,
7878
use_precip_mask : bool
7979
If True, set pixels outside precipitation areas to the minimum value of
8080
the observed field.
81-
mask_method : str
81+
mask_method : {'obs', 'sprog', 'incremental'}
8282
The precipitation/no precipitation method to use with mask: 'obs' = apply R_thr
8383
to the most recently observed precipitation intensity field, 'sprog' = use the
8484
smoothed forecast field from S-PROG, where the AR(p) model has been applied,

pysteps/optflow/darts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def DARTS(Z, **kwargs):
4747
y-axis.
4848
print_info : bool
4949
If True, print information messages.
50-
lsq_method : int
50+
lsq_method : {1, 2}
5151
The method to use for solving the linear equations in the least squares
5252
sense: 1=numpy.linalg.lstsq, 2=explicit computation of the Moore-Penrose
5353
pseudoinverse and SVD.

0 commit comments

Comments
 (0)