Simulator

Runs the orbital radar simulator.

class orbital_radar.simulator.Simulator(sat_name, file_earthcare=None, nyquist_from_prf=False, ms_threshold=12, ms_threshold_integral=41, **radar_specs)[source]

Runs the orbital radar simulator.

Methods

add_attributes()

Adds attributes to the variables of the dataset

add_noise(x, x_std, noise)

Equation to calculate the noise from values without noise, the uncertainty of the values, and random noise.

apply_detection_limit(var_ze, var_other)

Applies the detection limit of the spaceborne radar to the along-height convoluted data.

calculate_along_track_sat_bin_edges()

Calculate the bin edges of the along-track satellite grid.

calculate_height_sat_bin_edges()

Calculate the bin edges of the height satellite grid.

calculate_ms_flag()

Calculates the multiple scattering flag.

calculate_nubf()

Calculates the non-uniform beam filling from the standard deviation of Ze within the radar volume.

calculate_nubf_flag([threshold])

Calculate non-uniform beam filling flag.

calculate_signal_fraction()

Calculates the fraction of bins that contain a ze signal above the detection limit of the spaceborne radar.

calculate_vm_bias()

Calculate the satellite Doppler velocity bias between the estimate with and without satellite motion error.

calculate_vm_bias_flag([threshold])

Calculate the satellite Doppler velocity bias flag.

calculate_vm_noise()

Adds noise to satellite Doppler velocity based on the pre-defined lookup table with noise values for different radar reflectivity bins.

calculate_vm_std_nubf()

Calculate outstanding error in correcting Mean Doppler Velocity biases caused by non-uniform beam filling

calculate_ze_noise()

Adds noise to satellite radar reflectivity based on the pre-defined lookup table with noise values for different radar reflectivity bins.

check_input_dataset()

Check user input for consistency.

convolve_along_track()

Calculates the along-track convolution from the input suborbital data using the along-track weighting function of the spaceborne radar.

convolve_height()

Convolution of the along-track integrated data with the range weighting function of the spaceborne radar.

fold_vm()

Doppler velocity folding correction.

integrate_along_track()

Integrates the along-track convoluted data to profiles, which represent the satellite's footprint.

plot(**kwds)

Along-track plot of the simulated radar reflectivity and Doppler velocity.

plot_histogram(**kwds)

Histogram plot of the simulated radar reflectivity and Doppler velocity.

plot_scatter(**kwds)

Scatter plot between satellite data and suborbital data.

prepare_input_dataset()

Prepares input dataset for computations.

transform(ds)

Runs the entire simulator.

vm_uncertainty_equation(vm_std_broad, ...)

Calculates the total Doppler velocity uncertainty based on the broadening Doppler velocity uncertainty and the non-uniform beam filling Doppler velocity uncertainty.

add_attributes()[source]

Adds attributes to the variables of the dataset

static add_noise(x, x_std, noise)[source]

Equation to calculate the noise from values without noise, the uncertainty of the values, and random noise.

Parameters:
xxr.DataArray

Radar reflectivity [dB] or doppler velocity [m s-1]

x_stdfloat

Radar reflectivity uncertainty [dB] or doppler velocity uncertainty [m s-1]

noisenp.array

Random noise with shape equal to x.

Returns:
x_noisexr.DataArray

Radar reflectivity with added noise [dB]

apply_detection_limit(var_ze, var_other: list)[source]

Applies the detection limit of the spaceborne radar to the along-height convoluted data.

Parameters:
var_zexr.DataArray

Radar reflectivity reflectivity variable name

var_otherlist

List with other variables that should be masked with the radar reflectivity detection limit.

calculate_along_track_sat_bin_edges()[source]

Calculate the bin edges of the along-track satellite grid. This way is equivalent to height.

calculate_height_sat_bin_edges()[source]

Calculate the bin edges of the height satellite grid. This way is equivalent to along-track.

calculate_ms_flag()[source]

Calculates the multiple scattering flag. The flag is 1 if multiple scattering occurs, and 0 if no multiple scattering occurs.

