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().

cont_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).

continuity_3d_fluxes()

Finds the thickness fluxes from the continuity solver without actually updating the layer thicknesses.

continuity_2d_fluxes()

Find the vertical sum of the thickness fluxes from the continuity solver without actually updating the layer thicknesses.

continuity_adjust_vel()

Correct the velocities to give the specified depth-integrated transports by applying a barotropic acceleration (subject to viscous drag) to the velocities.

continuity_zonal_convergence()

Updates the thicknesses due to zonal thickness fluxes.

continuity_merdional_convergence()

Updates the thicknesses due to meridional thickness fluxes.

zonal_edge_thickness()

Set the reconstructed thicknesses at the eastern and western edges of tracer cells.

meridional_edge_thickness()

Set the reconstructed thicknesses at the eastern and western edges of tracer cells.

zonal_mass_flux()

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

zonal_bt_mass_flux()

Calculates the vertically integrated mass or volume fluxes through the zonal faces.

zonal_flux_layer()

Evaluates the zonal mass or volume fluxes in a layer.

zonal_flux_thickness()

Sets the effective interface thickness associated with the fluxes at each zonal velocity point, optionally scaling back these thicknesses to account for viscosity and fractional open areas.

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.

meridional_bt_mass_flux()

Calculates the vertically integrated mass or volume fluxes through the meridional faces.

merid_flux_layer()

Evaluates the meridional mass or volume fluxes in a layer.

meridional_flux_thickness()

Sets the effective interface thickness associated with the fluxes at each meridional velocity point, optionally scaling back these thicknesses to account for viscosity and fractional open areas.

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

set_continuity_loop_bounds()

Set up a structure that stores the sizes of the i- and j-loops to to work on in the continuity solver.

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:
  • % initialized [logical] :: True if this control structure has been initialized.

  • % 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].

  • % 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/cont_loop_bounds_type

A container for loop bounds.

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

  • % ieh [integer] :: Loop bounds.

  • % jsh [integer] :: Loop bounds.

  • % jeh [integer] :: Loop bounds.

Function/Subroutine Documentation

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

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

Parameters:
  • g :: [in] 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 :: [in] Module’s control structure.

  • obc :: Open boundaries control structure.

  • pbv :: [in] pointers to porous barrier fractional cell metrics

  • 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 [nondim]. Visc_rem_u is 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 [nondim]. Visc_rem_v is 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.

  • du_cor :: [out] The zonal velocity increments from u that give uhbt

  • dv_cor :: [out] The meridional velocity increments from v that give vhbt

Call to:

continuity_merdional_convergence continuity_zonal_convergence meridional_edge_thickness meridional_mass_flux mom_error_handler::mom_error set_continuity_loop_bounds zonal_edge_thickness zonal_mass_flux

subroutine mom_continuity_ppm/continuity_3d_fluxes(u, v, h, uh, vh, dt, G, GV, US, CS, OBC, pbv)

Finds the thickness fluxes from the continuity solver without actually updating the layer thicknesses. Because the fluxes in the two directions are calculated based on the input thicknesses, which are not updated between the direcitons, the fluxes returned here are not the same as those that would be returned by a call to continuity.

Parameters:
  • g :: [inout] Ocean 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].

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

  • uh :: [out] Thickness fluxes through zonal faces,

  • vh :: [out] Thickness fluxes through meridional faces,

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

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

  • cs :: [in] Control structure for mom_continuity(). .

  • obc :: Open boundaries control structure.

  • pbv :: [in] porous barrier fractional cell metrics

subroutine mom_continuity_ppm/continuity_2d_fluxes(u, v, h, uhbt, vhbt, dt, G, GV, US, CS, OBC, pbv)

Find the vertical sum of the thickness fluxes from the continuity solver without actually updating the layer thicknesses. Because the fluxes in the two directions are calculated based on the input thicknesses, which are not updated between the directions, the fluxes returned here are not the same as those that would be returned by a call to continuity.

Parameters:
  • g :: [inout] Ocean 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].

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

  • uhbt :: [out] Vertically summed thickness flux through

  • vhbt :: [out] Vertically summed thickness flux through

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

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

  • cs :: [in] Control structure for mom_continuity(). .

  • obc :: Open boundaries control structure.

  • pbv :: [in] porous barrier fractional cell metrics

subroutine mom_continuity_ppm/continuity_adjust_vel(u, v, h, dt, G, GV, US, CS, OBC, pbv, uhbt, vhbt, visc_rem_u, visc_rem_v)

