Skip to content

Computing nodal correction - possible bug ? #142

@simonweppe

Description

@simonweppe

Hi team,

Just came across a potential bug when trying to compute nodal correction.

In tides.py there are some MAJOR and MINOR cons declared at the beginning and combined into ALL_CONSTITUENTS

This is later checked in get_nodal_correction (https://github.com/schism-dev/pyschism/blob/main/pyschism/forcing/bctides/tides.py#L275). If a cons is not in ALL_CONSTITUENTS (e.g. "L2"), this returns self._nodal_factors[constituent], which seems is not initialized. So it fails, although the correction information is indeed available further below https://github.com/schism-dev/pyschism/blob/main/pyschism/forcing/bctides/tides.py#L351

The function 'add_constituents' that should initialize self._nodal_factors is never called it seems.

Keen to hear your thoughts.
Best
Simon

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions