aidas.io.get_previous_scan#

aidas.io.get_previous_scan(radar, rad_time=None, bucket_name='unidata-nexrad-level2')[source]#

Fetch the volume collected immediately before a given scan.

Wave detection differences two consecutive volumes, so it needs the scan before the one the user asked for. This resolves the requested scan first and then steps back one volume, rather than simply taking the nearest volume before rad_time, which would return the requested scan itself whenever rad_time falls after the start of the volume.

Parameters:
  • radar (str or pyart.core.Radar()) – The 4-letter code of the radar site, or a radar volume to step back from. When a volume is given, the site and time are read from it.

  • rad_time (ISO-format datestring, optional) – The date/time string in YYYY-MM-DDTHH:MM:SS format of the scan to step back from. If None, the latest scan is used. Ignored when radar is a pyart.core.Radar().

  • bucket_name (str) – The NEXRAD S3 bucket to use. Default is ‘unidata-nexrad-level2’.

Returns:

radar – The volume preceding the requested scan.

Return type:

pyart.core.Radar()