Weather
Weather
The Weather
class is your gateway to Jua's weather forecasting capabilities, providing access to all available weather models and their data services.
Overview
The Weather
class serves as the central hub for accessing Jua's weather models. Each model provides access to:
Weather forecast data (future predictions)
Weather hindcast data (historical records)
This class is not meant to be instantiated directly. Instead, you should always access it through the weather
property of a JuaClient
instance.
Accessing Weather Models
from jua import JuaClient
from jua.weather import Models
# Initialize the client
client = JuaClient()
# Access the Weather instance
weather = client.weather
# Get a specific model
ept2_model = weather.get_model(Models.EPT2)
Available Models
Jua provides several weather models with different characteristics (resolution, forecast range, etc.). You can access any model using the Models
enum:
# Get different models
ept2 = client.weather.get_model(Models.EPT2)
ept15 = client.weather.get_model(Models.EPT1_5)
Note: Some models are only available in premium subscriptions.
Dictionary-Style Access
For convenience, you can also use dictionary-style syntax to access models:
# These are equivalent
ept2 = client.weather.get_model(Models.EPT2)
ept2 = client.weather[Models.EPT2]
Working with Models
Once you have a model instance, you can access its forecast and hindcast capabilities:
# Get a model
model = client.weather.get_model(Models.EPT2)
# Get a forecast (returns a JuaDataset)
forecast_data = model.forecast.get_forecast()
# Get a hindcast (returns a JuaDataset)
hindcast_data = model.hindcast.get_hindcast(
# Selection
...
)
Best Practices
Always use the Models enum for type-safe access to weather models
Access Weather through the client - never create Weather instances directly
Last updated