Skip to contents

Use this scheme to interpolate a layer at a new depth from an array.

Usage

scheme_interp_slice(space, target_depth, sf = NULL)

Arguments

space

a list of latitudes, longitudes, and depths for NEMO-MEDUSA model output, as returned by `get_spatial()`

target_depth

a depth (m) to interpolate a slice for.

sf

an optional sf polygon to define the horizontal area of interest.

Value

A dataframe containing a slabR scheme.

Details

The function takes the spatial information for a whole NEMO-MEDUSA file and determines which slice is immediately above and below a target depth. These two slices are used to interpolate the new layer. The function calculates the weights needed to interpolate between the values using `calculate_proximity_weight`. If an sf polygon is provided, only points which fall within the polygon will be interpolated.