In [1]:
# Convert the Level 2 format to CfRadial format using RadxConvert
run(`RadxConvert -f data/Level2_KHGX_20170827_1402.ar2v`);
In [2]:
# Calculate the rain rates using RadxPartRain
run(`RadxPartRain -f ./output/20170827/cfrad.20170827_140311.645_to_20170827_140722.830_KHGX_Surveillance_SUR.nc -params ./data/RadxPartRain.params`)
In [3]:
# Grid the data using Radx2Grid
run(`Radx2Grid -f output/20170827/cfrad.20170827_140311.645_to_20170827_140722.830_KHGX_Surveillance_SUR.nc -params ./data/Radx2Grid.params -outdir ./output`)
In [4]:
# Import some modules
# JuliaMet available from https://github.com/metjmart/JuliaMet
# PyPlot available via `Pkg.add("PyPlot")`
using JuliaMet
using PyPlot
plt = PyPlot
Out[4]:
In [5]:
# Read in the gridded radar data
volume = "./output/20170827/ncf_20170827_140722.nc"
vars = ["x0","y0","z0","DBZ","ZDR","RATE_KDP_ZDR","RATE_ZH","RATE_Z_ZDR"]
x,y,z,dbz,zdr,kdp_zdr_rr,zh_rr,z_zdr_rr = read_ncvars(volume,vars);
In [6]:
# Calculate the difference between the Z/ZDR and Z only rainrates
rr_diff = z_zdr_rr - zh_rr;
In [11]:
# Plot up the results at 3 km
fig = plt.figure(figsize=(7, 12))
zplot = 3
hmin = 100
hmax = 400
plt.subplot(421, aspect="equal")
plt.contourf(x[hmin:hmax],y[hmin:hmax],dbz[hmin:hmax,hmin:hmax,zplot]',levels=collect(0:3:54),cmap="radar",extend="both")
plt.colorbar(fraction=0.046, pad=0.04)
#plt.contour(r[1:121],z,azmean_drypv[1:121,:]'.*10.0^6,levels=collect(0:20:300),colors="k")
plt.title("Radar Reflectivity (dBZ)")
plt.subplot(422, aspect="equal")
plt.contourf(x[hmin:hmax],y[hmin:hmax],zh_rr[hmin:hmax,hmin:hmax,zplot]',levels=collect(0:10:150),cmap="radar_carbone",extend="max")
plt.colorbar(fraction=0.046, pad=0.04)
plt.title("ZH Rain Rate (mm/hr)")
plt.subplot(423, aspect="equal")
plt.contourf(x[hmin:hmax],y[hmin:hmax],z_zdr_rr[hmin:hmax,hmin:hmax,zplot]',levels=collect(0:10:150),cmap="radar_carbone",extend="max")
plt.colorbar(fraction=0.046, pad=0.04)
plt.title("Z-ZDR Rain Rate (mm/hr)")
plt.subplot(424, aspect="equal")
plt.contourf(x[hmin:hmax],y[hmin:hmax],rr_diff[hmin:hmax,hmin:hmax,zplot]',levels=collect(-55:10:55),cmap="bwr",extend="both")
plt.colorbar(fraction=0.046, pad=0.04)
plt.title("Rain Rate Difference (mm/hr)")
plt.tight_layout()
In [ ]: