Skip to content

Commit 0c02e41

Browse files
authored
Merge pull request #261 from ecmwf/develop
update docs
2 parents 099523a + 290869b commit 0c02e41

File tree

6 files changed

+52
-53
lines changed

6 files changed

+52
-53
lines changed

docs/Service/Examples/timeseries_example.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
" \"feature\" : {\n",
4040
" \"type\" : \"timeseries\",\n",
4141
" \"points\": LOCATION,\n",
42-
" \"axis\": \"step\",\n",
42+
" \"axes\": \"step\",\n",
4343
" },\n",
4444
"}\n",
4545
"\n",

docs/Service/Features/boundingbox.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -48,36 +48,36 @@ For a bounding box, `type` must be `boundingbox`.
4848

4949
## Optional Fields
5050

51-
`axes` refers to the axes on which to generate the bounding box. As stated above the minimum default `axes` contains `lat` and `lon` meaning if `axes` is not included these values must be provided per point. By default the level is taken from the main body of the request.
51+
`axes` refers to the axes on which to generate the bounding box. As stated above the minimum default `axes` contains `latitude` and `longitude` meaning if `axes` is not included these values must be provided per point. By default the level is taken from the main body of the request.
5252

5353
However `axes` can also be provided by the user and with a value for level. Such as here:
5454

5555
```python
56-
"axes" : ["lat", "long", "level"]
56+
"axes" : ["latitude", "longitude", "levelist"]
5757
```
5858

59-
In this case the user must provide a `lat`, `lon` and `level`. `level` should not be included in the main body of the request in this case. An example can be seen here:
59+
In this case the user must provide a `latitude`, `longitude` and `levelist`. `levelist` should not be included in the main body of the request in this case. An example can be seen here:
6060

6161

6262
```python
6363
request = {
64-
"class" : "od",
64+
"class": "od",
6565
"stream" : "enfo",
6666
"type" : "pf",
6767
"date" : -1,
6868
"time" : "0000",
69+
"levtype" : "pl",
6970
"expver" : "0001",
7071
"domain" : "g",
71-
"param" : "164/167/169",
72-
"levtype" : "pl",
72+
"param" : "203/133",
7373
"number" : "1",
7474
"step" : "0",
7575
"feature" : {
7676
"type" : "boundingbox",
77-
"points" : [[-1, -1, 1000], [1, 1, 500]],
78-
"axes" : ["lat", "lon", "level"],
77+
"points" : [[-0.1, -0.1, 500], [0.1, 0.1, 1000]],
78+
"axes" : ["latitude", "longitude", "levelist"]
7979
},
80-
"format" : "covjson",
80+
"format" : "covjson"
8181
}
8282
```
8383

docs/Service/Features/trajectory.md

+21-21
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,29 @@ An example trajectory requested via earthkit-data:
88
import earthkit.data
99

1010
request = {
11-
"class" : "od",
11+
"class": "od",
1212
"stream" : "enfo",
1313
"type" : "pf",
14-
"date" : -1, # Note: date must be within the last two days
14+
"date" : -1,
1515
"time" : "0000",
16+
"levtype" : "sfc",
1617
"expver" : "0001",
1718
"domain" : "g",
18-
"param" : "164/167/169",
19-
"levtype" : "pl",
19+
"param" : "164/166/167/169",
2020
"number" : "1",
21+
"step": "0",
2122
"feature" : {
2223
"type" : "trajectory",
23-
"points" : [[-1, -1, 1000, 0], [0, 0, 1000, 12], [1, 1, 250, 24]],
24+
"points" : [[-0.1, -0.1], [0, 0], [0.1, 0.1]],
2425
"radius" : 0.1,
26+
"axes" :["latitude", "longitude"],
2527
},
26-
"format" : "covjson",
2728
}
2829

