hydroflows.methods.sfincs.sfincs_run#

Method for running a SFINCS model.

class hydroflows.methods.sfincs.sfincs_run.SfincsRun(sfincs_inp: str, run_method: Literal['exe', 'docker', 'apptainer'] = 'exe', sfincs_exe: Path | None = None, **params)[source]#

Method for running a SFINCS model.

Parameters:
  • sfincs_inp (str) – Path to the SFINCS input file.

  • run_method (Literal["exe", "docker", "apptainer"], optional) – How to run the SFINCS model. The default is “exe”, which runs the Windows executable. If ‘docker’ or ‘apptainer’ is specified, the model is run in a Docker or Apptainer container.

  • sfincs_exe (Path, optional) – Path to the SFINCS Windows executable.

  • **params – Additional parameters to pass to the SfincsRun instance. See sfincs_run Params.

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

Input parameters.

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

The path to the SFINCS model configuration (inp) 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_run.Output[source]#

Output parameters.

This class represents the output data generated by the SfincsRun 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: Annotated[Path, AfterValidator(func=filedir_validator)] [Required]#

The path to the SFINCS sfincs_map.nc output 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_run.Params[source]#

Parameters.

Instances of this class are used in the SfincsRun 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 docker_tag: str = 'sfincs-v2.1.1-Dollerup-Release'#

The Docker tag to specify the version of the Docker image to use.

field run_method: Literal['exe', 'docker', 'apptainer'] = 'exe'#

How to run the SFINCS model. The default is “exe”, which runs the Windows executable. If ‘docker’ or ‘aptainer’ is specified, the model is run in a Docker or Apptainer container.

field sfincs_exe: Path | None = None#

The path to SFINCS executable.

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.