mom_continuity_ppm module reference
Solve the layer continuity equation using the PPM method for layer fluxes.
Data Types
Control structure for |
|
A container for loop bounds. |
Functions/Subroutines
Time steps the layer thicknesses, using a monotonically limit, directionally split PPM scheme, based on Lin (1994). |
|
Finds the thickness fluxes from the continuity solver without actually updating the layer thicknesses. |
|
Find the vertical sum of the thickness fluxes from the continuity solver without actually updating the layer thicknesses. |
|
Correct the velocities to give the specified depth-integrated transports by applying a barotropic acceleration (subject to viscous drag) to the velocities. |
|
Updates the thicknesses due to zonal thickness fluxes. |
|
Updates the thicknesses due to meridional thickness fluxes. |
|
Set the reconstructed thicknesses at the eastern and western edges of tracer cells. |
|
Set the reconstructed thicknesses at the eastern and western edges of tracer cells. |
|
Calculates the mass or volume fluxes through the zonal faces, and other related quantities. |
|
Calculates the vertically integrated mass or volume fluxes through the zonal faces. |
|
Evaluate the mass or volume flux through a single face of an element. |
|
Overrides the zonal or meridional mass or volume flux through a single face of an element with the value set by an open boundary condition. |
|
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. |
|
Returns the barotropic velocity adjustment that gives the desired barotropic (layer-summed) transport. |
|
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. |
|
Calculates the mass or volume fluxes through the meridional faces, and other related quantities. |
|
Calculates the vertically integrated mass or volume fluxes through the meridional faces. |
|
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. |
|
Returns the barotropic velocity adjustment that gives the desired barotropic (layer-summed) transport. |
|
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. |
|
Calculates left/right edge values for PPM reconstruction. |
|
Calculates left/right edge values for PPM reconstruction. |
|
This subroutine limits the left/right edge values of the PPM reconstruction to give a reconstruction that is positive-definite. |
|
This subroutine limits the left/right edge values of the PPM reconstruction according to the monotonic prescription of Colella and Woodward, 1984. |
|
Return the maximum ratio of a/b or maxrat. |
|
Initializes |
|
continuity_PPM_stencil returns the continuity solver stencil size |
|
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 ::
logicalTrue if this control structure has been initialized.% diag ::
type(diag_ctrl), pointerDiagnostics control structure.% upwind_1st ::
logicalIf true, use a first-order upwind scheme.% monotonic ::
logicalIf true, use the Colella & Woodward monotonic limiter; otherwise use a simple positive definite limiter.% simple_2nd ::
logicalIf true, use a simple second order (arithmetic mean) interpolation of the edge values instead of the higher order interpolation.% tol_eta ::
realThe 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 ::
realThe 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 ::
realThe maximum CFL of the adjusted velocities [nondim].% h_marg_min ::
realNegligible floor on h_marg, the marginal thickness used to calculate the partial derivative of transports with velocities [H ~> m or kg m-2].% aggress_adjust ::
logicalIf true, allow the adjusted velocities to have a relative CFL change up to 0.5. False by default.% vol_cfl ::
logicalIf 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 ::
logicalIf true, stop corrective iterations using a velocity-based criterion and only stop if the iteration is better than all predecessors.% use_visc_rem_max ::
logicalIf true, use more appropriate limiting bounds for corrections in strongly viscous columns.% marginal_faces ::
logicalIf 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.% niblock ::
integerThe i block size used in array calculations.% njblock ::
integerThe j block size used in array calculations.% nkblock ::
integerThe k block size used in reconstruction calculations.
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 ::
u[in] Zonal velocity [L T-1 ~> m s-1].v ::
v[in] Meridional velocity [L T-1 ~> m s-1].hin ::
hin[in] Initial layer thickness [H ~> m or kg m-2].h ::
h[inout] Final layer thickness [H ~> m or kg m-2].uh ::
uh[out] Zonal volume flux, u*h*dy [H L2 T-1 ~> m3 s-1 or kg s-1].vh ::
vh[out] Meridional volume flux, v*h*dx [H L2 T-1 ~> m3 s-1 or kg s-1].dt ::
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 ::
pbv[in] pointers to porous barrier fractional cell metricsuhbt ::
uhbt[in] The summed volume flux through zonal facesvhbt ::
vhbt[in] The summed volume flux through meridional facesvisc_rem_u ::
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 ::
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 ::
u_cor[out] The zonal velocities that give uhbt as the depth-integrated transport [L T-1 ~> m s-1].v_cor ::
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 ::
du_cor[out] The zonal velocity increments from u that give uhbtdv_cor ::
dv_cor[out] The meridional velocity increments from v that give vhbt
- Call to:
continuity_merdional_convergencecontinuity_zonal_convergencemeridional_edge_thicknessmeridional_mass_fluxmom_error_handler::mom_errorset_continuity_loop_boundszonal_edge_thicknesszonal_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 ::
u[in] Zonal velocity [L T-1 ~> m s-1].v ::
v[in] Meridional velocity [L T-1 ~> m s-1].h ::
h[in] Layer thickness [H ~> m or kg m-2].uh ::
uh[out] Thickness fluxes through zonal faces,vh ::
vh[out] Thickness fluxes through meridional faces,dt ::
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 ::
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 ::
u[in] Zonal velocity [L T-1 ~> m s-1].v ::
v[in] Meridional velocity [L T-1 ~> m s-1].h ::
h[in] Layer thickness [H ~> m or kg m-2].uhbt ::
uhbt[out] Vertically summed thickness flux throughvhbt ::
vhbt[out] Vertically summed thickness flux throughdt ::
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 ::
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 ::
u[inout] Zonal velocity, which will be adjusted tov ::
v[inout] Meridional velocity, which will be adjustedh ::
h[in] Layer thickness [H ~> m or kg m-2].dt ::
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 ::
pbv[in] porous barrier fractional cell metricsuhbt ::
uhbt[in] The vertically summed thickness flux throughvhbt ::
vhbt[in] The vertically summed thickness flux throughvisc_rem_u ::
visc_rem_u[in] Both the fraction of the zonal momentumvisc_rem_v ::
visc_rem_v[in] Both the fraction of the meridional momentum
- Call to:
meridional_edge_thicknessmeridional_mass_fluxzonal_edge_thicknesszonal_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 ::
h[inout] Final layer thickness [H ~> m or kg m-2]uh ::
uh[in] Zonal thickness flux, u*h*dy [H L2 T-1 ~> m3 s-1 or kg s-1]dt ::
dt[in] Time increment [T ~> s]lb :: [in] Loop bounds structure
hin ::
hin[in] Initial layer thickness [H ~> m or kg m-2].hmin ::
hmin[in] The minimum layer thickness [H ~> m or kg m-2]
- Call to:
id_clock_update- Called from:
- 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 ::
h[inout] Final layer thickness [H ~> m or kg m-2]vh ::
vh[in] Meridional thickness flux, v*h*dx [H L2 T-1 ~> m3 s-1 or kg s-1]dt ::
dt[in] Time increment [T ~> s]lb :: [in] Loop bounds structure
hin ::
hin[in] Initial layer thickness [H ~> m or kg m-2].hmin ::
hmin[in] The minimum layer thickness [H ~> m or kg m-2]
- Call to:
id_clock_update- Called from:
- 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 ::
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_reconstructppm_reconstruction_x- Called from:
mom_continuity_ppm::continuity_fluxes::continuity_2d_fluxesmom_continuity_ppm::continuity_fluxes::continuity_3d_fluxescontinuity_adjust_velcontinuity_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 ::
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_reconstructppm_reconstruction_y- Called from:
mom_continuity_ppm::continuity_fluxes::continuity_2d_fluxesmom_continuity_ppm::continuity_fluxes::continuity_3d_fluxescontinuity_adjust_velcontinuity_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, nIIB, njj, 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 ::
u[in] Zonal velocity [L T-1 ~> m s-1].h_in ::
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 ::
uh[out] Volume flux through zonal faces = u*h*dydt ::
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]
niib :: [in] I block size for array calculations.
njj ::
njj[in] j block size for array calculations.lb_in :: [in] Loop bounds structure.
uhbt ::
uhbt[in] The summed volume flux through zonal facesvisc_rem_u ::
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 ::
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 ::
du_cor[out] The zonal velocity increments from u that give uhbt
- Call to:
flux_elemflux_elem_obcid_clock_correctmom_open_boundary::obc_direction_eratio_maxset_zonal_bt_contzonal_flux_adjustzonal_flux_thickness- Called from:
mom_continuity_ppm::continuity_fluxes::continuity_3d_fluxescontinuity_adjust_velcontinuity_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 ::
u[in] Zonal velocity [L T-1 ~> m s-1]h_in ::
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 ::
uhbt[out] The summed volume flux through zonal faces [H L2 T-1 ~> m3 s-1 or kg s-1].dt ::
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:
flux_elemflux_elem_obcid_clock_correct- Called from:
- subroutine mom_continuity_ppm/flux_elem(u, h, h_p1, h_L, h_L_p1, h_R, h_R_p1, uh, duhdu, visc_rem, G_dy_Cu, G_IareaT, G_IareaT_p1, G_IdxT, G_IdxT_p1, dt, vol_CFL, por_face_area, h_marg_min)
Evaluate the mass or volume flux through a single face of an element.
- Parameters:
u ::
u[in] Zonal or meridional velocity [L T-1 ~> m s-1]h ::
h[in] Layer thickness [H ~> m or kg m-2]h_p1 ::
h_p1[in] Layer thickness - offset by 1 [ H ~> m or kg m-2]h_l :: [in] West/South edge thickness [H ~> m or kg m-2]
h_l_p1 :: [in] West/South edge thickness - offset by 1 [H ~> m or kg m-2]
h_r :: [in] East/North edge thickness [H ~> m or kg m-2]
h_r_p1 :: [in] East/North edge thickness - offset by 1 [H ~> m or kg m-2]
uh ::
uh[out] Zonal or meridional mass or volume transport [H L2 T-1 ~> m3 s-1 or kg s-1]duhdu ::
duhdu[out] Partial derivative of uh with u [H L ~> m2 or kg m-1]visc_rem ::
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. Visc_rem is between 0 (at the bottom) and 1 (far above the bottom). [nondim]g_dy_cu :: [in] The grid cell’s unblocked lengths of u/v-faces of the h-cell [L ~> m]
g_iareat :: [in] The grid cell’s 1/areaT [L-2 ~> m-2]
g_iareat_p1 :: [in] The grid cell’s 1/areaT - offset by 1 [L-2 ~> m-2]
g_idxt :: [in] The grid cell’s 1/dxT [L-1 ~> m-1]
g_idxt_p1 :: [in] The grid cell’s 1/dxT - offset by 1 [L-1 ~> m-1]
dt ::
dt[in] Time increment [T ~> s]vol_cfl :: [in] If true, rescale the ratio of face areas to the cell areas when estimating the CFL number
por_face_area ::
por_face_area[in] fractional open area of U/V-faces [nondim]h_marg_min ::
h_marg_min[in] Negligible floor on h_marg [H ~> m or kg m-2]
- Called from:
meridional_bt_mass_fluxmeridional_flux_adjustmeridional_mass_fluxset_merid_bt_contset_zonal_bt_contzonal_bt_mass_fluxzonal_flux_adjustzonal_mass_flux
- subroutine mom_continuity_ppm/flux_elem_obc(u, h, h_p1, uh, duhdu, visc_rem, por_face_area, G_dy_Cu, OBC, l_seg, h_marg_min)
Overrides the zonal or meridional mass or volume flux through a single face of an element with the value set by an open boundary condition.
- Parameters:
u ::
u[in] Zonal/meridional velocity [L T-1 ~> m s-1].h ::
h[in] Layer thickness [H ~> m or kg m-2].h_p1 ::
h_p1[in] Layer thickness offset by 1 [H ~> m or kg m-2].uh ::
uh[inout] Zonal/meridional mass or volume transport [H L2 T-1 ~> m3 s-1 or kg s-1].duhdu ::
duhdu[inout] Partial derivative of uh with u [H L ~> m2 or kg m-1].visc_rem ::
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. Visc_rem is between 0 (at the bottom) and 1 (far above the bottom). [nondim]por_face_area ::
por_face_area[in] fractional open area of U/V-faces [nondim].g_dy_cu :: [in] The grid cell’s unblocked lengths of the u/v-faces of the h-cell [L ~> m]. ratio of face areas to the cell areas when estimating the CFL number.
obc :: [in] Open boundaries control structure.
l_seg ::
l_seg[in] Segment index.h_marg_min ::
h_marg_min[in] Negligible floor on h [H ~> m or kg m-2]
- Called from:
meridional_bt_mass_fluxmeridional_flux_adjustmeridional_mass_fluxzonal_bt_mass_fluxzonal_flux_adjustzonal_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 ::
u[in] Zonal velocity [L T-1 ~> m s-1].h ::
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 ::
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 ::
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 ::
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 ::
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:
- 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, IsbB, IebB, jsb, jeb, do_ij_in, por_face_areaU, nIIB, njj, uh_3d, OBC)
Returns the barotropic velocity adjustment that gives the desired barotropic (layer-summed) transport.
- Parameters:
niib :: [in] I block size for array calculations.
njj ::
njj[in] j block size for array calculations.g :: [in] Ocean’s grid structure.
gv :: [in] Ocean’s vertical grid structure.
u ::
u[in] Zonal velocity [L T-1 ~> m s-1].h_in ::
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 ::
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 ::
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 ::
uh_tot_0[in] The summed transport with 0 adjustment [H L2 T-1 ~> m3 s-1 or kg s-1].duhdu_tot_0 ::
duhdu_tot_0[in] The partial derivative of du_err with du at 0 adjustment [H L ~> m2 or kg m-1].du ::
du[out] The barotropic velocity adjustment [L T-1 ~> m s-1].dt ::
dt[in] Time increment [T ~> s].us :: [in] A dimensional unit scaling type
cs :: [in] This module’s control structure.
isbb :: [in] Start of I index range.
iebb :: [in] End of I index range.
jsb ::
jsb[in] Start of j index range.jeb ::
jeb[in] End of j index range.do_ij_in ::
do_ij_in[in] A logical flag indicating which block points to work on.por_face_areau :: [in] fractional open area of U-faces [nondim]
uh_3d ::
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:
- Called from:
- 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, IsbB, IebB, jsb, jeb, do_ij, por_face_areaU, nIIB, njj)
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:
niib :: [in] I block size for array calculations.
njj ::
njj[in] j block size for array calculations.g :: [in] Ocean’s grid structure.
gv :: [in] Ocean’s vertical grid structure.
u ::
u[in] Zonal velocity [L T-1 ~> m s-1].h_in ::
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 ::
uh_tot_0[in] The summed transport with 0 adjustment [H L2 T-1 ~> m3 s-1 or kg s-1].duhdu_tot_0 ::
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 ::
dt[in] Time increment [T ~> s].us :: [in] A dimensional unit scaling type
cs :: [in] This module’s control structure.
visc_rem ::
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 ::
visc_rem_max[in] Maximum allowable visc_rem [nondim].isbb :: [in] Start of I index range.
iebb :: [in] End of I index range.
jsb ::
jsb[in] Start of j index range.jeb ::
jeb[in] End of j index range.do_ij ::
do_ij[in] A logical flag indicating which block points to work on.por_face_areau :: [in] fractional open area of U-faces [nondim]
- Call to:
- Called from:
- subroutine mom_continuity_ppm/meridional_mass_flux(v, h_in, h_S, h_N, vh, dt, G, GV, US, CS, OBC, por_face_areaV, nii, nJJB, 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:
nii ::
nii[in] i block size for array calculations.njjb :: [in] J block size for array calculations.
g :: [in] Ocean’s grid structure.
gv :: [in] Ocean’s vertical grid structure.
v ::
v[in] Meridional velocity [L T-1 ~> m s-1]h_in ::
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 ::
vh[out] Volume flux through meridional faces = v*h*dx [H L2 T-1 ~> m3 s-1 or kg s-1]dt ::
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 ::
vhbt[in] The summed volume flux through meridional faces [H L2 T-1 ~> m3 s-1 or kg s-1].visc_rem_v ::
visc_rem_v[in] Both the fraction of the momentumv_cor ::
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 ::
dv_cor[out] The meridional velocity increments from v
- Call to:
flux_elemflux_elem_obcid_clock_correctmeridional_flux_adjustmeridional_flux_thicknessmom_open_boundary::obc_direction_nratio_maxset_merid_bt_cont- Called from:
mom_continuity_ppm::continuity_fluxes::continuity_3d_fluxescontinuity_adjust_velcontinuity_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 ::
v[in] Meridional velocity [L T-1 ~> m s-1]h_in ::
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 ::
vhbt[out] The summed volume flux through meridional faces [H L2 T-1 ~> m3 s-1 or kg s-1].dt ::
dt[in] Time increment [T ~> s].us :: [in] A dimensional unit scaling type
cs :: [in] This module’s control structure.
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:
flux_elemflux_elem_obcid_clock_correct- Called from:
- 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 ::
v[in] Meridional velocity [L T-1 ~> m s-1].h ::
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 ::
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 ::
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 ::
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 ::
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:
- 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, isb, ieb, JsbB, JebB, do_ij_in, por_face_areaV, nii, nJJB, vh_3d, OBC)
Returns the barotropic velocity adjustment that gives the desired barotropic (layer-summed) transport.
- Parameters:
nii ::
nii[in] i block size for array calculations.njjb :: [in] J block size for array calculations.
g :: [in] Ocean’s grid structure.
gv :: [in] Ocean’s vertical grid structure.
v ::
v[in] Meridional velocity [L T-1 ~> m s-1].h_in ::
h_in[in] Layer thickness used to calculate fluxesh_s :: [in] South edge thickness in the reconstruction
h_n :: [in] North edge thickness in the reconstruction
visc_rem ::
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 ::
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 ::
vh_tot_0[in] The summed transport with 0 adjustment [H L2 T-1 ~> m3 s-1 or kg s-1].dvhdv_tot_0 ::
dvhdv_tot_0[in] The partial derivative of dv_err with dv at 0 adjustment [H L ~> m2 or kg m-1].dv ::
dv[out] The barotropic velocity adjustment [L T-1 ~> m s-1].dt ::
dt[in] Time increment [T ~> s].us :: [in] A dimensional unit scaling type
cs :: [in] This module’s control structure.
jsbb :: [in] Start of J index range.
jebb :: [in] End of J index range.
isb ::
isb[in] Start of i index range.ieb ::
ieb[in] End of i index range.do_ij_in ::
do_ij_in[in] A flag indicating which block points to work on.por_face_areav :: [in] fractional open area of V-faces [nondim]
vh_3d ::
vh_3d[inout] Volume flux through meridionalobc :: Open boundaries control structure.
- Call to:
- Called from:
- 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, isb, ieb, JsbB, JebB, do_ij, por_face_areaV, nii, nJJB)
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:
nii ::
nii[in] i block size for array calculations.njjb :: [in] J block size for array calculations.
g :: [in] Ocean’s grid structure.
gv :: [in] Ocean’s vertical grid structure.
v ::
v[in] Meridional velocity [L T-1 ~> m s-1].h_in ::
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 ::
vh_tot_0[in] The summed transport with 0 adjustment [H L2 T-1 ~> m3 s-1 or kg s-1].dvhdv_tot_0 ::
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 ::
dt[in] Time increment [T ~> s].us :: [in] A dimensional unit scaling type
cs :: [in] This module’s control structure.
visc_rem ::
visc_rem[in] Both the fraction of thevisc_rem_max ::
visc_rem_max[in] Maximum allowable visc_rem [nondim].jsbb :: [in] Start of J index range.
jebb :: [in] End of J index range.
isb ::
isb[in] Start of i index range.ieb ::
ieb[in] End of i index range.do_ij ::
do_ij[in] A logical flag indicating which block points to work on.por_face_areav :: [in] fractional open area of V-faces [nondim]
- Call to:
- Called from:
- subroutine mom_continuity_ppm/ppm_reconstruction_x(h_in, h_W, h_E, G, GV, LB, nkk, h_min, monotonic, simple_2nd, OBC)
Calculates left/right edge values for PPM reconstruction.
- Parameters:
g :: [in] Ocean’s grid structure.
gv :: [in] Ocean’s vertical grid structure.
h_in ::
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.
nkk ::
nkk[in] k block size for reconstruction calculations.h_min ::
h_min[in] The minimum thickness that can be obtained by a concave parabolic fit [H ~> m or kg m-2]monotonic ::
monotonic[in] If true, use the Colella & Woodward monotonic limiter. Otherwise use a simple positive-definite limiter.simple_2nd ::
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_errormom_open_boundary::obc_direction_emom_open_boundary::obc_direction_wppm_limit_cw84ppm_limit_pos- Called from:
- subroutine mom_continuity_ppm/ppm_reconstruction_y(h_in, h_S, h_N, G, GV, LB, nkk, h_min, monotonic, simple_2nd, OBC)
Calculates left/right edge values for PPM reconstruction.
- Parameters:
g :: [in] Ocean’s grid structure.
gv :: [in] Ocean’s vertical grid structure.
h_in ::
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.
nkk ::
nkk[in] k block size for reconstruction calculations.h_min ::
h_min[in] The minimum thickness that can be obtained by a concave parabolic fit [H ~> m or kg m-2]monotonic ::
monotonic[in] If true, use the Colella & Woodward monotonic limiter. Otherwise use a simple positive-definite limiter.simple_2nd ::
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_errormom_open_boundary::obc_direction_nmom_open_boundary::obc_direction_sppm_limit_cw84ppm_limit_pos- Called from:
- subroutine mom_continuity_ppm/ppm_limit_pos(h_in, h_L, h_R, h_min, G, GV, iis, iie, jis, jie, ks, ke)
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.
gv :: [in] Ocean’s vertical grid structure.
h_in ::
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 ::
h_min[in] The minimum thickness that can be obtained by a concave parabolic fit [H ~> m or kg m-2]iis ::
iis[in] Start of i index range.iie ::
iie[in] End of i index range.jis ::
jis[in] Start of j index range.jie ::
jie[in] End of j index range.ks ::
ks[in] Start of k index range.ke ::
ke[in] End of k index range.
- Called from:
- subroutine mom_continuity_ppm/ppm_limit_cw84(h_in, h_L, h_R, G, GV, iis, iie, jis, jie, ks, ke)
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.
gv :: [in] Ocean’s vertical grid structure.
h_in ::
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 ::
iis[in] Start of i index range.iie ::
iie[in] End of i index range.jis ::
jis[in] Start of j index range.jie ::
jie[in] End of j index range.ks ::
ks[in] Start of k index range.ke ::
ke[in] End of k index range.
- Called from:
- function mom_continuity_ppm/ratio_max(a, b, maxrat)
Return the maximum ratio of a/b or maxrat.
- Parameters:
a ::
a[in] Numerator, in arbitrary units [A]b ::
b[in] Denominator, in arbitrary units [B]maxrat ::
maxrat[in] Maximum value of ratio [A B-1]
- Return:
undefined :: Return value [A B-1]
- Called from:
- subroutine mom_continuity_ppm/continuity_ppm_init(Time, G, GV, US, param_file, diag, CS, OBC)
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 ::
param_file[in] A structure indicating the open file to parse for model parameter values.diag ::
diag[inout] A structure that is used to regulate diagnostic output.cs :: [inout] Module’s control structure.
obc :: Open boundaries control structure.
- Call to:
id_clock_correctid_clock_reconstructid_clock_updatemom_error_handler::mom_error
- function mom_continuity_ppm/continuity_ppm_stencil(CS)
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:
- function mom_continuity_ppm/set_continuity_loop_bounds(G, CS, i_stencil, j_stencil)
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 ::
i_stencil[in] If present and true, extend the i-loop bounds by the stencil width of the continuity scheme.j_stencil ::
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:
- Called from: