Skip to content

Commit c7631ec

Browse files
committed
update with doc strings
1 parent ed04fd0 commit c7631ec

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

notebooks/utils.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,13 @@ def copy_s3_files(in_fileglob, out_folder):
103103

104104

105105
def load_data(inpath):
106+
'''
107+
This methods copy the data from s3 bucket and load the data as iris cubelist.
108+
Data is stored in data/ directory.
106109
110+
input: file(s) path on s3 bucket
111+
output: iris cubelist
112+
'''
107113
if inpath.startswith('s3'):
108114
keys = find_matching_s3_keys(inpath)
109115
s3dir = _get_directory(inpath)
@@ -132,9 +138,14 @@ def _get_directory(inpath):
132138
return dirpath
133139

134140

135-
def flush_data():
141+
def flush_data(path):
142+
'''
143+
It delete the data from compute node.
144+
145+
Input: file(s) path
146+
'''
136147
import glob
137-
files = glob.glob('data/*.nc')
148+
files = glob.glob(path)
138149
for file in files:
139150
os.remove(file)
140151

0 commit comments

Comments
 (0)