MOM6
MOM_remapping.F90 File Reference
#include <MOM_memory.h>
Include dependency graph for MOM_remapping.F90:

Go to the source code of this file.

Data Types

type  mom_remapping::remapping_cs
 Container for remapping parameters. More...
 

Modules

module  mom_remapping
 Provides column-wise vertical remapping functions.
 

Functions/Subroutines

subroutine, public mom_remapping::remapping_set_param (CS, remapping_scheme, boundary_extrapolation, check_reconstruction, check_remapping, force_bounds_in_subcell, answers_2018)
 Set parameters within remapping object. More...
 
subroutine, public mom_remapping::extract_member_remapping_cs (CS, remapping_scheme, degree, boundary_extrapolation, check_reconstruction, check_remapping, force_bounds_in_subcell)
 
subroutine mom_remapping::buildgridfromh (nz, h, x)
 Calculate edge coordinate x from cell width h. More...
 
logical function mom_remapping::ispossumerrsignificant (n1, sum1, n2, sum2)
 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. More...
 
subroutine, public mom_remapping::remapping_core_h (CS, n0, h0, u0, n1, h1, u1, h_neglect, h_neglect_edge)
 Remaps column of values u0 on grid h0 to grid h1 assuming the top edge is aligned. More...
 
subroutine, public mom_remapping::remapping_core_w (CS, n0, h0, u0, n1, dx, u1, h_neglect, h_neglect_edge)
 Remaps column of values u0 on grid h0 to implied grid h1 where the interfaces of h1 differ from those of h0 by dx. More...
 
subroutine, public mom_remapping::build_reconstructions_1d (CS, n0, h0, u0, ppoly_r_coefs, ppoly_r_E, ppoly_r_S, iMethod, h_neglect, h_neglect_edge)
 Creates polynomial reconstructions of u0 on the source grid h0. More...
 
subroutine mom_remapping::check_reconstructions_1d (n0, h0, u0, deg, boundary_extrapolation, ppoly_r_coefs, ppoly_r_E, ppoly_r_S)
 Checks that edge values and reconstructions satisfy bounds. More...
 
subroutine mom_remapping::remap_via_sub_cells (n0, h0, u0, ppoly0_E, ppoly0_coefs, n1, h1, method, force_bounds_in_subcell, u1, uh_err, ah_sub, aisub_src, aiss, aise)
 Remaps column of n0 values u0 on grid h0 to grid h1 with n1 cells by calculating the n0+n1+1 sub-integrals of the intersection of h0 and h1, and the summing the appropriate integrals into the h1*u1 values. h0 and h1 must have the same units. More...
 
real function, public mom_remapping::average_value_ppoly (n0, u0, ppoly0_E, ppoly0_coefs, method, i0, xa, xb)
 Returns the average value of a reconstruction within a single source cell, i0, between the non-dimensional positions xa and xb (xa<=xb) with dimensional separation dh. More...
 
subroutine mom_remapping::measure_input_bounds (n0, h0, u0, ppoly_E, h0tot, h0err, u0tot, u0err, u0min, u0max)
 Measure totals and bounds on source grid. More...
 
subroutine mom_remapping::measure_output_bounds (n1, h1, u1, h1tot, h1err, u1tot, u1err, u1min, u1max)
 Measure totals and bounds on destination grid. More...
 
subroutine mom_remapping::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. More...
 
subroutine mom_remapping::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). More...
 
subroutine mom_remapping::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. More...
 
subroutine, public mom_remapping::dzfromh1h2 (n1, h1, n2, h2, dx)
 Calculates the change in interface positions based on h1 and h2. More...
 
subroutine, public mom_remapping::initialize_remapping (CS, remapping_scheme, boundary_extrapolation, check_reconstruction, check_remapping, force_bounds_in_subcell, answers_2018)
 Constructor for remapping control structure. More...
 
subroutine mom_remapping::setreconstructiontype (string, CS)
 Changes the method of reconstruction Use this routine to parse a string parameter specifying the reconstruction and re-allocates work arrays appropriately. It is called from initialize_remapping but can be called from an external module too. More...
 
subroutine, public mom_remapping::end_remapping (CS)
 Destrcutor for remapping control structure. More...
 
logical function, public mom_remapping::remapping_unit_tests (verbose)
 Runs unit tests on remapping functions. Should only be called from a single/root thread Returns True if a test fails, otherwise False. More...
 
logical function mom_remapping::test_answer (verbose, n, u, u_true, label)
 Returns true if any cell of u and u_true are not identical. Returns false otherwise. More...
 
subroutine mom_remapping::dumpgrid (n, h, x, u)
 Convenience function for printing grid to screen. More...
 

Variables

integer, parameter mom_remapping::remapping_pcm = 0
 O(h^1) remapping scheme. More...
 
integer, parameter mom_remapping::remapping_plm = 1
 O(h^2) remapping scheme. More...
 
integer, parameter mom_remapping::remapping_ppm_h4 = 2
 O(h^3) remapping scheme. More...
 
integer, parameter mom_remapping::remapping_ppm_ih4 = 3
 O(h^3) remapping scheme. More...
 
integer, parameter mom_remapping::remapping_pqm_ih4ih3 = 4
 O(h^4) remapping scheme. More...
 
integer, parameter mom_remapping::remapping_pqm_ih6ih5 = 5
 O(h^5) remapping scheme. More...
 
integer, parameter mom_remapping::integration_pcm = 0
 Piecewise Constant Method. More...
 
integer, parameter mom_remapping::integration_plm = 1
 Piecewise Linear Method. More...
 
integer, parameter mom_remapping::integration_ppm = 3
 Piecewise Parabolic Method. More...
 
integer, parameter mom_remapping::integration_pqm = 5
 Piecewise Quartic Method. More...
 
character(len=40) mom_remapping::mdl = "MOM_remapping"
 This module's name. More...
 
character(len=256), public mom_remapping::remappingschemesdoc = "PCM (1st-order accurate)\n"// "PLM (2nd-order accurate)\n"// "PPM_H4 (3rd-order accurate)\n"// "PPM_IH4 (3rd-order accurate)\n"// "PQM_IH4IH3 (4th-order accurate)\n"// "PQM_IH6IH5 (5th-order accurate)\n"
 Documentation for external callers. More...
 
character(len=3), public mom_remapping::remappingdefaultscheme = "PLM"
 Default remapping method. More...
 
real, parameter mom_remapping::hneglect_dflt = 1.E-30
 A thickness [H ~> m or kg m-2] that can be added to thicknesses in a denominator without changing the numerical result, except where a division by zero would otherwise occur. More...
 
logical, parameter mom_remapping::old_algorithm = .false.
 Use the old "broken" algorithm. This is a temporary measure to assist debugging until we delete the old algorithm. More...