BilinearInterpolation
ClimaInterpolations.BilinearInterpolation.Bilinear — TypeBilinear{V,I}This struct stores the source and target grids for bilinear interpolation on a rectangular grid. Indexes specifying the location of the target points in the source grid are also stored for enabling efficient implementation of bilinear interpolation.
Fields
sourcex: Source grid inxdirection(nsourcex)sourcey: Source grid inydirection(nsourcey)targetx: Target grid inxdirection(ntargetx)targety: Target grid inydirection(ntargety)startx: left index of location of a targetxgrid point in sourcexgridstarty: left index of location of a targetygrid point in sourceygrid
ClimaInterpolations.BilinearInterpolation.interpolatebilinear! — Functioninterpolatebilinear!(
ftarget::AbstractArray{FT,N},
bilinear::B,
fsource::AbstractArray{FT,N},
) where {FT,N,B}Interpolate fsource, defined on source grid, onto the target grid. The horizontal source and target grids are defined in bilinear. Here fsource is an N-dimensional array where the last two dimensions are assumed to be horizontal dimensions.
For example, fsource can be of size [n1, n2..., nx, ny], where nx and ny are the horizontal dimensions. Single horizontal level is also supported. The number of horizontal levels should be same for both source and target arrays.
https://en.wikipedia.org/wiki/Bilinear_interpolation
ClimaInterpolations.BilinearInterpolation.set_source_range! — Functionset_source_range!(
start::AbstractVector{I},
source::AbstractVector{FT},
target::AbstractVector{FT},
) where {I, FT}This function populates the 1D integer array start which provides the left indices of locations of target points inside the source grid specified by the 1D array source.
ClimaInterpolations.BilinearInterpolation.get_stencil_left_idx — Functionget_stencil_left_idx(alg::Linear, sourcegrid, targetpoint; first = 1)Return the left index of location of targetpoint point in sourcegrid grid.