Forecast steps

[1]:
import earthkit.data
import earthkit.maps

data = earthkit.data.from_source("url", "https://get.ecmwf.int/repository/test-data/metview/gallery/fc_msl_wg_joachim.grib")
data.ls()
[1]:
centre shortName typeOfLevel level dataDate dataTime stepRange dataType number gridType
0 ecmf msl surface 0 20111215 0 0 fc 0 regular_ll
1 ecmf 10fg6 surface 0 20111215 0 0 fc 0 regular_ll
2 ecmf msl surface 0 20111215 0 6 fc 0 regular_ll
3 ecmf 10fg6 surface 0 20111215 0 0-6 fc 0 regular_ll
4 ecmf msl surface 0 20111215 0 12 fc 0 regular_ll
5 ecmf 10fg6 surface 0 20111215 0 6-12 fc 0 regular_ll
6 ecmf msl surface 0 20111215 0 18 fc 0 regular_ll
7 ecmf 10fg6 surface 0 20111215 0 12-18 fc 0 regular_ll
8 ecmf msl surface 0 20111215 0 24 fc 0 regular_ll
9 ecmf 10fg6 surface 0 20111215 0 18-24 fc 0 regular_ll
10 ecmf msl surface 0 20111215 0 30 fc 0 regular_ll
11 ecmf 10fg6 surface 0 20111215 0 24-30 fc 0 regular_ll
12 ecmf msl surface 0 20111215 0 36 fc 0 regular_ll
13 ecmf 10fg6 surface 0 20111215 0 30-36 fc 0 regular_ll
14 ecmf msl surface 0 20111215 0 42 fc 0 regular_ll
15 ecmf 10fg6 surface 0 20111215 0 36-42 fc 0 regular_ll
16 ecmf msl surface 0 20111215 0 48 fc 0 regular_ll
17 ecmf 10fg6 surface 0 20111215 0 42-48 fc 0 regular_ll
[2]:
import matplotlib.pyplot as plt

chart = earthkit.maps.Chart(domain=[-5, 23, 40, 58], rows=3, columns=4)

gust_style = earthkit.maps.Style(
    colors=["#85AAEE", "#208EFC", "#6CA632", "#FFB000", "#FF0000", "#7A11B1"],
    levels=[12, 15, 20, 25, 30, 35, 50],
    units="m s-1",
)

chart.add_subplot(row=0, column=3)
for i in range(8):
    chart.add_subplot(row=1+i//4, column=i%4)

chart.plot(data.sel(shortName="10fg6"), style=gust_style)
chart.plot(data.sel(shortName="msl"), units="hPa")

chart.land(color="lightgrey")
chart.coastlines()
chart.borders()

ax = plt.axes((0.05, 0.8, 0.65, 0.025))
chart.legend(ax=ax)

chart.subplot_titles("{time:%Y-%m-%d %H} UTC (+{lead_time}h)")
chart.title(
    "ECMWF HRES Run: {base_time:%Y-%m-%d %H} UTC\n{variable_name}",
    fontsize=15, horizontalalignment="left", x=0, y=0.96,
)

chart.show()
../../../_images/examples_gallery_gridded-data_forecast-steps_2_0.png