bsrn.io.retrieval.download_bsrn_single#

bsrn.io.retrieval.download_bsrn_single(station, year, month, local_dir, username, password, host='ftp.bsrn.awi.de')[source]#

Download a single BSRN file by specifying station, year, and month.

Parameters:
  • station (str) – Station abbreviation (e.g., ‘pay’).

  • year (int or str) – Four-digit year (e.g., 2024 or ‘2024’).

  • month (int or str) – Month number or string (1-12 or ‘01’-‘12’).

  • local_dir (str) – The local directory to save the file.

  • username (str) – BSRN FTP username.

  • password (str) – BSRN FTP password.

  • host (str, default BSRN_FTP_HOST) – FTP host address.

Returns:

local_path – The path to the downloaded file, or None if failed.

Return type:

str or None