Beispiel #1
0
import pymap3d as pm
from scipy.interpolate import griddata

tilt = 0.5
names = ['KENX', 'KBUF', 'KBGM', 'KTYX']
date = '20200218'
center = names[3]
date = '20200218'
center_lon = -75.6791; center_lat = 43.7558; center_alt = 567.4;

for iradar in names:
    
    #filepath = "G:\\My Drive\\phd\\plotly\\data\\NEXRAD\\" + iradar + '\\' + date + '\\' # personal computer
    filepath = "Q:\\My Drive\\phd\\plotly\\data\\NEXRAD\\" + iradar + '\\' + date + '\\' # work computer
    
    filelist = gen_fun.get_filelist(filepath, iradar, False)
    
    for ifile in filelist:
        
        print(ifile)
    
        radar = pyart.io.read_nexrad_archive(filepath + ifile) # read in file
    
        # find indices of where 0.5 deg tilts are
        elevAngles = radar.fixed_angle['data']
        elevDiff = elevAngles - tilt
        lowTilts = np.where(elevDiff == np.min(elevDiff))[0]
    
        radar = radar.extract_sweeps(lowTilts) # radar object with only 0.5 deg tilts
        
        # dealias velocity and add to radar object
Beispiel #2
0
#of negative values relative to positive values. 'RdBu_r' is preferred.
#cmaps = [LCH,LCH,LCH_zdr,'bone_r','cividis','copper','copper','RdBu_r'] #HF-S
#cmaps = #StormRanger
if radar_type == 'CHILL':
    cmaps = [
        LCH, 'RdBu_r', LCH_zdr, LCH_wid, 'bone_r', 'copper', 'magma',
        cuckooPalette
    ]  #CSU-CHILL
elif radar_type == 'KASPR':
    cmaps = ['bone_r', LCH_zdr, 'RdBu_r', LCH, LCH_wid, 'inferno',
             'copper']  #KASPR common
elif radar_type == 'NEXRAD':
    cmaps = [LCH, 'RdBu_r', LCH_wid, 'bone_r', LCH_zdr]

# Make filelist
filelist = gen_fun.get_filelist(inpath, wildcard, False)

# Plausibility check on inputs
if len(cmaps) != len(colorbar_labels):
    raise IndexError('Check number of colormaps and colorbars!')

# Data quality
#   Remove values outside of a given range for some variable.
#   Common Z ranges: (-5, 50) (KASPR), (-10, 80) (HF-S)
#   Common PhiDP ranges: (0, 180) (HF-S)
#   Common rhoHV ranges: (0.45, 1.2) (good for most cases)
#   Common NCP ranges: (0.05, 1.2) (good for most cases)
#   Most common approach is to mask on SNR if available, or rhoHV if not. Sometimes an NCP mask is also needed.
#   Z, Zdr, and PhiDP masks risk removing real echo if used incautiously.

Z_mask = {"bool": False, "range": (-5, 45)}