Closed SorooshMani-NOAA closed 11 months ago
@SorooshMani-NOAA Thanks for reviewing the code. I'll modify the code accordingly.
@cuill no problem! Can you please also release a new version on PyPI either before or after this update? Thanks!
@SorooshMani-NOAA Sure. Will release a new version after updating this.
Since you merged the updates related to this I'm closing this one.
In the new API for BCTides, the input for
constituents
is taken (and set toTides
) in the__init__
ofBctides
class. https://github.com/schism-dev/pyschism/blob/f5fa0c26b518632414e033fe3d78d46bb75d891d/pyschism/forcing/bctides/bctides.py#L11-L21 https://github.com/schism-dev/pyschism/blob/f5fa0c26b518632414e033fe3d78d46bb75d891d/pyschism/forcing/bctides/bctides.py#L54However the
write
method again gets the value ofconstituents
and sets it to theself.constituents
which seems to be unused: https://github.com/schism-dev/pyschism/blob/f5fa0c26b518632414e033fe3d78d46bb75d891d/pyschism/forcing/bctides/bctides.py#L231-L236 https://github.com/schism-dev/pyschism/blob/f5fa0c26b518632414e033fe3d78d46bb75d891d/pyschism/forcing/bctides/bctides.py#L259-L262I think the
constituents
argument forwrite
method needs to be removed as it is misleading and unused as the constituents are already accounted for in theTides
object creation and active ones are taken from there: https://github.com/schism-dev/pyschism/blob/f5fa0c26b518632414e033fe3d78d46bb75d891d/pyschism/forcing/bctides/bctides.py#L276-L282 .https://github.com/schism-dev/pyschism/blob/f5fa0c26b518632414e033fe3d78d46bb75d891d/pyschism/forcing/bctides/bctides.py#L74 https://github.com/schism-dev/pyschism/blob/f5fa0c26b518632414e033fe3d78d46bb75d891d/pyschism/forcing/bctides/bctides.py#L92 https://github.com/schism-dev/pyschism/blob/f5fa0c26b518632414e033fe3d78d46bb75d891d/pyschism/forcing/bctides/bctides.py#L159