mom_continuity_ppm module reference

Solve the layer continuity equation using the PPM method for layer fluxes.

More…

Data Types

continuity_ppm_cs

Control structure for mom_continuity_ppm().

loop_bounds_type

A container for loop bounds.

Functions/Subroutines

continuity_ppm()

Time steps the layer thicknesses, using a monotonically limit, directionally split PPM scheme, based on Lin (1994).

zonal_mass_flux()

Calculates the mass or volume fluxes through the zonal faces, and other related quantities.

zonal_flux_layer()

Evaluates the zonal mass or volume fluxes in a layer.

zonal_face_thickness()

Sets the effective interface thickness at each zonal velocity point.

zonal_flux_adjust()

Returns the barotropic velocity adjustment that gives the desired barotropic (layer-summed) transport.

set_zonal_bt_cont()

Sets a structure that describes the zonal barotropic volume or mass fluxes as a function of barotropic flow to agree closely with the sum of the layer’s transports.

meridional_mass_flux()

Calculates the mass or volume fluxes through the meridional faces, and other related quantities.

merid_flux_layer()

Evaluates the meridional mass or volume fluxes in a layer.

merid_face_thickness()

Sets the effective interface thickness at each meridional velocity point.

meridional_flux_adjust()

Returns the barotropic velocity adjustment that gives the desired barotropic (layer-summed) transport.

set_merid_bt_cont()

Sets of a structure that describes the meridional barotropic volume or mass fluxes as a function of barotropic flow to agree closely with the sum of the layer’s transports.

ppm_reconstruction_x()

Calculates left/right edge values for PPM reconstruction.

ppm_reconstruction_y()

Calculates left/right edge values for PPM reconstruction.

ppm_limit_pos()

This subroutine limits the left/right edge values of the PPM reconstruction to give a reconstruction that is positive-definite.

ppm_limit_cw84()

This subroutine limits the left/right edge values of the PPM reconstruction according to the monotonic prescription of Colella and Woodward, 1984.

ratio_max()

Return the maximum ratio of a/b or maxrat.

continuity_ppm_init()

Initializes continuity_ppm_cs().

continuity_ppm_stencil()

continuity_PPM_stencil returns the continuity solver stencil size

continuity_ppm_end()

Destructor for continuity_ppm_cs().

Detailed Description

This module contains the subroutines that advect layer thickness. The scheme here uses a Piecewise-Parabolic method with a positive definite limiter.

Type Documentation

type mom_continuity_ppm/continuity_ppm_cs

Control structure for mom_continuity_ppm(). .

Type fields
  • % diag [type(diag_ctrl),pointer] :: Diagnostics control structure.

  • % upwind_1st [logical] :: If true, use a first-order upwind scheme.

  • % monotonic [logical] :: If true, use the Colella & Woodward monotonic limiter; otherwise use a simple positive definite limiter.

  • % simple_2nd [logical] :: If true, use a simple second order (arithmetic mean) interpolation of the edge values instead of the higher order interpolation.

  • % tol_eta [real] :: The tolerance for free-surface height discrepancies between the barotropic solution and the sum of the layer thicknesses [H ~> m or kg m-2].

  • % tol_vel [real] :: The tolerance for barotropic velocity discrepancies between the barotropic solution and the sum of the layer thicknesses [L T-1 ~> m s-1].

  • % tol_eta_aux [real] :: The tolerance for free-surface height discrepancies between the barotropic solution and the sum of the layer thicknesses when calculating the auxiliary corrected velocities [H ~> m or kg m-2].

  • % cfl_limit_adjust [real] :: The maximum CFL of the adjusted velocities [nondim].

  • % aggress_adjust [logical] :: If true, allow the adjusted velocities to have a relative CFL change up to 0.5. False by default.

  • % vol_cfl [logical] :: If true, use the ratio of the open face lengths to the tracer cell areas when estimating CFL numbers. Without aggress_adjust, the default is false; it is always true with.

  • % better_iter [logical] :: If true, stop corrective iterations using a velocity-based criterion and only stop if the iteration is better than all predecessors.

  • % use_visc_rem_max [logical] :: If true, use more appropriate limiting bounds for corrections in strongly viscous columns.

  • % marginal_faces [logical] :: If true, use the marginal face areas from the continuity solver for use as the weights in the barotropic solver. Otherwise use the transport averaged areas.

type mom_continuity_ppm/loop_bounds_type

A container for loop bounds.

Type fields
  • % ish [integer,private] :: Loop bounds.

  • % ieh [integer,private] :: Loop bounds.

  • % jsh [integer,private] :: Loop bounds.

  • % jeh [integer,private] :: Loop bounds.

Function/Subroutine Documentation

subroutine mom_continuity_ppm/continuity_ppm(u, v, hin, h, uh, vh, dt, G, GV, US, CS, OBC, uhbt, vhbt, visc_rem_u, visc_rem_v, u_cor, v_cor, BT_cont)

Time steps the layer thicknesses, using a monotonically limit, directionally split PPM scheme, based on Lin (1994).

Parameters
  • g :: [inout] The ocean’s grid structure.

  • gv :: [in] Vertical grid structure.

  • u :: [in] Zonal velocity [L T-1 ~> m s-1].

  • v :: [in] Meridional velocity [L T-1 ~> m s-1].

  • hin :: [in] Initial layer thickness [H ~> m or kg m-2].

  • h :: [inout] Final layer thickness [H ~> m or kg m-2].

  • uh :: [out] Zonal volume flux, u*h*dy [H L2 T-1 ~> m3 s-1 or kg s-1].

  • vh :: [out] Meridional volume flux, v*h*dx [H L2 T-1 ~> m3 s-1 or kg s-1].

  • dt :: [in] Time increment [T ~> s].

  • us :: [in] A dimensional unit scaling type

  • cs :: Module’s control structure.

  • obc :: Open boundaries control structure.

  • uhbt :: [in] The summed volume flux through zonal faces

  • vhbt :: [in] The summed volume flux through meridional faces

  • visc_rem_u :: [in] The fraction of zonal momentum originally in a layer that remains after a time-step of viscosity, and the fraction of a time-step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non-dimensional between 0 (at the bottom) and 1 (far above the bottom).

  • visc_rem_v :: [in] The fraction of meridional momentum originally in a layer that remains after a time-step of viscosity, and the fraction of a time-step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non-dimensional between 0 (at the bottom) and 1 (far above the bottom).

  • u_cor :: [out] The zonal velocities that give uhbt as the depth-integrated transport [L T-1 ~> m s-1].

  • v_cor :: [out] The meridional velocities that give vhbt as the depth-integrated transport [L T-1 ~> m s-1].

  • bt_cont :: A structure with elements that describe the effective open face areas as a function of barotropic flow.

Call to

id_clock_update meridional_mass_flux mom_error_handler::mom_error zonal_mass_flux

subroutine mom_continuity_ppm/zonal_mass_flux(u, h_in, uh, dt, G, GV, US, CS, LB, OBC, uhbt, visc_rem_u, u_cor, BT_cont)

Calculates the mass or volume fluxes through the zonal faces, and other related quantities.

Parameters
  • g :: [inout] Ocean’s grid structure.

  • gv :: [in] Ocean’s vertical grid structure.

  • u :: [in] Zonal velocity [L T-1 ~> m s-1].

  • h_in :: [in] Layer thickness used to calculate fluxes [H ~> m or kg m-2].

  • uh :: [out] Volume flux through zonal faces = u*h*dy

  • dt :: [in] Time increment [T ~> s].

  • us :: [in] A dimensional unit scaling type

  • cs :: This module’s control structure.

  • lb :: [in] Loop bounds structure.

  • obc :: Open boundaries control structure.

  • uhbt :: [in] The summed volume flux through zonal faces

  • visc_rem_u :: [in] The fraction of zonal momentum originally in a layer that remains after a time-step of viscosity, and the fraction of a time-step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non-dimensional between 0 (at the bottom) and 1 (far above the bottom).

  • u_cor :: [out] The zonal velocitiess (u with a barotropic correction) that give uhbt as the depth-integrated transport, m s-1.

  • bt_cont :: A structure with elements that describe the effective open face areas as a function of barotropic flow.

Call to

id_clock_correct id_clock_update mom_open_boundary::obc_direction_e ppm_reconstruction_x ratio_max set_zonal_bt_cont zonal_face_thickness zonal_flux_adjust zonal_flux_layer

Called from

continuity_ppm

subroutine mom_continuity_ppm/zonal_flux_layer(u, h, h_L, h_R, uh, duhdu, visc_rem, dt, G, US, j, ish, ieh, do_I, vol_CFL, OBC)

Evaluates the zonal mass or volume fluxes in a layer.

Parameters
  • g :: [inout] Ocean’s grid structure.

  • u :: [in] Zonal velocity [L T-1 ~> m s-1].

  • visc_rem :: [in] Both the fraction of the momentum originally in a layer that remains after a time-step of viscosity, and the fraction of a time-step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non-dimensional between 0 (at the bottom) and 1 (far above the bottom).

  • h :: [in] Layer thickness [H ~> m or kg m-2].

  • h_l :: [in] Left thickness [H ~> m or kg m-2].

  • h_r :: [in] Right thickness [H ~> m or kg m-2].

  • uh :: [inout] Zonal mass or volume transport [H L2 T-1 ~> m3 s-1 or kg s-1].

  • duhdu :: [inout] Partial derivative of uh with u [H L ~> m2 or kg m-1].

  • dt :: [in] Time increment [T ~> s].

  • us :: [in] A dimensional unit scaling type

  • j :: [in] Spatial index.

  • ish :: [in] Start of index range.

  • ieh :: [in] End of index range.

  • do_i :: [in] Which i values to work on.

  • vol_cfl :: [in] If true, rescale the ratio of face areas to the cell areas when estimating the CFL number.

  • obc :: Open boundaries control structure.

Call to

mom_open_boundary::obc_direction_e

Called from

set_zonal_bt_cont zonal_flux_adjust zonal_mass_flux

subroutine mom_continuity_ppm/zonal_face_thickness(u, h, h_L, h_R, h_u, dt, G, GV, US, LB, vol_CFL, marginal, OBC, visc_rem_u)

Sets the effective interface thickness at each zonal velocity point.

Parameters
  • g :: [inout] Ocean’s grid structure.

  • gv :: [in] Ocean’s vertical grid structure.

  • u :: [in] Zonal velocity [L T-1 ~> m s-1].

  • h :: [in] Layer thickness used to calculate fluxes [H ~> m or kg m-2].

  • h_l :: [in] Left thickness in the reconstruction [H ~> m or kg m-2].

  • h_r :: [in] Right thickness in the reconstruction [H ~> m or kg m-2].

  • h_u :: [inout] Thickness at zonal faces [H ~> m or kg m-2].

  • dt :: [in] Time increment [T ~> s].

  • us :: [in] A dimensional unit scaling type

  • lb :: [in] Loop bounds structure.

  • vol_cfl :: [in] If true, rescale the ratio of face areas to the cell areas when estimating the CFL number.

  • marginal :: [in] If true, report the marginal face thicknesses; otherwise report transport-averaged thicknesses.

  • obc :: Open boundaries control structure.

  • visc_rem_u :: [in] Both the fraction of the momentum originally in a layer that remains after a time-step of viscosity, and the fraction of a time-step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non-dimensional between 0 (at the bottom) and 1 (far above the bottom).

Call to

mom_open_boundary::obc_direction_e

Called from

zonal_mass_flux

