|
1 | 1 | # xarray-esgf |
2 | 2 |
|
3 | | -[](https://img.shields.io/github/v/release/bopen/xarray-esgf) |
4 | | -[](https://github.com/bopen/xarray-esgf/actions/workflows/main.yml?query=branch%3Amain) |
5 | | -[](https://codecov.io/gh/bopen/xarray-esgf) |
6 | | -[](https://img.shields.io/github/commit-activity/m/bopen/xarray-esgf) |
7 | | -[](https://img.shields.io/github/license/bopen/xarray-esgf) |
8 | | - |
9 | 3 | Xarray backend for ESGF data |
10 | 4 |
|
11 | | -- **Github repository**: <https://github.com/bopen/xarray-esgf/> |
12 | | -- **Documentation** <https://bopen.github.io/xarray-esgf/> |
13 | | - |
14 | | -## Getting started with your project |
15 | | - |
16 | | -### 1. Create a New Repository |
17 | | - |
18 | | -First, create a repository on GitHub with the same name as this project, and then run the following commands: |
19 | | - |
20 | | -```bash |
21 | | -git init -b main |
22 | | -git add . |
23 | | -git commit -m "init commit" |
24 | | -git remote add origin git@github.com:bopen/xarray-esgf.git |
25 | | -git push -u origin main |
| 5 | +## Quick start |
| 6 | + |
| 7 | +```python |
| 8 | +import xarray as xr |
| 9 | + |
| 10 | +ESGPULL_PATH = # Set path to download data |
| 11 | + |
| 12 | +ds = xr.open_dataset( |
| 13 | + { |
| 14 | + "project": "CMIP6", |
| 15 | + "experiment_id": "ssp*", |
| 16 | + "source_id": "EC-Earth3-CC", |
| 17 | + "frequency": "mon", |
| 18 | + "variable_id": ["tas", "pr"], |
| 19 | + "variant_label": "r1i1p1f1", |
| 20 | + }, |
| 21 | + concat_dims="experiment_id", |
| 22 | + esgpull_path=ESGPULL_PATH, |
| 23 | + index_node="esgf.ceda.ac.uk", |
| 24 | + engine="esgf", |
| 25 | +) |
26 | 26 | ``` |
27 | | - |
28 | | -### 2. Set Up Your Development Environment |
29 | | - |
30 | | -Then, install the environment and the pre-commit hooks with |
31 | | - |
32 | | -```bash |
33 | | -make install |
34 | | -``` |
35 | | - |
36 | | -This will also generate your `uv.lock` file |
37 | | - |
38 | | -### 3. Run the pre-commit hooks |
39 | | - |
40 | | -Initially, the CI/CD pipeline might be failing due to formatting issues. To resolve those run: |
41 | | - |
42 | | -```bash |
43 | | -uv run pre-commit run -a |
44 | | -``` |
45 | | - |
46 | | -### 4. Commit the changes |
47 | | - |
48 | | -Lastly, commit the changes made by the two steps above to your repository. |
49 | | - |
50 | | -```bash |
51 | | -git add . |
52 | | -git commit -m 'Fix formatting issues' |
53 | | -git push origin main |
54 | | -``` |
55 | | - |
56 | | -You are now ready to start development on your project! |
57 | | -The CI/CD pipeline will be triggered when you open a pull request, merge to main, or when you create a new release. |
58 | | - |
59 | | -To finalize the set-up for publishing to PyPI, see [here](https://fpgmaas.github.io/cookiecutter-uv/features/publishing/#set-up-for-pypi). |
60 | | -For activating the automatic documentation with MkDocs, see [here](https://fpgmaas.github.io/cookiecutter-uv/features/mkdocs/#enabling-the-documentation-on-github). |
61 | | -To enable the code coverage reports, see [here](https://fpgmaas.github.io/cookiecutter-uv/features/codecov/). |
62 | | - |
63 | | -## Releasing a new version |
64 | | - |
65 | | - |
66 | | - |
67 | | ---- |
68 | | - |
69 | | -Repository initiated with [fpgmaas/cookiecutter-uv](https://github.com/fpgmaas/cookiecutter-uv). |
0 commit comments