MOM_remapping module reference

Provides column-wise vertical remapping functions

Data Types

remapping_CS

Container for remapping parameters

Functions/Subroutines

remapping_set_param

Set parameters within remapping object

extract_member_remapping_CS

remapping_core_h

Remaps column of values u0 on grid h0 to grid h1 assuming the top edge is aligned and using the OM4 reconstruction methods

remapping_core_w

Remaps column of values u0 on grid h0 to implied grid h1 where the interfaces of h1 differ from those of h0 by dx.

build_reconstructions_1d

Creates polynomial reconstructions of u0 on the source grid h0.

check_reconstructions_1d

Checks that edge values and reconstructions satisfy bounds

intersect_src_tgt_grids

Returns the intersection of source and targets grids along with and auxiliary lists or indices.

remap_src_to_sub_grid_om4

Adjust h_sub to ensure accurate conservation

remap_src_to_sub_grid

Remaps column of n0 values u0 on grid h0 to subgrid h_sub

remap_sub_to_tgt_grid_om4

Remaps column of n0+n1+1 values usub on sub-grid h_sub to targets on grid h1 using the OM4-era algorithm

remap_sub_to_tgt_grid

Remaps column of n0+n1+1 values usub on sub-grid h_sub to targets on grid h1

interpolate_column

Linearly interpolate interface data, u_src, from grid h_src to a grid h_dest

reintegrate_column

Conservatively calculate integrated data, uh_dest, on grid h_dest, from layer-integrated data, uh_src, on grid h_src

average_value_ppoly

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.

check_remapped_values

This subroutine checks for sufficient consistence in the extrema and total amounts on the old and new grids.

measure_input_bounds

Measure totals and bounds on source grid

measure_output_bounds

Measure totals and bounds on destination grid

dzFromH1H2

Calculates the change in interface positions based on h1 and h2

initialize_remapping

Constructor for remapping control structure

setReconstructionType

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.

end_remapping

Destrcutor for remapping control structure

test_interp

Test if interpolate_column() produces the wrong answer

test_reintegrate

Test if reintegrate_column() produces the wrong answer

test_recon_consistency

Test class-based remapping for internal consistency on random data

test_preserve_uniform

Test that remapping a uniform field remains uniform

test_unchanged_grid

Test that remapping to the same grid preserves answers

compare_two_schemes

Test class-based remapping bitwise reproduces original implementation

remapping_unit_tests

Runs unit tests on remapping functions. Should only be called from a single/root thread Returns True if a test fails, otherwise False

Type Documentation

type, public :: remapping_CS

Container for remapping parameters

Parameters
  • remapping_scheme

    Degree of polynomial reconstruction

  • degree

    If true, extrapolate boundaries

  • boundary_extrapolation

    If true, reconstructions are checked for consistency.

  • check_reconstruction

    If true, the result of remapping are checked for conservation and bounds.

  • check_remapping

    If true, the intermediate values used in remapping are forced to be bounded.

  • force_bounds_in_subcell

    If true, impose bounds on the remapping from sub-cells to target grid

  • force_bounds_in_target

    If true, impose bounds on the remapping from non-vanished sub-cells to target grid

  • better_force_bounds_in_target

    If true, calculate and use an offset when summing sub-cells to the target grid

  • offset_tgt_summation

    The vintage of the expressions to use for remapping. Values below 20190101 result in the use of older, less accurate expressions.

  • answer_date

    If true, use the OM4 version of the remapping algorithm that makes poor assumptions about the reconstructions in top and bottom layers of the source grid

  • om4_remap_via_sub_cells

    A negligibly small width for the purpose of cell reconstructions in the same units as the h0 argument to remapping_core_h [H]

  • h_neglect

    A negligibly small width for the purpose of edge value calculations in the same units as the h0 argument to remapping_core_h [H]

  • h_neglect_edge

    If true, do some debugging as operations proceed

  • debug

    The instance of the actual equation of state

Functions/Subroutine Documentation

subroutine remapping_set_param(CS, remapping_scheme, boundary_extrapolation, check_reconstruction, check_remapping, force_bounds_in_subcell, force_bounds_in_target, better_force_bounds_in_target, offset_tgt_summation, om4_remap_via_sub_cells, answers_2018, answer_date, nk, h_neglect, h_neglect_edge)

Set parameters within remapping object

Parameters
  • CS [inout]

    Remapping control structure

  • remapping_scheme [in]

    Remapping scheme to use

  • boundary_extrapolation [in]

    Indicate to extrapolate in boundary cells

  • check_reconstruction [in]

    Indicate to check reconstructions

  • check_remapping [in]

    Indicate to check results of remapping

  • force_bounds_in_subcell [in]

    Force subcells values to be bounded

  • force_bounds_in_target [in]

    Force target values to be bounded

  • better_force_bounds_in_target [in]

    Force target values to be bounded

  • offset_tgt_summation [in]

    Use an offset when summing sub-cells

  • om4_remap_via_sub_cells [in]

    If true, use OM4 remapping algorithm

  • answers_2018 [in]

    If true use older, less accurate expressions.

  • answer_date [in]

    The vintage of the expressions to use

  • h_neglect [in]

    A negligibly small width for the purpose of cell reconstructions in the same units as the h0 argument to remapping_core_h [H]

  • h_neglect_edge [in]

    A negligibly small width for the purpose of edge value calculations in the same units as as the h0 argument to remapping_core_h [H]

  • nk [in]

    Number of levels to initialize reconstruction class with

Callees call graph
Callees of mom_remapping::remapping_set_param calls cluster_mom_error_handler MOM_error_handler cluster_mom_remapping MOM_remapping mom_error_handler::mom_error MOM_error mom_remapping::remapping_set_param remapping_set_param mom_remapping::remapping_set_param->mom_error_handler::mom_error mom_remapping::setreconstructiontype setReconstructionType [private/internal] mom_remapping::remapping_set_param->mom_remapping::setreconstructiontype
Text view
Callers call graph
Callers of mom_remapping::remapping_set_param calls cluster_mom_ale MOM_ALE cluster_mom_remapping MOM_remapping mom_ale::ale_set_extrap_boundaries ALE_set_extrap_boundaries mom_remapping::remapping_set_param remapping_set_param mom_ale::ale_set_extrap_boundaries->mom_remapping::remapping_set_param mom_ale::ale_set_om4_remap_algorithm ALE_set_OM4_remap_algorithm [private/internal] mom_ale::ale_set_om4_remap_algorithm->mom_remapping::remapping_set_param mom_remapping::initialize_remapping initialize_remapping mom_remapping::initialize_remapping->mom_remapping::remapping_set_param mom_remapping::remapping_unit_tests remapping_unit_tests mom_remapping::remapping_unit_tests->mom_remapping::remapping_set_param
Text view

subroutine extract_member_remapping_CS(CS, remapping_scheme, degree, boundary_extrapolation, check_reconstruction, check_remapping, force_bounds_in_subcell, force_bounds_in_target, better_force_bounds_in_target, offset_tgt_summation)

Parameters
  • CS [in]

    Control structure for remapping module

  • remapping_scheme [out]

    Determines which reconstruction scheme to use

  • degree [out]

    Degree of polynomial reconstruction

  • boundary_extrapolation [out]

    If true, extrapolate boundaries

  • check_reconstruction [out]

    If true, reconstructions are checked for consistency.

  • check_remapping [out]

    If true, the result of remapping are checked for conservation and bounds.

  • force_bounds_in_subcell [out]

    If true, the intermediate values used in remapping are forced to be bounded.

  • force_bounds_in_target [out]

    Force target values to be bounded

  • better_force_bounds_in_target [out]

    Force target values to be bounded

  • offset_tgt_summation [out]

    Use an offset when summing sub-cells

