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

Some (All?) new xarray functions only work for polar data (azimuth, range), (elevation, range) or (time, range) #667

Open
kmuehlbauer opened this issue Feb 18, 2024 · 1 comment

Comments

@kmuehlbauer
Copy link
Member

MCVE Code Samplecode

This is the code of _z_to_r_xarray. It's obvious it only works for the polar data representation.

wradlib/wradlib/zr.py

Lines 96 to 109 in d49fa0a

dim0 = obj.wrl.util.dim0()
out = xr.apply_ufunc(
z_to_r,
obj,
input_core_dims=[[dim0, "range"]],
output_core_dims=[[dim0, "range"]],
kwargs=kwargs,
dask="parallelized",
dask_gufunc_kwargs=dict(allow_rechunk=True),
)
out.attrs = sweep_vars_mapping["RATE"]
out.name = "RATE"
return out

Expected Output

Should work for any input dimensions and dimension names.

Output of wrl.show_versions()

latest github main

@kmuehlbauer
Copy link
Member Author

This was found in collaboration with openradar discourse member ankithva.

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

1 participant