# =========================================================
# # Testing and Debugging
#
# # Dump intermediate per ray data in $IRIS_DATA/temp/ray_XXX.dat files 
#
# dump_rays = yes
#
# =========================================================
# Attenuation correction

# Algorithm selection. Available options:
# DP - propogational depolarisation based attenuation
#      (dBZ_real(r) = dBZ_measured(r) + alpha PhiDP(r)).
# IDPC - iterative DP constrained attenuation correction.
#        Single iteration with DP corrected dBZ(r) as
#        an initial dBZ(r).
algorithm = IDPC

# DP attenuation constant for horizontal polarization
# 0.080 for warm oceanic climate
# 0.105 for cool continental climate 
alpha_h = 0.105

# DP attenuation constant for horizontal polarization
# 0.060 for warm oceanic climate
# 0.065 for cool continental climate
alpha_v = 0.065

# The melting layer (aka bright band) above sea level.
# No attenuation is added in the part of the ray above ML
melting_layer = 4300.0

# The above value for melting layer is used only if melting
# layer altitude is not set for processed data set or if
# the following flag is set to 'yes' 
force_conf_melting_layer =  no

# The b parameter from the reflectivity based attenuation
# equation: A(r) = a Z(r)^b
b_exp = 0.78
 
# =========================================================
# PHIDP processing parameters
 
# PHIDP processing algorithm type (in IRIS reingest, use
# dspx for RVP):
# LSQ - Weighted least square fit to a linear function
#       FIR filter coefficients are used as weights. Use
#       fir_width to control width of the filter.
# SPLINES - Smoothing and numerical derivatives calculation
#           using cubic splines algorithm
#           (V. Chandrasekar et al.)  
phidp_alg = LSQ

# Smoothing factor for the first, non-adaptive, stage of
# cubic splines processing (in IRIS reingest, use
# dspx for RVP)
standard_smoothing_factor = 0.1

# Smoothing factor for the second, adaptive, part of
# cubic splines processing (in IRIS reingest, use
# dspx for RVP)
adaptive_smoothing_factor = 1.1

# The width, in km, of FIR filter used as weights in
# LSQ processing. (in IRIS reingest, use
# dspx for RVP)
fir_width = 3.0

# Initial/seed value [deg] of the PhiDP at distance R=0
# Do not set unless you know radar system PhiDP. It is recomended
# to use RVP "phidip_offset" (set via dspx, Mp menue) to adjust 
# effective system PhiDP to be somewhere between 30 and 50 degrees
#
# sys_phi_dp = 30.0
#
# =========================================================
# Data thresholding parameters for the adaptive Kdp data mask
# The distance, in km, at which PhiDP propagation may start 
start_range_phidp = 5.0 

# The minimum SNR required to enter to "rain", or stay in "rain"
snr_phidp = 15.0

# The minimum dispersion required to enter "rain" (perfect tune=1)
# In case of extreme attenuation, set this to 0.85
disp_phidp = 0.80

# The minimum RhoHV required to stay in "rain"
rhohv_phidp = 0.8

# Number of continuous  "good" (dispersion and snr ok) bins needed to enter "rain"
# In case of extreme attenuation, set this to 6
mgood_phidp = 4

# Number of continuous "bad" (dispersion not ok) bins necessary (but not sufficient) to exit "rain" 
#mbad_phidp = 10
mbad_phidp = 2

# =========================================================
# Common data thresholding parameters for the data mask of
# the attenuation corrections and the LSQ method of Kdp.

# The shortest distance, in km, at which measurements are meaningful.
recovery_range = 5

# Lowest allowed/meaningful SNR
snr_lim = 15.0

# Lowest allowed/meaningful RHOHV
rhohv_lim = 0.85

# =========================================================
# Segment criteria in the attenuation correction mask

# Number of sequentially "good" bins needed to transition
# from "no weather" to "rain".
# Note: It is also the width of the gate used to compute
# STD of PHIDP, and mean value of RHOHV. [bins]
long_gate = 10

# Number of sequentially "bad" bins needed to transition
# to "no weather". [bins]
short_gate = 5

# Lowest allowed mean RHOHV at the transition to "rain"
rhohv_enter_r = 0.8

# Highest standard deviation of PhiDP at the transition
# to "rain" [deg]
phidp_std_enter_r = 5.

# Low mean RHOHV that triggers exit from "rain"
rhohv_exit_r = 0.75

# High standard deviation of PhiDP that triggers exit
# from "rain" [deg]
phidp_std_exit_r = 10.0
