> For the complete documentation index, see [llms.txt](https://docs.jua.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jua.ai/python-sdk/weather.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