Callers call graph
Callers of mom_remapping::extract_member_remapping_cs calls cluster_mom_hor_bnd_diffusion MOM_hor_bnd_diffusion cluster_mom_neutral_diffusion MOM_neutral_diffusion cluster_mom_remapping MOM_remapping mom_hor_bnd_diffusion::hor_bnd_diffusion_init hor_bnd_diffusion_init mom_remapping::extract_member_remapping_cs extract_member_remapping_CS mom_hor_bnd_diffusion::hor_bnd_diffusion_init->mom_remapping::extract_member_remapping_cs mom_hor_bnd_diffusion::near_boundary_unit_tests near_boundary_unit_tests mom_hor_bnd_diffusion::near_boundary_unit_tests->mom_remapping::extract_member_remapping_cs mom_neutral_diffusion::neutral_diffusion_init neutral_diffusion_init mom_neutral_diffusion::neutral_diffusion_init->mom_remapping::extract_member_remapping_cs
Text view
subroutine remapping_core_h(CS, n0, h0, u0, n1, h1, u1, net_err, PCM_cell)

Remaps column of values u0 on grid h0 to grid h1 assuming the top edge is aligned and using the OM4 reconstruction methods

Todo: Remove h_neglect argument by moving into remapping_CS

Todo: Remove PCM_cell argument by adding new method in Recon1D class

Parameters
  • CS [in]

    Remapping control structure

  • n0 [in]

    Number of cells on source grid

  • h0 [in]

    Cell widths on source grid [H]

  • u0 [in]

    Cell averages on source grid [A]

  • n1 [in]

    Number of cells on target grid

  • h1 [in]

    Cell widths on target grid [H]

  • u1 [out]

    Cell averages on target grid [A]

  • net_err [out]

    Error in total column [A H]

  • PCM_cell [in]

    If present, use PCM remapping for cells in the source grid where this is true.

Callees call graph
Callees of mom_remapping::remapping_core_h calls cluster_mom_remapping MOM_remapping mom_remapping::build_reconstructions_1d build_reconstructions_1d mom_remapping::check_reconstructions_1d check_reconstructions_1d [private/internal] mom_remapping::check_remapped_values check_remapped_values [private/internal] mom_remapping::intersect_src_tgt_grids intersect_src_tgt_grids [private/internal] mom_remapping::remap_src_to_sub_grid remap_src_to_sub_grid [private/internal] mom_remapping::remap_src_to_sub_grid_om4 remap_src_to_sub_grid_om4 [private/internal] mom_remapping::remap_sub_to_tgt_grid remap_sub_to_tgt_grid [private/internal] mom_remapping::remap_sub_to_tgt_grid_om4 remap_sub_to_tgt_grid_om4 [private/internal] mom_remapping::remapping_core_h remapping_core_h mom_remapping::remapping_core_h->mom_remapping::build_reconstructions_1d mom_remapping::remapping_core_h->mom_remapping::check_reconstructions_1d mom_remapping::remapping_core_h->mom_remapping::check_remapped_values mom_remapping::remapping_core_h->mom_remapping::intersect_src_tgt_grids mom_remapping::remapping_core_h->mom_remapping::remap_src_to_sub_grid mom_remapping::remapping_core_h->mom_remapping::remap_src_to_sub_grid_om4 mom_remapping::remapping_core_h->mom_remapping::remap_sub_to_tgt_grid mom_remapping::remapping_core_h->mom_remapping::remap_sub_to_tgt_grid_om4
Text view
Callers call graph
Callers of mom_remapping::remapping_core_h calls cluster_coord_hycom coord_hycom cluster_coord_rho coord_rho cluster_marbl_tracers MARBL_tracers cluster_mom_ale MOM_ALE cluster_mom_ale_sponge MOM_ALE_sponge cluster_mom_diag_remap MOM_diag_remap cluster_mom_hor_bnd_diffusion MOM_hor_bnd_diffusion cluster_mom_oda_driver_mod MOM_oda_driver_mod cluster_mom_oda_incupd MOM_oda_incupd cluster_mom_open_boundary MOM_open_boundary cluster_mom_remapping MOM_remapping cluster_mom_state_initialization MOM_state_initialization cluster_mom_tidal_mixing MOM_tidal_mixing cluster_mom_wave_speed MOM_wave_speed coord_hycom::build_hycom1_column build_hycom1_column mom_remapping::remapping_core_h remapping_core_h coord_hycom::build_hycom1_column->mom_remapping::remapping_core_h coord_rho::build_rho_column_iteratively build_rho_column_iteratively [private/internal] coord_rho::build_rho_column_iteratively->mom_remapping::remapping_core_h marbl_tracers::marbl_tracers_column_physics MARBL_tracers_column_physics marbl_tracers::marbl_tracers_column_physics->mom_remapping::remapping_core_h mom_ale::ale_regrid_accelerated ALE_regrid_accelerated mom_ale::ale_regrid_accelerated->mom_remapping::remapping_core_h mom_ale::ale_remap_scalar ALE_remap_scalar mom_ale::ale_remap_scalar->mom_remapping::remapping_core_h mom_ale::ale_remap_tracers ALE_remap_tracers mom_ale::ale_remap_tracers->mom_remapping::remapping_core_h mom_ale::ale_remap_velocities ALE_remap_velocities mom_ale::ale_remap_velocities->mom_remapping::remapping_core_h mom_ale_sponge::apply_ale_sponge apply_ALE_sponge mom_ale_sponge::apply_ale_sponge->mom_remapping::remapping_core_h mom_diag_remap::do_remap do_remap [private/internal] mom_diag_remap::do_remap->mom_remapping::remapping_core_h mom_hor_bnd_diffusion::fluxes_layer_method fluxes_layer_method [private/internal] mom_hor_bnd_diffusion::fluxes_layer_method->mom_remapping::remapping_core_h mom_oda_driver_mod::apply_oda_tracer_increments apply_oda_tracer_increments mom_oda_driver_mod::apply_oda_tracer_increments->mom_remapping::remapping_core_h mom_oda_driver_mod::set_prior_tracer set_prior_tracer mom_oda_driver_mod::set_prior_tracer->mom_remapping::remapping_core_h mom_oda_incupd::apply_oda_incupd apply_oda_incupd mom_oda_incupd::apply_oda_incupd->mom_remapping::remapping_core_h mom_oda_incupd::calc_oda_increments calc_oda_increments mom_oda_incupd::calc_oda_increments->mom_remapping::remapping_core_h mom_open_boundary::read_obc_field_data read_OBC_field_data [private/internal] mom_open_boundary::read_obc_field_data->mom_remapping::remapping_core_h mom_open_boundary::remap_obc_fields remap_OBC_fields mom_open_boundary::remap_obc_fields->mom_remapping::remapping_core_h mom_remapping::compare_two_schemes compare_two_schemes [private/internal] mom_remapping::compare_two_schemes->mom_remapping::remapping_core_h mom_remapping::remapping_unit_tests remapping_unit_tests mom_remapping::remapping_unit_tests->mom_remapping::remapping_core_h mom_remapping::test_preserve_uniform test_preserve_uniform [private/internal] mom_remapping::test_preserve_uniform->mom_remapping::remapping_core_h mom_remapping::test_unchanged_grid test_unchanged_grid [private/internal] mom_remapping::test_unchanged_grid->mom_remapping::remapping_core_h mom_state_initialization::cut_off_column_top cut_off_column_top [private/internal] mom_state_initialization::cut_off_column_top->mom_remapping::remapping_core_h mom_tidal_mixing::calculate_cvmix_tidal calculate_CVMix_tidal [private/internal] mom_tidal_mixing::calculate_cvmix_tidal->mom_remapping::remapping_core_h mom_wave_speed::wave_speed wave_speed mom_wave_speed::wave_speed->mom_remapping::remapping_core_h mom_wave_speed::wave_speeds wave_speeds mom_wave_speed::wave_speeds->mom_remapping::remapping_core_h
Text view
subroutine remapping_core_w(CS, n0, h0, u0, n1, dx, u1)

Remaps column of values u0 on grid h0 to implied grid h1 where the interfaces of h1 differ from those of h0 by dx.

Parameters
  • CS [in]

    Remapping control structure

  • n0 [in]

    Number of cells on source grid

  • h0 [in]

    Cell widths on source grid [H]

  • u0 [in]

    Cell averages on source grid [A]

  • n1 [in]

    Number of cells on target grid

  • dx [in]

    Cell widths on target grid [H]

  • u1 [out]

    Cell averages on target grid [A]

  • h1

    Cell widths on target grid [H]

Callees call graph
Callees of mom_remapping::remapping_core_w calls cluster_mom_remapping MOM_remapping mom_remapping::build_reconstructions_1d build_reconstructions_1d mom_remapping::check_reconstructions_1d check_reconstructions_1d [private/internal] mom_remapping::check_remapped_values check_remapped_values [private/internal] mom_remapping::intersect_src_tgt_grids intersect_src_tgt_grids [private/internal] mom_remapping::remap_src_to_sub_grid_om4 remap_src_to_sub_grid_om4 [private/internal] mom_remapping::remap_sub_to_tgt_grid_om4 remap_sub_to_tgt_grid_om4 [private/internal] mom_remapping::remapping_core_w remapping_core_w mom_remapping::remapping_core_w->mom_remapping::build_reconstructions_1d mom_remapping::remapping_core_w->mom_remapping::check_reconstructions_1d mom_remapping::remapping_core_w->mom_remapping::check_remapped_values mom_remapping::remapping_core_w->mom_remapping::intersect_src_tgt_grids mom_remapping::remapping_core_w->mom_remapping::remap_src_to_sub_grid_om4 mom_remapping::remapping_core_w->mom_remapping::remap_sub_to_tgt_grid_om4
Text view
Callers call graph
Callers of mom_remapping::remapping_core_w calls cluster_mom_ale MOM_ALE cluster_mom_remapping MOM_remapping mom_ale::ale_remap_scalar ALE_remap_scalar mom_remapping::remapping_core_w remapping_core_w mom_ale::ale_remap_scalar->mom_remapping::remapping_core_w mom_remapping::remapping_unit_tests remapping_unit_tests mom_remapping::remapping_unit_tests->mom_remapping::remapping_core_w
Text view
subroutine build_reconstructions_1d(CS, n0, h0, u0, ppoly_r_coefs, ppoly_r_E, ppoly_r_S, iMethod, h_neglect, h_neglect_edge, PCM_cell, debug)

Creates polynomial reconstructions of u0 on the source grid h0.

Parameters
  • CS [in]

    Remapping control structure

  • n0 [in]

    Number of cells on source grid

  • h0 [in]

    Cell widths on source grid [H]

  • u0 [in]

    Cell averages on source grid [A]

  • ppoly_r_coefs [out]

    Coefficients of polynomial [A]

  • ppoly_r_E [out]

    Edge value of polynomial [A]

  • ppoly_r_S [out]

    Edge slope of polynomial [A H-1]

  • iMethod [out]

    Integration method

  • h_neglect [in]

    A negligibly small width for the purpose of cell reconstructions in the same units as h0 [H]

  • h_neglect_edge [in]

    A negligibly small width for the purpose of edge value calculations in the same units as h0 [H]. The default is h_neglect.

  • PCM_cell [in]

    If present, use PCM remapping for cells from the source grid where this is true.

  • debug [in]

    If true, enable debugging

Callees call graph
Callees of mom_remapping::build_reconstructions_1d calls cluster_mom_error_handler MOM_error_handler cluster_mom_hybgen_remap MOM_hybgen_remap cluster_mom_remapping MOM_remapping cluster_pcm_functions PCM_functions cluster_plm_functions PLM_functions cluster_ppm_functions PPM_functions cluster_pqm_functions PQM_functions cluster_regrid_edge_values regrid_edge_values mom_error_handler::mom_error MOM_error mom_hybgen_remap::hybgen_plm_coefs hybgen_plm_coefs mom_hybgen_remap::hybgen_ppm_coefs hybgen_ppm_coefs mom_hybgen_remap::hybgen_weno_coefs hybgen_weno_coefs mom_remapping::build_reconstructions_1d build_reconstructions_1d mom_remapping::build_reconstructions_1d->mom_error_handler::mom_error mom_remapping::build_reconstructions_1d->mom_hybgen_remap::hybgen_plm_coefs mom_remapping::build_reconstructions_1d->mom_hybgen_remap::hybgen_ppm_coefs mom_remapping::build_reconstructions_1d->mom_hybgen_remap::hybgen_weno_coefs pcm_functions::pcm_reconstruction PCM_reconstruction mom_remapping::build_reconstructions_1d->pcm_functions::pcm_reconstruction plm_functions::plm_boundary_extrapolation PLM_boundary_extrapolation mom_remapping::build_reconstructions_1d->plm_functions::plm_boundary_extrapolation plm_functions::plm_reconstruction PLM_reconstruction mom_remapping::build_reconstructions_1d->plm_functions::plm_reconstruction ppm_functions::ppm_boundary_extrapolation PPM_boundary_extrapolation mom_remapping::build_reconstructions_1d->ppm_functions::ppm_boundary_extrapolation ppm_functions::ppm_monotonicity PPM_monotonicity mom_remapping::build_reconstructions_1d->ppm_functions::ppm_monotonicity ppm_functions::ppm_reconstruction PPM_reconstruction mom_remapping::build_reconstructions_1d->ppm_functions::ppm_reconstruction pqm_functions::pqm_boundary_extrapolation_v1 PQM_boundary_extrapolation_v1 mom_remapping::build_reconstructions_1d->pqm_functions::pqm_boundary_extrapolation_v1 pqm_functions::pqm_reconstruction PQM_reconstruction mom_remapping::build_reconstructions_1d->pqm_functions::pqm_reconstruction regrid_edge_values::edge_slopes_implicit_h3 edge_slopes_implicit_h3 mom_remapping::build_reconstructions_1d->regrid_edge_values::edge_slopes_implicit_h3 regrid_edge_values::edge_slopes_implicit_h5 edge_slopes_implicit_h5 mom_remapping::build_reconstructions_1d->regrid_edge_values::edge_slopes_implicit_h5 regrid_edge_values::edge_values_explicit_h4 edge_values_explicit_h4 mom_remapping::build_reconstructions_1d->regrid_edge_values::edge_values_explicit_h4 regrid_edge_values::edge_values_explicit_h4cw edge_values_explicit_h4cw mom_remapping::build_reconstructions_1d->regrid_edge_values::edge_values_explicit_h4cw regrid_edge_values::edge_values_implicit_h4 edge_values_implicit_h4 mom_remapping::build_reconstructions_1d->regrid_edge_values::edge_values_implicit_h4 regrid_edge_values::edge_values_implicit_h6 edge_values_implicit_h6 mom_remapping::build_reconstructions_1d->regrid_edge_values::edge_values_implicit_h6
Text view
Callers call graph
Callers of mom_remapping::build_reconstructions_1d calls cluster_mom_neutral_diffusion MOM_neutral_diffusion cluster_mom_remapping MOM_remapping mom_neutral_diffusion::neutral_diffusion_calc_coeffs neutral_diffusion_calc_coeffs mom_remapping::build_reconstructions_1d build_reconstructions_1d mom_neutral_diffusion::neutral_diffusion_calc_coeffs->mom_remapping::build_reconstructions_1d mom_neutral_diffusion::neutral_surface_flux neutral_surface_flux [private/internal] mom_neutral_diffusion::neutral_surface_flux->mom_remapping::build_reconstructions_1d mom_remapping::remapping_core_h remapping_core_h mom_remapping::remapping_core_h->mom_remapping::build_reconstructions_1d mom_remapping::remapping_core_w remapping_core_w mom_remapping::remapping_core_w->mom_remapping::build_reconstructions_1d
Text view
subroutine check_reconstructions_1d(n0, h0, u0, deg, boundary_extrapolation, ppoly_r_coefs, ppoly_r_E)

Checks that edge values and reconstructions satisfy bounds

Parameters
  • n0 [in]

    Number of cells on source grid

  • h0 [in]

    Cell widths on source grid [H]

  • u0 [in]

    Cell averages on source grid [A]

  • deg [in]

    Degree of polynomial reconstruction

  • boundary_extrapolation [in]

    Extrapolate at boundaries if true

  • ppoly_r_coefs [in]

    Coefficients of polynomial [A]

  • ppoly_r_E [in]

    Edge value of polynomial [A]

Callees call graph
Callees of mom_remapping::check_reconstructions_1d calls cluster_mom_error_handler MOM_error_handler cluster_mom_remapping MOM_remapping mom_error_handler::mom_error MOM_error mom_remapping::check_reconstructions_1d check_reconstructions_1d [private/internal] mom_remapping::check_reconstructions_1d->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_remapping::check_reconstructions_1d calls cluster_mom_remapping MOM_remapping mom_remapping::check_reconstructions_1d check_reconstructions_1d [private/internal] mom_remapping::remapping_core_h remapping_core_h mom_remapping::remapping_core_h->mom_remapping::check_reconstructions_1d mom_remapping::remapping_core_w remapping_core_w mom_remapping::remapping_core_w->mom_remapping::check_reconstructions_1d
Text view
subroutine intersect_src_tgt_grids(n0, h0, n1, h1, h_sub, h0_eff, isrc_start, isrc_end, isrc_max, itgt_start, itgt_end, isub_src)

Returns the intersection of source and targets grids along with and auxiliary lists or indices.

For source grid with thicknesses h0(1:n0) and target grid with thicknesses h1(1:n1) the intersection or "subgrid" has thicknesses h_sub(1:n0+n1+1). h0 and h1 must have the same units. h_sub will return with the same units as h0 and h1.

Notes on the algorithm: Internally, grids are defined by the interfaces (although we describe grids via thicknesses for accuracy). The intersection or union of two grids is thus defined by the super set of both lists of interfaces. Because both source and target grids can contain vanished cells, we do not eliminate repeated interfaces from the union. That is, the total number of interfaces of the sub-cells is equal to the total numer of interfaces of the source grid (n0+1) plus the total number of interfaces of the target grid (n1+1), i.e. n0+n1+2. Whenever target and source interfaces align, then the retention of identical interfaces leads to a vanished subcell. The remapping uses a common point of reference to the left (top) so there is always a vanished subcell at the left (top). If the total column thicknesses are the same, then the right (bottom) interfaces are also aligned and so the last subcell will also be vanished.

Parameters
  • n0 [in]

    Number of cells in source grid

  • h0 [in]

    Source grid widths (size n0) [H]

  • n1 [in]

    Number of cells in target grid

  • h1 [in]

    Target grid widths (size n1) [H]

  • h_sub [out]

    Overlapping sub-cell thicknesses, h_sub [H]

  • h0_eff [out]

    Effective thickness of source cells [H]

  • isrc_start [out]

    Index of first sub-cell within each source cell

  • isrc_end [out]

    Index of last sub-cell within each source cell

  • isrc_max [out]

    Index of thickest sub-cell within each source cell

  • itgt_start [out]

    Index of first sub-cell within each target cell

  • itgt_end [out]

    Index of last sub-cell within each target cell

  • isub_src [out]

    Index of source cell for each sub-cell

  • src_has_volume

    True if h0 has not been consumed

  • tgt_has_volume

    True if h1 has not been consumed

Callers call graph
Callers of mom_remapping::intersect_src_tgt_grids calls cluster_mom_remapping MOM_remapping mom_remapping::intersect_src_tgt_grids intersect_src_tgt_grids [private/internal] mom_remapping::remapping_core_h remapping_core_h mom_remapping::remapping_core_h->mom_remapping::intersect_src_tgt_grids mom_remapping::remapping_core_w remapping_core_w mom_remapping::remapping_core_w->mom_remapping::intersect_src_tgt_grids mom_remapping::remapping_unit_tests remapping_unit_tests mom_remapping::remapping_unit_tests->mom_remapping::intersect_src_tgt_grids
Text view
subroutine remap_src_to_sub_grid_om4(n0, h0, u0, ppoly0_E, ppoly0_coefs, n1, h_sub, h0_eff, isrc_start, isrc_end, isrc_max, isub_src, method, force_bounds_in_subcell, u_sub, uh_sub, u02_err)

Adjust h_sub to ensure accurate conservation

Loop over each source cell substituting the thickest sub-cell (within the source cell) with the residual of the source cell thickness minus the sum of other sub-cells aka a genius algorithm for accurate conservation when remapping from Robert Hallberg (@Hallberg-NOAA).

Remaps column of n0 values u0 on grid h0 to subgrid h_sub

This includes an error for the scenario where the source grid is much thicker than the target grid and extrapolation is needed.

Parameters
  • n0 [in]

    Number of cells in source grid

  • h0 [in]

    Source grid widths (size n0) [H]

  • u0 [in]

    Source grid widths (size n0) [H]

  • ppoly0_E [in]

    Edge value of polynomial [A]

  • ppoly0_coefs [in]

    Coefficients of polynomial [A]

  • n1 [in]

    Number of cells in target grid

  • h_sub [in]

    Overlapping sub-cell thicknesses, h_sub [H]

  • h0_eff [in]

    Effective thickness of source cells [H]

  • isrc_start [in]

    Index of first sub-cell within each source cell

  • isrc_end [in]

    Index of last sub-cell within each source cell

  • isrc_max [in]

    Index of thickest sub-cell within each source cell

  • isub_src [in]

    Index of source cell for each sub-cell

  • method [in]

    Remapping scheme to use

  • force_bounds_in_subcell [in]

    Force sub-cell values to be bounded

  • u_sub [out]

    Sub-cell cell averages (size n1) [A]

  • uh_sub [out]

    Sub-cell cell integrals (size n1) [A H]

  • u02_err [out]

    Integrated reconstruction error estimates [A H]

  • u0_min

    Min/max of u0 for each source cell [A]

  • u0_max

    Min/max of u0 for each source cell [A]

Callees call graph
Callees of mom_remapping::remap_src_to_sub_grid_om4 calls cluster_mom_remapping MOM_remapping mom_remapping::average_value_ppoly average_value_ppoly mom_remapping::remap_src_to_sub_grid_om4 remap_src_to_sub_grid_om4 [private/internal] mom_remapping::remap_src_to_sub_grid_om4->mom_remapping::average_value_ppoly
Text view
Callers call graph
Callers of mom_remapping::remap_src_to_sub_grid_om4 calls cluster_mom_remapping MOM_remapping mom_remapping::remap_src_to_sub_grid_om4 remap_src_to_sub_grid_om4 [private/internal] mom_remapping::remapping_core_h remapping_core_h mom_remapping::remapping_core_h->mom_remapping::remap_src_to_sub_grid_om4 mom_remapping::remapping_core_w remapping_core_w mom_remapping::remapping_core_w->mom_remapping::remap_src_to_sub_grid_om4 mom_remapping::remapping_unit_tests remapping_unit_tests mom_remapping::remapping_unit_tests->mom_remapping::remap_src_to_sub_grid_om4
Text view
subroutine remap_src_to_sub_grid(n0, h0, u0, ppoly0_E, ppoly0_coefs, n1, h_sub, isrc_start, isrc_end, isrc_max, isub_src, method, force_bounds_in_subcell, u_sub, uh_sub, u02_err)

Remaps column of n0 values u0 on grid h0 to subgrid h_sub

Parameters
  • n0 [in]

    Number of cells in source grid

  • h0 [in]

    Source grid widths (size n0) [H]

  • u0 [in]

    Source grid widths (size n0) [H]

  • ppoly0_E [in]

    Edge value of polynomial [A]

  • ppoly0_coefs [in]

    Coefficients of polynomial [A]

  • n1 [in]

    Number of cells in target grid

  • h_sub [in]

    Overlapping sub-cell thicknesses, h_sub [H]

  • isrc_start [in]

    Index of first sub-cell within each source cell

  • isrc_end [in]

    Index of last sub-cell within each source cell

  • isrc_max [in]

    Index of thickest sub-cell within each source cell

  • isub_src [in]

    Index of source cell for each sub-cell

  • method [in]

    Remapping scheme to use

  • force_bounds_in_subcell [in]

    Force sub-cell values to be bounded

  • u_sub [out]

    Sub-cell cell averages (size n1) [A]

  • uh_sub [out]

    Sub-cell cell integrals (size n1) [A H]

  • u02_err [out]

    Integrated reconstruction error estimates [A H]

Callees call graph
Callees of mom_remapping::remap_src_to_sub_grid calls cluster_mom_remapping MOM_remapping mom_remapping::average_value_ppoly average_value_ppoly mom_remapping::remap_src_to_sub_grid remap_src_to_sub_grid [private/internal] mom_remapping::remap_src_to_sub_grid->mom_remapping::average_value_ppoly
Text view
Callers call graph
Callers of mom_remapping::remap_src_to_sub_grid calls cluster_mom_remapping MOM_remapping mom_remapping::remap_src_to_sub_grid remap_src_to_sub_grid [private/internal] mom_remapping::remapping_core_h remapping_core_h mom_remapping::remapping_core_h->mom_remapping::remap_src_to_sub_grid mom_remapping::remapping_unit_tests remapping_unit_tests mom_remapping::remapping_unit_tests->mom_remapping::remap_src_to_sub_grid
Text view
subroutine remap_sub_to_tgt_grid_om4(n0, n1, h1, h_sub, u_sub, uh_sub, itgt_start, itgt_end, force_bounds_in_target, u1, uh_err)

Remaps column of n0+n1+1 values usub on sub-grid h_sub to targets on grid h1 using the OM4-era algorithm

Parameters
  • n0 [in]

    Number of cells in source grid

  • n1 [in]

    Number of cells in target grid

  • h1 [in]

    Target grid widths (size n1) [H]

  • h_sub [in]

    Overlapping sub-cell thicknesses, h_sub [H]

  • u_sub [in]

    Sub-cell cell averages (size n1) [A]

  • uh_sub [in]

    Sub-cell cell integrals (size n1) [A H]

  • itgt_start [in]

    Index of first sub-cell within each target cell

  • itgt_end [in]

    Index of last sub-cell within each target cell

  • force_bounds_in_target [in]

    Force sub-cell values to be bounded

  • u1 [out]

    Target cell averages (size n1) [A]

  • uh_err [out]

    Estimate of bound on error in sum of u*h [A H]

Callers call graph
Callers of mom_remapping::remap_sub_to_tgt_grid_om4 calls cluster_mom_remapping MOM_remapping mom_remapping::remap_sub_to_tgt_grid_om4 remap_sub_to_tgt_grid_om4 [private/internal] mom_remapping::remapping_core_h remapping_core_h mom_remapping::remapping_core_h->mom_remapping::remap_sub_to_tgt_grid_om4 mom_remapping::remapping_core_w remapping_core_w mom_remapping::remapping_core_w->mom_remapping::remap_sub_to_tgt_grid_om4
Text view
subroutine remap_sub_to_tgt_grid(n0, n1, h1, h_sub, u_sub, uh_sub, itgt_start, itgt_end, force_bounds_in_target, better_force_bounds_in_target, offset_summation, u1, uh_err)

Remaps column of n0+n1+1 values usub on sub-grid h_sub to targets on grid h1

Parameters
  • n0 [in]

    Number of cells in source grid

  • n1 [in]

    Number of cells in target grid

  • h1 [in]

    Target grid widths (size n1) [H]

  • h_sub [in]

    Overlapping sub-cell thicknesses, h_sub [H]

  • u_sub [in]

    Sub-cell cell averages (size n1) [A]

  • uh_sub [in]

    Sub-cell cell integrals (size n1) [A H]

  • itgt_start [in]

    Index of first sub-cell within each target cell

  • itgt_end [in]

    Index of last sub-cell within each target cell

  • force_bounds_in_target [in]

    Force sub-cell values to be bounded

  • better_force_bounds_in_target [in]

    Force sub-cell values to be bounded

  • offset_summation [in]

    Offset values in summation for accuracy

  • u1 [out]

    Target cell averages (size n1) [A]

  • uh_err [out]

    Estimate of bound on error in sum of u*h [A H]

Callers call graph
Callers of mom_remapping::remap_sub_to_tgt_grid calls cluster_mom_remapping MOM_remapping mom_remapping::remap_sub_to_tgt_grid remap_sub_to_tgt_grid [private/internal] mom_remapping::remapping_core_h remapping_core_h mom_remapping::remapping_core_h->mom_remapping::remap_sub_to_tgt_grid mom_remapping::remapping_unit_tests remapping_unit_tests mom_remapping::remapping_unit_tests->mom_remapping::remap_sub_to_tgt_grid
Text view
subroutine interpolate_column(nsrc, h_src, u_src, ndest, h_dest, u_dest, mask_edges)

Linearly interpolate interface data, u_src, from grid h_src to a grid h_dest

Parameters
  • nsrc [in]

    Number of source cells

  • h_src [in]

    Thickness of source cells [H]

  • u_src [in]

    Values at source cell interfaces [A]

  • ndest [in]

    Number of destination cells

  • h_dest [in]

    Thickness of destination cells [H]

  • u_dest [inout]

    Interpolated value at destination cell interfaces [A]

  • mask_edges [in]

    If true, mask the values outside of massless layers at the top and bottom of the column.

Callers call graph
Callers of mom_remapping::interpolate_column calls cluster_mom_ale MOM_ALE cluster_mom_diag_remap MOM_diag_remap cluster_mom_remapping MOM_remapping cluster_mom_wave_speed MOM_wave_speed mom_ale::ale_offline_inputs ALE_offline_inputs mom_remapping::interpolate_column interpolate_column mom_ale::ale_offline_inputs->mom_remapping::interpolate_column mom_ale::ale_remap_interface_vals ALE_remap_interface_vals mom_ale::ale_remap_interface_vals->mom_remapping::interpolate_column mom_ale::ale_remap_vertex_vals ALE_remap_vertex_vals mom_ale::ale_remap_vertex_vals->mom_remapping::interpolate_column mom_diag_remap::vertically_interpolate_field vertically_interpolate_field [private/internal] mom_diag_remap::vertically_interpolate_field->mom_remapping::interpolate_column mom_remapping::test_interp test_interp [private/internal] mom_remapping::test_interp->mom_remapping::interpolate_column mom_wave_speed::wave_speeds wave_speeds mom_wave_speed::wave_speeds->mom_remapping::interpolate_column
Text view
subroutine reintegrate_column(nsrc, h_src, uh_src, ndest, h_dest, uh_dest)

Conservatively calculate integrated data, uh_dest, on grid h_dest, from layer-integrated data, uh_src, on grid h_src

Parameters
  • nsrc [in]

    Number of source cells

  • h_src [in]

    Thickness of source cells [H]

  • uh_src [in]

    Values at source cell interfaces [A H]

  • ndest [in]

    Number of destination cells

  • h_dest [in]

    Thickness of destination cells [H]

  • uh_dest [inout]

    Interpolated value at destination cell interfaces [A H]

Callers call graph
Callers of mom_remapping::reintegrate_column calls cluster_marbl_tracers MARBL_tracers cluster_mom_ale MOM_ALE cluster_mom_diag_remap MOM_diag_remap cluster_mom_hor_bnd_diffusion MOM_hor_bnd_diffusion cluster_mom_remapping MOM_remapping marbl_tracers::marbl_tracers_column_physics MARBL_tracers_column_physics mom_remapping::reintegrate_column reintegrate_column marbl_tracers::marbl_tracers_column_physics->mom_remapping::reintegrate_column mom_ale::ale_offline_inputs ALE_offline_inputs mom_ale::ale_offline_inputs->mom_remapping::reintegrate_column mom_diag_remap::vertically_reintegrate_field vertically_reintegrate_field [private/internal] mom_diag_remap::vertically_reintegrate_field->mom_remapping::reintegrate_column mom_hor_bnd_diffusion::fluxes_layer_method fluxes_layer_method [private/internal] mom_hor_bnd_diffusion::fluxes_layer_method->mom_remapping::reintegrate_column mom_remapping::test_reintegrate test_reintegrate [private/internal] mom_remapping::test_reintegrate->mom_remapping::reintegrate_column
Text view
real function 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.

Parameters
  • n0 [in]

    Number of cells in source grid

  • u0 [in]

    Cell means [A]

  • ppoly0_E [in]

    Edge value of polynomial [A]

  • ppoly0_coefs [in]

    Coefficients of polynomial [A]

  • method [in]

    Remapping scheme to use

  • i0 [in]

    Source cell index

  • xa [in]

    Non-dimensional start position within source cell [nondim]

  • xb [in]

    Non-dimensional end position within source cell [nondim]

