interp_hypso: Linear interpolate hypsometry

Description Usage Arguments Value Examples

View source: R/opti_thermal_habitat.R

Description

Interpolate bathymetry to a specified depth interval. Includes options to ensure validity of profile (force zero area layer, monotonically decreasing area)

Usage

1
interp_hypso(hypso, dz = 0.1, force_zero_area = TRUE)

Arguments

hypso

Hypsography data.frame with columns depth (meters, positive downward) and area (m^2)

dz

Requested resample depth interval

force_zero_area

Force the hypsography profile to keep a zero-area depth, even if the input did not have a zero-area depth, or if the zero area depth does not fall perfectly on the dz interval

Value

A hypso data.frame with columns depth and area

Examples

1
2
3
4
5
hypso = getBathy('439800')
new_hypso = interp_hypso(hypso, dz=0.1)

plot(hypso$area, hypso$depth, ylim=rev(range(new_hypso$depth)), type='o')
lines(new_hypso$area, new_hypso$depth, lty=2, col='red')

USGS-R/mda.lakes documentation built on Nov. 13, 2020, 8:28 p.m.