# 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.

A default `request_credit_limit` exists, which blocks users from making requests which will cost more than a given number of credits. If you ever hit that limit but want to make the query anyway (and override the limit), you can just set the `request_credit_limit` in the `JuaClient` to the desired value.

### Accessing Weather Models

```python
from jua import JuaClient
from jua.weather import Models

# Initialize the client
client = JuaClient()

# Initialize the client with a higher request_credit_limit
client = JuaClient(request_credit_limit=100)

# 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:

```python
# 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:

```python
# 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 capabilities:

```python
# Get a model
model = client.weather.get_model(Models.EPT2)

# Get a forecast (returns a JuaDataset)
forecast_data = model.get_forecasts(...)

```

### Best Practices

1. **Always use the Models enum** for type-safe access to weather models
2. **Access Weather through the client** - never create Weather instances directly


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.jua.ai/python-sdk/weather.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
