Skip to content

Commit 0e6ceb5

Browse files
committed
Improve Parameters syntax
1 parent 2458ab9 commit 0e6ceb5

File tree

19 files changed

+228
-214
lines changed

19 files changed

+228
-214
lines changed

ensemble/ensemble.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -499,14 +499,14 @@ def calc_prediction(self, input_state=None, save_prediction=None):
499499
500500
Parameters
501501
----------
502-
input_state:
502+
input_state :
503503
Use an input state instead of internal state (stored in self) to run predictions
504-
save_prediction:
504+
save_prediction :
505505
Save the predictions as a <save_prediction>.npz file (numpy compressed file)
506506
507507
Returns
508508
-------
509-
prediction:
509+
prediction :
510510
List of dictionaries with keys equal to data types (in DATATYPE),
511511
containing the responses at each time step given in PREDICTION.
512512

input_output/read_config.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def read_txt(init_file):
130130
131131
Parameters
132132
----------
133-
init_file: str
133+
init_file : str
134134
PIPT init. file containing info. to run the inversion algorithm
135135
136136
Returns
@@ -197,12 +197,12 @@ def read_clean_file(init_file):
197197
198198
Parameters
199199
----------
200-
init_file: str
200+
init_file : str
201201
Name of file to remove all comments. WHOLE filename needed (with suffix!)
202202
203203
Returns
204204
-------
205-
lines: list
205+
lines : list
206206
Lines from init. file converted to list entries
207207
"""
208208
# Read file except lines starting with an octothorpe (#) and return the python variable
@@ -219,12 +219,12 @@ def remove_empty_lines(lines):
219219
220220
Parameters
221221
----------
222-
lines: list
222+
lines : list
223223
List of lines from a file
224224
225225
Returns
226226
-------
227-
lines_clean: list
227+
lines_clean : list
228228
List of clean lines (without empty entries)
229229
"""
230230
# Loop over lines to find '\n'
@@ -254,12 +254,12 @@ def parse_keywords(lines):
254254
255255
Parameters
256256
----------
257-
lines: list
257+
lines : list
258258
List of (clean) lines from the PIPT init. file.
259259
260260
Returns
261261
-------
262-
keys: dict
262+
keys : dict
263263
Dictionary with all info. from the init. file.
264264
"""
265265
# Init. the dictionary

pipt/loop/assimilation.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __init__(self, ensemble: Ensemble):
4444
4545
Parameters
4646
----------
47-
init_file: str
47+
init_file : str
4848
PIPT init. filename
4949
"""
5050
# Internalize ensemble and simulator class instances
@@ -292,6 +292,7 @@ def _ext_max_iter(self):
292292
----------
293293
keys_da : dict
294294
A dictionary containing all keywords from DATAASSIM part.
295+
295296
- 'iteration' : object
296297
Information for iterative methods.
297298
@@ -368,7 +369,7 @@ def _save_during_iteration(self, tempsave):
368369
369370
Parameters
370371
----------
371-
tempsave: list
372+
tempsave : list
372373
Info. from the TEMPSAVE keyword
373374
"""
374375
self.ensemble.logger.info(
@@ -444,7 +445,7 @@ def calc_forecast(self):
444445
Parameters
445446
----------
446447
assim_step : int
447-
Current assimilation step.
448+
Current assimilation step.
448449
449450
Notes
450451
-----

pipt/loop/ensemble.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -672,12 +672,12 @@ def compress(self, data=None, vintage=0, aug_coeff=None):
672672
673673
Parameters
674674
----------
675-
data:
675+
data :
676676
data to be compressed
677677
If data is `None`, all data (true and simulated) is re-compressed (used if leading indices are updated)
678-
vintage: int
678+
vintage : int
679679
the time index for the data
680-
aug_coeff: bool
680+
aug_coeff : bool
681681
- False: in this case the leading indices for wavelet coefficients are computed
682682
- True: in this case the leading indices are augmented using information from the ensemble
683683
- None: in this case simulated data is compressed

0 commit comments

Comments
 (0)