MOM6
|
Linear interpolation functions.
Date of creation: 2008.06.09 L. White
This module contains p1m (linear) interpolation routines.
p1m interpolation is performed by estimating the edge values and linearly interpolating between them.
Functions/Subroutines | |
subroutine, public | p1m_interpolation (N, h, u, ppoly_E, ppoly_coef, h_neglect) |
Linearly interpolate between edge values. More... | |
subroutine, public | p1m_boundary_extrapolation (N, h, u, ppoly_E, ppoly_coef) |
Interpolation by linear polynomials within boundary cells. More... | |
subroutine, public p1m_functions::p1m_boundary_extrapolation | ( | integer, intent(in) | N, |
real, dimension(:), intent(in) | h, | ||
real, dimension(:), intent(in) | u, | ||
real, dimension(:,:), intent(inout) | ppoly_E, | ||
real, dimension(:,:), intent(inout) | ppoly_coef | ||
) |
Interpolation by linear polynomials within boundary cells.
The left and right edge values in the left and right boundary cells, respectively, are estimated using a linear extrapolation within the cells.
It is assumed that the size of the array 'u' is equal to the number of cells defining 'grid' and 'ppoly'. No consistency check is performed here.
[in] | n | Number of cells |
[in] | h | cell widths (size N) |
[in] | u | cell averages (size N) |
[in,out] | ppoly_e | edge values of piecewise polynomials, with the same units as u. |
[in,out] | ppoly_coef | coefficients of piecewise polynomials, mainly with the same units as u. |
Definition at line 70 of file P1M_functions.F90.
Referenced by regrid_interp::regridding_set_ppolys().
subroutine, public p1m_functions::p1m_interpolation | ( | integer, intent(in) | N, |
real, dimension(:), intent(in) | h, | ||
real, dimension(:), intent(in) | u, | ||
real, dimension(:,:), intent(inout) | ppoly_E, | ||
real, dimension(:,:), intent(inout) | ppoly_coef, | ||
real, intent(in), optional | h_neglect | ||
) |
Linearly interpolate between edge values.
The resulting piecewise interpolant is stored in 'ppoly'. See 'ppoly.F90' for a definition of this structure.
The edge values MUST have been estimated prior to calling this routine.
The estimated edge values must be limited to ensure monotonicity of the interpolant. We also make sure that edge values are NOT discontinuous.
It is assumed that the size of the array 'u' is equal to the number of cells defining 'grid' and 'ppoly'. No consistency check is performed here.
[in] | n | Number of cells |
[in] | h | cell widths (size N) |
[in] | u | cell average properties (size N) |
[in,out] | ppoly_e | Potentially modified edge values, with the same units as u. |
[in,out] | ppoly_coef | Potentially modified piecewise polynomial coefficients, mainly with the same units as u. |
[in] | h_neglect | A negligibly small width in the same units as h. |
Definition at line 28 of file P1M_functions.F90.
References regrid_edge_values::average_discontinuous_edge_values(), and regrid_edge_values::bound_edge_values().
Referenced by regrid_interp::regridding_set_ppolys().