Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inhomogeneous shape #92

Open
Miron025 opened this issue Feb 6, 2024 · 1 comment
Open

Inhomogeneous shape #92

Miron025 opened this issue Feb 6, 2024 · 1 comment

Comments

@Miron025
Copy link

Miron025 commented Feb 6, 2024

When trying to download volume data from DWD, some stations, for example HNR or DRS (from time to time) showing this annyoing error:

In:
volume_velocity = [v[-6:] for v in volume_velocity]
volume_velocity = np.array(volume_velocity).T.tolist()


ValueError Traceback (most recent call last)
Cell In[86], line 2
1 volume_velocity = [v[-6:] for v in volume_velocity]
----> 2 volume_velocity = np.array(volume_velocity).T.tolist()

ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (10,) + inhomogeneous part.

Is there any way how to stop this? Thanks
fullcode+error.txt

@kmuehlbauer
Copy link
Member

@Miron025 Good chance that the example needs an update.

The idea behind this example https://docs.wradlib.org/en/latest/notebooks/workflow/recipe4.html was to read several volumes of data from DWD opendata server.

This is done by iterating over the different elevation (here 10) and read all available files between certain start_date and end_date. In the example we choose a time range of 30 minutes which should be 6 files per elevation.

After getting back the request from wetterservice we get the buffers and sort the different sweeps into a list of single volumes. During this process the error is raised. It means that there might be one file missing for one or more elevations. We should make this sorting approach and the consecutive reading part more robust to also handle missing files.

This is no error in the wradlib library but an issue of the wradlib-notebooks. So I'll move the issue over there.

@kmuehlbauer kmuehlbauer transferred this issue from wradlib/wradlib Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants