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. 通过指定站点、年份和月份下载单个 BSRN 文件。
- Parameters:
station (str) – Station abbreviation (e.g., ‘pay’). 站点缩写(例如 ‘pay’)。
year (int or str) – Four-digit year (e.g., 2024 or ‘2024’). 四位年份(例如 2024 或 ‘2024’)。
month (int or str) – Month number or string (1-12 or ‘01’-‘12’). 月份(1-12 或 ‘01’-‘12’)。
local_dir (str) – The local directory to save the file. 保存文件的本地目录。
username (str) – BSRN FTP username. BSRN FTP 用户名。
password (str) – BSRN FTP password. BSRN FTP 密码。
host (str, default BSRN_FTP_HOST) – FTP host address. FTP 主机地址。
- Returns:
local_path – The path to the downloaded file, or None if failed. 下载文件的路径,如果失败则返回 None。
- Return type:
str or None