Correct the velocities to give the specified depth-integrated transports by applying a barotropic acceleration (subject to viscous drag) to the velocities.

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

  • gv :: [in] Vertical grid structure.

  • u :: [inout] Zonal velocity, which will be adjusted to

  • v :: [inout] Meridional velocity, which will be adjusted

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

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

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

  • cs :: [in] Control structure for mom_continuity(). .

  • obc :: Open boundaries control structure.

  • pbv :: [in] porous barrier fractional cell metrics

  • uhbt :: [in] The vertically summed thickness flux through

  • vhbt :: [in] The vertically summed thickness flux through

  • visc_rem_u :: [in] Both the fraction of the zonal momentum

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

Call to:

meridional_edge_thickness meridional_mass_flux zonal_edge_thickness zonal_mass_flux

subroutine mom_continuity_ppm/continuity_zonal_convergence(h, uh, dt, G, GV, LB, hin, hmin)

Updates the thicknesses due to zonal thickness fluxes.

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

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

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

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

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

  • lb :: [in] Loop bounds structure

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

  • hmin :: [in] The minimum layer thickness [H ~> m or kg m-2]

Call to:

id_clock_update

Called from:

continuity_ppm

subroutine mom_continuity_ppm/continuity_merdional_convergence(h, vh, dt, G, GV, LB, hin, hmin)

Updates the thicknesses due to meridional thickness fluxes.

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

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

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

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

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

  • lb :: [in] Loop bounds structure

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

  • hmin :: [in] The minimum layer thickness [H ~> m or kg m-2]

Call to:

id_clock_update

Called from:

continuity_ppm

subroutine mom_continuity_ppm/zonal_edge_thickness(h_in, h_W, h_E, G, GV, US, CS, OBC, LB_in)

Set the reconstructed thicknesses at the eastern and western edges of tracer cells.

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

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

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

  • h_w :: [out] Western edge layer thickness [H ~> m or kg m-2].

  • h_e :: [out] Eastern edge layer thickness [H ~> m or kg m-2].

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

  • cs :: [in] This module’s control structure.

  • obc :: Open boundaries control structure.

  • lb_in :: [in] Loop bounds structure.

Call to:

id_clock_reconstruct ppm_reconstruction_x

Called from:

mom_continuity_ppm::continuity_fluxes::continuity_2d_fluxes mom_continuity_ppm::continuity_fluxes::continuity_3d_fluxes continuity_adjust_vel continuity_ppm

subroutine mom_continuity_ppm/meridional_edge_thickness(h_in, h_S, h_N, G, GV, US, CS, OBC, LB_in)

Set the reconstructed thicknesses at the eastern and western edges of tracer cells.

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

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

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

  • h_s :: [out] Southern edge layer thickness [H ~> m or kg m-2].

  • h_n :: [out] Northern edge layer thickness [H ~> m or kg m-2].

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

  • cs :: [in] This module’s control structure.

  • obc :: Open boundaries control structure.

  • lb_in :: [in] Loop bounds structure.

Call to:

id_clock_reconstruct ppm_reconstruction_y

Called from:

mom_continuity_ppm::continuity_fluxes::continuity_2d_fluxes mom_continuity_ppm::continuity_fluxes::continuity_3d_fluxes continuity_adjust_vel continuity_ppm

subroutine mom_continuity_ppm/zonal_mass_flux(u, h_in, h_W, h_E, uh, dt, G, GV, US, CS, OBC, por_face_areaU, LB_in, uhbt, visc_rem_u, u_cor, BT_cont, du_cor)

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