2930
ds = earthkit.data.from_source("polytope", "ecmwf-mars", request, stream=False, address='polytope.ecmwf.int')
3031
```
3132

32-
This request will return a trajectory from yesterday's midnight forecast for the three requested parameters for the points:
33-
34-
* `lat: -1, lon: -1, pressure level: 1000, step: 0`
35-
* `lat: 0, lon: 0, pressure level: 1000, step: 12`
36-
* `lat: 1, lon: 1, pressure level: 250, step: 24`
33+
This request will return a trajectory from yesterday's midnight forecast for the three requested parameters for the points along the path gives with a radius of 0.1.
3734

3835
The `trajectory` `feature` also contains another field called `radius`. This is the radius of the circle swept around the trajectory where points within this radius are returned to the user.
3936

@@ -49,35 +46,37 @@ For a trajectory two fields are required within the `feature` dictionary
4946

5047
For a trajectory `type` must be `trajectory`.
5148

52-
The values in `points` can change depending on the `axes`. The default for `axes` is:
49+
The values in `points` can change depending on the `axes`. `axes` can contain the following values:
5350

5451
```python
55-
"axes" : ["lat", "lon", "level", "step"]
52+
"axes" : ["latitude", "longitude", "levelist", "step"]
5653
```
5754

58-
In this default case, a nested list of at least two points with values for `lat`, `lon`, `level`, and `step` must be provided.
55+
In this default case, a nested list of at least two points with values for `latitude` and `longitude` must be provided.
5956

6057
Another required field that is within the `feature` dictionary is `radius`. This refers to the radius of the circle swept around the trajectory along which points will be included.
6158

6259

6360
## Optional Fields
6461

65-
`axes` refers to the axes on which to generate the trajectory. As stated above the minimum default `axes` contains `lat`, `lon`, `level`, and `step` meaning if `axes` is not included these values must be provided per point.
62+
`axes` refers to the axes on which to generate the trajectory. As stated above the minimum default `axes` contains `latitude`, `longitude` meaning if `axes` is not included these values must be provided per point.
6663

67-
However `axes` can also be provided by the user and with less values. The minimum values of `axes` are:
64+
However `axes` can also be provided by the user and with more values:
6865

6966
```python
70-
"axes" : ["lat", "lon"]
67+
"axes" : ["latitude", "longitude", "levelist", "step"]
7168
```
7269

73-
In this case only `lat` and `lon` must be provided in the requested points but a level and time axis must be provided in the main body of the request. These values will be propagated for each set of `lat`, `lon` points. For example in the following request:
70+
In this case a point must contain a value for each axis.
71+
<!---
72+
In this case only `latitude` and `longitude` must be provided in the requested points but a level and time axis must be provided in the main body of the request. These values will be propagated for each set of `latitude`, `longitude` points. For example in the following request:
7473
7574
```python
7675
request = {
7776
"class" : "od",
7877
"stream" : "enfo",
7978
"type" : "pf",
80-
"date" : yesterday,
79+
"date" : -1,
8180
"time" : "0000",
8281
"expver" : "0001",
8382
"domain" : "g",
@@ -89,7 +88,7 @@ request = {
8988
"feature" : {
9089
"type" : "trajectory",
9190
"points" : [[-1, -1], [0, 0], [-1, -1]],
92-
"axes" : ['lat', 'lon']
91+
"axes" : ['latitude', 'longitude']
9392
},
9493
}
9594
```
@@ -105,4 +104,5 @@ The following points would be returned:
105104
106105
The user does not have to give `step` as the time axis. In the case of a climate dataset `datetime` can also be used.
107106
108-
Combinations such as `"axis" : ['lat', 'step']` will return an error if `step` is included as an `axis` and also in the main body of the request. An error that the request is overspecified will also be thrown.
107+
Combinations such as `"axis" : ['lat', 'step']` will return an error if `step` is included as an `axis` and also in the main body of the request. An error that the request is overspecified will also be thrown.
108+
-->

docs/Service/Features/vertical_profile.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ request = {
1616
"levtype" : "pl",
1717
"expver" : "0001",
1818
"domain" : "g",
19-
"param" : "164/167/169",
20-
"number" : "1/to/50",
19+
"param" : "203/133",
20+
"number" : "1",
2121
"step" : "0",
2222
"feature" : {
2323
"type" : "verticalprofile",
@@ -84,18 +84,18 @@ request = {
8484
"type" : "pf",
8585
"date" : -1,
8686
"time" : "0000",
87-
"levtype" : "sfc",
87+
"levtype" : "pl",
8888
"expver" : "0001",
8989
"domain" : "g",
90-
"param" : "164/167/169",
91-
"number" : "1/to/50",
90+
"param" : "203/133",
91+
"number" : "1",
92+
"step" : "0",
9293
"levelist" : "0/to/1000",
9394
"feature" : {
94-
"type" : "timeseries",
95-
"points": [[-9.10, 38.78]],
96-
"axes": "levelist",
95+
"type" : "verticalprofile",
96+
"points": [[38.9, -9.1]],
97+
"axes" : "levelist",
9798
},
98-
"format": "covjson",
9999
}
100100
```
101101

docs/Service/Installation.md

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ To use covjson functionality also run:
99

1010
python3 -m pip install earthkit-data[covjsonkit]
1111

12+
To use any of the visualisations, also install earthkit-plots:
13+
14+
python3 -m pip install earthkit-plots
15+
1216
Installing like this gives you a **minimal** package which can talk to Polytope. If you want to use more data types or remote services you need to install other optional features of earthkit-data, or just install all of them:
1317

1418
python3 -m pip install earthkit-data[all]

docs/Service/Quick_Start.md

+8-13
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,16 @@ ds.to_xarray()
5151
The following visualisation does not use the latest version of earthkit-plots. To replicate it you need to install the https://github.com/ecmwf/earthkit-plots/tree/feature/ams-meteograms branch
5252

5353
```python
54-
import ipywidgets as widgets
55-
import earthkit.plots
56-
import earthkit.data
57-
58-
TIME_FREQUENCY = "6H"
54+
from earthkit.plots.interactive import Chart
5955

60-
def f():
61-
data = ds
62-
chart = earthkit.plots.Chart()
63-
chart.box(data, time_frequency=TIME_FREQUENCY)
64-
chart.line(data, time_frequency=TIME_FREQUENCY, aggregation="mean", line_color="purple")
65-
chart.show()
56+
TIME_FREQUENCY = "6h"
57+
QUANTILES = [0, 0.1, 0.25, 0.5, 0.75, 0.9, 1]
6658

67-
out = widgets.interactive_output(f, {})
68-
display(out)
59+
chart = Chart()
60+
chart.title(f"ECMWF ensemble meteogram")
61+
chart.box(ds, time_frequency=TIME_FREQUENCY, quantiles=QUANTILES)
62+
chart.line(ds,aggregation='mean', line_color='grey', time_frequency=TIME_FREQUENCY)
63+
chart.show(renderer="png") # Replace with chart.show() in an interactive session!
6964
```
7065

7166
<div style="text-align:center">

0 commit comments

Comments
 (0)