Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

seaduck.eulerian

Position

class Position(*arg, **kwarg)

The Position object that performs the interpolation.

Create a empty one by default. To actually do interpolation, use from_latlon method to tell the ducks where they are.

Position.fatten (method)

fatten(self, knw, four_d=False, required='all', ind_moves_kwarg={})

Fatten in all the required dimensions.

Finding the neighboring center grid points in all 4 dimensions.

Parameters

Position.from_bool_array (method)

from_bool_array(self, t=None, data=None, bool_array=None, num=None, random_seed=None)

Update/Generate new object with random points in given grid boxes.

Use the methods from the ocedata to transform from lat-lon-dep-time coords to rel-coords store the output in the Position object.

Parameters

Position.from_latlon (method)

from_latlon(self, x=None, y=None, z=None, t=None, data=None)

Fill in the coord info using lat-lon-dep-time dims.

Use the methods from the ocedata to transform from lat-lon-dep-time coords to rel-coords store the output in the Position object.

Parameters

Position.get_f_node_weight (method)

get_f_node_weight(self)

Find weight for the corner points interpolation.

Position.get_px_py (method)

get_px_py(self)

Get the nearest 4 corner points of the given point.

Used for oceanparcel style horizontal interpolation.

Returns

Position.interpolate (method)

interpolate(self, var_name, knw, vec_transform=True, prefetched=None, prefetch_prefix=None)

Do interpolation.

This is the method that does the actual interpolation/derivative. It is a combination of the following methods: _register_interpolation_input, _fatten_required_index_and_register, _transform_vector_and_register, _read_data_and_register, _mask_value_and_register, _compute_weight_and_registe,.

Parameters

Returns

Position.subset (method)

subset(self, which)

Create a subset of the Position object.

Parameters

Returns

Position.update_from_subset (method)

update_from_subset(self, sub, which)

Update from the original one from a subset of the Position object.

Parameters