remapping_attic module reference¶
Retains older versions of column-wise vertical remapping functions that are no longer used in MOM6, but may be useful later for documenting the development of the schemes that are used in MOM6.
Functions/Subroutines¶
Compare two summation estimates of positive data and judge if due to more than round-off. |
|
Remaps column of values u0 on grid h0 to grid h1 by integrating over the projection of each h1 cell onto the h0 grid. |
|
Remaps column of values u0 on grid h0 to implied grid h1 where the interfaces of h1 differ from those of h0 by dx. |
|
Integrate the reconstructed column profile over a single cell. |
|
Calculates the change in interface positions based on h1 and h2. |
|
Calculate edge coordinate x from cell width h. |
|
Runs unit tests on archaic remapping functions. |
|
Convenience function for printing grid to screen. |
Detailed Description¶
Retains older versions of column-wise vertical remapping functions that are no longer used in MOM6, but may be useful later for documenting the development of the schemes that are used in MOM6.
Function/Subroutine Documentation¶
-
function
remapping_attic/
ispossumerrsignificant
(n1, sum1, n2, sum2) [logical]¶ Compare two summation estimates of positive data and judge if due to more than round-off. When two sums are calculated from different vectors that should add up to the same value, the results can differ by round off. The round off error can be bounded to be proportional to the number of operations. This function returns true if the difference between sum1 and sum2 is larger than than the estimated round off bound.
- Parameters:
n1 :: [in] Number of values in sum1
n2 :: [in] Number of values in sum2
sum1 :: [in] Sum of n1 values in arbitrary units [A]
sum2 :: [in] Sum of n2 values [A]
- Return:
undefined :: True if difference in sums is large
- Call to:
-
subroutine
remapping_attic/
remapbyprojection
(n0, h0, u0, ppoly0_E, ppoly0_coefs, n1, h1, method, u1, h_neglect)¶ Remaps column of values u0 on grid h0 to grid h1 by integrating over the projection of each h1 cell onto the h0 grid.
- Parameters:
n0 :: [in] Number of cells in source grid
h0 :: [in] Source grid widths (size n0) in thickness units [H]
u0 :: [in] Source cell averages (size n0) in arbitrary units [A]
ppoly0_e :: [in] Edge value of polynomial [A]
ppoly0_coefs :: [in] Coefficients of polynomial [A]
n1 :: [in] Number of cells in target grid
h1 :: [in] Target grid widths (size n1) [H]
method :: [in] Remapping scheme to use
u1 :: [out] Target cell averages (size n1) [A]
h_neglect :: [in] A negligibly small width for the purpose of cell reconstructions in the same units as h [H].
- Call to:
- Called from:
-
subroutine
remapping_attic/
remapbydeltaz
(n0, h0, u0, ppoly0_E, ppoly0_coefs, n1, dx1, method, u1, h1, h_neglect)¶ Remaps column of values u0 on grid h0 to implied grid h1 where the interfaces of h1 differ from those of h0 by dx. The new grid is defined relative to the original grid by change dx1(:) = xNew(:) - xOld(:) and the remapping calculated so that hNew(k) qNew(k) = hOld(k) qOld(k) + F(k+1) - F(k) where F(k) = dx1(k) qAverage and where qAverage is the average qOld in the region zOld(k) to zNew(k).
- Parameters:
n0 :: [in] Number of cells in source grid
h0 :: [in] Source grid sizes (size n0) in thickness units [H]
u0 :: [in] Source cell averages (size n0) in arbitrary units [A]
ppoly0_e :: [in] Edge value of polynomial [A]
ppoly0_coefs :: [in] Coefficients of polynomial [A]
n1 :: [in] Number of cells in target grid
dx1 :: [in] Target grid edge positions (size n1+1) [H]
method :: [in] Remapping scheme to use
u1 :: [out] Target cell averages (size n1) [A]
h1 :: [out] Target grid widths (size n1) [H]
h_neglect :: [in] A negligibly small width for the purpose of cell reconstructions in the same units as h [H].
- Call to:
- Called from:
-
subroutine
remapping_attic/
integraterecononinterval
(n0, h0, u0, ppoly0_E, ppoly0_coefs, method, xL, xR, hC, uAve, jStart, xStart, h_neglect)¶ Integrate the reconstructed column profile over a single cell.
- Parameters:
n0 :: [in] Number of cells in source grid
h0 :: [in] Source grid sizes (size n0) in thickness units [H]
u0 :: [in] Source cell averages in arbitrary units [A]
ppoly0_e :: [in] Edge value of polynomial [A]
ppoly0_coefs :: [in] Coefficients of polynomial [A]
method :: [in] Remapping scheme to use
xl :: [in] Left edges of target cell [H]
xr :: [in] Right edges of target cell [H]
hc :: [in] Cell width hC = xR - xL [H]
uave :: [out] Average value on target cell [A]
jstart :: [inout] The index of the cell to start searching from On exit, contains index of last cell used
xstart :: [inout] The left edge position of cell jStart [H] On first entry should be 0.
h_neglect :: [in] A negligibly small width for the purpose of cell reconstructions in the same units as h [H]
- Call to:
hneglect_dflt
integration_pcm
integration_plm
integration_ppm
integration_pqm
mom_error_handler::mom_error
- Called from:
-
subroutine
remapping_attic/
dzfromh1h2
(n1, h1, n2, h2, dx)¶ Calculates the change in interface positions based on h1 and h2.
- Parameters:
n1 :: [in] Number of cells on source grid
h1 :: [in] Cell widths of source grid (size n1) [H]
n2 :: [in] Number of cells on target grid
h2 :: [in] Cell widths of target grid (size n2) [H]
dx :: [out] Change in interface position (size n2+1) [H]
- Called from:
-
subroutine
remapping_attic/
buildgridfromh
(nz, h, x)¶ Calculate edge coordinate x from cell width h.
- Parameters:
nz :: [in] Number of cells
h :: [in] Cell widths [H]
x :: [inout] Edge coordinates starting at x(1)=0 [H]
- Called from:
-
function
remapping_attic/
remapping_attic_unit_tests
(verbose) [logical]¶ Runs unit tests on archaic remapping functions. Should only be called from a single/root thread Returns True if a test fails, otherwise False.
- Parameters:
verbose :: [in] If true, write results to stdout
- Call to:
buildgridfromh
dumpgrid
dzfromh1h2
regrid_edge_values::edge_values_explicit_h4
hneglect_dflt
integration_ppm
ppm_functions::ppm_boundary_extrapolation
ppm_functions::ppm_reconstruction
remapbydeltaz
remapbyprojection
mom_io::stdout
- Called from:
-
subroutine
remapping_attic/
dumpgrid
(n, h, x, u)¶ Convenience function for printing grid to screen.
- Parameters:
n :: [in] Number of cells
h :: [in] Cell thickness [H]
x :: [in] Interface delta [H]
u :: [in] Cell average values [A]
- Call to:
mom_io::stdout
- Called from: