Skip to content

Commit

Permalink
Merge branch 'main' into source
Browse files Browse the repository at this point in the history
  • Loading branch information
larsbuntemeyer committed Dec 9, 2024
2 parents c18e3b3 + fdb4369 commit b42eb5a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,25 @@ and install this code using:
```
pip install -e .
```

## Reading in data

evaltools contains some code to easily open and combine datasets, e.g.,

```python
from evaltools.source import get_source_collection, open_and_sort
from dask.distributed import Client

# see https://github.com/euro-cordex/evaltools/issues/5
client = Client(threads_per_worker=1)

catalog = get_source_collection(["tas", "pr"], "mon")
dsets = open_and_sort(catalog, merge=True)
list(dsets.keys())
```
will give a dictionary of combined datasets containing the `tas` and `pr` variables identified by their instance id, e.g.,
```
['CORDEX.EUR-12.CLMcom-Hereon.ERA5.evaluation.r1i1p1f1.ICON-CLM-202407-1-1.v1-r1.v20240920',
'CORDEX.EUR-12.GERICS.ERA5.evaluation.r1i1p1f1.REMO2020.v1.v20241120',
'CORDEX.EUR-12.HCLIMcom-SMHI.ERA5.evaluation.r1i1p1f1.HCLIM43-ALADIN.v1-r1.v20241205']
```

0 comments on commit b42eb5a

Please sign in to comment.