hydroflows.methods.fiat.fiat_update#

Method for updating a FIAT model with hazard maps.

class hydroflows.methods.fiat.fiat_update.FIATUpdateHazard(fiat_cfg: Path, event_set_yaml: Path, hazard_maps: Path | List[Path], output_dir: str, risk: bool = True, map_type: Literal['water_level', 'water_depth'] = 'water_level', **params)[source]#

Method for updating a FIAT model with hazard maps.

Either hazard_maps or single_hazard_map should be provided. If single_hazard_map is provided, risk analysis is disabled.

FIAT simulations are stored in {output_dir}/{sim_name}.

Parameters:
  • fiat_cfg (Path) – The file path to the FIAT configuration (toml) file.

  • event_set_yaml (Path) – The path to the event description file.

  • output_dir (str) – Output location of updated model

  • hazard_maps (Path or List[Path], optional) – The path to the hazard maps. It can be a list of paths, a single path containing a wildcard, or a single path to a single hazard map.

  • map_type (Literal["water_level", "water_depth"], optional) – The hazard data type

  • sim_name (str, optional) – The name of the simulation folder. If None, the stem of the event set file or the first hazard map is used.

  • **params – Additional parameters to pass to the FIATUpdateHazard instance. See fiat_update_hazard Params.

See also

fiat_update_hazard Input fiat_update_hazard Output fiat_update_hazard Params

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

Input parameters for the FIATUpdateHazard 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 event_set_yaml: Annotated[Path, AfterValidator(func=filedir_validator)] | None = None#

The path to the event description file, used to get the return periods of events hydroflows.methods.events.EventSet. Optional for a single hazard map.

field fiat_cfg: Path [Required]#

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

field hazard_maps: <lambda>, json_schema_input_type=PydanticUndefined)] [Required]#

List of paths to hazard maps the event description 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_update.Output[source]#

Output parameters for FIATUpdateHazard 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_hazard: Path [Required]#

“The path to the generated combined hazard file (NetCDF) containing all rps.

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

The path to the newly created settings 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_update.Params[source]#

Parameters for the FIATUpdateHazard method.

See also

hydromt_fiat.fiat.FiatModel

For more details on the setup_hazard method 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 copy_model: bool = False#

Create full copy of model or create rel paths in model config.

field map_type: Literal['water_level', 'water_depth'] = 'water_level'#

“The data type of each map specified in the data catalog. A single map type applies for all the elements.

field output_dir: Annotated[Path, AfterValidator(func=outputdirpath_validator)] [Required]#

Output location relative to the workflow root. The updated model will be stored in <output_dir>/<sim_name>.

field risk: bool = True#

“The parameter that defines if a risk analysis is required.

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.