shnitsel.core.xrhelpers

Functions

assign_levels(obj[, levels])

Assign new values to levels of MultiIndexes in obj

expand_midx(obj, midx_name, level_name, value)

flatten_levels(obj, idx_name, levels[, ...])

flatten_midx(obj, idx_name[, renamer])

mgroupby(obj, levels)

Group a Dataset or DataArray by several levels of a MultiIndex it contains.

midx_combs(values[, name])

msel(obj, **kwargs)

open_frames(path)

Opens a NetCDF4 file saved by shnitsel-tools, specially interpreting certain attributes.

replace_total(da, to_replace, value)

Replaces each occurence of to_replace in da with the corresponding element of value.

save_frames(frames, path[, complevel])

Save a Dataset, presumably (but not necessarily) consisting of frames of trajectories, to a file at path.

save_split(frames, path_template[, ...])

sel_trajids(frames, trajids[, invert])

Will not generally return trajectories in order given

sel_trajs(frames, trajids_or_mask[, invert])

Select trajectories using a list of trajectories IDs or a boolean mask

split_for_saving(frames[, bytes_per_chunk])

stack_trajs(unstacked)

Stack the trajid and time dims of an unstacked Dataset into a MultiIndex along a new dimension called frame.

unstack_trajs(frames)

Unstack the frame MultiIndex so that trajid and time become separate dims.