-
Notifications
You must be signed in to change notification settings - Fork 28
Description
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