oceanspy.utils

OceanSpy utilities that don’t need OceanDataset objects.

Functions

Coriolis_parameter(Y[, omega])

Compute Coriolis parameter (both vertical and horizontal components).

cartesian_path(x1, y1, x2, y2[, delta])

Generate a trajectory specifying the distance resolution.

circle_path_array(_Y, _X, R[, _res])

Given a list of prescribed coordinate points of len(N), returns an array of increased (or equal) length, wherein the added values are computed following a great circle path.

connector(_ix, _iy)

Takes a collection of points defined in logical space (ix, iy), each of equal length arrays, and returns a new continous array (_ix, _iy) that contains the original elements now with unit spacing.

densjmd95(s, t, p)

Density of Sea Water using Jackett and McDougall 1995 (JAOT 12) polynomial (modified UNESCO polynomial) [R5a812deaf4b9-JaMc95].

densmdjwf(s, t, p)

Density of Sea Water using McDougall et al. 2003 (JAOT 20) polynomial (Gibbs Potential) [Re2d133f292dd-McJa03].

diff_and_inds_where_insert(ix, iy)

get_maskH(ds, add_Hbdr, XRange, YRange[, ...])

Define this function to avoid repeated code.

great_circle_path(lat1, lon1, lat2, lon2[, ...])

Generate a great circle trajectory specifying the distance resolution.

remove_repeated(_iX, _iY)

Attemps to remove repeated coords not adjascent to each other, while retaining the trajectory property of being simply connected (i.e. the distance between each index point is one).

reset_dim(_ds, N[, dim])

resets the dimension mooring by shifting it by a value set by N

spherical2cartesian(Y, X[, R])

Convert spherical coordinates to cartesian.

static_pressure(Z)

Returns the static pressure given depth.

viewer2range(p)

Takes the output from the poseidon viewer p and returns the coordinate trajectories in X and Y in a way that is compatible with oceanspy.subsample functions.