You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Global High Frequency Forecasts at 0.4° resolution
Code Example :
Hourly Variables
fromopenmeteopyimportOpenMeteofromopenmeteopy.optionsimportEcmwfOptionsfromopenmeteopy.hourlyimportHourlyEcmwffromopenmeteopy.utils.constantsimport*# Latitude, Longitude longitude=33.89latitude=-6.31hourly=HourlyEcmwf()
# Here we want to see the data of past days too,notice how the timezone parameter is non existent for these api optionsoptions=EcmwfOptions(latitude,
longitude,
past_days=2)
mgr=OpenMeteo(options, hourly.all())
# Download data in json formatmeteo=mgr.get_json_str()
print(meteo)
Options :
Parameter
Format
Required
Default
latitude, longitude
Floating point
Yes
current_weather
Bool
No
false
temperature_unit
String
No
celsius
windspeed_unit
String
No
kmh
precipitation_unit
String
No
kmh
timeformat
String
No
iso8601
timezone
String
No
UTC
past_days
Integer (0-2)
No
0
start_end
Boolean
No
False
start_date,end_date
String (yyyy-mm-dd)
No
-
cell_selection
String
No
nearest
Hourly Parameter Definition :
Variable
Valid time
Unit
temperature_2m
Instant
°C (°F)
pressure_msl,surface_air_pressure
Instant
hPa
cloudcover
Instant
%
cloudcover_low
Instant
%
cloudcover_mid
Instant
%
cloudcover_high
Instant
%
windspeed_10m
Instant
km/h (mph, m/s, knots)
winddirection_10m
Instant
°
precipitation
Preceding hour sum
mm (inch)
weathercode
Instant
WMO code
cape
Instant
J/kg
snowfall
Preceding hour sum
cm (inch)
all
-
-
Pressure Level Variables
Pressure level variables do not have fixed altitudes. Altitude varies with atmospheric pressure. 1000 hPa is roughly between 60 and 160 meters above sea level. Estimated altitudes are given below. Altitudes are in meters above sea level (not above ground). For precise altitudes, geopotential_height can be used.
to call a pressure level method all you have to do is put the variable for example ; temperature then an underscore _ and the equivalent pressure level for example : 1015hpa
for this example the method is temperature_1015hpa()