Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
## Backend API Reference

::: xarray_eopf.backend.EopfBackend
40 changes: 21 additions & 19 deletions docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ convenient form using the `xarray` data models `DataTree` and `Dataset`.
For this reason, it is the default mode of operation when using the `"eopf-zarr"`
backend.

The data products are provided in this mode use a unified grid mapping
The data products provided in this mode use a unified grid mapping
for all their data variables. This means that selected variables are
spatially up-scaled or down-scaled as needed, so that the dataset can use a
single shared pair of `x` and `y` coordinates in the returned datasets.
Expand Down Expand Up @@ -67,24 +67,6 @@ The aim of this mode is to represent EOPF data products without modification
using the `xarray` data models `DataTree` and `Dataset`. Content and structure
of the original data products are preserved to a maximum extend.

### Function `open_datatree()`

Synopsis:

```python
datatree = xr.open_datatree(
filename_or_obj,
engine="eopf-zarr",
op_mode="native",
**kwargs
)
```

Opens a data product as-is including Zarr groups and returns a data tree object.

This function currently returns the result of calling
`xr.open_datatree(filename_or_obj, engine="zarr", **kwargs)`.

### Function `open_dataset()`

Synopsis:
Expand Down Expand Up @@ -115,3 +97,23 @@ Parameters `**params`:
- `group_sep`: Separator string used to concatenate groups names
to create prefixes for unique variable and dimension names.
Defaults to the underscore character (`"_"`).


### Function `open_datatree()`

Synopsis:

```python
datatree = xr.open_datatree(
filename_or_obj,
engine="eopf-zarr",
op_mode="native",
**kwargs
)
```

Opens a data product as-is including Zarr groups and returns a data tree object.

This function currently returns the result of calling
`xr.open_datatree(filename_or_obj, engine="zarr", **kwargs)`.

34 changes: 23 additions & 11 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# EOPF xarray backend

`xarray-eopf` is a Python package that enhances [xarray](https://docs.xarray.dev/en/stable/user-guide/io.html) by a new backend
named `"eopf-zarr"`. This backend allows for reading the ESA EOPF data products
named `"eopf-zarr"`. This backend allows for reading the [ESA EOPF data](https://eopf.copernicus.eu/eopf-products-and-adfs/) products
in Zarr format and representing them using analysis ready data models.

## Overview

After installation of the package, you can open EOPF data products using the
usual xarray top-level functions `open_dataset()` that provides
a [`Dataset`](https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html) object
a [`Dataset`](https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html) object:

```python
dataset = xr.open_dataset(url_or_path_to_product, engine="eopf-zarr")
dataset = xr.open_dataset(url_or_path, engine="eopf-zarr")
```

and `open_datatree()` that provides a [`DataTree`](https://docs.xarray.dev/en/stable/generated/xarray.DataTree.html)
object including groups:

```python
datatree = xr.open_datatree(url_or_path_to_product, engine="eopf-zarr")
datatree = xr.open_datatree(url_or_path, engine="eopf-zarr")
```

## Features
Expand All @@ -28,19 +28,31 @@ object including groups:
> The following features are only partly or not at all implemented yet.


The backend supports two distinct modes of operation, `"native"` and `"analysis-ready"`:

- `op_mode="native"` - using the _native mode_, the returned `Dataset` or `DataTree`
objects try to serve as a 1:1 representation of the actual Zarr product structure and
content with either none or minimal preprocessing applied.
The backend supports two distinct modes of operation, `"native"` and `"analysis"`:

- `op_mode="analysis"` - using the _analysis mode_, the returned `Dataset`
or `DataTree` objects attempt to be user-friendly and analysis-ready to a maximum
extend. Certain preprocessing steps will be applied depending on the specific
Sentinel product towards an analysis-ready data model and content. For example,
for Sentinel-2, we will support the selection of specific bands and resampling to a
desired spatial resolution. For Sentinel-3 we will allow for rectifying the images
in satellite coordinates to a user-provided, common CRS.
in satellite coordinates to a user-provided, common CRS. It can be used as shown
in the examples below:
```python
dataset = xr.open_dataset(url_or_path, engine="eopf-zarr", op_mode="analysis")
datatree = xr.open_datatree(url_or_path, engine="eopf-zarr", op_mode="analysis")
```

- `op_mode="native"` - using the _native mode_, the returned `Dataset` or `DataTree`
objects try to serve as a 1:1 representation of the actual Zarr product structure and
content with either none or minimal preprocessing applied. It can be used as shown
in the examples below:
```python
dataset = xr.open_dataset(url_or_path, engine="eopf-zarr", op_mode="native")
datatree = xr.open_datatree(url_or_path, engine="eopf-zarr", op_mode="native")
```

More information on the two modes are given in the [User Guide](guide.md)

Data variables will always be represented as chunked Dask arrays for
efficient out-of core computations and visualisations.
Expand All @@ -49,7 +61,7 @@ The package has minimal core dependencies: `xarray`, `zarr`, and `dask`.
Packages for accessing remote filesystems are optional, e.g., you will need `s3fs`
if you need to access EOPF data products in S3-compatible remote object storages.

### License
## License

The package is open source and released under the
[Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0.html) license. :heart:
Expand Down
8 changes: 4 additions & 4 deletions docs/start.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Getting Started

By installing the `xarray-eopf` package into an existing Python environment
The `xarray-eopf` package can be installed into an existing Python environment
using

```bash
Expand All @@ -13,11 +13,11 @@ or
conda install -c conda-forge xarray-eopf
```

you are ready to go and use the `engine="eopf-zarr"` keyword argument when calling
`open_dataset()` or `open_datatree()`:
After installation, you are ready to go and use the `engine="eopf-zarr"` keyword
argument when calling `open_dataset()` or `open_datatree()`:

```python
import xarray as xr

dataset = xr.open_dataset(url_or_path_to_product, engine="eopf-zarr")
dataset = xr.open_dataset(url_or_path, engine="eopf-zarr")
```