Skip to content

Commit

Permalink
REL: 0.8.0 (openradar#229)
Browse files Browse the repository at this point in the history
* Fix datatree -> xarray in docs
* fix docstrings
* fix release/data in CITATION.cff
* restructure doc navigation, more doc fixes
* more notebook alignments
* fix pyproject.toml
  • Loading branch information
kmuehlbauer authored and rcjackson committed Nov 26, 2024
1 parent 38a7595 commit a359232
Show file tree
Hide file tree
Showing 46 changed files with 286 additions and 224 deletions.
6 changes: 3 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
cff-version: 1.0.3
message: If you use this software, please cite it using these metadata.
# FIXME title as repository name might not be the best name, please make human readable
title: 'openradar/xradar: xradar v0.7.0'
title: 'openradar/xradar: xradar v0.8.0'
doi: 10.5281/zenodo.7091737
# FIXME splitting of full names is error prone, please check if given/family name are correct
authors:
Expand Down Expand Up @@ -36,7 +36,7 @@ authors:
affiliation: Federal Office of Meteorology and Climatology MeteoSwiss
orcid: https://orcid.org/0009-0006-1419-0556

version: 0.7.0
date-released: 2024-10-26
version: 0.8.0
date-released: 2024-11-04
repository-code: https://github.com/openradar/xradar
license: MIT
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
"python": ("https://docs.python.org/3/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"xarray": ("https://docs.xarray.dev/en/stable/", None),
"datatree": ("https://xarray-datatree.readthedocs.io/en/latest/", None),
"pyproj": ("https://pyproj4.github.io/pyproj/stable/", None),
}

Expand Down
4 changes: 2 additions & 2 deletions docs/datamodel.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
With the forthcoming standard [FM301], which is a subset of [CfRadial2.0], as
a basis for the xradar data model we can take full advantage of [Xarray] and the whole software stack.

We facilitate {py:class}`datatree:datatree.DataTree` to bundle the different sweeps of a radar volume into one structure. These sweep datasets are essentially {py:class}`xarray:xarray.Dataset` which contain metadata attributes and variables ({py:class}`xarray:xarray.DataArray`).
We facilitate {py:class}`xarray:xarray.DataTree` to bundle the different sweeps of a radar volume into one structure. These sweep datasets are essentially {py:class}`xarray:xarray.Dataset` which contain metadata attributes and variables ({py:class}`xarray:xarray.DataArray`).

## DataTree

The DataTree consists of one global root group and several sweep groups. Optionally, groups containing parameter and calibration can be part of the datatree.

Internal representation: {py:class}`datatree:datatree.DataTree`
Internal representation: {py:class}`xarray:xarray.DataTree`

## Global Scope / Root Group

Expand Down
10 changes: 3 additions & 7 deletions docs/exporters.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,23 @@ Exporting is only supported for acknowledged standards.

Currently xradar can export:

- [](#odim-h5)
- [](#cfradial2)
- [](#cfradial1)

## ODIM_H5

### to_odim

With {class}`~xradar.io.export.to_odim` an xradar {py:class}`datatree:datatree.DataTree`
With {class}`~xradar.io.export.to_odim` an xradar {py:class}`xarray:xarray.DataTree`
can be saved to an ODIM_H5 file (v2.2 at the moment).

## CfRadial2

### to_cfradial2

With {class}`~xradar.io.export.to_cfradial2` an xradar {py:class}`datatree:datatree.DataTree`
With {class}`~xradar.io.export.to_cfradial2` an xradar {py:class}`xarray:xarray.DataTree`
can be saved to a CfRadial2-like file.

## CfRadial1

### to_cfradial1

With {class}`~xradar.io.export.to_cfradial1` an xradar {py:class}`datatree:datatree.DataTree`
With {class}`~xradar.io.export.to_cfradial1` an xradar {py:class}`xarray:xarray.DataTree`
can be saved to a CfRadial1-like file.
3 changes: 1 addition & 2 deletions docs/history.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# History

## 0.8.0 (2024-10-28)
## 0.8.0 (2024-11-04)

This is the first version which uses datatree directly from xarray. Thus, xarray is pinned to version >= 2024.10.0.

Expand All @@ -13,7 +13,6 @@ This is the first version which uses datatree directly from xarray. Thus, xarray
* Use DataTree from xarray and add xarray nightly run ({pull}`213`, {pull}`214`, {pull}`215`, {pull}`218`) by [@kmuehlbauer](https://github.com/kmuehlbauer).
* ADD: Added new accessor `map_over_sweeps` for volume operations on DataTrees and a matching decorator ({pull}`203`) by [@syedhamidali](https://github.com/syedhamidali).


## 0.7.0 (2024-10-26)

This is the last version which uses datatree from xarray-contrib/datatree. Thus, xarray is pinned to version 2024.9.0.
Expand Down
77 changes: 59 additions & 18 deletions docs/importers.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
# Importers

To import different radar data different approaches are used.

Currently xradar can import:

- [](#cfradial1)
- [](#odim-h5)
- [](#gamic-hdf5)
- [](#furuno-scn-and-scnx)
- [](#rainbow)
- [](#iris-sigmet)
- [](#nexradlevel2)
The backends use different approaches to ingest the data.

## CfRadial1

Expand All @@ -27,7 +17,7 @@ group with all data and metadata can be returned.

With {func}`~xradar.io.backends.cfradial1.open_cfradial1_datatree` all groups (eg.
``sweeps_0`` and ``root`` are extracted from the source file and added as ParentNodes
and ChildNodes to a {py:class}`datatree:datatree.DataTree`.
and ChildNodes to a {py:class}`xarray:xarray.DataTree`.

## ODIM_H5

Expand All @@ -45,7 +35,7 @@ more functions are applied on that {py:class}`xarray:xarray.Dataset`.

With {func}`~xradar.io.backends.odim.open_odim_datatree` all groups (eg. ``datasetN``)
are extracted. From that the ``root`` group is processed. Everything is finally added as
ParentNodes and ChildNodes to a {py:class}`datatree:datatree.DataTree`.
ParentNodes and ChildNodes to a {py:class}`xarray:xarray.DataTree`.


## GAMIC HDF5
Expand All @@ -62,7 +52,7 @@ more functions are applied on that {py:class}`xarray:xarray.Dataset`.

With {func}`~xradar.io.backends.odim.open_gamic_datatree` all groups (eg. ``scanN``)
are extracted. From that the ``root`` group is processed. Everything is finally added as
ParentNodes and ChildNodes to a {py:class}`datatree:datatree.DataTree`.
ParentNodes and ChildNodes to a {py:class}`xarray:xarray.DataTree`.


## Furuno SCN and SCNX
Expand All @@ -80,7 +70,7 @@ a {py:class}`xarray:xarray.Dataset` with the sweep group.

With {func}`~xradar.io.backends.furuno.open_furuno_datatree` the single group
is extracted. From that the ``root`` group is processed. Everything is finally
added as ParentNodes and ChildNodes to a {py:class}`datatree:datatree.DataTree`.
added as ParentNodes and ChildNodes to a {py:class}`xarray:xarray.DataTree`.

## Rainbow

Expand All @@ -97,7 +87,7 @@ more functions are applied on that {py:class}`xarray:xarray.Dataset`.

With {func}`~xradar.io.backends.rainbow.open_rainbow_datatree` all groups (eg. ``0``)
are extracted. From that the ``root`` group is processed. Everything is finally added as
ParentNodes and ChildNodes to a {py:class}`datatree:datatree.DataTree`.
ParentNodes and ChildNodes to a {py:class}`xarray:xarray.DataTree`.


## Iris/Sigmet
Expand All @@ -115,7 +105,7 @@ more functions are applied on that {py:class}`xarray:xarray.Dataset`.

With {func}`~xradar.io.backends.iris.open_iris_datatree` all groups (eg. ``1``)
are extracted. From that the ``root`` group is processed. Everything is finally added as
ParentNodes and ChildNodes to a {py:class}`datatree:datatree.DataTree`.
ParentNodes and ChildNodes to a {py:class}`xarray:xarray.DataTree`.


## NexradLevel2
Expand All @@ -133,4 +123,55 @@ more functions are applied on that {py:class}`xarray:xarray.Dataset`.

With {func}`~xradar.io.backends.nexrad_level2.open_nexradlevel2_datatree`
all groups (eg. ``1``) are extracted. From that the ``root`` group is processed.
Everything is finally added as ParentNodes and ChildNodes to a {py:class}`datatree:datatree.DataTree`.
Everything is finally added as ParentNodes and ChildNodes to a {py:class}`xarray:xarray.DataTree`.

## Datamet

### DataMetBackendEntrypoint

The xarray backend {class}`~xradar.io.backends.datamet.DataMetBackendEntrypoint`
opens the file with {class}`~xradar.io.backends.datamet.DataMetStore`. Several
private helper functions are used to conveniently access data and
metadata. Finally, the xarray machinery returns a {py:class}`xarray:xarray.Dataset`
with wanted group (eg. ``0``). Depending on the used backend kwargs several
more functions are applied on that {py:class}`xarray:xarray.Dataset`.

### open_datamet_datatree

With {func}`~xradar.io.backends.datamet.open_nexradlevel2_datatree`
all groups (eg. ``1``) are extracted. From that the ``root`` group is processed.
Everything is finally added as ParentNodes and ChildNodes to a {py:class}`xarray:xarray.DataTree`.

## Halo Photonics Lidar

### HPLBackendEntrypoint

The xarray backend {class}`~xradar.io.backends.hpl.HPLBackendEntrypoint`
opens the file with {class}`~xradar.io.backends.hpl.HplStore`. Several
private helper functions are used to conveniently access data and
metadata. Finally, the xarray machinery returns a {py:class}`xarray:xarray.Dataset`
with wanted group (eg. ``0``). Depending on the used backend kwargs several
more functions are applied on that {py:class}`xarray:xarray.Dataset`.

### open_hpl_datatree

With {func}`~xradar.io.backends.hpl.open_hpl_datatree`
all groups (eg. ``1``) are extracted. From that the ``root`` group is processed.
Everything is finally added as ParentNodes and ChildNodes to a {py:class}`xarray:xarray.DataTree`.

## Metek MRR2

### MRRBackendEntrypoint

The xarray backend {class}`~xradar.io.backends.metek.MRRBackendEntrypoint`
opens the file with {class}`~xradar.io.backends.metek.MRR2DataStore`. Several
private helper functions are used to conveniently access data and
metadata. Finally, the xarray machinery returns a {py:class}`xarray:xarray.Dataset`
with wanted group (eg. ``0``). Depending on the used backend kwargs several
more functions are applied on that {py:class}`xarray:xarray.Dataset`.

### open_metek_datatree

With {func}`~xradar.io.backends.metek.open_metek_datatree`
all groups (eg. ``1``) are extracted. From that the ``root`` group is processed.
Everything is finally added as ParentNodes and ChildNodes to a {py:class}`xarray:xarray.DataTree`.
14 changes: 10 additions & 4 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@ importers
exporters
notebooks/Accessors
notebooks/Mapping_Sweeps
notebooks/CfRadial1_Model_Transformation
```

```{toctree}
:maxdepth: 2
:caption: Examples
:caption: Backends
notebooks/CfRadial1_Model_Transformation
notebooks/CfRadial1
notebooks/CfRadial1_Export
notebooks/Transform
notebooks/ODIM_H5
notebooks/GAMIC
notebooks/Furuno
Expand All @@ -37,9 +35,17 @@ notebooks/Iris
notebooks/HaloPhotonics
notebooks/MRR
notebooks/NexradLevel2
```

```{toctree}
:maxdepth: 2
:caption: Examples
notebooks/CfRadial1_Export
notebooks/Read-plot-Sigmet-data-from-AWS
notebooks/plot-ppi
notebooks/angle_reindexing
notebooks/Multi-Volume-Concatenation.ipynb
notebooks/multiple-sweeps-into-volume-scan.ipynb
notebooks/Transform
```
4 changes: 2 additions & 2 deletions examples/notebooks/CfRadial1_Export.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# CfRadial1"
"# CfRadial1 - Export"
]
},
{
Expand Down Expand Up @@ -265,5 +265,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
Loading

0 comments on commit a359232

Please sign in to comment.