hydroflows.methods.coastal.get_coast_rp#

Method for fetching and processing COAST-RP dataset for a given region.

class hydroflows.methods.coastal.get_coast_rp.GetCoastRP(region: Path, coastrp_catalog: Path, data_root: Path = PosixPath('data/input/forcing_data/waterlevel'), **params)[source]#

Method for fetching and processing COAST-RP dataset for a given region.

Parameters:
  • region (Path) – Path to region geometry file. Centroid is used to look for closest station to be consistent with GetGTSMData method.

  • coastrp_fn (Path) – Path to full COAST-RP dataset.

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

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

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

Path to full COAST-RP dataset.

field region: Path [Required]#

Path to region geometry 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.coastal.get_coast_rp.Output[source]#

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

Path to return period and values dataset.

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

Params parameters for the GetCoastRP 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 buffer: float = 2000#

Buffer around region to look for GTSM stations, [m]

field catalog_key: str = 'coast-rp'#

Data catalog key for COAST-RP data.

field data_root: Annotated[Path, AfterValidator(func=outputdirpath_validator)] = PosixPath('data/input/forcing_data/waterlevel')#

The folder root where output is stored.

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.