subroutine mom_continuity_ppm/zonal_flux_adjust(u, h_in, h_L, h_R, uhbt, uh_tot_0, duhdu_tot_0, du, du_max_CFL, du_min_CFL, dt, G, GV, US, CS, visc_rem, j, ish, ieh, do_I_in, uh_3d, OBC)

Returns the barotropic velocity adjustment that gives the desired barotropic (layer-summed) transport.

Parameters
  • g :: [inout] Ocean’s grid structure.

  • gv :: [in] Ocean’s vertical grid structure.

  • u :: [in] Zonal velocity [L T-1 ~> m s-1].

  • h_in :: [in] Layer thickness used to calculate fluxes [H ~> m or kg m-2].

  • h_l :: [in] Left thickness in the reconstruction [H ~> m or kg m-2].

  • h_r :: [in] Right thickness in the reconstruction [H ~> m or kg m-2].

  • visc_rem :: [in] Both the fraction of the momentum originally in a layer that remains after a time-step of viscosity, and the fraction of a time-step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non-dimensional between 0 (at the bottom) and 1 (far above the bottom).

  • uhbt :: [in] The summed volume flux through zonal faces [H L2 T-1 ~> m3 s-1 or kg s-1].

  • du_max_cfl :: [in] Maximum acceptable value of du [L T-1 ~> m s-1].

  • du_min_cfl :: [in] Minimum acceptable value of du [L T-1 ~> m s-1].

  • uh_tot_0 :: [in] The summed transport with 0 adjustment [H L2 T-1 ~> m3 s-1 or kg s-1].

  • duhdu_tot_0 :: [in] The partial derivative of du_err with du at 0 adjustment [H L ~> m2 or kg m-1].

  • du :: [out] The barotropic velocity adjustment [L T-1 ~> m s-1].

  • dt :: [in] Time increment [T ~> s].

  • us :: [in] A dimensional unit scaling type

  • cs :: This module’s control structure.

  • j :: [in] Spatial index.

  • ish :: [in] Start of index range.

  • ieh :: [in] End of index range.

  • do_i_in :: [in] A logical flag indicating which I values to work on.

  • uh_3d :: [inout] Volume flux through zonal faces = u*h*dy [H L2 T-1 ~> m3 s-1 or kg s-1].

  • obc :: Open boundaries control structure.

Call to

zonal_flux_layer

Called from

set_zonal_bt_cont zonal_mass_flux

subroutine mom_continuity_ppm/set_zonal_bt_cont(u, h_in, h_L, h_R, BT_cont, uh_tot_0, duhdu_tot_0, du_max_CFL, du_min_CFL, dt, G, GV, US, CS, visc_rem, visc_rem_max, j, ish, ieh, do_I)

Sets a structure that describes the zonal barotropic volume or mass fluxes as a function of barotropic flow to agree closely with the sum of the layer’s transports.

Parameters
  • g :: [inout] Ocean’s grid structure.

  • gv :: [in] Ocean’s vertical grid structure.

  • u :: [in] Zonal velocity [L T-1 ~> m s-1].

  • h_in :: [in] Layer thickness used to calculate fluxes [H ~> m or kg m-2].

  • h_l :: [in] Left thickness in the reconstruction [H ~> m or kg m-2].

  • h_r :: [in] Right thickness in the reconstruction [H ~> m or kg m-2].

  • bt_cont :: [inout] A structure with elements that describe the effective open face areas as a function of barotropic flow.

  • uh_tot_0 :: [in] The summed transport with 0 adjustment [H L2 T-1 ~> m3 s-1 or kg s-1].

  • duhdu_tot_0 :: [in] The partial derivative of du_err with du at 0 adjustment [H L ~> m2 or kg m-1].

  • du_max_cfl :: [in] Maximum acceptable value of du [L T-1 ~> m s-1].

  • du_min_cfl :: [in] Minimum acceptable value of du [L T-1 ~> m s-1].

  • dt :: [in] Time increment [T ~> s].

  • us :: [in] A dimensional unit scaling type

  • cs :: This module’s control structure.

  • visc_rem :: [in] Both the fraction of the momentum originally in a layer that remains after a time-step of viscosity, and the fraction of a time-step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non-dimensional between 0 (at the bottom) and 1 (far above the bottom).

  • visc_rem_max :: [in] Maximum allowable visc_rem.

  • j :: [in] Spatial index.

  • ish :: [in] Start of index range.

  • ieh :: [in] End of index range.

  • do_i :: [in] A logical flag indicating which I values to work on.

Call to

zonal_flux_adjust zonal_flux_layer

Called from

zonal_mass_flux

subroutine mom_continuity_ppm/meridional_mass_flux(v, h_in, vh, dt, G, GV, US, CS, LB, OBC, vhbt, visc_rem_v, v_cor, BT_cont)

Calculates the mass or volume fluxes through the meridional faces, and other related quantities.

Parameters
  • g :: [inout] Ocean’s grid structure.

  • gv :: [in] Ocean’s vertical grid structure.

  • v :: [in] Meridional velocity [L T-1 ~> m s-1]

  • h_in :: [in] Layer thickness used to calculate fluxes [H ~> m or kg m-2]

  • vh :: [out] Volume flux through meridional faces = v*h*dx [H m2 s-1 ~> m3 s-1 or kg s-1]

  • dt :: [in] Time increment [T ~> s].

  • us :: [in] A dimensional unit scaling type

  • cs :: This module’s control structure.G

  • lb :: [in] Loop bounds structure.

  • obc :: Open boundary condition type specifies whether, where, and what open boundary conditions are used.

  • vhbt :: [in] The summed volume flux through meridional faces [H L2 T-1 ~> m3 s-1 or kg s-1].

  • visc_rem_v :: [in] Both the fraction of the momentum

  • v_cor :: [out] The meridional velocitiess (v with a barotropic correction) that give vhbt as the depth-integrated transport [L T-1 ~> m s-1].

  • bt_cont :: A structure with elements that describe the effective open face areas as a function of barotropic flow.

Call to

id_clock_correct id_clock_update merid_face_thickness merid_flux_layer meridional_flux_adjust mom_open_boundary::obc_direction_n ppm_reconstruction_y ratio_max set_merid_bt_cont

Called from

continuity_ppm

subroutine mom_continuity_ppm/merid_flux_layer(v, h, h_L, h_R, vh, dvhdv, visc_rem, dt, G, US, J, ish, ieh, do_I, vol_CFL, OBC)

Evaluates the meridional mass or volume fluxes in a layer.

Parameters
  • g :: [inout] Ocean’s grid structure.

  • v :: [in] Meridional velocity [L T-1 ~> m s-1].

  • visc_rem :: [in] Both the fraction of the momentum originally in a layer that remains after a time-step of viscosity, and the fraction of a time-step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non-dimensional between 0 (at the bottom) and 1 (far above the bottom).

  • h :: [in] Layer thickness used to calculate fluxes, [H ~> m or kg m-2].

  • h_l :: [in] Left thickness in the reconstruction [H ~> m or kg m-2].

  • h_r :: [in] Right thickness in the reconstruction [H ~> m or kg m-2].

  • vh :: [inout] Meridional mass or volume transport [H L2 T-1 ~> m3 s-1 or kg s-1].

  • dvhdv :: [inout] Partial derivative of vh with v [H L ~> m2 or kg m-1].

  • dt :: [in] Time increment [T ~> s].

  • us :: [in] A dimensional unit scaling type

  • j :: [in] Spatial index.

  • ish :: [in] Start of index range.

  • ieh :: [in] End of index range.

  • do_i :: [in] Which i values to work on.

  • vol_cfl :: [in] If true, rescale the ratio of face areas to the cell areas when estimating the CFL number.

  • obc :: Open boundaries control structure.

Call to

mom_open_boundary::obc_direction_n

Called from

meridional_flux_adjust meridional_mass_flux set_merid_bt_cont

subroutine mom_continuity_ppm/merid_face_thickness(v, h, h_L, h_R, h_v, dt, G, GV, US, LB, vol_CFL, marginal, OBC, visc_rem_v)

Sets the effective interface thickness at each meridional velocity point.

Parameters
  • g :: [inout] Ocean’s grid structure.

  • gv :: [in] Ocean’s vertical grid structure.

  • v :: [in] Meridional velocity [L T-1 ~> m s-1].

  • h :: [in] Layer thickness used to calculate fluxes, [H ~> m or kg m-2].

  • h_l :: [in] Left thickness in the reconstruction, [H ~> m or kg m-2].

  • h_r :: [in] Right thickness in the reconstruction, [H ~> m or kg m-2].

  • h_v :: [inout] Thickness at meridional faces, [H ~> m or kg m-2].

  • dt :: [in] Time increment [T ~> s].

  • lb :: [in] Loop bounds structure.

  • us :: [in] A dimensional unit scaling type

  • vol_cfl :: [in] If true, rescale the ratio of face areas to the cell areas when estimating the CFL number.

  • marginal :: [in] If true, report the marginal face thicknesses; otherwise report transport-averaged thicknesses.

  • obc :: Open boundaries control structure.

  • visc_rem_v :: [in] Both the fraction of the momentum originally in a layer that remains after a time-step of viscosity, and the fraction of a time-step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non-dimensional between 0 (at the bottom) and 1 (far above the bottom).

Call to

mom_open_boundary::obc_direction_n

Called from

meridional_mass_flux

subroutine mom_continuity_ppm/meridional_flux_adjust(v, h_in, h_L, h_R, vhbt, vh_tot_0, dvhdv_tot_0, dv, dv_max_CFL, dv_min_CFL, dt, G, GV, US, CS, visc_rem, j, ish, ieh, do_I_in, vh_3d, OBC)

Returns the barotropic velocity adjustment that gives the desired barotropic (layer-summed) transport.

Parameters
  • g :: [inout] Ocean’s grid structure.

  • gv :: [in] Ocean’s vertical grid structure.

  • v :: [in] Meridional velocity [L T-1 ~> m s-1].

  • h_in :: [in] Layer thickness used to calculate fluxes [H ~> m or kg m-2].

  • h_l :: [in] Left thickness in the reconstruction [H ~> m or kg m-2].

  • h_r :: [in] Right thickness in the reconstruction [H ~> m or kg m-2].

  • visc_rem :: [in] Both the fraction of the momentum originally in a layer that remains after a time-step of viscosity, and the fraction of a time-step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non-dimensional between 0 (at the bottom) and 1 (far above the bottom).

  • vhbt :: [in] The summed volume flux through meridional faces

  • dv_max_cfl :: [in] Maximum acceptable value of dv [L T-1 ~> m s-1].

  • dv_min_cfl :: [in] Minimum acceptable value of dv [L T-1 ~> m s-1].

  • vh_tot_0 :: [in] The summed transport with 0 adjustment [H L2 T-1 ~> m3 s-1 or kg s-1].

  • dvhdv_tot_0 :: [in] The partial derivative of dv_err with dv at 0 adjustment [H L ~> m2 or kg m-1].

  • dv :: [out] The barotropic velocity adjustment [L T-1 ~> m s-1].

  • dt :: [in] Time increment [T ~> s].

  • us :: [in] A dimensional unit scaling type

  • cs :: This module’s control structure.

  • j :: [in] Spatial index.

  • ish :: [in] Start of index range.

  • ieh :: [in] End of index range.

  • do_i_in :: [in] A flag indicating which I values to work on.

  • vh_3d :: [inout] Volume flux through meridional

  • obc :: Open boundaries control structure.

Call to

merid_flux_layer

Called from

meridional_mass_flux set_merid_bt_cont

