|
1 | | -# Pipeline Version 2 |
| 1 | +# PyEarthTools Pipeline |
2 | 2 |
|
3 | | -A rework of the pipeline setup to improve parallelisation and overall usability. |
| 3 | +This is the pipeline sub-package which forms a part of the [PyEarthTools package](https://github.com/ACCESS-Community-Hub/PyEarthTools). |
4 | 4 |
|
5 | | -Integrated fully with `pyearthtools.data` to build pipelines of operations applied to data. |
6 | | - |
7 | | -## Examples |
8 | | - |
9 | | -A pipeline should be a sequence of steps, with optional branches. |
10 | | - |
11 | | -Here is an example pipeline, for use with PanguWeather. |
12 | | - |
13 | | -```python |
14 | | - |
15 | | -import pyearthtools.data |
16 | | -import pyearthtools.pipeline |
17 | | - |
18 | | - |
19 | | -data_preperation = pyearthtools.pipeline.Pipeline( |
20 | | - ( |
21 | | - pyearthtools.data.archive.ERA5(['msl', '10u', '10v', '2t']), |
22 | | - pyearthtools.data.archive.ERA5(['z', 'q', 't', 'u', 'v'], level_value = [50, 100, 150, 200, 250, 300, 400, 500, 600, 700, 850, 925, 1000]) |
23 | | - ), |
24 | | - pyearthtools.pipeline.operations.xarray.Merge(), |
25 | | - pyearthtools.pipeline.operations.xarray.Sort(['msl', '10u', '10v', '2t', 'z', 'q', 't', 'u', 'v']), |
26 | | - pyearthtools.pipeline.operations.Transforms( |
27 | | - apply = pyearthtools.data.transforms.coordinates.standard_longitude(type = '0-360') + pyearthtools.data.transforms.coordinates.ReIndex(level = 'reversed') |
28 | | - ), |
29 | | - pyearthtools.pipeline.operations.xarray.reshape.CoordinateFlatten('level'), |
30 | | - pyearthtools.pipeline.operations.xarray.conversion.ToNumpy(), |
31 | | - pyearthtools.pipeline.operations.numpy.reshape.Squish(1), |
32 | | -) |
33 | | -``` |
34 | | - |
35 | | -This pipeline can then be viewed as a graph |
36 | | - |
37 | | -```python |
38 | | -data_preperation.graph() |
39 | | -``` |
40 | | - |
41 | | - |
42 | | - |
43 | | -## Installation |
44 | | - |
45 | | -### Pypi |
46 | | - |
47 | | -```shell |
48 | | -pip install pyearthtools-pipeline |
49 | | -``` |
50 | | - |
51 | | -### On Gadi |
52 | | - |
53 | | -On gadi prebuilt modules exist |
54 | | - |
55 | | -```shell |
56 | | -module use /scratch/ra02/modules |
57 | | -module load pyearthtools |
58 | | -``` |
| 5 | +Documentation for this package is maintained at the [documentation site](https://pyearthtools.readthedocs.io/en/latest/). |
0 commit comments