meteociel.soundings.sounding_obs
- meteociel.soundings.sounding_obs(date: datetime, city_name: str)
Get the data of the upper air sounding observation from the city name and date.
Parameters
- date
datetime The date for which data is to be extracted in the form of a datetime object.
Warning
The upper air souding from observations are only available at 00:00, 06:00, 12:00 and 18:00 (GMT).
- city_name
str The name of the requested city.
Returns
- out
tuple(str, pd.DataFrame) A tuple that contains two elements:
the name of the city
A DataFrame that contains all the variables from the sounding.
Exemples
>>> from datetime import datetime >>> from meteociel.soundings import sounding_obs >>> city_name, data = sounding_obs( ... datetime.strptime("2022-08-18 00", "%Y-%m-%d %H"), "Ajaccio" ... ) >>> city_name 'ajaccio' >>> data altitude pressure temperature ... dew_point wind_u wind_v 0 5.0 1006.0 25.1 ... 18.1 28.342661 19.845745 1 18.0 1004.0 25.0 ... 18.2 39.172546 23.537240 2 31.0 1003.0 24.9 ... 18.3 38.624733 22.300000 3 44.0 1002.0 25.2 ... 19.2 36.459669 21.050000 4 57.0 1000.0 25.9 ... 20.5 35.247174 19.537828 ... ... ... ... ... ... ... ... 2547 36313.0 5.0 -33.5 ... -71.4 -7.700029 -5.391619 2548 36453.0 5.0 -33.6 ... -71.5 -8.375461 -4.267511 2549 36602.0 5.0 -34.1 ... -71.8 -8.715528 -3.521302 2550 36758.0 5.0 -34.5 ... -72.1 -8.833111 -3.214989 2551 36908.0 5.0 -34.5 ... -72.1 -8.833111 -3.214989 >>> data["temperature"] 0 25.1 1 25.0 2 24.9 3 25.2 4 25.9 ... 2547 -33.5 2548 -33.6 2549 -34.1 2550 -34.5 2551 -34.5 Name: temperature, Length: 2552, dtype: float64
- date