hydroflows.methods.fiat.fiat_run#

Method for running a FIAT model.

pydantic model hydroflows.methods.fiat.fiat_run.Input[source]#

Input parameters.

This class represents the input data required for the FIATRun method.

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.

Fields:
field fiat_cfg: Annotated[Path, AfterValidator(func=filedir_validator)] [Required]#

The file path to the FIAT configuration (toml) file from the FIAT model that needs to be run.

model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

pydantic model hydroflows.methods.fiat.fiat_run.Output[source]#

Output parameters.

This class represents the output data generated by the FIATRun method.

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.

Fields:
field fiat_out_csv: Path [Required]#

The resulting csv file from the fiat calculations.

field fiat_out_gpkg: Annotated[Path, AfterValidator(func=filedir_validator)] [Required]#

The resulting spatial file from the fiat calculations.

model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

pydantic model hydroflows.methods.fiat.fiat_run.Params[source]#

Parameters.

Instances of this class are used in the FIATRun method to define the required settings.

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.

Fields:
field fiat_exe: Path | None = None#

The path to the FIAT executable.

field run_method: Literal['exe', 'python'] = 'exe'#

How to run the FIAT model. Options are ‘exe’ for running the executable directly (only on Windows), ‘python’ for running the model in a Python environment.

field threads: int = 1#

The number of the threads to be used.

model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

class hydroflows.methods.fiat.fiat_run.FIATRun(fiat_cfg: Path, run_method: Literal['exe', 'python'] = 'exe', fiat_exe: Path | None = None, **params)[source]#

Method for running a FIAT model.

Parameters:
  • fiat_cfg (Path) – Path to the FIAT config file.

  • run_method (Literal["exe", "python"]) – How to run the FIAT model. Options are ‘exe’ for running the executable directly (only on Windows), ‘python’ for running the model in a Python environment.

  • fiat_exe (Path) – Path to the FIAT executable

  • **params – Additional parameters to pass to the FIATRun instance. See fiat_run Params.