@@ -62,7 +62,7 @@ def _empty_dataframe_from_logical_records(logical_records):
6262
6363
6464def get_bsrn (station , start , end , username , password ,
65- logical_records = ('0100' ,), local_path = None ):
65+ logical_records = ('0100' ,), save_path = None ):
6666 """
6767 Retrieve ground measured irradiance data from the BSRN FTP server.
6868
@@ -87,8 +87,8 @@ def get_bsrn(station, start, end, username, password,
8787 logical_records: list or tuple, default: ('0100',)
8888 List of the logical records (LR) to parse. Options include: '0100',
8989 '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.
9292
9393 Returns
9494 -------
@@ -178,10 +178,10 @@ def get_bsrn(station, start, end, username, password,
178178 # Check that transfer was successfull
179179 if not response .startswith ('226 Transfer complete' ):
180180 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 :
183183 # 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 :
185185 f .write (bio .getbuffer ()) # Write local file
186186 # Open gzip file and convert to StringIO
187187 bio .seek (0 ) # reset buffer to start of file
0 commit comments