hydroflows.methods.sfincs.sfincs_update_forcing#

Method to update SFINCS forcing.

class hydroflows.methods.sfincs.sfincs_update_forcing.SfincsUpdateForcing(sfincs_inp: Path, event_yaml: Path, output_dir: str, event_name: str | None = None, **params)[source]#

Method for updating SFINCS forcing with event data.

SFINCS simulations are stored in {output_dir}/{event_name}.

Parameters:
  • sfincs_inp (Path) – The file path to the SFINCS basemodel configuration file (inp).

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

  • output_dir (str) – Output location of updated model

  • event_name (str, optional) – The name of the event, by default derived from the event_yaml file name stem.

  • **params – Additional parameters to pass to the SfincsUpdateForcing instance. See sfincs_update_forcing Params.

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

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

The path to the event description file, see also hydroflows.methods.events.Event.

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

The file path to the SFINCS basemodel configuration file (inp).

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

Output parameters for SfincsUpdateForcing 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_out_inp: Annotated[Path, AfterValidator(func=filedir_validator)] [Required]#

The path to the updated SFINCS configuration (inp) file per event.

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

Parameters for the SfincsUpdateForcing 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 copy_model: bool = False#

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

field event_name: str [Required]#

The name of the event

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>/<event_name>.

field sfincs_config: <lambda>, json_schema_input_type=PydanticUndefined)] = {}#

SFINCS simulation config settings to update sfincs_inp.

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.