Callees call graph
Callees of mom_remapping::average_value_ppoly calls cluster_mom_error_handler MOM_error_handler cluster_mom_remapping MOM_remapping mom_error_handler::mom_error MOM_error mom_remapping::average_value_ppoly average_value_ppoly mom_remapping::average_value_ppoly->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_remapping::average_value_ppoly calls cluster_mom_neutral_diffusion MOM_neutral_diffusion cluster_mom_remapping MOM_remapping mom_neutral_diffusion::neutral_surface_t_eval neutral_surface_T_eval [private/internal] mom_remapping::average_value_ppoly average_value_ppoly mom_neutral_diffusion::neutral_surface_t_eval->mom_remapping::average_value_ppoly mom_remapping::remap_src_to_sub_grid remap_src_to_sub_grid [private/internal] mom_remapping::remap_src_to_sub_grid->mom_remapping::average_value_ppoly mom_remapping::remap_src_to_sub_grid_om4 remap_src_to_sub_grid_om4 [private/internal] mom_remapping::remap_src_to_sub_grid_om4->mom_remapping::average_value_ppoly
Text view
subroutine check_remapped_values(n0, h0, u0, ppoly_r_E, deg, ppoly_r_coefs, n1, h1, u1, iMethod, uh_err, caller)

This subroutine checks for sufficient consistence in the extrema and total amounts on the old and new grids.

Parameters
  • n0 [in]

    Number of cells on source grid

  • h0 [in]

    Cell widths on source grid [H]

  • u0 [in]

    Cell averages on source grid [A]

  • ppoly_r_E [in]

    Edge values of polynomial fits [A]

  • deg [in]

    Degree of the piecewise polynomial reconstrution

  • ppoly_r_coefs [in]

    Coefficients of the piecewise polynomial reconstructions [A]

  • n1 [in]

    Number of cells on target grid

  • h1 [in]

    Cell widths on target grid [H]

  • u1 [in]

    Cell averages on target grid [A]

  • iMethod [in]

    An integer indicating the integration method used

  • uh_err [in]

    A bound on the error in the sum of u*h as estimated by the remapping code [H A]

  • caller [in]

    The name of the calling routine.

Callees call graph
Callees of mom_remapping::check_remapped_values calls cluster_mom_error_handler MOM_error_handler cluster_mom_remapping MOM_remapping mom_error_handler::mom_error MOM_error mom_remapping::check_remapped_values check_remapped_values [private/internal] mom_remapping::check_remapped_values->mom_error_handler::mom_error mom_remapping::measure_input_bounds measure_input_bounds [private/internal] mom_remapping::check_remapped_values->mom_remapping::measure_input_bounds mom_remapping::measure_output_bounds measure_output_bounds [private/internal] mom_remapping::check_remapped_values->mom_remapping::measure_output_bounds
Text view
Callers call graph
Callers of mom_remapping::check_remapped_values calls cluster_mom_remapping MOM_remapping mom_remapping::check_remapped_values check_remapped_values [private/internal] mom_remapping::remapping_core_h remapping_core_h mom_remapping::remapping_core_h->mom_remapping::check_remapped_values mom_remapping::remapping_core_w remapping_core_w mom_remapping::remapping_core_w->mom_remapping::check_remapped_values
Text view
subroutine measure_input_bounds(n0, h0, u0, edge_values, h0tot, h0err, u0tot, u0err, u0min, u0max)

Measure totals and bounds on source grid

Parameters
  • n0 [in]

    Number of cells on source grid

  • h0 [in]

    Cell widths on source grid [H]

  • u0 [in]

    Cell averages on source grid [A]

  • edge_values [in]

    Cell edge values on source grid [A]

  • h0tot [out]

    Sum of cell widths [H]

  • h0err [out]

    Magnitude of round-off error in h0tot [H]

  • u0tot [out]

    Sum of cell widths times values [H A]

  • u0err [out]

    Magnitude of round-off error in u0tot [H A]

  • u0min [out]

    Minimum value in reconstructions of u0 [A]

  • u0max [out]

    Maximum value in reconstructions of u0 [A]

Callers call graph
Callers of mom_remapping::measure_input_bounds calls cluster_mom_remapping MOM_remapping mom_remapping::check_remapped_values check_remapped_values [private/internal] mom_remapping::measure_input_bounds measure_input_bounds [private/internal] mom_remapping::check_remapped_values->mom_remapping::measure_input_bounds
Text view
subroutine measure_output_bounds(n1, h1, u1, h1tot, h1err, u1tot, u1err, u1min, u1max)

Measure totals and bounds on destination grid

Parameters
  • n1 [in]

    Number of cells on destination grid

  • h1 [in]

    Cell widths on destination grid [H]

  • u1 [in]

    Cell averages on destination grid [A]

  • h1tot [out]

    Sum of cell widths [H]

  • h1err [out]

    Magnitude of round-off error in h1tot [H]

  • u1tot [out]

    Sum of cell widths times values [H A]

  • u1err [out]

    Magnitude of round-off error in u1tot [H A]

  • u1min [out]

    Minimum value in reconstructions of u1 [A]

  • u1max [out]

    Maximum value in reconstructions of u1 [A]

Callers call graph
Callers of mom_remapping::measure_output_bounds calls cluster_mom_remapping MOM_remapping mom_remapping::check_remapped_values check_remapped_values [private/internal] mom_remapping::measure_output_bounds measure_output_bounds [private/internal] mom_remapping::check_remapped_values->mom_remapping::measure_output_bounds
Text view
subroutine 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]

Callers call graph
Callers of mom_remapping::dzfromh1h2 calls cluster_mom_ale MOM_ALE cluster_mom_remapping MOM_remapping mom_ale::ale_remap_scalar ALE_remap_scalar mom_remapping::dzfromh1h2 dzFromH1H2 mom_ale::ale_remap_scalar->mom_remapping::dzfromh1h2 mom_remapping::remapping_unit_tests remapping_unit_tests mom_remapping::remapping_unit_tests->mom_remapping::dzfromh1h2
Text view
subroutine initialize_remapping(CS, remapping_scheme, boundary_extrapolation, check_reconstruction, check_remapping, force_bounds_in_subcell, force_bounds_in_target, better_force_bounds_in_target, offset_tgt_summation, om4_remap_via_sub_cells, answers_2018, answer_date, nk, h_neglect, h_neglect_edge)

Constructor for remapping control structure

Parameters
  • CS [inout]

    Remapping control structure

  • remapping_scheme [in]

    Remapping scheme to use

  • boundary_extrapolation [in]

    Indicate to extrapolate in boundary cells

  • check_reconstruction [in]

    Indicate to check reconstructions

  • check_remapping [in]

    Indicate to check results of remapping

  • force_bounds_in_subcell [in]

    Force subcells values to be bounded

  • force_bounds_in_target [in]

    Force target values to be bounded

  • better_force_bounds_in_target [in]

    Force target values to be bounded

  • offset_tgt_summation [in]

    Use an offset when summing sub-cells

  • om4_remap_via_sub_cells [in]

    If true, use OM4 remapping algorithm

  • answers_2018 [in]

    If true use older, less accurate expressions.

  • answer_date [in]

    The vintage of the expressions to use

  • h_neglect [in]

    A negligibly small width for the purpose of cell reconstructions in the same units as h0 [H]

  • h_neglect_edge [in]

    A negligibly small width for the purpose of edge value calculations in the same units as h0 [H].

  • nk [in]

    Number of levels to initialize reconstruction class with

Callees call graph
Callees of mom_remapping::initialize_remapping calls cluster_mom_remapping MOM_remapping mom_remapping::initialize_remapping initialize_remapping mom_remapping::remapping_set_param remapping_set_param mom_remapping::initialize_remapping->mom_remapping::remapping_set_param
Text view
Callers call graph
Callers of mom_remapping::initialize_remapping calls cluster_marbl_tracers MARBL_tracers cluster_mom_ale MOM_ALE cluster_mom_ale_sponge MOM_ALE_sponge cluster_mom_diag_remap MOM_diag_remap cluster_mom_hor_bnd_diffusion MOM_hor_bnd_diffusion cluster_mom_neutral_diffusion MOM_neutral_diffusion cluster_mom_oda_driver_mod MOM_oda_driver_mod cluster_mom_oda_incupd MOM_oda_incupd cluster_mom_open_boundary MOM_open_boundary cluster_mom_remapping MOM_remapping cluster_mom_state_initialization MOM_state_initialization cluster_mom_tidal_mixing MOM_tidal_mixing cluster_mom_tracer_initialization_from_z MOM_tracer_initialization_from_Z cluster_mom_wave_speed MOM_wave_speed marbl_tracers::register_marbl_tracers register_MARBL_tracers mom_remapping::initialize_remapping initialize_remapping marbl_tracers::register_marbl_tracers->mom_remapping::initialize_remapping mom_ale::ale_init ALE_init mom_ale::ale_init->mom_remapping::initialize_remapping mom_ale_sponge::initialize_ale_sponge_fixed initialize_ALE_sponge_fixed [private/internal] mom_ale_sponge::initialize_ale_sponge_fixed->mom_remapping::initialize_remapping mom_ale_sponge::initialize_ale_sponge_varying initialize_ALE_sponge_varying [private/internal] mom_ale_sponge::initialize_ale_sponge_varying->mom_remapping::initialize_remapping mom_diag_remap::diag_remap_update diag_remap_update mom_diag_remap::diag_remap_update->mom_remapping::initialize_remapping mom_hor_bnd_diffusion::hor_bnd_diffusion_init hor_bnd_diffusion_init mom_hor_bnd_diffusion::hor_bnd_diffusion_init->mom_remapping::initialize_remapping mom_hor_bnd_diffusion::near_boundary_unit_tests near_boundary_unit_tests mom_hor_bnd_diffusion::near_boundary_unit_tests->mom_remapping::initialize_remapping mom_neutral_diffusion::neutral_diffusion_init neutral_diffusion_init mom_neutral_diffusion::neutral_diffusion_init->mom_remapping::initialize_remapping mom_oda_driver_mod::init_oda init_oda mom_oda_driver_mod::init_oda->mom_remapping::initialize_remapping mom_oda_incupd::initialize_oda_incupd initialize_oda_incupd mom_oda_incupd::initialize_oda_incupd->mom_remapping::initialize_remapping mom_open_boundary::open_boundary_setup_vert open_boundary_setup_vert mom_open_boundary::open_boundary_setup_vert->mom_remapping::initialize_remapping mom_remapping::remapping_unit_tests remapping_unit_tests mom_remapping::remapping_unit_tests->mom_remapping::initialize_remapping mom_remapping::test_preserve_uniform test_preserve_uniform [private/internal] mom_remapping::test_preserve_uniform->mom_remapping::initialize_remapping mom_remapping::test_recon_consistency test_recon_consistency [private/internal] mom_remapping::test_recon_consistency->mom_remapping::initialize_remapping mom_remapping::test_unchanged_grid test_unchanged_grid [private/internal] mom_remapping::test_unchanged_grid->mom_remapping::initialize_remapping mom_state_initialization::mom_temp_salt_initialize_from_z MOM_temp_salt_initialize_from_Z [private/internal] mom_state_initialization::mom_temp_salt_initialize_from_z->mom_remapping::initialize_remapping mom_state_initialization::trim_for_ice trim_for_ice [private/internal] mom_state_initialization::trim_for_ice->mom_remapping::initialize_remapping mom_tidal_mixing::read_tidal_constituents read_tidal_constituents [private/internal] mom_tidal_mixing::read_tidal_constituents->mom_remapping::initialize_remapping mom_tracer_initialization_from_z::mom_initialize_tracer_from_z MOM_initialize_tracer_from_Z mom_tracer_initialization_from_z::mom_initialize_tracer_from_z->mom_remapping::initialize_remapping mom_wave_speed::wave_speed_init wave_speed_init mom_wave_speed::wave_speed_init->mom_remapping::initialize_remapping
Text view
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.

Parameters
  • string [in]

    String to parse for method

  • CS [inout]

    Remapping control structure

Callees call graph
Callees of mom_remapping::setreconstructiontype calls cluster_mom_error_handler MOM_error_handler cluster_mom_remapping MOM_remapping cluster_mom_string_functions MOM_string_functions mom_error_handler::mom_error MOM_error mom_remapping::setreconstructiontype setReconstructionType [private/internal] mom_remapping::setreconstructiontype->mom_error_handler::mom_error mom_string_functions::uppercase uppercase mom_remapping::setreconstructiontype->mom_string_functions::uppercase
Text view
Callers call graph
Callers of mom_remapping::setreconstructiontype calls cluster_mom_remapping MOM_remapping mom_remapping::remapping_set_param remapping_set_param mom_remapping::setreconstructiontype setReconstructionType [private/internal] mom_remapping::remapping_set_param->mom_remapping::setreconstructiontype
Text view
subroutine end_remapping(CS)

Destrcutor for remapping control structure

Parameters
  • CS [inout]

    Remapping control structure

Callers call graph
Callers of mom_remapping::end_remapping calls cluster_mom_ale MOM_ALE cluster_mom_remapping MOM_remapping mom_ale::ale_end ALE_end mom_remapping::end_remapping end_remapping mom_ale::ale_end->mom_remapping::end_remapping mom_remapping::remapping_unit_tests remapping_unit_tests mom_remapping::remapping_unit_tests->mom_remapping::end_remapping
Text view
subroutine test_interp(test, msg, nsrc, h_src, u_src, ndest, h_dest, u_true)

Test if interpolate_column() produces the wrong answer

Parameters
  • test [inout]

    Unit testing convenience functions

  • msg [in]

    Message to label test

  • nsrc [in]

    Number of source cells

  • h_src [in]

    Thickness of source cells [H]

  • u_src [in]

    Values at source cell interfaces [A]

  • ndest [in]

    Number of destination cells

  • h_dest [in]

    Thickness of destination cells [H]

  • u_true [in]

    Correct value at destination cell interfaces [A]

Callees call graph
Callees of mom_remapping::test_interp calls cluster_mom_remapping MOM_remapping mom_remapping::interpolate_column interpolate_column mom_remapping::test_interp test_interp [private/internal] mom_remapping::test_interp->mom_remapping::interpolate_column
Text view
Callers call graph
Callers of mom_remapping::test_interp calls cluster_mom_remapping MOM_remapping mom_remapping::remapping_unit_tests remapping_unit_tests mom_remapping::test_interp test_interp [private/internal] mom_remapping::remapping_unit_tests->mom_remapping::test_interp
Text view
subroutine test_reintegrate(test, msg, nsrc, h_src, uh_src, ndest, h_dest, uh_true)

Test if reintegrate_column() produces the wrong answer

Parameters
  • test [inout]

    Unit testing convenience functions

  • msg [in]

    Message to label test

  • nsrc [in]

    Number of source cells

  • h_src [in]

    Thickness of source cells [H]

  • uh_src [in]

    Values of source cell stuff [A H]

  • ndest [in]

    Number of destination cells

  • h_dest [in]

    Thickness of destination cells [H]

  • uh_true [in]

    Correct value of destination cell stuff [A H]

Callees call graph
Callees of mom_remapping::test_reintegrate calls cluster_mom_remapping MOM_remapping mom_remapping::reintegrate_column reintegrate_column mom_remapping::test_reintegrate test_reintegrate [private/internal] mom_remapping::test_reintegrate->mom_remapping::reintegrate_column
Text view
Callers call graph
Callers of mom_remapping::test_reintegrate calls cluster_mom_remapping MOM_remapping mom_remapping::remapping_unit_tests remapping_unit_tests mom_remapping::test_reintegrate test_reintegrate [private/internal] mom_remapping::remapping_unit_tests->mom_remapping::test_reintegrate
Text view
subroutine test_recon_consistency(test, scheme, n0, niter, h_neglect)

Test class-based remapping for internal consistency on random data

Parameters
  • test [inout]

    Unit testing convenience functions

  • scheme [in]

    Name of scheme to use

  • n0 [in]

    Number of source cells

  • niter [in]

    Number of randomized columns to try

  • h_neglect [in]

    A negligibly small width used in cell reconstructions [H]

  • remapCS

    Remapping control structure

Callees call graph
Callees of mom_remapping::test_recon_consistency calls cluster_mom_remapping MOM_remapping mom_remapping::initialize_remapping initialize_remapping mom_remapping::test_recon_consistency test_recon_consistency [private/internal] mom_remapping::test_recon_consistency->mom_remapping::initialize_remapping
Text view
Callers call graph
Callers of mom_remapping::test_recon_consistency calls cluster_mom_remapping MOM_remapping mom_remapping::remapping_unit_tests remapping_unit_tests mom_remapping::test_recon_consistency test_recon_consistency [private/internal] mom_remapping::remapping_unit_tests->mom_remapping::test_recon_consistency
Text view
subroutine test_preserve_uniform(test, scheme, n0, niter, h_neglect)