subroutine mom_continuity_ppm/set_merid_bt_cont(v, h_in, h_L, h_R, BT_cont, vh_tot_0, dvhdv_tot_0, dv_max_CFL, dv_min_CFL, dt, G, GV, US, CS, visc_rem, visc_rem_max, j, ish, ieh, do_I)

Sets of a structure that describes the meridional barotropic volume or mass fluxes as a function of barotropic flow to agree closely with the sum of the layer’s transports.

Parameters
  • g :: [inout] Ocean’s grid structure.

  • gv :: [in] Ocean’s vertical grid structure.

  • v :: [in] Meridional velocity [L T-1 ~> m s-1].

  • h_in :: [in] Layer thickness used to calculate fluxes, [H ~> m or kg m-2].

  • h_l :: [in] Left thickness in the reconstruction, [H ~> m or kg m-2].

  • h_r :: [in] Right thickness in the reconstruction, [H ~> m or kg m-2].

  • bt_cont :: [inout] A structure with elements that describe the effective open face areas as a function of barotropic flow.

  • vh_tot_0 :: [in] The summed transport with 0 adjustment [H L2 T-1 ~> m3 s-1 or kg s-1].

  • dvhdv_tot_0 :: [in] The partial derivative of du_err with dv at 0 adjustment [H L ~> m2 or kg m-1].

  • dv_max_cfl :: [in] Maximum acceptable value of dv [L T-1 ~> m s-1].

  • dv_min_cfl :: [in] Minimum acceptable value of dv [L T-1 ~> m s-1].

  • dt :: [in] Time increment [T ~> s].

  • us :: [in] A dimensional unit scaling type

  • cs :: This module’s control structure.

  • visc_rem :: [in] Both the fraction of the momentum originally in a layer that remains after a time-step of viscosity, and the fraction of a time-step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non-dimensional between 0 (at the bottom) and 1 (far above the bottom).

  • visc_rem_max :: [in] Maximum allowable visc_rem.

  • j :: [in] Spatial index.

  • ish :: [in] Start of index range.

  • ieh :: [in] End of index range.

  • do_i :: [in] A logical flag indicating which I values to work on.

Call to

merid_flux_layer meridional_flux_adjust

Called from

meridional_mass_flux

subroutine mom_continuity_ppm/ppm_reconstruction_x(h_in, h_L, h_R, G, LB, h_min, monotonic, simple_2nd, OBC)

Calculates left/right edge values for PPM reconstruction.

Parameters
  • g :: [in] Ocean’s grid structure.

  • h_in :: [in] Layer thickness [H ~> m or kg m-2].

  • h_l :: [out] Left thickness in the reconstruction, [H ~> m or kg m-2].

  • h_r :: [out] Right thickness in the reconstruction, [H ~> m or kg m-2].

  • lb :: [in] Active loop bounds structure.

  • h_min :: [in] The minimum thickness that can be obtained by a concave parabolic fit.

  • monotonic :: [in] If true, use the Colella & Woodward monotonic limiter. Otherwise use a simple positive-definite limiter.

  • simple_2nd :: [in] If true, use the arithmetic mean thicknesses as the default edge values for a simple 2nd order scheme.

  • obc :: Open boundaries control structure.

Call to

mom_error_handler::mom_error mom_open_boundary::obc_direction_e mom_open_boundary::obc_direction_w ppm_limit_cw84 ppm_limit_pos

Called from

zonal_mass_flux

subroutine mom_continuity_ppm/ppm_reconstruction_y(h_in, h_L, h_R, G, LB, h_min, monotonic, simple_2nd, OBC)

Calculates left/right edge values for PPM reconstruction.