Parameters:
  • g :: [in] 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_w :: [in] Western edge thicknesses [H ~> m or kg m-2].

  • h_e :: [in] Eastern edge thicknesses [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 :: [in] This module’s control structure.

  • obc :: Open boundaries control structure.

  • por_face_areau :: [in] fractional open area of U-faces [nondim]

  • lb_in :: [in] Loop bounds 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 [nondim]. Visc_rem_u is between 0 (at the bottom) and 1 (far above the bottom).

  • u_cor :: [out] The zonal velocities (u with a barotropic correction) that give uhbt 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.

  • du_cor :: [out] The zonal velocity increments from u that give uhbt

Call to:

id_clock_correct mom_open_boundary::obc_direction_e ratio_max set_zonal_bt_cont zonal_flux_adjust zonal_flux_layer zonal_flux_thickness

Called from:

mom_continuity_ppm::continuity_fluxes::continuity_3d_fluxes continuity_adjust_vel continuity_ppm

subroutine mom_continuity_ppm/zonal_bt_mass_flux(u, h_in, h_W, h_E, uhbt, dt, G, GV, US, CS, OBC, por_face_areaU, LB_in)

Calculates the vertically integrated mass or volume fluxes through the zonal faces.

Parameters:
  • g :: [in] 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_w :: [in] Western edge thickness in the PPM reconstruction [H ~> m or kg m-2].

  • h_e :: [in] Eastern edge thickness in the PPM reconstruction [H ~> m or kg m-2].

  • uhbt :: [out] The summed volume flux through zonal faces [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 :: [in] This module’s control structure.G

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

  • por_face_areau :: [in] fractional open area of U-faces [nondim]

  • lb_in :: [in] Loop bounds structure.

Call to:

id_clock_correct zonal_flux_layer

Called from:

mom_continuity_ppm::continuity_fluxes::continuity_2d_fluxes

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

Evaluates the zonal mass or volume fluxes in a layer.

Parameters:
  • g :: [in] 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 [nondim]. Visc_rem is between 0 (at the bottom) and 1 (far above the bottom).

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

  • h_w :: [in] West edge thickness [H ~> m or kg m-2].

  • h_e :: [in] East edge 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

  • por_face_areau :: [in] fractional open area of U-faces [nondim] 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_bt_mass_flux zonal_flux_adjust zonal_mass_flux

subroutine mom_continuity_ppm/zonal_flux_thickness(u, h, h_W, h_E, h_u, dt, G, GV, US, LB, vol_CFL, marginal, OBC, por_face_areaU, visc_rem_u)

Sets the effective interface thickness associated with the fluxes at each zonal velocity point, optionally scaling back these thicknesses to account for viscosity and fractional open areas.

Parameters:
  • g :: [in] 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_w :: [in] West edge thickness in the reconstruction [H ~> m or kg m-2].

  • h_e :: [in] East edge thickness in the reconstruction [H ~> m or kg m-2].

  • h_u :: [inout] Effective thickness at zonal faces, scaled down to account for the effects of viscosity and the fractional open area [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.

  • por_face_areau :: [in] fractional open area of U-faces [nondim]

  • 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 [nondim]. Visc_rem_u is 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_W, h_E, 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, por_face_areaU, uh_3d, OBC)

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

Parameters:
  • g :: [in] 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_w :: [in] West edge thickness in the reconstruction [H ~> m or kg m-2].

  • h_e :: [in] East edge 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 [nondim]. Visc_rem is 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 :: [in] 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.

  • por_face_areau :: [in] fractional open area of U-faces [nondim]

  • 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_W, h_E, 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, por_face_areaU)

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 :: [in] 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_w :: [in] West edge thickness in the reconstruction [H ~> m or kg m-2].

  • h_e :: [in] East edge 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 :: [in] 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 [nondim]. Visc_rem is between 0 (at the bottom) and 1 (far above the bottom).

  • visc_rem_max :: [in] Maximum allowable visc_rem [nondim].

  • 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.

  • por_face_areau :: [in] fractional open area of U-faces [nondim]

Call to:

zonal_flux_adjust zonal_flux_layer

Called from:

zonal_mass_flux

subroutine mom_continuity_ppm/meridional_mass_flux(v, h_in, h_S, h_N, vh, dt, G, GV, US, CS, OBC, por_face_areaV, LB_in, vhbt, visc_rem_v, v_cor, BT_cont, dv_cor)

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

Parameters:
  • g :: [in] 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_s :: [in] South edge thickness in the reconstruction [H ~> m or kg m-2].

  • h_n :: [in] North edge thickness in the reconstruction [H ~> m or kg m-2].

  • vh :: [out] Volume flux through meridional faces = 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 :: [in] This module’s control structure.G

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

  • por_face_areav :: [in] fractional open area of V-faces [nondim]

  • lb_in :: [in] Loop bounds structure.

  • 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 velocities (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.

  • dv_cor :: [out] The meridional velocity increments from v

Call to:

id_clock_correct merid_flux_layer meridional_flux_adjust meridional_flux_thickness mom_open_boundary::obc_direction_n ratio_max set_merid_bt_cont

Called from:

mom_continuity_ppm::continuity_fluxes::continuity_3d_fluxes continuity_adjust_vel continuity_ppm

subroutine mom_continuity_ppm/meridional_bt_mass_flux(v, h_in, h_S, h_N, vhbt, dt, G, GV, US, CS, OBC, por_face_areaV, LB_in)

Calculates the vertically integrated mass or volume fluxes through the meridional faces.

Parameters:
  • g :: [in] 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_s :: [in] Southern edge thickness in the PPM reconstruction [H ~> m or kg m-2].

  • h_n :: [in] Northern edge thickness in the PPM reconstruction [H ~> m or kg m-2].

  • vhbt :: [out] The summed volume flux through meridional faces [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 :: [in] This module’s control structure.G

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

  • por_face_areav :: [in] fractional open area of V-faces [nondim]

  • lb_in :: [in] Loop bounds structure.

Call to:

id_clock_correct merid_flux_layer

Called from:

mom_continuity_ppm::continuity_fluxes::continuity_2d_fluxes

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

Evaluates the meridional mass or volume fluxes in a layer.

Parameters:
  • g :: [in] 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 [nondim]. Visc_rem is 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_s :: [in] South edge thickness in the reconstruction [H ~> m or kg m-2].

  • h_n :: [in] North edge 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.

  • por_face_areav :: [in] fractional open area of V-faces [nondim]

  • obc :: Open boundaries control structure.

Call to:

mom_open_boundary::obc_direction_n

Called from:

meridional_bt_mass_flux meridional_flux_adjust meridional_mass_flux set_merid_bt_cont

subroutine mom_continuity_ppm/meridional_flux_thickness(v, h, h_S, h_N, h_v, dt, G, GV, US, LB, vol_CFL, marginal, OBC, por_face_areaV, visc_rem_v)

Sets the effective interface thickness associated with the fluxes at each meridional velocity point, optionally scaling back these thicknesses to account for viscosity and fractional open areas.

Parameters:
  • g :: [in] 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_s :: [in] South edge thickness in the reconstruction, [H ~> m or kg m-2].

  • h_n :: [in] North edge thickness in the reconstruction, [H ~> m or kg m-2].

  • h_v :: [inout] Effective thickness at meridional faces, scaled down to account for the effects of viscosity and the fractional open area [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.

  • por_face_areav :: [in] fractional open area of V-faces [nondim]

  • 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 [nondim]. Visc_rem_v is 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_S, h_N, 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, por_face_areaV, vh_3d, OBC)

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

Parameters:
  • g :: [in] 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_s :: [in] South edge thickness in the reconstruction [H ~> m or kg m-2].

  • h_n :: [in] North edge 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 [nondim]. Visc_rem is between 0 (at the bottom) and 1 (far above the bottom).

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

  • 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 :: [in] 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.

  • por_face_areav :: [in] fractional open area of V-faces [nondim]

  • 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_S, h_N, 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, por_face_areaV)

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 :: [in] 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_s :: [in] South edge thickness in the reconstruction, [H ~> m or kg m-2].

  • h_n :: [in] North edge 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 :: [in] 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 [nondim]. Visc_rem is between 0 (at the bottom) and 1 (far above the bottom).

  • visc_rem_max :: [in] Maximum allowable visc_rem [nondim]

  • 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.

  • por_face_areav :: [in] fractional open area of V-faces [nondim]

Call to:

merid_flux_layer meridional_flux_adjust

Called from:

meridional_mass_flux

subroutine mom_continuity_ppm/ppm_reconstruction_x(h_in, h_W, h_E, 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_w :: [out] West edge thickness in the reconstruction, [H ~> m or kg m-2].

  • h_e :: [out] East edge 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 [H ~> m or kg m-2]

  • 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_edge_thickness

subroutine mom_continuity_ppm/ppm_reconstruction_y(h_in, h_S, h_N, 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_s :: [out] South edge thickness in the reconstruction, [H ~> m or kg m-2].

  • h_n :: [out] North edge 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 [H ~> m or kg m-2]

  • 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_edge_thickness

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 [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

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, in arbitrary units [A]

  • b :: [in] Denominator, in arbitrary units [B]

  • maxrat :: [in] Maximum value of ratio [A B-1]

Return:

undefined :: Return value [A B-1]

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 :: [inout] Module’s control structure.

Call to:

id_clock_correct id_clock_reconstruct id_clock_update

function mom_continuity_ppm/continuity_ppm_stencil(CS) [integer]

continuity_PPM_stencil returns the continuity solver stencil size

Parameters:

cs :: [in] Module’s control structure.

Return:

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

Called from:

set_continuity_loop_bounds

function mom_continuity_ppm/set_continuity_loop_bounds(G, CS, i_stencil, j_stencil) [type(cont_loop_bounds_type)]

Set up a structure that stores the sizes of the i- and j-loops to to work on in the continuity solver.

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

  • cs :: [in] Module’s control structure.

  • i_stencil :: [in] If present and true, extend the i-loop bounds by the stencil width of the continuity scheme.

  • j_stencil :: [in] If present and true, extend the j-loop bounds by the stencil width of the continuity scheme.

Return:

undefined :: A type storing the array sizes to work on in the continuity routines.

Call to:

continuity_ppm_stencil

Called from:

continuity_ppm