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
timestep
An ordinal integer representing the current timestep (i.e., 1, 2, 3, ..., N).
date
date
A the current timestep's date as a Pendulum date object, which has numerous useful attributes and properties (e.g., date.month
, etc.).
periodic_timestep
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
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
:
where start_date
is the start date of the model. Speaking of start date...
start_date
start_date
This is a Pendulum date object representing (you guessed it!) the start date of the model.
This list is preliminary, and we would happily accommodate additional variable needs.
Last updated