Probelm in pyart.map.grid_from_radars when I created a radar object with pyart.testing.make_empty_ppi_radar #1689
-
I have a Netcdf file with radar variables with 240 grids(range dimension), 361 azimuth (dimension) and 14 elevation(Sweep) finally the reflectivity with shape (240, 361, 14) . Then I created a radar object with using pyart.testing.make_empty_ppi_radar. with shape radar = pyart.testing.make_empty_ppi_radar(240, 361, 14) and added the field as mentioned in "Basic ingest of a netcdf file" https://arm-doe.github.io/pyart/notebooks/basic_ingest_using_test_radar_object.html (But the example only contain 1 sweep( elevation)) after creating the radar object I tried to grid it with pyart.map.grid_from_radars grid_shape = (41, 480, 480)
and got the error ValueError Traceback (most recent call last)
How can I resolve this???? Gridding worked when I used one sweep but not for field with 14 sweeps |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
@gokul123kit Hello! Question I had was, did reading in the file with read_cfradial not work? Second the reflectivity field needs to be two dimensional so in this case you would need to use the start and end sweepray index to plug in the reflectivity for each sweep. The error is most likely due to the 3 dimensions your using, were pyart expects two. |
Beta Was this translation helpful? Give feedback.
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:
I believe that should work...