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....")
 
 
(17 intermediate revisions by the same user not shown)
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 =
+
=== '''Overview''' ===
 +
RadxRate builds upon the capabilities of [http://wiki.lrose.net/index.php/RadxKdp RadxKdp] and [http://wiki.lrose.net/index.php/RadxPid 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 [http://wiki.lrose.net/index.php/RadxQpe RadxQpe] to estimate the rain rate closest to the surface, after accounting for beam blockage, noise, and clutter.
 +
 
 +
 
 +
=== '''Scientific Background''' ===
 +
For more information regarding the different precipitation rate calculations that are available in LROSE, please refer to this [http://wiki.lrose.net/index.php/RadxRate_equations link].
 +
 
 +
Information about how attenuation is estimated from <math>K_{DP}</math> for use in estimating the precipitation rate can be found [http://wiki.lrose.net/index.php/Estimated_Attenuation here].
 +
 
 +
Information on how to convert soundings into the Spdb format can be found [http://wiki.lrose.net/index.php/Spdb_description here].
 +
 
 +
 
 +
=== '''Prerequesites''' ===
  
 
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.
 +
 
 +
 
 +
=== '''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/images/d/de/Pid_thresholds.sband.shv.txt pid_thresholds.sband.shv]'''
 +
|-
 +
| S-band
 +
| Alternating
 +
| '''[http://wiki.lrose.net/images/e/e4/Pid_thresholds.sband.alt.txt pid_thresholds.sband.alt]'''
 +
|-
 +
| C-band
 +
| Simultaneous
 +
| '''[http://wiki.lrose.net/images/4/4a/Pid_thresholds.cband.shv.txt pid_thresholds.cband.shv]'''
 +
|-
 +
| X-band
 +
| Simultaneous
 +
| '''[http://wiki.lrose.net/images/0/0d/Pid_thresholds.xband.shv.txt 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 [http://wiki.lrose.net/index.php/Spdb_description here].
 +
 
 +
=== '''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:
 +
 
 +
<code lang="bash">/path/to/lrose/install/bin/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:
 +
 
 +
<code lang="bash">/path/to/lrose/install/bin/RadxRate -params orig_param_file_name -print_params &gt; new_param_file_name</code>
 +
 
 +
===== '''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
  
= Overview =
+
Computing Rate
  
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.
+
* 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
  
= Parameter files =
+
Writing the output 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.
+
* output_dir: files will be written to this directory
 +
* output_format: select the preferred file type (usually CFRADIAL)
  
== 1) Main parameter file ==
+
==== '''2) KDP-specific parameter file''' ====
  
=== Ensure file is up to date ===
+
===== '''Ensure file is up to date''' =====
  
 
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">/path/to/lrose/install/bin/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:
 
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">/path/to/lrose/install/bin/RadxRate -params_kdp orig_param_file_name -print_params_kdp &gt; new_param_file_name</code>
  
=== Important parameters ===
+
===== '''Important parameters''' =====
  
Inputs/outputs
+
Unfolding and filtering
  
* data_url: directory containing the output from RadxRate
+
* KDP_fir_filter_len: Filter length applied to PHIDP
* 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
+
Handling phase shift on backscatter (PSOB)
  
* output_format: select the preferred file type
+
* KDP_psob_method: Method to handle PSOB
  
Polar output directory and filename
+
==== '''3) PID-specific parameter file''' ====
  
* output_dir: file will be written to this directory (set to empty if the user does not want polar output)
+
===== '''Ensure file is up to date''' =====
  
Cartesian grid projection and XY details, and output specification
+
To obtain the default parameter file, use the following command:
  
* output_cartesian_dir: file will be written to this directory (set to empty if the user does not want cartesian output)
+
<code lang="bash">/path/to/lrose/install/bin/RadxRate -print_params_pid &gt; param_file_name</code>
  
= Running RadxQpe =
+
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">/path/to/lrose/install/bin/RadxRate -params_pid orig_param_file_name -print_params_pid &gt; new_param_file_name</code>
 +
 
 +
===== '''Important parameters''' =====
  
To check all command line options for RadxQpe, including debugging options and file paths, type the following command into a terminal.
+
NCAR PID Method
  
<code lang="bash">lrose -- RadxQpe -h</code>
+
* pid_thresholds_file_path: file path for the PID thresholds file
  
Once your parameter file is complete, use a command similar to the following to run the application:
+
Sounding input for PID temperatures
  
<code lang="bash">lrose -- RadxQpe -params param_file_name</code>
+
* 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
  
The user can also specify the location of cfradial files in the following manner:
+
==== '''4) Rate-specific parameter file''' ====
  
<code lang="bash">lrose -- RadxQpe -f /path/to/cfradial/files/ -params param_file_name</code>
+
===== '''Ensure file is up to date''' =====
  
= Other relevant items =
+
To obtain the default parameter file, use the following command:
  
== Additional parameters to edit ==
+
<code lang="bash">/path/to/lrose/install/bin/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">/path/to/lrose/install/bin/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">/path/to/lrose/install/bin/RadxRate -h</code>
 +
 
 +
Once your parameter file is complete, use a command similar to the following to run the application. ''Note: this command will '''''not''''' work for the FILELIST mode.''
 +
 
 +
<code lang="bash">/path/to/lrose/install/bin/RadxRate -params param_file_name</code>
 +
 
 +
If using FILELIST mode, the user needs to specify the location of cfradial files using the <code lang="bash">-f</code> flag:
 +
 
 +
<code lang="bash">/path/to/lrose/install/bin/RadxRate -f /path/to/cfradial/files/ -params param_file_name</code>
 +
 
 +
=== '''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.  
 
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''' =====
  
=== Main 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)
 

Latest revision as of 20:27, 19 April 2024

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

Overview

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.


Scientific Background

For more information regarding the different precipitation rate calculations that are available in LROSE, please refer to this link.

Information about how attenuation is estimated from [math]\displaystyle{ K_{DP} }[/math] for use in estimating the precipitation rate can be found here.

Information on how to convert soundings into the Spdb format can be found here.


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.


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.

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:

/path/to/lrose/install/bin/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:

/path/to/lrose/install/bin/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:

/path/to/lrose/install/bin/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:

/path/to/lrose/install/bin/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:

/path/to/lrose/install/bin/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:

/path/to/lrose/install/bin/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:

/path/to/lrose/install/bin/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:

/path/to/lrose/install/bin/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.

/path/to/lrose/install/bin/RadxRate -h

Once your parameter file is complete, use a command similar to the following to run the application. Note: this command will not work for the FILELIST mode.

/path/to/lrose/install/bin/RadxRate -params param_file_name

If using FILELIST mode, the user needs to specify the location of cfradial files using the -f flag:

/path/to/lrose/install/bin/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