Skip to content

Commit

Permalink
add verbose flag to qvp code (ARM-DOE#1108)
Browse files Browse the repository at this point in the history
* add verbose flag

* remove casual
  • Loading branch information
dopplerchase authored Apr 14, 2022
1 parent c27c68f commit b69fe0a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pyart/retrieve/qvp.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ..core.transforms import antenna_to_cartesian


def quasi_vertical_profile(radar, desired_angle=None, fields=None, gatefilter=None):
def quasi_vertical_profile(radar, desired_angle=None, fields=None, gatefilter=None,verbose=False):

"""
Quasi Vertical Profile.
Expand All @@ -25,6 +25,8 @@ def quasi_vertical_profile(radar, desired_angle=None, fields=None, gatefilter=No
desired_angle : float
Radar tilt angle to use for indexing radar field data.
None will result in wanted_angle = 20.0
verbose : bool
boolean flag to turn the printing of radar tilts on or off.
Other Parameters
----------------
Expand Down Expand Up @@ -63,9 +65,10 @@ def quasi_vertical_profile(radar, desired_angle=None, fields=None, gatefilter=No
index = abs(radar.fixed_angle['data'] - desired_angle).argmin()
radar_slice = radar.get_slice(index)

# Printing radar tilt angles and radar elevation
print(radar.fixed_angle['data'])
print(radar.elevation['data'][-1])
if verbose:
# Printing radar tilt angles and radar elevation
print(radar.fixed_angle['data'])
print(radar.elevation['data'][-1])

# Setting field parameters
# If fields is None then all radar fields pulled else defined field is used
Expand Down

0 comments on commit b69fe0a

Please sign in to comment.