rca.aux

Functions used in clutter map creation and RCA calculation that handle simple tasks such as: Reading file in and converting to radar object Grabbing arrays of radar variables from radar object Create masks based on desired radar azimuths Create CSV file to store RCA values for a particular instrument

rca.aux.create_masks

rca.aux.create_masks.create_az_mask_ppi(azimuth_value, azimuth_array, radar_band)[source]

create_az_mask_ppi creates a mask for a desired azimuth angle for an array of azimuth from a radar PPI file

Parameters
  • azimuth_value (float) – value of the radar azimuth of interest i.e. 0., 27., 60., 120., etc.

  • azimuth_array (array_like) – array of azimuth values to search through and find the appropriate azimuth

  • radar_band (str) – one or two letter code noting radar band (used for thresholding depending on beam width)

Returns

az_mask – array of same shape as azimuth_array, masked to highlight the desried azimuth value

Return type

MaskedArray

rca.aux.create_masks.create_az_mask_rhi(azimuth_value, azimuth_array, radar_band)[source]

create_az_mask_rhi creates a mask for a desired azimuth angle for an array of azimuth from a radar RHI file

Parameters
  • azimuth_value (float) – value of the radar azimuth of interest i.e. 30., 60., 120., etc.

  • azimuth_array (array_like) – array of azimuth values to search through and find the appropriate azimuth

  • radar_band (str) – one or two letter code noting radar band (used for thresholding depending on beam width)

Returns

az_mask – array of same shape as azimuth_array, masked to highlight the desried azimuth value

Return type

MaskedArray

rca.aux.create_rca_csv

rca.aux.create_rca_csv.create_rca_csv(radar_config_file)[source]

create_rca_csv creates a CSV file specifically for keeping track of daily RCA values generated by daily_rca.py

Parameters

radar_config_file (str) – path to JSON file containing specifications: data directory, file extension, clutter map directory, output directory for baseline netCDF, baseline date, scan type, polarization, site, instrument, range limit

rca.aux.file_to_radar_object

rca.aux.file_to_radar_object.file_to_radar_object(filename, extension)[source]

Input radar filename and use appropriate PyART functions to read file and return radar object.

Parameters
  • filename (str) – path and filename of the radar data file

  • extension (str) – file extension of radar data file i.e. ‘.nc’, ‘.h5’

Returns

radar – radar object derived from PyART readers

Return type

object

rca.aux.get_var_arrays_from_radar_object

rca.aux.get_var_arrays_from_radar_object.get_var_arrays_from_radar_object(radar, radar_config_file)[source]

Input radar object and radar configuration (.json) file to use PyART to extract variables to be used in calculations Returns variables in arrays or strings in a single dictionary

Parameters
  • radar (radar object) – radar object (often from PyART) contains all radar data and info

  • radar_config_file (str) – path to and .json configuration file specific to the radar and scan type used

Returns

var_dict – dictionary or relevant variables needed for the rest of clutter map and RCA calculation var_dict = { “date_time”: date_time, “range”: r, “azimuth”: theta, “elevation”: elev, “reflectivity_h”: zh, “reflectivity_v”: zv }

Return type

dict