hydroflows.methods.sfincs.sfincs_postprocess#

Postprocess SFINCS netcdf maximum water level (zsmax) output to a regular grid geotiff file.

class hydroflows.methods.sfincs.sfincs_postprocess.SfincsPostprocess(sfincs_map: Path, event_name: str | None = None, output_root: Path | None = None)[source]#

Postprocess SFINCS netcdf maximum water level (zsmax) output to a regular grid geotiff file.

output nc file is saved to {output_root}/zsmax_{event_name}.nc

Parameters:
  • sfincs_map (Path) – The path to the SFINCS model output sfincs_map.nc file.

  • event_name (str) – The name of the event, used to create the output filename.

  • output_root (Optional[Path], optional) – The output directory where the hazard output files are saved. By default the output is saved in the same directory as the input.

pydantic model hydroflows.methods.sfincs.sfincs_postprocess.Input[source]#

Input parameters for the SfincsPostprocess 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 sfincs_map: Path [Required]#

The path to the SFINCS model output sfincs_map.nc 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.sfincs.sfincs_postprocess.Output[source]#

Output parameters for the SfincsPostprocess 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 sfincs_zsmax: Path [Required]#

The path to the output zsmax netcdf 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.sfincs.sfincs_postprocess.Params[source]#

Parameters for the SfincsPostprocess 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_name: str [Required]#

The name of the event, used to create the output filename.

field output_root: Annotated[Path, AfterValidator(func=outputdirpath_validator)] | None = None#

The output directory where the hazard output files are saved.

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.