MOM6
|
Provides column-wise vertical remapping functions.
Data Types | |
type | remapping_cs |
Container for remapping parameters. More... | |
Functions/Subroutines | |
subroutine, public | 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 | extract_member_remapping_cs (CS, remapping_scheme, degree, boundary_extrapolation, check_reconstruction, check_remapping, force_bounds_in_subcell) |
subroutine | buildgridfromh (nz, h, x) |
Calculate edge coordinate x from cell width h. More... | |
logical function | 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 | 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 | 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 | 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 | 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 | 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 | 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 | measure_input_bounds (n0, h0, u0, ppoly_E, h0tot, h0err, u0tot, u0err, u0min, u0max) |
Measure totals and bounds on source grid. More... | |
subroutine | measure_output_bounds (n1, h1, u1, h1tot, h1err, u1tot, u1err, u1min, u1max) |
Measure totals and bounds on destination grid. More... | |
subroutine | 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 | 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 | 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 | dzfromh1h2 (n1, h1, n2, h2, dx) |
Calculates the change in interface positions based on h1 and h2. More... | |
subroutine, public | initialize_remapping (CS, remapping_scheme, boundary_extrapolation, check_reconstruction, check_remapping, force_bounds_in_subcell, answers_2018) |
Constructor for remapping control structure. More... | |
subroutine | 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 | end_remapping (CS) |
Destrcutor for remapping control structure. More... | |
logical function, public | 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 | 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 | dumpgrid (n, h, x, u) |
Convenience function for printing grid to screen. More... | |
Variables | |
integer, parameter | remapping_pcm = 0 |
O(h^1) remapping scheme. More... | |
integer, parameter | remapping_plm = 1 |
O(h^2) remapping scheme. More... | |
integer, parameter | remapping_ppm_h4 = 2 |
O(h^3) remapping scheme. More... | |
integer, parameter | remapping_ppm_ih4 = 3 |
O(h^3) remapping scheme. More... | |
integer, parameter | remapping_pqm_ih4ih3 = 4 |
O(h^4) remapping scheme. More... | |
integer, parameter | remapping_pqm_ih6ih5 = 5 |
O(h^5) remapping scheme. More... | |
integer, parameter | integration_pcm = 0 |
Piecewise Constant Method. More... | |
integer, parameter | integration_plm = 1 |
Piecewise Linear Method. More... | |
integer, parameter | integration_ppm = 3 |
Piecewise Parabolic Method. More... | |
integer, parameter | integration_pqm = 5 |
Piecewise Quartic Method. More... | |
character(len=40) | mdl = "MOM_remapping" |
This module's name. More... | |
character(len=256), public | 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 | remappingdefaultscheme = "PLM" |
Default remapping method. More... | |
real, parameter | 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 | old_algorithm = .false. |
Use the old "broken" algorithm. This is a temporary measure to assist debugging until we delete the old algorithm. More... | |
real function, public mom_remapping::average_value_ppoly | ( | integer, intent(in) | n0, |
real, dimension(:), intent(in) | u0, | ||
real, dimension(:,:), intent(in) | ppoly0_E, | ||
real, dimension(:,:), intent(in) | ppoly0_coefs, | ||
integer, intent(in) | method, | ||
integer, intent(in) | i0, | ||
real, intent(in) | xa, | ||
real, intent(in) | 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.
[in] | n0 | Number of cells in source grid |
[in] | u0 | Cell means |
[in] | ppoly0_e | Edge value of polynomial |
[in] | ppoly0_coefs | Coefficients of polynomial |
[in] | method | Remapping scheme to use |
[in] | i0 | Source cell index |
[in] | xa | Non-dimensional start position within source cell |
[in] | xb | Non-dimensional end position within source cell |
Definition at line 926 of file MOM_remapping.F90.
References integration_pcm, integration_plm, integration_ppm, integration_pqm, and mom_error_handler::mom_error().
Referenced by mom_lateral_boundary_diffusion::bulk_average(), mom_lateral_boundary_diffusion::fluxes_layer_method(), mom_neutral_diffusion::neutral_surface_t_eval(), and remap_via_sub_cells().
subroutine, public mom_remapping::build_reconstructions_1d | ( | type(remapping_cs), intent(in) | CS, |
integer, intent(in) | n0, | ||
real, dimension(n0), intent(in) | h0, | ||
real, dimension(n0), intent(in) | u0, | ||
real, dimension(n0,cs%degree+1), intent(out) | ppoly_r_coefs, | ||
real, dimension(n0,2), intent(out) | ppoly_r_E, | ||
real, dimension(n0,2), intent(out) | ppoly_r_S, | ||
integer, intent(out) | iMethod, | ||
real, intent(in), optional | h_neglect, | ||
real, intent(in), optional | h_neglect_edge | ||
) |
Creates polynomial reconstructions of u0 on the source grid h0.
[in] | cs | Remapping control structure |
[in] | n0 | Number of cells on source grid |
[in] | h0 | Cell widths on source grid |
[in] | u0 | Cell averages on source grid |
[out] | ppoly_r_coefs | Coefficients of polynomial |
[out] | ppoly_r_e | Edge value of polynomial |
[out] | ppoly_r_s | Edge slope of polynomial |
[out] | imethod | Integration method |
[in] | h_neglect | A negligibly small width for the purpose of cell reconstructions in the same units as h0. |
[in] | h_neglect_edge | A negligibly small width for the purpose of edge value calculations in the same units as h0. |
Definition at line 356 of file MOM_remapping.F90.
References regrid_edge_slopes::edge_slopes_implicit_h3(), regrid_edge_slopes::edge_slopes_implicit_h5(), regrid_edge_values::edge_values_implicit_h4(), regrid_edge_values::edge_values_implicit_h6(), integration_pcm, integration_plm, integration_ppm, integration_pqm, mom_error_handler::mom_error(), pcm_functions::pcm_reconstruction(), plm_functions::plm_boundary_extrapolation(), plm_functions::plm_reconstruction(), ppm_functions::ppm_boundary_extrapolation(), ppm_functions::ppm_reconstruction(), pqm_functions::pqm_boundary_extrapolation_v1(), pqm_functions::pqm_reconstruction(), remapping_pcm, remapping_plm, remapping_ppm_h4, remapping_ppm_ih4, remapping_pqm_ih4ih3, and remapping_pqm_ih6ih5.
Referenced by remapping_core_h(), and remapping_core_w().
|
private |
Calculate edge coordinate x from cell width h.
[in] | nz | Number of cells |
[in] | h | Cell widths |
[in,out] | x | Edge coordiantes starting at x(1)=0 |
Definition at line 140 of file MOM_remapping.F90.
Referenced by remapping_unit_tests().
|
private |
Checks that edge values and reconstructions satisfy bounds.
[in] | n0 | Number of cells on source grid |
[in] | h0 | Cell widths on source grid |
[in] | u0 | Cell averages on source grid |
[in] | deg | Degree of polynomial reconstruction |
[in] | boundary_extrapolation | Extrapolate at boundaries if true |
[out] | ppoly_r_coefs | Coefficients of polynomial |
[out] | ppoly_r_e | Edge value of polynomial |
[out] | ppoly_r_s | Edge slope of polynomial |
Definition at line 442 of file MOM_remapping.F90.
References mom_error_handler::mom_error().
Referenced by remapping_core_h(), and remapping_core_w().
|
private |
Convenience function for printing grid to screen.
[in] | n | Number of cells |
[in] | h | Cell thickness |
[in] | x | Interface delta |
[in] | u | Cell average values |
Definition at line 1907 of file MOM_remapping.F90.
Referenced by remapping_unit_tests().
subroutine, public mom_remapping::dzfromh1h2 | ( | integer, intent(in) | n1, |
real, dimension(:), intent(in) | h1, | ||
integer, intent(in) | n2, | ||
real, dimension(:), intent(in) | h2, | ||
real, dimension(:), intent(out) | dx | ||
) |
Calculates the change in interface positions based on h1 and h2.
[in] | n1 | Number of cells on source grid |
[in] | h1 | Cell widths of source grid (size n1) |
[in] | n2 | Number of cells on target grid |
[in] | h2 | Cell widths of target grid (size n2) |
[out] | dx | Change in interface position (size n2+1) |
Definition at line 1522 of file MOM_remapping.F90.
Referenced by mom_ale::ale_remap_scalar(), and remapping_unit_tests().
subroutine, public mom_remapping::end_remapping | ( | type(remapping_cs), intent(inout) | CS | ) |
Destrcutor for remapping control structure.
[in,out] | cs | Remapping control structure |
Definition at line 1603 of file MOM_remapping.F90.
subroutine, public mom_remapping::extract_member_remapping_cs | ( | type(remapping_cs), intent(in) | CS, |
integer, intent(out), optional | remapping_scheme, | ||
integer, intent(out), optional | degree, | ||
logical, intent(out), optional | boundary_extrapolation, | ||
logical, intent(out), optional | check_reconstruction, | ||
logical, intent(out), optional | check_remapping, | ||
logical, intent(out), optional | force_bounds_in_subcell | ||
) |
[in] | cs | Control structure for remapping module |
[out] | remapping_scheme | Determines which reconstruction scheme to use |
[out] | degree | Degree of polynomial reconstruction |
[out] | boundary_extrapolation | If true, extrapolate boundaries |
[out] | check_reconstruction | If true, reconstructions are checked for consistency. |
[out] | check_remapping | If true, the result of remapping are checked for conservation and bounds. |
[out] | force_bounds_in_subcell | If true, the intermediate values used in remapping are forced to be bounded. |
Definition at line 120 of file MOM_remapping.F90.
subroutine, public mom_remapping::initialize_remapping | ( | type(remapping_cs), intent(inout) | CS, |
character(len=*), intent(in) | remapping_scheme, | ||
logical, intent(in), optional | boundary_extrapolation, | ||
logical, intent(in), optional | check_reconstruction, | ||
logical, intent(in), optional | check_remapping, | ||
logical, intent(in), optional | force_bounds_in_subcell, | ||
logical, intent(in), optional | answers_2018 | ||
) |
Constructor for remapping control structure.
[in,out] | cs | Remapping control structure |
[in] | remapping_scheme | Remapping scheme to use |
[in] | boundary_extrapolation | Indicate to extrapolate in boundary cells |
[in] | check_reconstruction | Indicate to check reconstructions |
[in] | check_remapping | Indicate to check results of remapping |
[in] | force_bounds_in_subcell | Force subcells values to be bounded |
[in] | answers_2018 | If true use older, less acccurate expressions. |
Definition at line 1547 of file MOM_remapping.F90.
References remapping_set_param().
Referenced by mom_oda_driver_mod::init_oda(), mom_ale_sponge::initialize_ale_sponge_fixed(), mom_ale_sponge::initialize_ale_sponge_varying(), mom_open_boundary::initialize_segment_data(), mom_tidal_mixing::read_tidal_constituents(), remapping_unit_tests(), and mom_wave_speed::wave_speed_init().
|
private |
Integrate the reconstructed column profile over a single cell.
[in] | n0 | Number of cells in source grid |
[in] | h0 | Source grid sizes (size n0) |
[in] | u0 | Source cell averages |
[in] | ppoly0_e | Edge value of polynomial |
[in] | ppoly0_coefs | Coefficients of polynomial |
[in] | method | Remapping scheme to use |
[in] | xl | Left edges of target cell |
[in] | xr | Right edges of target cell |
[in] | hc | Cell width hC = xR - xL |
[out] | uave | Average value on target cell |
[in,out] | jstart | The index of the cell to start searching from On exit, contains index of last cell used |
[in,out] | xstart | The left edge position of cell jStart On first entry should be 0. |
[in] | h_neglect | A negligibly small width for the purpose of cell reconstructions in the same units as h. |
Definition at line 1223 of file MOM_remapping.F90.
References hneglect_dflt, integration_pcm, integration_plm, integration_ppm, integration_pqm, and mom_error_handler::mom_error().
Referenced by remapbydeltaz(), and remapbyprojection().
|
private |
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.
[in] | n1 | Number of values in sum1 |
[in] | n2 | Number of values in sum2 |
[in] | sum1 | Sum of n1 values |
[in] | sum2 | Sum of n2 values |
Definition at line 162 of file MOM_remapping.F90.
References mom_error_handler::mom_error().
|
private |
Measure totals and bounds on source grid.
[in] | n0 | Number of cells on source grid |
[in] | h0 | Cell widths on source grid |
[in] | u0 | Cell averages on source grid |
[in] | ppoly_e | Cell edge values on source grid |
[out] | h0tot | Sum of cell widths |
[out] | h0err | Magnitude of round-off error in h0tot |
[out] | u0tot | Sum of cell widths times values |
[out] | u0err | Magnitude of round-off error in u0tot |
[out] | u0min | Minimum value in reconstructions of u0 |
[out] | u0max | Maximum value in reconstructions of u0 |
Definition at line 1027 of file MOM_remapping.F90.
Referenced by remap_via_sub_cells(), remapping_core_h(), and remapping_core_w().
|
private |
Measure totals and bounds on destination grid.
[in] | n1 | Number of cells on destination grid |
[in] | h1 | Cell widths on destination grid |
[in] | u1 | Cell averages on destination grid |
[out] | h1tot | Sum of cell widths |
[out] | h1err | Magnitude of round-off error in h1tot |
[out] | u1tot | Sum of cell widths times values |
[out] | u1err | Magnitude of round-off error in u1tot |
[out] | u1min | Minimum value in reconstructions of u1 |
[out] | u1max | Maximum value in reconstructions of u1 |
Definition at line 1061 of file MOM_remapping.F90.
Referenced by remap_via_sub_cells(), remapping_core_h(), and remapping_core_w().
|
private |
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.
[in] | n0 | Number of cells in source grid |
[in] | h0 | Source grid widths (size n0) |
[in] | u0 | Source cell averages (size n0) |
[in] | ppoly0_e | Edge value of polynomial |
[in] | ppoly0_coefs | Coefficients of polynomial |
[in] | n1 | Number of cells in target grid |
[in] | h1 | Target grid widths (size n1) |
[in] | method | Remapping scheme to use |
[in] | force_bounds_in_subcell | Force sub-cell values to be bounded |
[out] | u1 | Target cell averages (size n1) |
[out] | uh_err | Estimate of bound on error in sum of u*h |
[out] | ah_sub | h_sub |
[out] | aisub_src | i_sub_src |
[out] | aiss | isrc_start |
[out] | aise | isrc_ens |
Definition at line 516 of file MOM_remapping.F90.
References average_value_ppoly(), measure_input_bounds(), measure_output_bounds(), mom_error_handler::mom_error(), and old_algorithm.
Referenced by remapping_core_h(), remapping_core_w(), and remapping_unit_tests().
|
private |
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).
[in] | n0 | Number of cells in source grid |
[in] | h0 | Source grid sizes (size n0) |
[in] | u0 | Source cell averages (size n0) |
[in] | ppoly0_e | Edge value of polynomial |
[in] | ppoly0_coefs | Coefficients of polynomial |
[in] | n1 | Number of cells in target grid |
[in] | dx1 | Target grid edge positions (size n1+1) |
[in] | method | Remapping scheme to use |
[out] | u1 | Target cell averages (size n1) |
[out] | h1 | Target grid widths (size n1) |
[in] | h_neglect | A negligibly small width for the purpose of cell reconstructions in the same units as h. |
Definition at line 1144 of file MOM_remapping.F90.
References integraterecononinterval().
Referenced by remapping_unit_tests().
|
private |
Remaps column of values u0 on grid h0 to grid h1 by integrating over the projection of each h1 cell onto the h0 grid.
[in] | n0 | Number of cells in source grid |
[in] | h0 | Source grid widths (size n0) |
[in] | u0 | Source cell averages (size n0) |
[in] | ppoly0_e | Edge value of polynomial |
[in] | ppoly0_coefs | Coefficients of polynomial |
[in] | n1 | Number of cells in target grid |
[in] | h1 | Target grid widths (size n1) |
[in] | method | Remapping scheme to use |
[out] | u1 | Target cell averages (size n1) |
[in] | h_neglect | A negligibly small width for the purpose of cell reconstructions in the same units as h. |
Definition at line 1096 of file MOM_remapping.F90.
References integraterecononinterval().
Referenced by remapping_unit_tests().
subroutine, public mom_remapping::remapping_core_h | ( | type(remapping_cs), intent(in) | CS, |
integer, intent(in) | n0, | ||
real, dimension(n0), intent(in) | h0, | ||
real, dimension(n0), intent(in) | u0, | ||
integer, intent(in) | n1, | ||
real, dimension(n1), intent(in) | h1, | ||
real, dimension(n1), intent(out) | u1, | ||
real, intent(in), optional | h_neglect, | ||
real, intent(in), optional | h_neglect_edge | ||
) |
Remaps column of values u0 on grid h0 to grid h1 assuming the top edge is aligned.
[in] | cs | Remapping control structure |
[in] | n0 | Number of cells on source grid |
[in] | h0 | Cell widths on source grid |
[in] | u0 | Cell averages on source grid |
[in] | n1 | Number of cells on target grid |
[in] | h1 | Cell widths on target grid |
[out] | u1 | Cell averages on target grid |
[in] | h_neglect | A negligibly small width for the purpose of cell reconstructions in the same units as h0. |
[in] | h_neglect_edge | A negligibly small width for the purpose of edge value calculations in the same units as h0. |
Definition at line 188 of file MOM_remapping.F90.
References build_reconstructions_1d(), check_reconstructions_1d(), measure_input_bounds(), measure_output_bounds(), mom_error_handler::mom_error(), and remap_via_sub_cells().
Referenced by mom_ale_sponge::apply_ale_sponge(), coord_rho::build_rho_column_iteratively(), mom_tidal_mixing::calculate_cvmix_tidal(), mom_state_initialization::cut_off_column_top(), mom_diag_remap::diag_remap_do_remap(), mom_oda_driver_mod::set_prior_tracer(), and mom_wave_speed::wave_speed().
subroutine, public mom_remapping::remapping_core_w | ( | type(remapping_cs), intent(in) | CS, |
integer, intent(in) | n0, | ||
real, dimension(n0), intent(in) | h0, | ||
real, dimension(n0), intent(in) | u0, | ||
integer, intent(in) | n1, | ||
real, dimension(n1+1), intent(in) | dx, | ||
real, dimension(n1), intent(out) | u1, | ||
real, intent(in), optional | h_neglect, | ||
real, intent(in), optional | 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.
[in] | cs | Remapping control structure |
[in] | n0 | Number of cells on source grid |
[in] | h0 | Cell widths on source grid |
[in] | u0 | Cell averages on source grid |
[in] | n1 | Number of cells on target grid |
[in] | dx | Cell widths on target grid |
[out] | u1 | Cell averages on target grid |
[in] | h_neglect | A negligibly small width for the purpose of cell reconstructions in the same units as h0. |
[in] | h_neglect_edge | A negligibly small width for the purpose of edge value calculations in the same units as h0. |
Definition at line 266 of file MOM_remapping.F90.
References build_reconstructions_1d(), check_reconstructions_1d(), measure_input_bounds(), measure_output_bounds(), mom_error_handler::mom_error(), and remap_via_sub_cells().
Referenced by remapping_unit_tests().
subroutine, public mom_remapping::remapping_set_param | ( | type(remapping_cs), intent(inout) | CS, |
character(len=*), intent(in), optional | remapping_scheme, | ||
logical, intent(in), optional | boundary_extrapolation, | ||
logical, intent(in), optional | check_reconstruction, | ||
logical, intent(in), optional | check_remapping, | ||
logical, intent(in), optional | force_bounds_in_subcell, | ||
logical, intent(in), optional | answers_2018 | ||
) |
Set parameters within remapping object.
[in,out] | cs | Remapping control structure |
[in] | remapping_scheme | Remapping scheme to use |
[in] | boundary_extrapolation | Indicate to extrapolate in boundary cells |
[in] | check_reconstruction | Indicate to check reconstructions |
[in] | check_remapping | Indicate to check results of remapping |
[in] | force_bounds_in_subcell | Force subcells values to be bounded |
[in] | answers_2018 | If true use older, less acccurate expressions. |
Definition at line 90 of file MOM_remapping.F90.
References setreconstructiontype().
Referenced by initialize_remapping().
logical function, public mom_remapping::remapping_unit_tests | ( | logical, intent(in) | verbose | ) |
Runs unit tests on remapping functions. Should only be called from a single/root thread Returns True if a test fails, otherwise False.
[in] | verbose | If true, write results to stdout |
Definition at line 1613 of file MOM_remapping.F90.
References buildgridfromh(), dumpgrid(), dzfromh1h2(), hneglect_dflt, initialize_remapping(), integration_plm, integration_ppm, pcm_functions::pcm_reconstruction(), plm_functions::plm_reconstruction(), ppm_functions::ppm_boundary_extrapolation(), ppm_functions::ppm_reconstruction(), remap_via_sub_cells(), remapbydeltaz(), remapbyprojection(), remapping_core_w(), and test_answer().
Referenced by mom_unit_tests::unit_tests().
|
private |
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.
[in] | string | String to parse for method |
[in,out] | cs | Remapping control structure |
Definition at line 1568 of file MOM_remapping.F90.
References mom_error_handler::mom_error(), remapping_pcm, remapping_plm, remapping_ppm_h4, remapping_ppm_ih4, remapping_pqm_ih4ih3, remapping_pqm_ih6ih5, and mom_string_functions::uppercase().
Referenced by remapping_set_param().
|
private |
Returns true if any cell of u and u_true are not identical. Returns false otherwise.
[in] | verbose | If true, write results to stdout |
[in] | n | Number of cells in u |
[in] | u | Values to test |
[in] | u_true | Values to test against (correct answer) |
[in] | label | Message |
Definition at line 1880 of file MOM_remapping.F90.
Referenced by remapping_unit_tests().
|
private |
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.
Definition at line 76 of file MOM_remapping.F90.
Referenced by integraterecononinterval(), and remapping_unit_tests().
|
private |
Piecewise Constant Method.
Definition at line 54 of file MOM_remapping.F90.
Referenced by average_value_ppoly(), build_reconstructions_1d(), and integraterecononinterval().
|
private |
Piecewise Linear Method.
Definition at line 55 of file MOM_remapping.F90.
Referenced by average_value_ppoly(), build_reconstructions_1d(), integraterecononinterval(), and remapping_unit_tests().
|
private |
Piecewise Parabolic Method.
Definition at line 56 of file MOM_remapping.F90.
Referenced by average_value_ppoly(), build_reconstructions_1d(), integraterecononinterval(), and remapping_unit_tests().
|
private |
Piecewise Quartic Method.
Definition at line 57 of file MOM_remapping.F90.
Referenced by average_value_ppoly(), build_reconstructions_1d(), and integraterecononinterval().
|
private |
This module's name.
Definition at line 59 of file MOM_remapping.F90.
|
private |
Use the old "broken" algorithm. This is a temporary measure to assist debugging until we delete the old algorithm.
Definition at line 81 of file MOM_remapping.F90.
Referenced by remap_via_sub_cells().
integer, parameter mom_remapping::remapping_pcm = 0 |
O(h^1) remapping scheme.
Definition at line 47 of file MOM_remapping.F90.
Referenced by build_reconstructions_1d(), and setreconstructiontype().
|
private |
O(h^2) remapping scheme.
Definition at line 48 of file MOM_remapping.F90.
Referenced by build_reconstructions_1d(), and setreconstructiontype().
|
private |
O(h^3) remapping scheme.
Definition at line 49 of file MOM_remapping.F90.
Referenced by build_reconstructions_1d(), and setreconstructiontype().
|
private |
O(h^3) remapping scheme.
Definition at line 50 of file MOM_remapping.F90.
Referenced by build_reconstructions_1d(), and setreconstructiontype().
|
private |
O(h^4) remapping scheme.
Definition at line 51 of file MOM_remapping.F90.
Referenced by build_reconstructions_1d(), and setreconstructiontype().
|
private |
O(h^5) remapping scheme.
Definition at line 52 of file MOM_remapping.F90.
Referenced by build_reconstructions_1d(), and setreconstructiontype().
character(len=3), public mom_remapping::remappingdefaultscheme = "PLM" |
Default remapping method.
Definition at line 69 of file MOM_remapping.F90.
Referenced by mom_lateral_boundary_diffusion::lateral_boundary_diffusion_init(), and mom_neutral_diffusion::neutral_diffusion_init().
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.
Definition at line 62 of file MOM_remapping.F90.
Referenced by mom_lateral_boundary_diffusion::lateral_boundary_diffusion_init(), and mom_neutral_diffusion::neutral_diffusion_init().