radarx.io.aws_data.download_file#
- radarx.io.aws_data.download_file(bucket, file_key, save_dir, anonymous=True)[source]#
Download a file from S3.
- Parameters:
- Returns:
str
– Path to the downloaded file.
Examples
Download a NEXRAD Level II file:
>>> file_path = download_file( ... "noaa-nexrad-level2", ... "2016/10/06/KAMX/KAMX20161006_170414_V06", ... "./downloads" ... ) >>> print(f"File downloaded to: {file_path}")
Download an MRMS file:
>>> file_path = download_file( ... "noaa-mrms-pds", ... "CONUS/ReflectivityAtLowestAltitude_00.50/2016/10/06/" + "ReflectivityAtLowestAltitude_00.50_20161006-1700.grib2.gz", ... "./downloads" ... ) >>> print(f"File downloaded to: {file_path}")