Skip to content

Probelm in pyart.map.grid_from_radars when I created a radar object with pyart.testing.make_empty_ppi_radar #1689

Answered by zssherman
gokul123kit asked this question in Q&A
Discussion options

You must be logged in to vote

Gotcha, with your current work flow you can transpose you ref array so we can index it by sweep and plug that in by sweep like so:

from pyart.config import get_metadata
ref_dict = get_metadata("reflectivity")

new_ref = your_reflectivity_array.transpose(2, 1, 0)
ref = np.zeros((radar.nrays, radar.ngates))
for sweep in radar.sweep_number['data']:
    start, end = radar.get_start_end(sweep)
    ref[start:end+1, :] = new_ref[sweep]

ref_dict["data"] = ref
radar.fields = {"reflectivity": ref_dict}

I believe that should work...

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@gokul123kit
Comment options

@zssherman
Comment options

@gokul123kit
Comment options

@zssherman
Comment options

Answer selected by zssherman
@gokul123kit
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants