hydroflows.methods.fiat.fiat_build#

Build a FIAT model from scratch using hydromt_fiat.

class hydroflows.methods.fiat.fiat_build.FIATBuild(region: ~pathlib.Path, config: ~pathlib.Path, catalog_path: ~pathlib.Path | None = None, predefined_catalogs: ~typing.Annotated[list[str], ~pydantic.functional_validators.BeforeValidator(func=~hydroflows._typing.<lambda>, json_schema_input_type=PydanticUndefined)] | None = None, fiat_root: ~pathlib.Path = 'models/fiat', ground_elevation: ~pathlib.Path | None = None, **params)[source]#

Build a FIAT model from scratch using hydromt_fiat.

Parameters:
  • region (Path) – The file path to the geometry file that defines the region of interest for constructing a FIAT model.

  • config (Path) – The path to the configuration file (.yml) that defines the settings to build a FIAT model. In this file the different model components that are required by the hydromt_fiat.fiat.FiatModel are listed.

  • catalog_path (Optional[Path], optional) – The path to the data catalog file (.yml) that contains the data sources specified in the config file. If None (default), a predefined data catalog should be provided.

  • predefined_catalogs (Optional[ListOfStr], optional) – A list containing the predefined data catalog names.

  • fiat_root (Path) – The path to the root directory where the FIAT model will be created, by default “models/fiat”.

  • ground_elevation (Optional[Path], optional) – Path to the DEM file with to set ground elevation data, by default None.

  • **params – Additional parameters to pass to the FIATBuild instance. See fiat_build Params.

See also

fiat_build Input fiat_build Output fiat_build Params hydromt_fiat.fiat.FIATModel

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

Input parameters.

This class represents the input data required for the FIATBuild 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 catalog_path: Annotated[Path, AfterValidator(func=filedir_validator)] | None = None#

The file path to the data catalog. This is a file in yml format, which should contain the data sources specified in the config file.

field config: Path = PosixPath('/home/runner/work/HydroFlows/HydroFlows/hydroflows/cfg/fiat_build.yml')#

The path to the configuration file (.yml) that defines the settings to build a FIAT model. In this file the different model components that are required by the hydromt_fiat.fiat.FiatModel are listed. Every component defines the setting for each hydromt_fiat setup methods. For more information see hydromt_fiat method documentation.

field ground_elevation: Path | None = None#

Path to the DEM file with to set ground elevation data.

field region: Path [Required]#

The file path to the geometry file that defines the region of interest for constructing a FIAT model.

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_build.Output[source]#

Output parameters.

This class represents the output data generated by the FIATBuild 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.

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

The file path to the FIAT spatial joins configuration (toml) file.

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_build.Params[source]#

Parameters for the FIATBuild.

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

See also

hydromt_fiat.fiat.FiatModel

For more details on the FiatModel used in hydromt_fiat.

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_root: Path [Required]#

The path to the root directory where the FIAT model will be created.

field predefined_catalogs: <lambda>, json_schema_input_type=PydanticUndefined)] | None = None#

List of predefined data catalogs containing the data sources specified in the config file.

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.