Sure!
# Open volume
vol = wrl.io.open_cfradial1_dataset("MDV-20180602-101927-PPIVol.nc")
# Iterate over sweeps and process
swp_list = []
for v in vol:
# georeference and stack dimensions
swp =
v.pipe(wrl.georef.georeference_dataset).stack(points=["azimuth", "range"])
swp_list.append(swp)
# concat sweeps to volume
vol0 = xr.concat(swp_list, dim="points")
# Create XYZ Coordinate DataArray
xyz = xr.concat([vol0.x, vol0.y, vol0.z], dim="xyz").transpose()
# Create Target 3D Grid
trgx = np.linspace(xyz[:, 0].min(),xyz[:, 0].max(), 100)
trgy = np.linspace(xyz[:, 1].min(),xyz[:, 1].max(), 100)
trgz = np.linspace(0, 20000, 200)
yy, hh, xx = np.meshgrid(trgy,trgz,trgx)
trgxyz = np.stack([xx.flatten(), yy.flatten(), hh.flatten()]).T
# Create Gridder/Interpolator
trgshape=xx.shape
gridder = wrl.vpr.CAPPI(polcoords=xyz,
gridcoords=trgxyz,
gridshape=trgshape,
maxrange=200000,
minelev=0,
maxelev=90,
ipclass=wrl.ipol.Nearest)
# Interpolate Data into 3D Grid
crtd_ref = vol0.UH.where(((vol0.RHOHV < 1.0) & ((vol0.PHIDP > 150) |
(vol0.PHIDP < -100))))
vol_zh = np.ma.masked_invalid(gridder(crtd_ref.values).reshape(trgshape))
trgx = trgxyz[:, 0].reshape(trgshape)[0, 0, :]
trgy = trgxyz[:, 1].reshape(trgshape)[0, :, 0]
trgz = trgxyz[:, 2].reshape(trgshape)[:, 0, 0]
yy, hh, xx = np.meshgrid(trgy,trgz,trgx)
# Plot MAXCAPPI
wrl.vis.plot_max_plan_and_vert(trgx, trgy, trgz, vol_zh, unit="dBZH",
cmap="jet", levels=range(-10, 60))
For real CAPPI you would just need to plot the single wanted height layer.
Cheers,
Kai
Am 13.07.21 um 14:33 schrieb Syed Hamid Ali:
> <mailto:
wradlib-users%2Bunsu...@googlegroups.com>
> > <mailto:
wradlib-user...@googlegroups.com
> <mailto:
wradlib-users%2Bunsu...@googlegroups.com>>.
> <
https://groups.google.com/d/msgid/wradlib-users/a0fb6e7f-c90d-499d-82ac-31e0236c1518n%40googlegroups.com?utm_medium=email&utm_source=footer
> <mailto:
wradlib-users%2Bunsu...@googlegroups.com>.
> To view this discussion on the web, visit
>
https://groups.google.com/d/msgid/wradlib-users/005ea2d3-bf74-fa55-b193-d62c8315a35e%40uni-bonn.de
> <
https://groups.google.com/d/msgid/wradlib-users/005ea2d3-bf74-fa55-b193-d62c8315a35e%40uni-bonn.de>.
>
>
>
> --
>
> Syed Hamid Ali
>
> Master of Technology Student
>
> Department of Atmospheric and Space Sciences,
> <
http://www.unipune.ac.in/dept/science/atmospheric_and_space_sciences/default.htm>
>
> Savitribai Phule Pune University &
>
> Indian Institute of Tropical Meteorology,
>
> Pune, India
>
> Mobile :
+91 9622222937
>
> <
https://github.com/syedhamidali>Syed Hamid Ali
> <
https://www.linkedin.com/in/rizvihamid/><
https://www.researchgate.net/profile/Syed-Ali-148><
https://twitter.com/hamidrixvi>
>
https://groups.google.com/d/msgid/wradlib-users/CADqG3xDv1MOK9NGDcgCJWN4MAsuRzKRFHG5eQ2c%3DGwmM8Mkr9g%40mail.gmail.com
> <
https://groups.google.com/d/msgid/wradlib-users/CADqG3xDv1MOK9NGDcgCJWN4MAsuRzKRFHG5eQ2c%3DGwmM8Mkr9g%40mail.gmail.com?utm_medium=email&utm_source=footer>.