Actions

Difference between revisions of "RadxRate"

From Lrose Wiki

(Created page with "RadxQpe ingests three-dimensional output from RadxRate and determines the precipitation rate closest to the surface that satisfies beam blockage and data quality requirements....")
 
Line 1: Line 1:
RadxQpe ingests three-dimensional output from RadxRate and determines the precipitation rate closest to the surface that satisfies beam blockage and data quality requirements.
+
RadxRate ingests polarimetric radar data and produces three-dimensional fields of the NCAR particle identification (PID) and various precipitation rates.
  
 
= Prerequesites =
 
= Prerequesites =
Line 5: Line 5:
 
The following items are required:
 
The following items are required:
  
* Three-dimensional file of rain rates created by RadxRate (cfradial)
+
* Polarimetric radar data (any Radx supported format, e.g., cfradial)
* Beamblock file created by RadxBeamBlock (cfradial)
+
* PID fuzzy logic thresholds file
* Parameter file for running RadxQpe
+
* Sounding data (either from observations or a numerical model)
 +
* Precipitation rate coefficients (e.g., those found in R(Z) or R(Z,ZDR) equations)
 +
* Parameter files for KDP, PID, and Rate.
  
 
= Overview =
 
= Overview =
  
RadxQpe synthesizes the files created by RadxRate and RadxBeamBlock to determine the best estimate of surface rainfall. RadxBeamBlock data is used to determine the data closest to the surface with minimal blocking by terrain. For irregularly-spaced elevation angles, RadxQpe finds the elevation angle in BeamBlock closest to the elevation angle in the files from RadxRate. Additional constraints based on the signal to noise ratio, beam height, and minimum precipitation rate can be set to constrain where data is reported.
+
Overall, RadxRate builds upon the capabilities of RadxKdp and RadxPid by calculating hourly rain rates at each radar gate depending on the local PID category and polarimetric values. It shares parameters files with those two applications. RadxRate will calculate the rain rates with either raw or attenuated-corrected data; the user can choose the option they prefer. The three-dimensional rain rates produced by RadxRate can be then used in RadxQpe to estimate the rain rate closest to the surface, after accounting for beam blockage, noise, and clutter.
 +
 
 +
= PID thresholds file =
 +
 
 +
These thresholds describe the membership functions for each combination of the PID category and polarimetric field as well as the variable weights for each particle type. The file also contains a place to enter a single sounding, if the data cover a narrow time period; otherwise, the sounding will be overwritten by data provided by the user, which is explained below. The particle types are most sensitive to temperature, Zh, Zdr, and the standard deviations of Zdr and PhiDP.
 +
 
 +
 
 +
Set this to a file suitable for the radar transmit mode and wavelength:
 +
 
 +
 
 +
{|
 +
! Wavelength
 +
! Transmit mode
 +
! thresholds_file_example
 +
|-
 +
| S-band
 +
| Simultaneous
 +
| '''[http://wiki.lrose.net/index.php/pid_thresholds.sband.shv.md pid_thresholds.sband.shv]'''
 +
|-
 +
| S-band
 +
| Alternating
 +
| '''[http://wiki.lrose.net/index.php/pid_thresholds.sband.alt.md pid_thresholds.sband.alt]'''
 +
|-
 +
| C-band
 +
| Simultaneous
 +
| '''[http://wiki.lrose.net/index.php/pid_thresholds.cband.shv.md pid_thresholds.cband.shv]'''
 +
|-
 +
| X-band
 +
| Simultaneous
 +
| '''[http://wiki.lrose.net/index.php/pid_thresholds.xband.shv.md pid_thresholds.xband.shv]'''
 +
|}
 +
 
 +
= Sounding data =
 +
 
 +
If sounding data varies in time, sounding data in a non-gridded data format (SPDB) will need to be ingested. SPDB data can come from either observations or numerical simulations (e.g., RAP or HRRR). For additional information regarding this data format, please see the documentation here ('''insert link when written''').
 +
 
 +
= Precipitation rate coefficients and thresholds =
 +
 
 +
RadxRate has the capability to calculate four different precipitation rates relying on a combination of the PID category and formulas dependent upon polarimetric values. Each algorithm requires user-defined polarimetric variable thresholds (typically Zh, Zdr, and KDP) and precipitation rate coefficients/exponents to determine the appropriate precipitation rate formula. The user should choose values appropriate for the specific radar and precipitation type (e.g., tropical vs continental, stratiform vs convective). These values can be set manually within the parameter file below, but users may find it easier to create a separate bash file that sets environment variables using the Unix ‘source’ command.
  
 
= Parameter files =
 
= Parameter files =
  
RadxQpe uses one parameter file that includes the basic parameters related to data location and field names, which is similar to the parameter files for the other Radx applications, and other parameters that specify when precipitation rates will be written to the output file.
+
RadxRate uses four separate parameter files. The first includes the basic parameters related to data location and field names, which is similar to the parameter files for the other Radx applications. The second includes the parameters that set the filtering length, method, and relevant coefficients necessary to calculate KDP and estimate attenuation. The third specifies filter parameters and relevant information related to the soundings used by the PID. The fourth includes all the filters and coefficients necessary to calculate a variety of polarimetric-based rain rates.
  
 
== 1) Main parameter file ==
 
== 1) Main parameter file ==
Line 23: Line 63:
 
To obtain the default parameter file, use the following command:
 
To obtain the default parameter file, use the following command:
  
<code lang="bash">lrose -- RadxQpe -print_params &gt; param_file_name</code>
+
<code lang="bash">lrose -- RadxRate -print_params &gt; param_file_name</code>
  
 
If you already have a parameter file and simply want to check for (and add) updated parameters while retaining current parameters, use the following command:
 
If you already have a parameter file and simply want to check for (and add) updated parameters while retaining current parameters, use the following command:
  
<code lang="bash">lrose -- RadxQpe -params orig_param_file_name -print_params &gt; new_param_file_name</code>
+
<code lang="bash">lrose -- RadxRate -params orig_param_file_name -print_params &gt; new_param_file_name</code>
  
 
=== Important parameters ===
 
=== Important parameters ===
  
Inputs/outputs
+
Input params
 +
 
 +
* input_dir: directory containing radar data (if not specified on the command line and if mode = REALTIME)
 +
* mode: determines if the program waits for new files (REALTIME), moves through start and end times specified on the command line (ARCHIVE), or moves through list of files specified on the command line (FILELIST)
 +
 
 +
Input field information
 +
 
 +
* SNR_available: determines if SNR data is in the file or needs to be calculated from DBZ
 +
* VARIABLE_field_name: tells RadxRate the polarimetric variable names in the ingested cfradial files
 +
* LDR_available: determines if LDR data is in the file
 +
 
 +
Computing KDP
  
* data_url: directory containing the output from RadxRate
+
* KDP_params_file_path: path to the KDP-specific parameter file
* snr_field: name of the SNR field in the RadxRate files (empty if no field)
 
* pid_field: name of the PID field in the RadxRate files
 
* beam_block_path: path to the RadxBeamBlock file
 
* beam_block_field: field name of the maximum beam blockage percentage (accumulated)
 
  
Polar output format
+
Computing PID
  
* output_format: select the preferred file type
+
* PID_params_file_path: path to the PID-specific parameter file
 +
* PID_use_attenuation_corrected_fields: determines whether PID uses Z and ZDR fields that are corrected for attenuation
  
Polar output directory and filename
+
Computing Rate
  
* output_dir: file will be written to this directory (set to empty if the user does not want polar output)
+
* RATE_params_file_path: path to the RATE-specific parameter file
 +
* RATE_use_attenuation_corrected_fields: determines whether RATE equations use Z and ZDR fields that are corrected for attenuation
  
Cartesian grid projection and XY details, and output specification
+
Writing the output files
  
* output_cartesian_dir: file will be written to this directory (set to empty if the user does not want cartesian output)
+
* output_dir: files will be written to this directory
 +
* output_format: select the preferred file type (usually CFRADIAL)
  
= Running RadxQpe =
+
== 2) KDP-specific parameter file ==
  
To check all command line options for RadxQpe, including debugging options and file paths, type the following command into a terminal.
+
=== Ensure file is up to date ===
  
<code lang="bash">lrose -- RadxQpe -h</code>
+
To obtain the default parameter file, use the following command:
 +
 
 +
<code lang="bash">lrose -- RadxRate -print_params_kdp &gt; param_file_name</code>
 +
 
 +
If you already have a parameter file and simply want to check for (and add) updated parameters while retaining current parameters, use the following command:
 +
 
 +
<code lang="bash">lrose -- RadxRate -params_kdp orig_param_file_name -print_params_kdp &gt; new_param_file_name</code>
 +
 
 +
=== Important parameters ===
 +
 
 +
Unfolding and filtering
 +
 
 +
* KDP_fir_filter_len: Filter length applied to PHIDP
 +
 
 +
Handling phase shift on backscatter (PSOB)
 +
 
 +
* KDP_psob_method: Method to handle PSOB
 +
 
 +
== 3) PID-specific parameter file ==
 +
 
 +
=== Ensure file is up to date ===
 +
 
 +
To obtain the default parameter file, use the following command:
 +
 
 +
<code lang="bash">lrose -- RadxRate -print_params_pid &gt; param_file_name</code>
 +
 
 +
If you already have a parameter file and simply want to check for (and add) updated parameters while retaining current parameters, use the following command:
 +
 
 +
<code lang="bash">lrose -- RadxRate -params_pid orig_param_file_name -print_params_pid &gt; new_param_file_name</code>
 +
 
 +
=== Important parameters ===
 +
 
 +
NCAR PID Method
 +
 
 +
* pid_thresholds_file_path: file path for the PID thresholds file
 +
 
 +
Sounding input for PID temperatures
 +
 
 +
* use_soundings_from_spdb: tells RadxRate whether to override the sounding in the pid thresholds file with SPDB data
 +
* PID_sounding_spdb_url: path to SPDB sounding data
 +
 
 +
== 4) Rate-specific parameter file ==
 +
 
 +
=== Ensure file is up to date ===
 +
 
 +
To obtain the default parameter file, use the following command:
 +
 
 +
<code lang="bash">lrose -- RadxRate -print_params_rate &gt; param_file_name</code>
 +
 
 +
If you already have a parameter file and simply want to check for (and add) updated parameters while retaining current parameters, use the following command:
 +
 
 +
<code lang="bash">lrose -- RadxRate -params_rate orig_param_file_name -print_params_rate &gt; new_param_file_name</code>
 +
 
 +
=== Important parameters ===
 +
 
 +
All the parameters in this file are important as it contains all the coefficients for each available rain rate relationship. It is important to carefully read this entire file.
 +
 
 +
= Running RadxRate =
 +
 
 +
To check all command line options for RadxRate, including debugging options and file paths, type the following command into a terminal.
 +
 
 +
<code lang="bash">lrose -- RadxRate -h</code>
  
 
Once your parameter file is complete, use a command similar to the following to run the application:
 
Once your parameter file is complete, use a command similar to the following to run the application:
  
<code lang="bash">lrose -- RadxQpe -params param_file_name</code>
+
<code lang="bash">lrose -- RadxRate -params param_file_name</code>
  
 
The user can also specify the location of cfradial files in the following manner:
 
The user can also specify the location of cfradial files in the following manner:
  
<code lang="bash">lrose -- RadxQpe -f /path/to/cfradial/files/ -params param_file_name</code>
+
<code lang="bash">lrose -- RadxRate -f /path/to/cfradial/files/ -params param_file_name</code>
  
 
= Other relevant items =
 
= Other relevant items =
Line 70: Line 181:
  
 
Caution: this is not an exhaustive list. We urge each user to read through the entire parameter file carefully.  
 
Caution: this is not an exhaustive list. We urge each user to read through the entire parameter file carefully.  
 +
=== Main parameter file ===
  
=== Main parameter file ===
+
Specifying copy-through fields
 +
 
 +
* copy_selected_input_fields_to_output: determines whether original fields are copied to the output file
 +
 
 +
=== KDP-specific parameter file ===
 +
 
 +
Precip-induced attenuation correction for DBZ and ZDR
  
Algorithm parameters
+
* KDP_specify_coefficients_for_attenuation_correction: the user can either set the coefficients or use the default coefficients based on the radar wavelength
  
* azimuthal_resolution_degrees: sets the azimuthal resolution of the output files
+
=== PID-specific parameter file ===
* min_snr: if the SNR lies below this threshold for a gate, a higher elevation angle is used
 
* max_beam_block_percent: beam blockage percentage must be below this threshold or else a higher elevation angle will be used
 
* max_beam_height_km_msl: the beam must not be above this height, otherwise the precipitation will be set to 0
 
* min_valid_precip_rate: any precipitation rates less than this threshold will be set to 0
 
  
Inputs/outputs
+
Computing PID
  
* rainrate_fields: sets the precipitation rates that are saved to the final files; the user can choose their preferred rate from the four options
+
* PID_snr_threshold: mininmum SNR required for the PID to be calculated
* output_fields: additional fields the user would like to see in the final files
+
* PID_min_valid_interest: mininimum interest value required in order for a PID category to be accepted
 +
* PID_apply_median_filter_to_VARIABLE: sets whether RadxRate applies a filter to specific polarimetric variables before running the PID
 +
* PID_ngates_for_sdev: sets the number of gates used to calculate the standard deviations of ZDR and PHIDP
  
Cartesian grid projection and XY details, and output specification
+
Sounding input for PID temperatures
  
* grid_projection: map projection for the cartesian grid
+
* sounding_search_time_margin_secs: the maximum allowable time difference between the radar files and sounding data
* grid_xy_geom: sets the lower left corner of the cartesian grid, grid size, and grid spacing
+
* sounding_location_name: directs RadxRate to the appropriate sounding
* center_grid_on_radar: centers the grid on the radar and not a (lat, lon) location
+
* sounding_required_pressure_range_hpa: sets the minimum pressure range required for a valid sounding
* min_nvalid_for_interp: the number of points required for interpolation to occur
+
* sounding_required_height_range_m: sets the minimum altitude range required for a valid sounding
* set_discrete_fields: option to use discrete values for certain fields instead of interpolation
 
* discrete_fields: list of fields that should use nearest neighbor instead of interpolation (e.g., PID)
 

Revision as of 17:16, 16 July 2019

RadxRate ingests polarimetric radar data and produces three-dimensional fields of the NCAR particle identification (PID) and various precipitation rates.

Prerequesites

The following items are required:

  • Polarimetric radar data (any Radx supported format, e.g., cfradial)
  • PID fuzzy logic thresholds file
  • Sounding data (either from observations or a numerical model)
  • Precipitation rate coefficients (e.g., those found in R(Z) or R(Z,ZDR) equations)
  • Parameter files for KDP, PID, and Rate.

Overview

Overall, RadxRate builds upon the capabilities of RadxKdp and RadxPid by calculating hourly rain rates at each radar gate depending on the local PID category and polarimetric values. It shares parameters files with those two applications. RadxRate will calculate the rain rates with either raw or attenuated-corrected data; the user can choose the option they prefer. The three-dimensional rain rates produced by RadxRate can be then used in RadxQpe to estimate the rain rate closest to the surface, after accounting for beam blockage, noise, and clutter.

PID thresholds file

These thresholds describe the membership functions for each combination of the PID category and polarimetric field as well as the variable weights for each particle type. The file also contains a place to enter a single sounding, if the data cover a narrow time period; otherwise, the sounding will be overwritten by data provided by the user, which is explained below. The particle types are most sensitive to temperature, Zh, Zdr, and the standard deviations of Zdr and PhiDP.


Set this to a file suitable for the radar transmit mode and wavelength:


Wavelength Transmit mode thresholds_file_example
S-band Simultaneous pid_thresholds.sband.shv
S-band Alternating pid_thresholds.sband.alt
C-band Simultaneous pid_thresholds.cband.shv
X-band Simultaneous pid_thresholds.xband.shv

Sounding data

If sounding data varies in time, sounding data in a non-gridded data format (SPDB) will need to be ingested. SPDB data can come from either observations or numerical simulations (e.g., RAP or HRRR). For additional information regarding this data format, please see the documentation here (insert link when written).

Precipitation rate coefficients and thresholds

RadxRate has the capability to calculate four different precipitation rates relying on a combination of the PID category and formulas dependent upon polarimetric values. Each algorithm requires user-defined polarimetric variable thresholds (typically Zh, Zdr, and KDP) and precipitation rate coefficients/exponents to determine the appropriate precipitation rate formula. The user should choose values appropriate for the specific radar and precipitation type (e.g., tropical vs continental, stratiform vs convective). These values can be set manually within the parameter file below, but users may find it easier to create a separate bash file that sets environment variables using the Unix ‘source’ command.

Parameter files

RadxRate uses four separate parameter files. The first includes the basic parameters related to data location and field names, which is similar to the parameter files for the other Radx applications. The second includes the parameters that set the filtering length, method, and relevant coefficients necessary to calculate KDP and estimate attenuation. The third specifies filter parameters and relevant information related to the soundings used by the PID. The fourth includes all the filters and coefficients necessary to calculate a variety of polarimetric-based rain rates.

1) Main parameter file

Ensure file is up to date

To obtain the default parameter file, use the following command:

lrose -- RadxRate -print_params > param_file_name

If you already have a parameter file and simply want to check for (and add) updated parameters while retaining current parameters, use the following command:

lrose -- RadxRate -params orig_param_file_name -print_params > new_param_file_name

Important parameters

