Skip to content

Commit 2ae9e42

Browse files
authored
FIX: align with xradar/xarray datatree coordinate inheritance, update dependency pinning (#104)
1 parent 555a4d5 commit 2ae9e42

12 files changed

Lines changed: 15 additions & 14 deletions

File tree

environment.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ dependencies:
2828
- sphinx-copybutton
2929
- sphinx-book-theme>=1.0
3030
- wradlib
31-
- xarray >=2024.10.0
31+
- xarray >=2026.4.0
32+
- xradar >=0.12.0
3233
- pip:
3334
- wradlib_data

notebooks/classify/clutter_cloud.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ display(pvol)
4242
pvol1 = pvol.match("sweep*")
4343
display(pvol1)
4444
vol = []
45-
for sweep in pvol1.values():
46-
vol.append(sweep.to_dataset().pipe(wrl.georef.georeference))
45+
for sweep in pvol1:
46+
vol.append(pvol[sweep].to_dataset(inherit="all_coords").pipe(wrl.georef.georeference))
4747
vol = xr.concat(vol, dim="tilt")
4848
vol = vol.assign_coords(sweep_mode=vol.sweep_mode)
4949
display(vol)

notebooks/fileio/backends/cfradial1_backend.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ display(vol["sweep_0"])
6868
``sweep_mode`` is assigned coordinate, as we need it available on the DataArray.
6969

7070
```{code-cell} python
71-
swp = vol["sweep_0"].ds
71+
swp = vol["sweep_0"].to_dataset(inherit="all_coords")
7272
swp = swp.assign_coords(sweep_mode=swp.sweep_mode)
7373
swp = swp.wrl.georef.georeference()
7474
display(swp)

notebooks/fileio/backends/furuno_backend.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ display(vol["sweep_0"])
6868
### Georeferencing scn
6969

7070
```{code-cell} python
71-
swp = vol["sweep_0"].ds.copy()
71+
swp = vol["sweep_0"].to_dataset(inherit="all_coords")
7272
swp = swp.assign_coords(sweep_mode=swp.sweep_mode)
7373
swp = swp.wrl.georef.georeference()
7474
```
@@ -131,7 +131,7 @@ display(vol["sweep_0"])
131131
### Georeferencing scnx
132132

133133
```{code-cell} python
134-
swp = vol["sweep_0"].ds.copy()
134+
swp = vol["sweep_0"].to_dataset(inherit="all_coords")
135135
swp = swp.assign_coords(sweep_mode=swp.sweep_mode)
136136
swp = swp.wrl.georef.georeference()
137137
```

notebooks/fileio/backends/gamic_backend.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ display(vol["sweep_0"])
6464
## Georeferencing
6565

6666
```{code-cell} python
67-
swp = vol["sweep_0"].ds.copy()
67+
swp = vol["sweep_0"].to_dataset(inherit="all_coords")
6868
swp = swp.assign_coords(sweep_mode=swp.sweep_mode)
6969
```
7070

notebooks/fileio/backends/iris_backend.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ display(vol["sweep_0"])
6666
## Georeferencing
6767

6868
```{code-cell} python
69-
swp = vol["sweep_0"].ds.copy()
69+
swp = vol["sweep_0"].to_dataset(inherit="all_coords")
7070
swp = swp.assign_coords(sweep_mode=swp.sweep_mode)
7171
swp = swp.wrl.georef.georeference()
7272
```

notebooks/fileio/backends/odim_backend.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ display(vol["sweep_0"])
6565
## Georeferencing
6666

6767
```{code-cell} python
68-
swp = vol["sweep_0"].ds
68+
swp = vol["sweep_0"].to_dataset(inherit="all_coords")
6969
swp = swp.assign_coords(sweep_mode=swp.sweep_mode)
7070
swp = swp.wrl.georef.georeference()
7171
```

notebooks/fileio/backends/rainbow_backend.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ display(vol["sweep_0"])
6666
## Georeferencing
6767

6868
```{code-cell} python
69-
swp = vol["sweep_0"].ds.copy()
69+
swp = vol["sweep_0"].to_dataset(inherit="all_coords")
7070
swp = swp.assign_coords(sweep_mode=swp.sweep_mode)
7171
swp = swp.wrl.georef.georeference()
7272
```

notebooks/georeferencing/coords.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ display(pvol)
4242
```{code-cell} python
4343
for key in list(pvol.children):
4444
if "sweep" in key:
45-
pvol[key].ds = pvol[key].ds.wrl.georef.georeference()
45+
pvol[key].ds = pvol[key].to_dataset(inherit="all_coords").wrl.georef.georeference()
4646
```
4747

4848
```{code-cell} python

notebooks/workflow/recipe2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ proj = osr.SpatialReference()
4646
proj.ImportFromEPSG(32632)
4747
for key in list(raw_dt.children):
4848
if "sweep" in key:
49-
raw_dt[key].ds = raw_dt[key].ds.wrl.georef.georeference(crs=proj)
49+
raw_dt[key].ds = raw_dt[key].to_dataset(inherit="all_coords").wrl.georef.georeference(crs=proj)
5050
```
5151

5252
```{code-cell} python

0 commit comments

Comments
 (0)