MOM6
pcm_functions Module Reference

Detailed Description

Piecewise constant reconstruction functions.

Functions/Subroutines

subroutine, public pcm_reconstruction (N, u, ppoly_E, ppoly_coef)
 Reconstruction by constant polynomials within each cell. There is nothing to do but this routine is provided to ensure a homogeneous interface throughout the regridding toolbox. More...
 

Function/Subroutine Documentation

◆ pcm_reconstruction()

subroutine, public pcm_functions::pcm_reconstruction ( integer, intent(in)  N,
real, dimension(:), intent(in)  u,
real, dimension(:,:), intent(inout)  ppoly_E,
real, dimension(:,:), intent(inout)  ppoly_coef 
)

Reconstruction by constant polynomials within each cell. There is nothing to do but this routine is provided to ensure a homogeneous interface throughout the regridding toolbox.

It is assumed that the dimension of 'u' is equal to the number of cells defining 'grid' and 'ppoly'. No consistency check is performed.

Parameters
[in]nNumber of cells
[in]ucell averages
[in,out]ppoly_eEdge value of polynomial, with the same units as u.
[in,out]ppoly_coefCoefficients of polynomial, with the same units as u.

Definition at line 19 of file PCM_functions.F90.

19  integer, intent(in) :: N !< Number of cells
20  real, dimension(:), intent(in) :: u !< cell averages
21  real, dimension(:,:), intent(inout) :: ppoly_E !< Edge value of polynomial,
22  !! with the same units as u.
23  real, dimension(:,:), intent(inout) :: ppoly_coef !< Coefficients of polynomial,
24  !! with the same units as u.
25 
26  ! Local variables
27  integer :: k
28 
29  ! The coefficients of the piecewise constant polynomial are simply
30  ! the cell averages.
31  ppoly_coef(:,1) = u(:)
32 
33  ! The edge values are equal to the cell average
34  do k = 1,n
35  ppoly_e(k,:) = u(k)
36  enddo
37 

Referenced by mom_remapping::build_reconstructions_1d(), and mom_remapping::remapping_unit_tests().

Here is the caller graph for this function: