@@ -62,7 +62,7 @@ def _empty_dataframe_from_logical_records(logical_records):
62
62
63
63
64
64
def get_bsrn (station , start , end , username , password ,
65
- logical_records = ('0100' ,), local_path = None ):
65
+ logical_records = ('0100' ,), save_path = None ):
66
66
"""
67
67
Retrieve ground measured irradiance data from the BSRN FTP server.
68
68
@@ -87,8 +87,8 @@ def get_bsrn(station, start, end, username, password,
87
87
logical_records: list or tuple, default: ('0100',)
88
88
List of the logical records (LR) to parse. Options include: '0100',
89
89
'0300', and '0500'.
90
- local_path : str or path-like, optional
91
- If specified, path (abs. or relative) of where to save files
90
+ save_path : str or path-like, optional
91
+ If specified, a directory path of where to save each monthly file.
92
92
93
93
Returns
94
94
-------
@@ -178,10 +178,10 @@ def get_bsrn(station, start, end, username, password,
178
178
# Check that transfer was successfull
179
179
if not response .startswith ('226 Transfer complete' ):
180
180
raise ftplib .Error (response )
181
- # Save file locally if local_path is specified
182
- if local_path is not None :
181
+ # Save file locally if save_path is specified
182
+ if save_path is not None :
183
183
# Create local file
184
- with open (os .path .join (local_path , filename ), 'wb' ) as f :
184
+ with open (os .path .join (save_path , filename ), 'wb' ) as f :
185
185
f .write (bio .getbuffer ()) # Write local file
186
186
# Open gzip file and convert to StringIO
187
187
bio .seek (0 ) # reset buffer to start of file
0 commit comments