0.2.0
New features
- New
model_phases
function for calculating tidal phases ("low-flow", high-flow", "high-ebb", "low-ebb") for each tide height in a timeseries. Ebb and low phases are calculated by running theeo_tides.model.model_tides
function twice, once for the requested timesteps, and again after subtracting a small time offset (by default, 15 minutes). If tides increased over this period, they are assigned as "flow"; if they decreased, they are assigned as "ebb". Tides are considered "high" if equal or greater than 0 metres tide height, otherwise "low". - Major refactor to use consistent input parameters across all EO focused functions: input can now be either
xr.DataArray
orxr.Dataset
orodc.geo.geobox.GeoBox
; if an xarray object is passed, it must have a"time"
dimension; if GeoBox is passed, time must be provided by thetime
parameter. time
parameters now accept any format that can be converted bypandas.to_datetime()
; e.g. np.ndarray[datetime64], pd.DatetimeIndex, pd.Timestamp, datetime.datetime and strings (e.g. "2020-01-01 23:00").model_tides
now uses default cropping approach frompyTMD
, rather than applying a bespoke 1 degree buffer around the selected analysis areamodel_tides
refactored to use simpler approach to loading tide consistuents enabled inpyTMD==2.1.7
Breaking changes
- The
ds
param in all satellite data functions (tag_tides
,pixel_tides
,tide_stats
,pixel_tides
) has been renamed to a more generic namedata
(to account for now accepting eitherxarray.Dataset
,xarray.DataArray
or aodc.geo.geobox.GeoBox
inputs).
PRs
- Refactor inputs to streamline API across functions by @robbibt in #19
- Refactor time, rename phase func by @robbibt in #23
Full Changelog: 0.1.1...0.2.0