hydroflows.methods.coastal.coastal_tidal_analysis#

Derive tide and surge from waterlevel timeseries based on a tidal analysis.

class hydroflows.methods.coastal.coastal_tidal_analysis.CoastalTidalAnalysis(waterlevel_nc: Path, data_root: Path = PosixPath('data/input'), **params)[source]#

Derive tide and surge from waterlevel timeseries based on a tidal analysis.

Implements hatyan package to do tidal analysis. Uses 94 tidal constituents to estimate tidal signal.

Parameters:
  • waterlevel_timeseries (Path) – Path to waterlevel timeseries to derive tide and surge from.

  • data_root (Path, optional) – Folder root where output is stored, by default “data/input/forcing/waterlevel”

pydantic model hydroflows.methods.coastal.coastal_tidal_analysis.Input[source]#

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

Path to water level time series in NetCDF format whici is used to derive tide and surge.

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

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

Path to output surge timeseries.

field tide_timeseries: Path [Required]#

Path to output tide timeseries.

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

Params for the CoastalTidalAnalysis 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 data_root: Annotated[Path, AfterValidator(func=outputdirpath_validator)] = PosixPath('data/input')#
field plot_fig: bool = True#

Make tidal component and timeseries plots. Note: the timeseries difference plot is -1*surge timeseries

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.