[1]:
!test -f tropical_cyclone.bufr || wget https://get.ecmwf.int/repository/test-data/pdbufr/test-data/tropical_cyclone.bufr
Generic: tropical cyclone track
[2]:
import pdbufr
The input BUFR data contains ensemble forecast of tropical cyclone tracks each message representing a storm. The messages consist of compressed subsets (one subset per ensemble member).
In this notebook we read this data with the generic reader, which is the default reader.
Example 1
Extracting the list of storm identifiers:
[3]:
df = pdbufr.read_bufr("tropical_cyclone.bufr",
columns=("stormIdentifier"))
df["stormIdentifier"].unique()
[3]:
array(['27W', '70E', '71W'], dtype=object)
Example 2
Getting a track with pressure for a given storm and ensemble member:
[4]:
df = pdbufr.read_bufr("tropical_cyclone.bufr",
columns=("stormIdentifier", "ensembleMemberNumber", "latitude", "longitude",
"pressureReducedToMeanSeaLevel"),
filters={"stormIdentifier": "70E", "ensembleMemberNumber": 1})
df.head()
[4]:
| stormIdentifier | ensembleMemberNumber | latitude | longitude | pressureReducedToMeanSeaLevel | |
|---|---|---|---|---|---|
| 0 | 70E | 1 | 11.3 | -126.0 | 100400.0 |
| 1 | 70E | 1 | 11.6 | -125.2 | 100400.0 |
| 2 | 70E | 1 | 11.3 | -125.8 | 100300.0 |
| 3 | 70E | 1 | NaN | NaN | NaN |
| 4 | 70E | 1 | 10.8 | -126.0 | 100200.0 |