Parameters
  • g :: [in] Ocean’s grid structure.

  • h_in :: [in] Layer thickness [H ~> m or kg m-2].

  • h_l :: [out] Left thickness in the reconstruction, [H ~> m or kg m-2].

  • h_r :: [out] Right thickness in the reconstruction, [H ~> m or kg m-2].

  • lb :: [in] Active loop bounds structure.

  • h_min :: [in] The minimum thickness that can be obtained by a concave parabolic fit.

  • monotonic :: [in] If true, use the Colella & Woodward monotonic limiter. Otherwise use a simple positive-definite limiter.

  • simple_2nd :: [in] If true, use the arithmetic mean thicknesses as the default edge values for a simple 2nd order scheme.

  • obc :: Open boundaries control structure.

Call to

mom_error_handler::mom_error mom_open_boundary::obc_direction_n mom_open_boundary::obc_direction_s ppm_limit_cw84 ppm_limit_pos

Called from

meridional_mass_flux

subroutine mom_continuity_ppm/ppm_limit_pos(h_in, h_L, h_R, h_min, G, iis, iie, jis, jie)

This subroutine limits the left/right edge values of the PPM reconstruction to give a reconstruction that is positive-definite. Here this is reinterpreted as giving a constant thickness if the mean thickness is less than h_min, with a minimum of h_min otherwise.

Parameters
  • g :: [in] Ocean’s grid structure.

  • h_in :: [in] Layer thickness [H ~> m or kg m-2].

  • h_l :: [inout] Left thickness in the reconstruction [H ~> m or kg m-2].

  • h_r :: [inout] Right thickness in the reconstruction [H ~> m or kg m-2].

  • h_min :: [in] The minimum thickness that can be obtained by a concave parabolic fit.

  • iis :: [in] Start of i index range.

  • iie :: [in] End of i index range.

  • jis :: [in] Start of j index range.

  • jie :: [in] End of j index range.

Called from

ppm_reconstruction_x ppm_reconstruction_y

subroutine mom_continuity_ppm/ppm_limit_cw84(h_in, h_L, h_R, G, iis, iie, jis, jie)

This subroutine limits the left/right edge values of the PPM reconstruction according to the monotonic prescription of Colella and Woodward, 1984.

Parameters
  • g :: [in] Ocean’s grid structure.

  • h_in :: [in] Layer thickness [H ~> m or kg m-2].

  • h_l :: [inout] Left thickness in the reconstruction, [H ~> m or kg m-2].

  • h_r :: [inout] Right thickness in the reconstruction, [H ~> m or kg m-2].

  • iis :: [in] Start of i index range.

  • iie :: [in] End of i index range.

  • jis :: [in] Start of j index range.

  • jie :: [in] End of j index range.

Called from

ppm_reconstruction_x ppm_reconstruction_y

function mom_continuity_ppm/ratio_max(a, b, maxrat) [real]

Return the maximum ratio of a/b or maxrat.

Parameters
  • a :: [in] Numerator

  • b :: [in] Denominator

  • maxrat :: [in] Maximum value of ratio.

Return

undefined :: Return value.

Called from

meridional_mass_flux zonal_mass_flux

subroutine mom_continuity_ppm/continuity_ppm_init(Time, G, GV, US, param_file, diag, CS)

Initializes continuity_ppm_cs(). .

Parameters
  • time :: [in] The current model time.

  • g :: [in] The ocean’s grid structure.

  • gv :: [in] Vertical grid structure.

  • us :: [in] A dimensional unit scaling type

  • param_file :: [in] A structure indicating the open file to parse for model parameter values.

  • diag :: [inout] A structure that is used to regulate diagnostic output.

  • cs :: Module’s control structure.

Call to

id_clock_correct id_clock_update mom_error_handler::mom_error

function mom_continuity_ppm/continuity_ppm_stencil(CS) [integer]

continuity_PPM_stencil returns the continuity solver stencil size

Parameters

cs :: Module’s control structure.

Return

undefined :: The continuity solver stencil size with the current settings.

subroutine mom_continuity_ppm/continuity_ppm_end(CS)

Destructor for continuity_ppm_cs(). .

Parameters

cs :: Module’s control structure.

Called from

mom_continuity::continuity_end