> For the complete documentation index, see [llms.txt](https://docs.openagua.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openagua.org/how-to-use/waterlp/variables.md).

# Built-in variables

OpenAgua includes a growing list of built-in variables available for use in functions. As of writing, these include the following:

### `timestep`

An ordinal integer representing the current timestep (i.e., 1, 2, 3, ..., N).

### `date`

A the current timestep's date as a [Pendulum](https://pendulum.eustace.io) date object, which has numerous useful [attributes and properties](https://pendulum.eustace.io/docs/#attributes-and-properties) (e.g., `date.month`, etc.).

### `periodic_timestep`

An ordinal integer representing the timestep in the current water year. For example, a monthly time step model starting in October would have `periodic_timestep` of 1, 2, 3, ..., 12, with 1 in October and 12 the following September. A daily time step model would similarly range from 1 to 365 (or 366 if leap years are considered).

### `water_year`

The current water year, which is defined by the calendar year of the *last month* in the water year. If it helps, here is the specific equation for `water_year`:

```python
water_year = date.year + (0 if date.month < start_date.month else 1)
```

where `start_date` is the start date of the model. Speaking of start date...

### `start_date`

This is a [Pendulum](https://pendulum.eustace.io) date object representing (you guessed it!) the start date of the model.

{% hint style="info" %}
This list is preliminary, and we would happily accommodate additional variable needs.
{% endhint %}


---

# 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 dynamically by asking a question.

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

```
GET https://docs.openagua.org/how-to-use/waterlp/variables.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.
