Utility Functions#

Helper functions for working with tidal constituent names and identifiers.

pyfes.known_constituents() list[str]#

Return a list of all known constituent names.

pyfes.parse_constituent(name: str) int#

Parse a constituent name into its corresponding identifier.

pyfes.generate_markdown_table(settings: pyfes.core.Settings, ascending: bool = True, modeled_constituents: collections.abc.Sequence[str] = []) str#

Generate a Markdown table describing the settings, the constituents provided by the model and inferred.

Parameters:
  • settings – The settings for which to generate the table.

  • ascending – If true (default), sort the table by ascending frequency; otherwise, sort by descending frequency.

  • modeled_constituents – The list of constituent names provided by the model. Default is empty, in which case the table will only contain the inferred constituents.

Returns:

A string containing the Markdown table.