rubem.configuration.output_variables.OutputVariables

class OutputVariables(**data)[source]

Bases: BaseModel

Represents the output variables configuration.

Each variable flag enables its raster series; the time series of a variable is written when the variable and tss are both enabled.

Parameters:
  • itp (bool, optional) – Enable or disable Total Interception (ITP). Defaults to False.

  • bfw (bool, optional) – Enable or disable Baseflow (BFW). Defaults to False.

  • srn (bool, optional) – Enable or disable Surface Runoff (SRN). Defaults to False.

  • eta (bool, optional) – Enable or disable Actual Evapotranspiration (ETA). Defaults to False.

  • lfw (bool, optional) – Enable or disable Lateral Flow (LFW). Defaults to False.

  • rec (bool, optional) – Enable or disable Recharge (REC). Defaults to False.

  • smc (bool, optional) – Enable or disable Soil Moisture Content (SMC). Defaults to False.

  • rnf (bool, optional) – Enable or disable Total Runoff (RNF). Defaults to False.

  • arn (bool, optional) – Enable or disable Accumulated Total Runoff (ARN). Defaults to False.

  • tss (bool, optional) – Enable or disable Create time output time series (TSS). Defaults to False.

  • output_formats (OutputFileFormat, optional) – The output file formats. Defaults to OutputFileFormat.PCRASTER.

  • no_data_value (float, optional) – No-data value written to the GeoTIFF raster series. Defaults to -9999.

  • time_series_formats (TimeSeriesFileFormat, optional) – File formats of the time series at the sample locations. Defaults to CSV only (the legacy behaviour: the .tss files are converted and removed).

  • aggregation (str, optional) – Spatial aggregation of the time series: point (cells sharing a sample id), subcatchment or zones. Defaults to point.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Methods

all_enabled

Returns True if all output variables are enabled, otherwise False.

any_enabled

Returns True if any output variable is enabled, otherwise False.

any_output_enabled

Returns True if any variable writes its raster series or its time series.

get_enabled_raster_series

Returns a list of enabled raster series.

get_enabled_time_series

Returns a list of enabled time series.

Attributes

file_formats

The output file formats (alias of output_formats).

variables

The nine output variables, in the documented order.

itp

bfw

srn

eta

lfw

rec

smc

rnf

arn

tss

output_formats

no_data_value

time_series_formats

aggregation

all_enabled()[source]

Returns True if all output variables are enabled, otherwise False.

Returns:

True if all output variables are enabled, otherwise False.

Return type:

bool

any_enabled()[source]

Returns True if any output variable is enabled, otherwise False.

Returns:

True if any output variable is enabled, otherwise False.

Return type:

bool

any_output_enabled()[source]

Returns True if any variable writes its raster series or its time series.

Unlike any_enabled(), this also counts a variable enabled only as a time series (a format 1.0 configuration may select time series without their raster series): a run producing time series only is not producing “no output”.

Return type:

bool

property file_formats: OutputFileFormat

The output file formats (alias of output_formats).

get_enabled_raster_series()[source]

Returns a list of enabled raster series.

Returns:

A list of enabled raster series.

Return type:

list[OutputVariable]

get_enabled_time_series()[source]

Returns a list of enabled time series.

Returns:

A list of enabled time series.

Return type:

list[OutputVariable]

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

property variables: tuple[OutputVariable, ...]

The nine output variables, in the documented order.