CurrentPredictor

CurrentPredictor(self, constituent_repo, alpha=1.0 / 7)

Predict tidal currents.

Parameters

Name Type Description Default
constituent_repo ConstituentRepository Current constituent repository. required
alpha float Current profile power exponent. 1.0 / 7

Methods

Name Description
predict_depth_averaged Predict tide levels or currents using utide.
predict_profile Predict current profiles.

predict_depth_averaged

CurrentPredictor.predict_depth_averaged(
    lon,
    lat,
    start,
    end,
    interval=timedelta(hours=1),
)

Predict tide levels or currents using utide.

Parameters

Name Type Description Default
lon float The longitude. required
lat float The latitude. required
start datetime The start date. required
end datetime The end date. required
interval timedelta The interval between predictions. timedelta(hours=1)

Returns

Name Type Description
pl.DataFrame The predicted tide levels or currents.

Notes

The workhorse of this functions the reconstruct function from UTide

predict_profile

CurrentPredictor.predict_profile(
    lon,
    lat,
    start,
    end,
    interval=timedelta(hours=1),
    levels=None,
)

Predict current profiles.