Skip to content

Rain gage

Source-generated reference for precipitation reads, API source selection, and overrides. See Runtime forcings for workflows.

RainGage

Rain-gage handle owned by one Simulation; source selection and temporary overrides are distinct persistent inputs.

Properties

id

readonly id: string;

Canonical configured rain-gage ID.

Methods

results()

results(): Promise<RainGageResults>;

Read current precipitation in running, complete, or ended.

Returns

Promise<RainGageResults>

Detached rainfall, snowfall, and total rates in in/h or mm/h.

totalPrecip()

totalPrecip(): Promise<number>;

Read total precipitation rate, not accumulated depth, in in/h or mm/h; requires running, complete, or ended.

Returns

Promise<number>

rainfall()

rainfall(): Promise<number>;

Read liquid rainfall rate in in/h or mm/h; requires running, complete, or ended.

Returns

Promise<number>

snowfall()

snowfall(): Promise<number>;

Read snowfall water-equivalent rate in in/h or mm/h; requires running, complete, or ended.

Returns

Promise<number>

externalPrecipitationRate()

externalPrecipitationRate(): Promise<number | null>;

Read the selected API source rate in a healthy owner state.

Returns

Promise<number | null>

Rate in in/h or mm/h, or null when the API is not the underlying source.

useExternalPrecipitation()

useExternalPrecipitation(rate: number): Promise<void>;

Select the API as the persistent precipitation source in open, running, or ended.

Parameters
Parameter Type Description
rate number Finite nonnegative rate in in/h or mm/h; zero selects a dry API source, not the original source.
Returns

Promise<void>

Resolves after source selection; the value persists until replaced.

setPrecipitation()

setPrecipitation(rate: number): Promise<void>;

Alias for selecting the persistent API precipitation source in open, running, or ended.

Parameters
Parameter Type Description
rate number Finite nonnegative rate in in/h or mm/h; this is not a temporary override.
Returns

Promise<void>

rainfallOverride()

rainfallOverride(): Promise<number | null>;

Read the temporary source override in a healthy owner state.

Returns

Promise<number | null>

Rate in in/h or mm/h, or null when no override is active.

setRainfallOverride()

setRainfallOverride(rate: number | null): Promise<void>;

Override the current source in open, running, or ended without changing source selection.

Parameters
Parameter Type Description
rate number | null Finite nonnegative rate in in/h or mm/h; null clears the override and resumes the selected underlying source.
Returns

Promise<void>

Resolves after the update; an override remains active until changed or cleared.


RainGageResults

Detached current rain-gage rates in in/h or mm/h, not accumulated depths.

Properties

Property Modifier Type Description
totalPrecip readonly number Total current precipitation rate.
rainfall readonly number Current rainfall rate.
snowfall readonly number Current snowfall rate.
externalPrecipitationRate readonly number | null Selected persistent API source rate, or null when not selected.
rainfallOverride readonly number | null Highest-priority rainfall override rate, or null when cleared.