Create a time series
create_time_seriesCreates rain gauge, hydrograph, or tide/stage time series in a Hydrata project for flood simulation, validating timestamps, units, and row shape before submission.
Instructions
Create a time series (rain gauge, hydrograph, tide/stage) in a project.
ASK FIRST: before you write any input, ask the person which approach they want (rain-on-grid, or an inflow hydrograph at a place they name), whether by 'hydrograph' they mean an inflow that drives the model or the flow they want out of the results, and for their design rainfall and losses; do not choose or source these yourself unless they ask you to.
POSTs /projects//time-series/ with series_type and units as
top-level fields. series_type is checked against the four choices and
data against the {"rowData": [{timestamp, value}, ...]} shape before any
request is made — the API answers 500 (not 400) to a malformed row.
Returns a compact record — id, name, series_type, units, timezone,
row_count, http_status — not the echoed rows; fetch the full row with the
REST API (GET /projects//time-series//) if you need to round-trip it.
A rainfall polygon references its gauge by the series NAME, so create the
gauges with the exact names the rainfall GeoJSON's features carry.
The units must match the series_type (see units), and a hydrograph or
hyetograph must END at 0 unless hold_last_value is true. The result
carries Hydrata's own summary of the series (peak, volume or depth,
first and last stamp, trailing value): repeat those numbers to the user
(say_to_user does) rather than computing your own.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_id": "<project_id>",
"name": "<name>",
"data": "<data>"
},
"name": "create_time_series"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The rows: {"rowData": [{"timestamp": "1998-08-17T00:00:00", "value": 1.5}, ...]}. Timestamps ISO 8601, values numeric. Validated here before anything is sent. Time zones: a stamp with no offset is a wall clock in the series timezone; a stamp with Z or +hh:mm is that instant, stored in UTC and shown in the series timezone; one series never mixes the two (Hydrata refuses it with MIXED_TIMESTAMP_FORMS). How the simulation reads the rows: for rainfall and flow, each value holds from its timestamp until the next row's (a step: no straight line between rows), so send ONE row per interval, at its START (e.g. every 5 minutes), and end with a 0 row at the end of the last interval; never add a row just before the next one, it changes nothing. Rainfall values are rates (mm/hr): the depth of an interval is rate x its length. Use whole-second timestamps. A stage series is the exception: the level goes in a straight line between rows. | |
| name | Yes | Series name, kept VERBATIM — a rainfall polygon binds to its gauge by this exact name (its `data` property), so use the name the GeoJSON features carry | |
| units | No | Units of the values. REQUIRED for hyetograph ('mm/hr' or 'mm/h'), hydrograph ('m3/s', 'm^3/s' or 'cumec') and stage ('m'): the engine reads those units whatever the label says, so a mismatch is refused before anything is sent. Free for generic. | |
| method | No | One short phrase saying how you got these numbers (e.g. 'read off the council hydrograph PDF', 'scaled the 1% AEP peak'). Shown to the person who reviews the inputs. | |
| source | No | Where the data came from, e.g. a gauge id or agency (optional) | |
| sources | No | The documents this came from, so the engineer can click through to them: a list of {title, url, locator}, e.g. [{title: 'GHD 2015 Sullivans Creek Flood Study', url: 'https://...', locator: 'Table 5-2'}]. Limits: title (1-200 characters) and url (http or https, at most 2000 characters) are required; locator (a page or table, e.g. 'p. 42' or 'Table 5-2') is optional, at most 100 characters. At most 20 entries. Pass it beside the method whenever you cite a document. | |
| timezone | No | IANA timezone of the series, e.g. 'UTC', 'Europe/London' or 'America/Chicago': the zone its stamps with no offset are read in and its summary is shown in. Omit it to use the project's zone (Hydrata derives it from where the project is; UTC for a project with no location); the result reports the zone saved. Time zones: a stamp with no offset is a wall clock in the series timezone; a stamp with Z or +hh:mm is that instant, stored in UTC and shown in the series timezone; one series never mixes the two (Hydrata refuses it with MIXED_TIMESTAMP_FORMS). | |
| project_id | Yes | The project ID | |
| description | No | Free-text description (optional) | |
| series_type | No | One of hyetograph (rainfall depth/intensity — the default), hydrograph (flow that DRIVES an inflow boundary: an input, not a result; the flow out of a run comes from get_flow_hydrograph), stage (water level, e.g. a tide) or generic. Sent as a top-level field. | hyetograph |
| location_name | No | Human-readable location of the gauge (optional) | |
| rainfall_basis | No | REQUIRED for a hyetograph (rainfall): `excess` = rain AFTER losses (what you write; the simulation applies no losses) or `gross` = rain before losses (a design storm). Ignored for other series types. | |
| hold_last_value | No | Set true ONLY when you mean the last value not to be 0. How the simulation reads the last row: a rainfall's last row rains for one more interval (as long as the step before it) and then stops at 0; an inflow's last value is held to the end of the run. A hydrograph or hyetograph whose last value is not 0 is refused (TRAILING_VALUE_HELD) unless this is true: end the series with a 0 row instead, unless holding is really intended. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||