You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output of the retrieved field is this, all zeros:
Setting the freezing level to 90 km, we get a more realistic KDP:
This made me suspect the way the freezing level is being masked out of the calculation was causing the issues. The code that does the masking in phase_proc.py:
def det_process_range(radar, sweep, fzl, doc=10):
"""
Determine the processing range for a given sweep.
Queues the radar and returns the indices which can be used to slice
the radar fields and select the desired sweep with gates which are
below a given altitude.
Parameters
----------
radar : Radar
Radar object from which ranges will be determined.
sweep : int
Sweep (0 indexed) for which to determine processing ranges.
fzl : float
Maximum altitude in meters. The determined range will not include
gates which are above this limit.
doc : int, optional
Minimum number of gates which will be excluded from the determined
range.
Returns
-------
gate_end : int
Index of last gate below `fzl` and satisfying the `doc` parameter.
ray_start : int
Ray index which defines the start of the region.
ray_end : int
Ray index which defined the end of the region.
"""
# determine the index of the last valid gate
ranges = radar.range["data"]
elevation = radar.fixed_angle["data"][sweep]
radar_height = radar.altitude["data"]
gate_end = fzl_index(fzl, ranges, elevation, radar_height)
if doc is not None:
gate_end = min(gate_end, len(ranges) - doc)
else:
gate_end = min(gate_end, len(ranges))
ray_start = radar.sweep_start_ray_index["data"][sweep]
ray_end = radar.sweep_end_ray_index["data"][sweep] + 1
return gate_end, ray_start, ray_end
The problem is the assumption of constant elevation angles for the whole sweep (elevation = radar.fixed_angle["data"][sweep]) . This is fine for PPIs, but not for RHIs. This code will need to calculate the mask for each individual ray for RHIs.
The text was updated successfully, but these errors were encountered:
Description
Trying to process KDP and phase with
pyart.phase_proc_lp_gf
with the following lines of code:The output of the retrieved field is this, all zeros:
Setting the freezing level to 90 km, we get a more realistic KDP:
This made me suspect the way the freezing level is being masked out of the calculation was causing the issues. The code that does the masking in
phase_proc.py
:The problem is the assumption of constant elevation angles for the whole sweep (
elevation = radar.fixed_angle["data"][sweep]
) . This is fine for PPIs, but not for RHIs. This code will need to calculate the mask for each individual ray for RHIs.The text was updated successfully, but these errors were encountered: