pyrad.proc.process_time_avg_flag#

pyrad.proc.process_time_avg_flag(procstatus, dscfg, radar_list=None)[source]#

computes a flag field describing the conditions of the data used while averaging. The flag is an integer that tracks up to 999 occurrences of the number of samples as well as of three conditions during data accumulation: πœ™π‘‘π‘ exceeding a threshold (πœ™π‘‘π‘β‚˜β‚β‚“), clutter, and non-rain precipitation. It is a packed representation of 4 numbers into one large integer. Flags are encoded by adding +1 for nsamples, +1E3 for πœ™π‘‘π‘β‚˜β‚β‚“ exceedance, + 1E6 for clutter, and +1E9 for non-rain. Inputs include the πœ™π‘‘π‘ field, a dynamic clutter map, and either a hydrometeor classification or temperature field to identify precipitation phase.

Parameters:
  • procstatus (int) – Processing status: 0 initializing, 1 processing volume, 2 post-processing

  • dscfg (dictionary of dictionaries) –

    data set configuration. Accepted Configuration Keywords:

    datatype : list of string. Dataset keyword
        The input data types, must be
        "PhiDP" or "PhiDPc" (Optional, for PhiDP flagging), and,
        "echoID" (Optional, for echoID flagging), and,
        "hydro" (Optional, for no rain flagging), and,
        "TEMP" (Optional, for solid precip flagging), and,
        "H_ISO0" (Optional, also for solid precip flagging)
    period : float. Dataset keyword
        the period to average [s]. Default 3600.
    start_average : float. Dataset keyword
        when to start the average [s from midnight UTC]. Default 0.
    phidpmax: float. Dataset keyword
        maximum PhiDP
    beamwidth : float. Dataset keyword
        the antenna beamwidth [deg]. If None that of the keys
        radar_beam_width_h or radar_beam_width_v in attribute
        instrument_parameters of the radar object will be used. If the key
        or the attribute are not present the beamwidth will be set to None
    
  • radar_list (list of Radar objects) – Optional. list of radar objects

Returns:

  • new_dataset (dict) – dictionary containing the field β€œtime_avg_flag”

  • ind_rad (int) – radar index