Skip to content
Open
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Unreleased

**Added**
- CDSE (Copernicus Data Space Ecosystem) as an alternative download source for Sentinel-1 SLC granules via `--download-source CDSE` CLI option or `download_source: CDSE` in config.
- New `_cdse.py` module with CDSE credential handling, OAuth2 token acquisition, OData catalog search, and download with retry logic (supports both compressed and natively compressed CDSE archives).
- Interactive CDSE credential setup in `_netrc.py` (via environment variables, `~/.netrc`, or interactive prompt).
- Sentinel-1C support in unzip glob patterns.

# [0.2.0](https://github.com/opera-adt/dolphin/compare/v0.2.0...v0.3.0) - 2023-08-23

Expand Down
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,37 @@ conda activate sweets-env
python -m pip install .
```

## Setup

You need a `~/.netrc` file with NASA Earthdata credentials to download data from ASF:

```
machine urs.earthdata.nasa.gov
login <username>
password <password>
```

Register at https://urs.earthdata.nasa.gov/users/new if you don't have an account.

### Optional: CDSE credentials

To download Sentinel-1 SLC granules from the [Copernicus Data Space Ecosystem (CDSE)](https://dataspace.copernicus.eu/) instead of ASF, you need CDSE credentials. These can be provided in one of two ways:

- Add an entry to your `~/.netrc` file:
```
machine dataspace.copernicus.eu
login <cdse-username>
password <cdse-password>
```
- Or set environment variables:
```bash
export CDSE_USERNAME=<cdse-username>
export CDSE_PASSWORD=<cdse-password>
```

A free CDSE account can be registered at [dataspace.copernicus.eu](https://dataspace.copernicus.eu/).


## Usage

From the command line, installing will create a `sweets` executable. You can run `sweets --help` to see the available options.
Expand All @@ -56,6 +87,19 @@ Then you can kick off the workflow using
sweets run sweets_config.yaml
```

### Using CDSE for Sentinel-1 Download

By default, Sentinel-1 SLC granules are downloaded from the [Alaska Satellite Facility (ASF)](https://asf.alaska.edu/). As an alternative, particularly suited for European users or those operating within the European cloud ecosystem, granules can be downloaded from [CDSE](https://dataspace.copernicus.eu/) by passing `--download-source CDSE`:

```bash
sweets config --bbox -102.2 32.15 -102.1 32.22 --start 2022-12-15 --end 2022-12-29 --track 78 --download-source CDSE
```

Or in a YAML config file, set:
```yaml
download_source: CDSE
```

### Configuration from Python

Alternatively, you can configure everything in python:
Expand All @@ -68,6 +112,16 @@ w = Workflow(bbox=bbox, asf_query=dict(start=start, end=end, relativeOrbit=track
w.run()
```

To use CDSE for downloads:
```python
w = Workflow(
bbox=bbox,
download_source="CDSE",
asf_query=dict(start=start, end=end, relativeOrbit=track),
)
w.run()
```

You can also save the workflow to a config file for later use/to inspect or change parameters:
```
w.to_yaml() # Saves to sweets_config.yml for inspection/tweaking
Expand Down
Loading