ocmw.core.flowChar module

A preprocessor for extracting flow characterisaton information from a timeseries of tidal flow data extracted from either modelled or measured data at a specific height in the water column.

The timeseries data are generated by the ocmw extract tools.

preprocess_ts

Preprocess a timeseries of tidal data for a single location and specific depth in the water column.

tidal_flow_peak_directions

Determine peak flow directions based on a timeseries of flow magnitude and direction.

id_tidal_flow_peaks

Identify peak directions as ebb and flood.

get_flood_ebb_indices

Get the ebb/flood indices from a timeseries of flow direction at a specific depth.

flow_acceleration

Calculate the flow acceleration from a timeseries of velocity data exttracted at a specific depth.

streamwise_flow

Calculate the flood and ebb streamwise velocities from pre-processed data.

There are separate functions for calculating TEC power based on either the hub-height velocities, rotor-average velocities, or power-weighted rotor average velocites.

tec_power

Calculate the TEC power based on an a timeseries of representative hu-height velocity.

rotor_average_vel

Calculate the rotor averaged velocity.

pwra_vel

Calculate the power-weighted rotor avearge velocity.

chord_area

Calculate the area of a chord for a circle of radius R and a chord height h from the origin.

moving_average

Apply moving average to a series of data with a defined sample window width using convolution.

movmean

Apply moving mean to a series of data with a defined sample window width using running mean.

Preprocessor for extracting flow characterisaton information from a timeseries of tidal flow data.

ocmw.core.flowChar.moving_average(x, w)[source]

Apply moving average to a series of data with a defined sample window width using convolution.

ocmw.core.flowChar.movmean(v, n)[source]

Apply moving mean to a series of data with a defined sample window width using running mean.

ocmw.core.flowChar.chord_area(R, h)[source]

Calculate the area of a chord for a circle of radius R and a chord height h from the origin.

ocmw.core.flowChar.pwra_vel(z, v, zmin, zmax, nz=3)[source]

Calculate the power-weighted rotor avearge velocity.

ocmw.core.flowChar.rotor_average_vel(z, v, zmin, zmax, nz=3)[source]

Calculate the rotor averaged velocity.

ocmw.core.flowChar.tec_power(vel_rot, rdia, Cp=0.33, rho_sw=1025.0)[source]

Calculate the TEC power based on an a timeseries of representative hu-height velocity.

ocmw.core.flowChar.streamwise_flow(ppdata)[source]

Calculate the flood and ebb streamwise velocities from pre-processed data.

ocmw.core.flowChar.flow_acceleration(data)[source]

Calculate the flow acceleration from a timeseries of velocity data exttracted at a specific depth.

ocmw.core.flowChar.get_flood_ebb_indices(thta, pkDir, fld_id)[source]

Get the ebb/flood indices from a timeseries of flow direction at a specific depth.

ocmw.core.flowChar.id_tidal_flow_peaks(thta, elv, pkDir)[source]

Identify peak directions as ebb and flood.

ocmw.core.flowChar.tidal_flow_peak_directions(thta, magn)[source]

Determine peak flow directions based on a timeseries of flow magnitude and direction.

ocmw.core.flowChar.getFlowPercentage(magn, cutInSpeed, ratedSpeed, indices)[source]

Calculate percentage of time in flow speed ranges (below cut-in, operating, above rated)

ocmw.core.flowChar.preprocess_ts(tseries, tec=None, ndays=None, tstart=None)[source]

Preprocess a timeseries of tidal data for a single location and specific depth in the water column.