Test that remapping a uniform field remains uniform

Parameters
  • test [inout]

    Unit testing convenience functions

  • scheme [in]

    Name of scheme to use

  • n0 [in]

    Number of source cells

  • niter [in]

    Number of randomized columns to try

  • h_neglect [in]

    A negligibly small width used in cell reconstructions [H]

  • remapCS

    Remapping control structure

Callees call graph
Callees of mom_remapping::test_preserve_uniform calls cluster_mom_remapping MOM_remapping mom_remapping::initialize_remapping initialize_remapping mom_remapping::remapping_core_h remapping_core_h mom_remapping::test_preserve_uniform test_preserve_uniform [private/internal] mom_remapping::test_preserve_uniform->mom_remapping::initialize_remapping mom_remapping::test_preserve_uniform->mom_remapping::remapping_core_h
Text view
Callers call graph
Callers of mom_remapping::test_preserve_uniform calls cluster_mom_remapping MOM_remapping mom_remapping::remapping_unit_tests remapping_unit_tests mom_remapping::test_preserve_uniform test_preserve_uniform [private/internal] mom_remapping::remapping_unit_tests->mom_remapping::test_preserve_uniform
Text view
subroutine test_unchanged_grid(test, scheme, n0, niter, h_neglect)

Test that remapping to the same grid preserves answers

Notes:

  1. this test is currently imperfect since occasionally we see round-off implying that ( A * B ) / A != B

  2. this test does not work for vanished layers

Parameters
  • test [inout]

    Unit testing convenience functions

  • scheme [in]

    Name of scheme to use

  • n0 [in]

    Number of source cells

  • niter [in]

    Number of randomized columns to try

  • h_neglect [in]

    A negligibly small width used in cell reconstructions [H]

  • remapCS

    Remapping control structure

Callees call graph
Callees of mom_remapping::test_unchanged_grid calls cluster_mom_remapping MOM_remapping mom_remapping::initialize_remapping initialize_remapping mom_remapping::remapping_core_h remapping_core_h mom_remapping::test_unchanged_grid test_unchanged_grid [private/internal] mom_remapping::test_unchanged_grid->mom_remapping::initialize_remapping mom_remapping::test_unchanged_grid->mom_remapping::remapping_core_h
Text view
Callers call graph
Callers of mom_remapping::test_unchanged_grid calls cluster_mom_remapping MOM_remapping mom_remapping::remapping_unit_tests remapping_unit_tests mom_remapping::test_unchanged_grid test_unchanged_grid [private/internal] mom_remapping::remapping_unit_tests->mom_remapping::test_unchanged_grid
Text view
subroutine compare_two_schemes(test, CS1, CS2, n0, n1, niter, msg)

Test class-based remapping bitwise reproduces original implementation

Parameters
  • test [inout]

    Unit testing convenience functions

  • CS1 [inout]

    Remapping control structure configured for original implementation

  • CS2 [inout]

    Remapping control structure configured for class-based implementation

  • n0 [in]

    Number of source cells

  • n1 [in]

    Number of destination cells

  • niter [in]

    Number of randomized columns to try

  • msg [in]

    Message to label test

Callees call graph
Callees of mom_remapping::compare_two_schemes calls cluster_mom_remapping MOM_remapping mom_remapping::compare_two_schemes compare_two_schemes [private/internal] mom_remapping::remapping_core_h remapping_core_h mom_remapping::compare_two_schemes->mom_remapping::remapping_core_h
Text view
Callers call graph
Callers of mom_remapping::compare_two_schemes calls cluster_mom_remapping MOM_remapping mom_remapping::compare_two_schemes compare_two_schemes [private/internal] mom_remapping::remapping_unit_tests remapping_unit_tests mom_remapping::remapping_unit_tests->mom_remapping::compare_two_schemes
Text view
logical function remapping_unit_tests(verbose, num_comp_samp)

Runs unit tests on 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

  • num_comp_samp [in]

    If present, number of samples to try comparing class-based cade against OM4 code

  • CS

    Remapping control structures

  • CS2

    Remapping control structures

Callees call graph
Callees of mom_remapping::remapping_unit_tests calls cluster_mom_remapping MOM_remapping cluster_pcm_functions PCM_functions cluster_plm_functions PLM_functions cluster_ppm_functions PPM_functions cluster_regrid_edge_values regrid_edge_values mom_remapping::compare_two_schemes compare_two_schemes [private/internal] mom_remapping::dzfromh1h2 dzFromH1H2 mom_remapping::end_remapping end_remapping mom_remapping::initialize_remapping initialize_remapping mom_remapping::intersect_src_tgt_grids intersect_src_tgt_grids [private/internal] mom_remapping::remap_src_to_sub_grid remap_src_to_sub_grid [private/internal] mom_remapping::remap_src_to_sub_grid_om4 remap_src_to_sub_grid_om4 [private/internal] mom_remapping::remap_sub_to_tgt_grid remap_sub_to_tgt_grid [private/internal] mom_remapping::remapping_core_h remapping_core_h mom_remapping::remapping_core_w remapping_core_w mom_remapping::remapping_set_param remapping_set_param mom_remapping::remapping_unit_tests remapping_unit_tests mom_remapping::remapping_unit_tests->mom_remapping::compare_two_schemes mom_remapping::remapping_unit_tests->mom_remapping::dzfromh1h2 mom_remapping::remapping_unit_tests->mom_remapping::end_remapping mom_remapping::remapping_unit_tests->mom_remapping::initialize_remapping mom_remapping::remapping_unit_tests->mom_remapping::intersect_src_tgt_grids mom_remapping::remapping_unit_tests->mom_remapping::remap_src_to_sub_grid mom_remapping::remapping_unit_tests->mom_remapping::remap_src_to_sub_grid_om4 mom_remapping::remapping_unit_tests->mom_remapping::remap_sub_to_tgt_grid mom_remapping::remapping_unit_tests->mom_remapping::remapping_core_h mom_remapping::remapping_unit_tests->mom_remapping::remapping_core_w mom_remapping::remapping_unit_tests->mom_remapping::remapping_set_param mom_remapping::test_interp test_interp [private/internal] mom_remapping::remapping_unit_tests->mom_remapping::test_interp mom_remapping::test_preserve_uniform test_preserve_uniform [private/internal] mom_remapping::remapping_unit_tests->mom_remapping::test_preserve_uniform mom_remapping::test_recon_consistency test_recon_consistency [private/internal] mom_remapping::remapping_unit_tests->mom_remapping::test_recon_consistency mom_remapping::test_reintegrate test_reintegrate [private/internal] mom_remapping::remapping_unit_tests->mom_remapping::test_reintegrate mom_remapping::test_unchanged_grid test_unchanged_grid [private/internal] mom_remapping::remapping_unit_tests->mom_remapping::test_unchanged_grid pcm_functions::pcm_reconstruction PCM_reconstruction mom_remapping::remapping_unit_tests->pcm_functions::pcm_reconstruction plm_functions::plm_boundary_extrapolation PLM_boundary_extrapolation mom_remapping::remapping_unit_tests->plm_functions::plm_boundary_extrapolation plm_functions::plm_reconstruction PLM_reconstruction mom_remapping::remapping_unit_tests->plm_functions::plm_reconstruction ppm_functions::ppm_reconstruction PPM_reconstruction mom_remapping::remapping_unit_tests->ppm_functions::ppm_reconstruction regrid_edge_values::edge_values_explicit_h4 edge_values_explicit_h4 mom_remapping::remapping_unit_tests->regrid_edge_values::edge_values_explicit_h4
Text view
Callers call graph
Callers of mom_remapping::remapping_unit_tests calls cluster_mom_remapping MOM_remapping cluster_mom_unit_tests MOM_unit_tests mom_remapping::remapping_unit_tests remapping_unit_tests mom_unit_tests::unit_tests unit_tests mom_unit_tests::unit_tests->mom_remapping::remapping_unit_tests
Text view
API generated with Flint · Rendered from reStructuredText