Input params

  • input_dir: directory containing radar data (if not specified on the command line and if mode = REALTIME)
  • mode: determines if the program waits for new files (REALTIME), moves through start and end times specified on the command line (ARCHIVE), or moves through list of files specified on the command line (FILELIST)

Input field information

  • SNR_available: determines if SNR data is in the file or needs to be calculated from DBZ
  • VARIABLE_field_name: tells RadxRate the polarimetric variable names in the ingested cfradial files
  • LDR_available: determines if LDR data is in the file

Computing KDP

  • KDP_params_file_path: path to the KDP-specific parameter file

Computing PID

  • PID_params_file_path: path to the PID-specific parameter file
  • PID_use_attenuation_corrected_fields: determines whether PID uses Z and ZDR fields that are corrected for attenuation

Computing Rate

  • RATE_params_file_path: path to the RATE-specific parameter file
  • RATE_use_attenuation_corrected_fields: determines whether RATE equations use Z and ZDR fields that are corrected for attenuation

Writing the output files

  • output_dir: files will be written to this directory
  • output_format: select the preferred file type (usually CFRADIAL)

2) KDP-specific parameter file

Ensure file is up to date

To obtain the default parameter file, use the following command:

lrose -- RadxRate -print_params_kdp > param_file_name

If you already have a parameter file and simply want to check for (and add) updated parameters while retaining current parameters, use the following command:

lrose -- RadxRate -params_kdp orig_param_file_name -print_params_kdp > new_param_file_name

Important parameters

Unfolding and filtering

  • KDP_fir_filter_len: Filter length applied to PHIDP

Handling phase shift on backscatter (PSOB)

  • KDP_psob_method: Method to handle PSOB

3) PID-specific parameter file

Ensure file is up to date

To obtain the default parameter file, use the following command:

lrose -- RadxRate -print_params_pid > param_file_name

If you already have a parameter file and simply want to check for (and add) updated parameters while retaining current parameters, use the following command:

lrose -- RadxRate -params_pid orig_param_file_name -print_params_pid > new_param_file_name

Important parameters

NCAR PID Method

  • pid_thresholds_file_path: file path for the PID thresholds file

Sounding input for PID temperatures

  • use_soundings_from_spdb: tells RadxRate whether to override the sounding in the pid thresholds file with SPDB data
  • PID_sounding_spdb_url: path to SPDB sounding data

4) Rate-specific parameter file

Ensure file is up to date

To obtain the default parameter file, use the following command:

lrose -- RadxRate -print_params_rate > param_file_name

If you already have a parameter file and simply want to check for (and add) updated parameters while retaining current parameters, use the following command:

lrose -- RadxRate -params_rate orig_param_file_name -print_params_rate > new_param_file_name

Important parameters

All the parameters in this file are important as it contains all the coefficients for each available rain rate relationship. It is important to carefully read this entire file.

Running RadxRate

To check all command line options for RadxRate, including debugging options and file paths, type the following command into a terminal.

lrose -- RadxRate -h

Once your parameter file is complete, use a command similar to the following to run the application:

lrose -- RadxRate -params param_file_name

The user can also specify the location of cfradial files in the following manner:

lrose -- RadxRate -f /path/to/cfradial/files/ -params param_file_name

Other relevant items

Additional parameters to edit

Caution: this is not an exhaustive list. We urge each user to read through the entire parameter file carefully.

Main parameter file

Specifying copy-through fields

  • copy_selected_input_fields_to_output: determines whether original fields are copied to the output file

KDP-specific parameter file

Precip-induced attenuation correction for DBZ and ZDR

  • KDP_specify_coefficients_for_attenuation_correction: the user can either set the coefficients or use the default coefficients based on the radar wavelength

PID-specific parameter file

Computing PID

  • PID_snr_threshold: mininmum SNR required for the PID to be calculated
  • PID_min_valid_interest: mininimum interest value required in order for a PID category to be accepted
  • PID_apply_median_filter_to_VARIABLE: sets whether RadxRate applies a filter to specific polarimetric variables before running the PID
  • PID_ngates_for_sdev: sets the number of gates used to calculate the standard deviations of ZDR and PHIDP

Sounding input for PID temperatures

  • sounding_search_time_margin_secs: the maximum allowable time difference between the radar files and sounding data
  • sounding_location_name: directs RadxRate to the appropriate sounding
  • sounding_required_pressure_range_hpa: sets the minimum pressure range required for a valid sounding
  • sounding_required_height_range_m: sets the minimum altitude range required for a valid sounding