oceanspy.llc_rearrange

OceanSpy functionality that transforms a dataset with LLC geometry characterized by 13 faces (or tiles), into one with simple geometry.

Functions

arc_limits_mask(_ds, _var, _faces, _dims, ...)

Estimates the limits of the masking region of the arctic.

arct_connect(ds, varName[, faces, masking, ...])

Splits the arctic into four triangular regions. if masking = True: does not transpose data. Only use when masking for data not surviving the cutout. Default is masking=False, which implies data in arct10 gets transposed.

arct_diffs(_ds, _Xind, _Yind)

arctic_eval(_ds, _ix, _iy[, _dim_name])

Evaluates a dataset

combine_list_ds(_DSlist)

Combines a list of N-xarray.datasets along a dimension.

cross_face_diffs(_ds, _ix, _iy, _faces, ...)

computes the unit distance between the location of index spaces in both directions diffX and diffY when data has complex topology.

ds_arcedge(_ds, _ix, _iy, moor, face1, face2)

Given an array of index points that right ends at the edge between the arctic and another face, returns the complete set of center point and corner/velocity points.

ds_edge(_ds, _ix, _iy, _ifaces, ii, _face_topo)

Given an array of index point that ends at the face boundary, it samplest from the neighbor faced data the corresponding vector value.

ds_edge_difftx(_ds, iX, iY, iXp1, iYp1, ...)

different topology, axis=`x`

ds_edge_diffty(_ds, iX, iY, _ix, xp1, iYp1, ...)

different topology, axis=`y`

ds_edge_sametx(_ds, iX, iY, iXp1, iYp1, ...)

ds_edge_samety(_ds, iX, iY, _ix, xp1, iXp1, ...)

same topology, axis=`y`.

ds_splitarray(_ds, _iXn, _iYn, _faces, ...)

Creates a dataset from an array that reaches the edges of the face/tile once or multiple times, without crossing into a different face, but can end or begin at the edge of the face (which is to be interpreted more generally as crossing from or into a different face)

edge_completer(_x, _y[, face_dir, ind, _N])

verifies that an array begins and ends at the edge of a face.

edge_slider(x1, y1, f1, x2, y2, f2, ...[, _N])

Looks at the edge points between faces f1 (present) and f2 (next).

edgesid(_iX, _iY[, _N])

From an array of isolated logical indexes within a face, extracts the ones that lie at the edge between one or more faces.

eval_dataset(_ds, _ix, _iy[, _iface, _dim_name])

Evaluates a dataset along (spatial) trajectory in the plane as defined by the indexes in the plane.

face_adjacent(_ix, _iy, _iface, ...[, _N])

Given a collection of data points within a face, returns the adjacent face next to boundary data.

face_direction(face1, face2, face_connections)

from the topology face_connections, infers the direction of the array: left (0), right (1), bottom (2), top (3).

fdir_completer(_ix, _iy, _faces, _iface, ...)

completes the next directional face , whether the face is defined within the path of the array, or if the next face eval is an adjacent face.

fill_path(_X, _Y, _faces, k, _face_conxs[, _N])

Given a sequence of index arrays (each within a face) makes sure that it always begins and ends at the face edge, expend the end faced-data which can either end or begin at the face edge.

flip_v(_ds[, co_list, dims, _len])

Reverses the sign of the vector fields by default along the corner coordinate (Xp1 or Yp1).

index_splitter(ix, iy, _N)

Takes the index pair (ix, iy) of ordered, continuous and equidistant (unit) distanced array, and identifies the location at which the pair reaches the edge of the face and reenters the same face (no crossing).

mask_var(_ds[, XRange, YRange, ref_lon])

Returns a dataset with masked latitude at C and G points (YC and YG).

mates(ds[, pair])

Defines, when needed, the variable pair and stores the name of the pair (mate) variable as an attribute.

mooring_singleface(_ds, _ix, _iy, _faces, ...)

evaluates the mooring array within a single face.

order_from_indexing(_ix, _in)

Given an array of bounded integers (indexing array), and a list of indexes that subsets the indexing array, returns the mapping associated with the subsetting array.

reverse_dataset(_ds, dims_c, dims_g[, transpose])

Reverses the dataset along a dimension.

rotate_dataset(_ds, dims_c, dims_g[, rev_x, ...])

Rotates a dataset along its horizontal dimensions (e.g. center and corner).

rotate_vars(_ds)

Using the attribures mates, when this function is called it swaps the variables names.

shift_dataset(_ds, dims_c, dims_g)

Shifts a dataset along a dimension, setting its first element to zero.

shift_list_ds(_DS, dims_c, dims_g, Ni[, facet])

Given a list of n-datasets with matching dimensions, each element of the list gets shifted along the dimensions provided (by dims_c and dims_g) so that there is no overlap of values between them.

slice_datasets(_DSfacet, dims_c, dims_g, ...)

Slices a list of dataset along an axis.

splitter(_ix, _iy, _ifaces)

Takes the output from connector(_ix, _iy) as input, and splits it into the many faces the array grows through.

station_singleface(_ds, _ix, _iy, _faces, ...)

Extracts isolated station values from dataset from the given horizontal index values (iface, '_iy', '_ix').

Classes

Dims(vars)

Creates a shortcut for dimension`s names associated with an arbitrary variable.

LLCtransformation()

A class containing the transformation types of LLCgrids.