Data Shortcuts (Properties)

DOLfYN datasets also contain shortcuts to other variables that can be obtained from simple operations of its data items. Certain shortcuts require variables calculated using the DOLfYN API.

Table 4 Notes on common properties found in DOLfYN data objects.

Name

units

Description/Notes

u

m/s

dat['vel'][0]

v

m/s

dat['vel'][1]

w

m/s

dat['vel'][2]

U

m/s

Horizontal velocity as a complex quantity (u + 1j * v)

U_mag

m/s

Magnitude of the horizontal velocity

U_dir

deg

Direction of the horizontal velocity (CCW from X, East, or streamwise direction, depending on coordinate system)

I

Turbulence Intensity: ratio of horizontal velocity standard deviation (U_std) to mean (‘U_mag’)

I_tke

TKE Intensity: Ratio of sqrt(2*tke) to horizontal velocity magnitude

tke

m2/s2

Turbulent kinetic energy (half the sum of the data in ‘tke_vec’)

E_coh

m2/s2

Coherent TKE (root-sum-square of Reynold’s stresses)

upup_

m2/s2

dat['tke_vec'].sel(tke="upup_")

vpvp_

m2/s2

dat['tke_vec'].sel(tke="vpvp_")

wpwp_

m2/s2

dat['tke_vec'].sel(tke="wpwp_")

upvp_

m2/s2

dat['stress_vec'].sel(tau="upvp_")

upwp_

m2/s2

dat['stress_vec'].sel(tau="upwp_")

vpwp_

m2/s2

dat['stress_vec'].sel(tau="vpwp_")

Important Note: The items listed in Table 4 are not stored in the dataset but are provided as attributes (shortcuts) to the dataset itself. They are accessed through the xarray accessor velds.

For example, to return the magnitude of the horizontal velocity:

>> import dolfyn
>> dat = dolfyn.read_example('AWAC_test01.wpr')

>> dat.velds.U_mag

<xarray.DataArray 'vel' (range: 20, time: 9997)>
array([[1.12594587, 0.82454599, 0.96503734, ..., 3.40359042, 3.34527587,
                3.44412805],
           [0.86688534, 1.05108722, 1.12899632, ..., 0.72053462, 6.47548786,
                0.49120468],
           [0.88066635, 0.97954744, 0.63123135, ..., 4.37153751, 2.77540426,
                1.81550287],
           ...,
           [1.00013206, 1.21381814, 1.14834231, ..., 5.89236205, 1.44082763,
                2.7157082 ],
           [0.7759962 , 0.89600228, 1.02900833, ..., 2.39949021, 2.18758737,
                4.41797285],
           [0.95729835, 1.15594339, 1.15038508, ..., 3.11517746, 3.79158362,
                2.66788512]])
Coordinates:
  * range    (range) float32 1.41 2.41 3.4 4.4 5.4 ... 17.36 18.36 19.35 20.35
  * time     (time) float64 1.34e+09 1.34e+09 1.34e+09 ... 1.34e+09 1.34e+09
Attributes:
        units:        m/s
        description:  horizontal velocity magnitude