The flag is calculated from the radar reflectivity of the spaceborne radar from these steps: - Calculate integral of radar reflectivity above a certain threshold from the top of the atmosphere (TOA) down to the surface. - Multiple scattering occurs if the integral reaches a critical value at a certain height.

calculate_nubf()[source]

Calculates the non-uniform beam filling from the standard deviation of Ze within the radar volume.

Currently, the flag is expressed as standard deviation only and no threshold to indicate high standard deviation is applied. This may be added in the future to reduce the output file size.

calculate_nubf_flag(threshold=1)[source]

Calculate non-uniform beam filling flag. The flag is 1 if the non-uniform beam filling is higher than a certain threshold, and 0 otherwise.

Parameters:
thresholdfloat

Threshold for non-uniform beam filling. The default is 1 dB.

calculate_signal_fraction()[source]

Calculates the fraction of bins that contain a ze signal above the detection limit of the spaceborne radar. The fraction is 1 if all bins contain signal, and 0 if no bins contain signal.

calculate_vm_bias()[source]

Calculate the satellite Doppler velocity bias between the estimate with and without satellite motion error.

calculate_vm_bias_flag(threshold=0.5)[source]

Calculate the satellite Doppler velocity bias flag. The flag is 1 if the absolute satellite Doppler velocity bias is higher than 0.5 m s-1, and 0 otherwise.

Parameters:
thresholdfloat

Threshold for satellite Doppler velocity bias. The default is 0.5 m s-1.

calculate_vm_noise()[source]

Adds noise to satellite Doppler velocity based on the pre-defined lookup table with noise values for different radar reflectivity bins.

Note: The noise is added to the satellite Doppler velocity with the satellite motion error.

calculate_vm_std_nubf()[source]

Calculate outstanding error in correcting Mean Doppler Velocity biases caused by non-uniform beam filling

The calculation is based on the horizontal radar reflectivity gradient at the input resolution. The gradient is calculated along the along- track direction. The gradient is then averaged onto the satellite grid and the absolute value is taken. The error is then calculated as 0.15 times the gradient divided by 3 dBZ/km. Bins without reflectivity are set to 0 before averaging onto satellite resolution.

calculate_ze_noise()[source]

Adds noise to satellite radar reflectivity based on the pre-defined lookup table with noise values for different radar reflectivity bins. Empty bins are filled with noise according to the noise level.

check_input_dataset()[source]

Check user input for consistency.

convolve_along_track()[source]

Calculates the along-track convolution from the input suborbital data using the along-track weighting function of the spaceborne radar. Further, the function calculates the error due to satellite velocity.

convolve_height()[source]

Convolution of the along-track integrated data with the range weighting function of the spaceborne radar.

fold_vm()[source]

Doppler velocity folding correction.

integrate_along_track()[source]

Integrates the along-track convoluted data to profiles, which represent the satellite’s footprint. The along-track integration is given by the along track resolution satellite variable.

Along track bins of satellite refer to center of field of view.

plot(**kwds)[source]

Along-track plot of the simulated radar reflectivity and Doppler velocity.

plot_histogram(**kwds)[source]

Histogram plot of the simulated radar reflectivity and Doppler velocity.

plot_scatter(**kwds)[source]

Scatter plot between satellite data and suborbital data.

prepare_input_dataset()[source]

Prepares input dataset for computations. This only includes replacing nan values by zero in both ze and vm.

transform(ds)[source]

Runs the entire simulator.

Parameters:
dsxarray.Dataset

Data from suborbital radar interpolated to “along_track” [m] and “height” [m] coordinates. The dataset must contain the following variables: Radar reflectivity “ze” [mm6 m-3], Doppler velocity “vm” [m s-1]. Both variables should have no nan values. Any nan’s should be filled with zeros.

vm_uncertainty_equation(vm_std_broad, vm_std_nubf)[source]

Calculates the total Doppler velocity uncertainty based on the broadening Doppler velocity uncertainty and the non-uniform beam filling Doppler velocity uncertainty.

Based on Equation (4) in

Parameters:
vm_std_broadfloat, np.array

Doppler velocity uncertainty due to broadening [m s-1]

vm_std_nubffloat, np.array

Doppler velocity uncertainty due to non-uniform beam filling [m s-1]