OpenAgua includes a growing list of built-in variables available for use in functions. As of writing, these include the following:
An ordinal integer representing the current timestep (i.e., 1, 2, 3, ..., N).
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).
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 = date.year + (0 if date.month < start_date.month else 1)
start_date is the start date of the model. Speaking of start date...
This is a Pendulum date object representing (you guessed it!) the start date of the model.