scheme_interp_slice: Return a slabR Scheme for Linear Interpolation Between Array...

View source: R/Schemes.R

scheme_interp_sliceR Documentation

Return a slabR Scheme for Linear Interpolation Between Array Slices

Description

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.

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.

Value

A dataframe containing a slabR scheme.

See Also

Other NEMO-MEDUSA spatial tools: calculate_depth_share(), calculate_proximity_weight(), netcdf_scheme_helpers, scheme_column(), scheme_strathE2E(), stratify(), voronoi_grid(), xyindex_to_nindex()


Jack-H-Laverick/nemomedusR documentation built on Dec. 12, 2022, 5:21 a.m.