mom_dynamics_split_rk2 module reference

Time step the adiabatic dynamic core of MOM using RK2 method.

More…

Data Types

mom_dyn_split_rk2_cs

MOM_dynamics_split_RK2 module control structure.

Functions/Subroutines

step_mom_dyn_split_rk2()

RK2 splitting for time stepping MOM adiabatic dynamics.

register_restarts_dyn_split_rk2()

This subroutine sets up any auxiliary restart variables that are specific to the split-explicit time stepping scheme.

remap_dyn_split_rk2_aux_vars()

This subroutine does remapping for the auxiliary restart variables that are used with the split RK2 time stepping scheme.

initialize_dyn_split_rk2()

This subroutine initializes all of the variables that are used by this dynamic core, including diagnostics and the cpu clocks.

end_dyn_split_rk2()

Close the dyn_split_RK2 module.

Detailed Description

This file time steps the adiabatic dynamic core by splitting between baroclinic and barotropic modes. It uses a pseudo-second order Runge-Kutta time stepping scheme for the baroclinic momentum equation and a forward-backward coupling between the baroclinic momentum and continuity equations. This split time-stepping scheme is described in detail in Hallberg (JCP, 1997). Additional issues related to exact tracer conservation and how to ensure consistency between the barotropic and layered estimates of the free surface height are described in Hallberg and Adcroft (Ocean Modelling, 2009). This was the time stepping code that is used for most GOLD applications, including GFDL’s ESM2G Earth system model, and all of the examples provided with the MOM code (although several of these solutions are routinely verified by comparison with the slower unsplit schemes).

The subroutine step_MOM_dyn_split_RK2 actually does the time stepping, while register_restarts_dyn_split_RK2 sets the fields that are found in a full restart file with this scheme, and initialize_dyn_split_RK2 initializes the cpu clocks that are used in this module. For largely historical reasons, this module does not have its own control structure, but shares the same control structure with MOM.F90 and the other MOM_dynamics_… modules.

Type Documentation

type mom_dynamics_split_rk2/mom_dyn_split_rk2_cs

MOM_dynamics_split_RK2 module control structure.

Type fields:
  • % id_uold [integer] :: Diagnostic IDs.

  • % id_vold [integer] :: Diagnostic IDs.

  • % id_uh [integer] :: Diagnostic IDs.

  • % id_vh [integer] :: Diagnostic IDs.

  • % id_umo [integer] :: Diagnostic IDs.

  • % id_vmo [integer] :: Diagnostic IDs.

  • % id_umo_2d [integer] :: Diagnostic IDs.

  • % id_vmo_2d [integer] :: Diagnostic IDs.

  • % id_pfu [integer] :: Diagnostic IDs.

  • % id_pfv [integer] :: Diagnostic IDs.

  • % id_cau [integer] :: Diagnostic IDs.

  • % id_cav [integer] :: Diagnostic IDs.

  • % id_ueffa [integer] :: Diagnostic IDs.

  • % id_veffa [integer] :: Diagnostic IDs.

  • % id_h_pfu [integer] :: Diagnostic IDs.

  • % id_h_pfv [integer] :: Diagnostic IDs.

  • % id_hf_pfu_2d [integer] :: Diagnostic IDs.

  • % id_hf_pfv_2d [integer] :: Diagnostic IDs.

  • % id_intz_pfu_2d [integer] :: Diagnostic IDs.

  • % id_intz_pfv_2d [integer] :: Diagnostic IDs.

  • % id_pfu_visc_rem [integer] :: Diagnostic IDs.

  • % id_pfv_visc_rem [integer] :: Diagnostic IDs.

  • % id_h_cau [integer] :: Diagnostic IDs.

  • % id_h_cav [integer] :: Diagnostic IDs.

  • % id_hf_cau_2d [integer] :: Diagnostic IDs.

  • % id_hf_cav_2d [integer] :: Diagnostic IDs.

  • % id_intz_cau_2d [integer] :: Diagnostic IDs.

  • % id_intz_cav_2d [integer] :: Diagnostic IDs.

  • % id_cau_visc_rem [integer] :: Diagnostic IDs.

  • % id_cav_visc_rem [integer] :: Diagnostic IDs.

  • % id_deta_dt [integer] :: Diagnostic IDs.

  • % id_uav [integer] :: Diagnostic IDs.

  • % id_vav [integer] :: Diagnostic IDs.

  • % id_u_bt_accel [integer] :: Diagnostic IDs.

  • % id_v_bt_accel [integer] :: Diagnostic IDs.

  • % id_h_u_bt_accel [integer] :: Diagnostic IDs.

  • % id_h_v_bt_accel [integer] :: Diagnostic IDs.

  • % id_hf_u_bt_accel_2d [integer] :: Diagnostic IDs.

  • % id_hf_v_bt_accel_2d [integer] :: Diagnostic IDs.

  • % id_intz_u_bt_accel_2d [integer] :: Diagnostic IDs.

  • % id_intz_v_bt_accel_2d [integer] :: Diagnostic IDs.

  • % id_u_bt_accel_visc_rem [integer] :: Diagnostic IDs.

  • % id_v_bt_accel_visc_rem [integer] :: Diagnostic IDs.

  • % real (* pbce [*, *) :: CAu = f*v - u.grad(u) [L T-2 ~> m s-2].

  • % real :: The predictor step value of CAu = f*v - u.grad(u) [L T-2 ~> m s-2].

  • % real :: PFu = -dM/dx [L T-2 ~> m s-2].

  • % real :: PFu_Stokes = -d/dx int_r (u_L*duS/dr) [L T-2 ~> m s-2].

  • % real :: Zonal acceleration due to convergence of the along-isopycnal stress tensor [L T-2 ~> m s-2].

  • % real :: CAv = -f*u - u.grad(v) [L T-2 ~> m s-2].

  • % real :: The predictor step value of CAv = -f*u - u.grad(v) [L T-2 ~> m s-2].

  • % real :: PFv = -dM/dy [L T-2 ~> m s-2].

  • % real :: PFv_Stokes = -d/dy int_r (v_L*dvS/dr) [L T-2 ~> m s-2].

  • % real :: Meridional acceleration due to convergence of the along-isopycnal stress tensor [L T-2 ~> m s-2].

  • % real :: Both the fraction of the zonal momentum originally in a layer that remains after a time-step of viscosity, and the fraction of a time-step worth of a barotropic acceleration that a layer experiences after viscosity is applied [nondim]. Nondimensional between 0 (at the bottom) and 1 (far above).

  • % real :: The zonal layer accelerations due to the difference between the barotropic accelerations and the baroclinic accelerations that were fed into the barotopic calculation [L T-2 ~> m s-2].

  • % real :: Both the fraction of the meridional momentum originally in a layer that remains after a time-step of viscosity, and the fraction of a time-step worth of a barotropic acceleration that a layer experiences after viscosity is applied [nondim]. Nondimensional between 0 (at the bottom) and 1 (far above).

  • % real :: The meridional layer accelerations due to the difference between the barotropic accelerations and the baroclinic accelerations that were fed into the barotopic calculation [L T-2 ~> m s-2].

  • % real :: Instantaneous free surface height (in Boussinesq mode) or column mass anomaly (in non-Boussinesq mode) [H ~> m or kg m-2].

  • % real :: layer x-velocity with vertical mean replaced by time-mean barotropic velocity over a baroclinic timestep [L T-1 ~> m s-1]

  • % real :: layer y-velocity with vertical mean replaced by time-mean barotropic velocity over a baroclinic timestep [L T-1 ~> m s-1]

  • % real :: arithmetic mean of two successive layer thicknesses [H ~> m or kg m-2]

  • % real :: instantaneous SSH used in calculating PFu and PFv [H ~> m or kg m-2]

  • % real :: average x-volume or mass flux determined by the barotropic solver [H L2 T-1 ~> m3 s-1 or kg s-1]. uhbt is roughly equal to the vertical sum of uh.

  • % real :: average y-volume or mass flux determined by the barotropic solver [H L2 T-1 ~> m3 s-1 or kg s-1]. vhbt is roughly equal to vertical sum of vh.

  • % real :: pbce times eta gives the baroclinic pressure anomaly in each layer due to free surface height anomalies [L2 H-1 T-2 ~> m s-2 or m4 kg-1 s-2].

  • % kpp_csp [type( kpp_cs ),pointer] :: KPP control structure needed to ge.

  • % energetic_pbl_csp [type( energetic_pbl_cs ),pointer] :: ePBL control structure

  • % taux_bot [real(:,:),pointer] :: frictional x-bottom stress from the ocean to the seafloor [R L Z T-2 ~> Pa]

  • % tauy_bot [real(:,:),pointer] :: frictional y-bottom stress from the ocean to the seafloor [R L Z T-2 ~> Pa]

  • % bt_cont [type( bt_cont_type ),pointer] :: A structure with elements that describe the effective summed open face areas as a function of barotropic flow.

  • % bt_use_layer_fluxes [logical] :: If true, use the summed layered fluxes plus an adjustment due to a changed barotropic velocity in the barotropic continuity equation.

  • % split_bottom_stress [logical] :: If true, provide the bottom stress calculated by the vertical viscosity to the barotropic solver.

  • % calc_dtbt [logical] :: If true, calculate the barotropic time-step dynamically.

  • % store_cau [logical] :: If true, store the Coriolis and advective accelerations at the end of the timestep for use in the next predictor step.

  • % cau_pred_stored [logical] :: If true, the Coriolis and advective accelerations at the end of the timestep have been stored for use in the next predictor step. This is used to accomodate various generations of restart files.

  • % calculate_sal [logical] :: If true, calculate self-attraction and loading.

  • % use_tides [logical] :: If true, tidal forcing is enabled.

  • % remap_aux [logical] :: If true, apply ALE remapping to all of the auxiliary 3-D variables that are needed to reproduce across restarts, similarly to what is done with the primary state variables.

  • % be [real] :: A nondimensional number from 0.5 to 1 that controls the backward weighting of the time stepping scheme [nondim].

  • % begw [real] :: A nondimensional number from 0 to 1 that controls the extent to which the treatment of gravity waves is forward-backward (0) or simulated backward Euler (1) [nondim]. 0 is often used.

  • % debug [logical] :: If true, write verbose checksums for debugging purposes.

  • % debug_obc [logical] :: If true, do debugging calls for open boundary conditions.

  • % fpmix [logical] :: If true, applies profiles of momentum flux magnitude and direction.

  • % module_is_initialized [logical] :: Record whether this module has been initialized.

  • % diag [type( diag_ctrl ),pointer] :: A structure that is used to regulate the timing of diagnostic output.

  • % adp [type( accel_diag_ptrs ),pointer] :: A structure pointing to the various accelerations in the momentum equations, which can later be used to calculate derived diagnostics like energy budgets.

  • % ad_pred [type( accel_diag_ptrs ),pointer] :: A structure pointing to the various predictor step accelerations in the momentum equations, which can be used to debug truncations.

  • % cdp [type( cont_diag_ptrs ),pointer] :: A structure with pointers to various terms in the continuity equations, which can later be used to calculate derived diagnostics like energy budgets.

  • % hor_visc [type( hor_visc_cs )] :: A pointer to the horizontal viscosity control structure.

  • % continuity_csp [type(continuity_cs)] :: A pointer to the continuity control structure.

  • % coriolisadv [type( coriolisadv_cs )] :: The CoriolisAdv control structure.

  • % pressureforce_csp [type( pressureforce_cs )] :: A pointer to the PressureForce control structure.

  • % vertvisc_csp [type( vertvisc_cs ),pointer] :: A pointer to a structure containing interface height diffusivities.

  • % set_visc_csp [type( set_visc_cs ),pointer] :: A pointer to the set_visc control structure.

  • % barotropic_csp [type( barotropic_cs )] :: A pointer to the barotropic stepping control structure.

  • % sal_csp [type( sal_cs )] :: A pointer to the SAL control structure.

  • % tides_csp [type( tidal_forcing_cs )] :: A pointer to the tidal forcing control structure.

  • % ale_csp [type( ale_cs ),pointer] :: A pointer to the ALE control structure.

  • % obc [type( ocean_obc_type ),pointer] :: A pointer to an open boundary condition type that specifies whether, where, and what open boundary conditions are used. If no open BCs are used, this pointer stays nullified. Flather OBCs use open boundary_CS as well.

  • % update_obc_csp [type( update_obc_cs ),pointer] :: A pointer to the update_OBC control structure.

  • % pass_eta [type(group_pass_type)] :: Structure for group halo pass.

  • % pass_visc_rem [type(group_pass_type)] :: Structure for group halo pass.

  • % pass_uvp [type(group_pass_type)] :: Structure for group halo pass.

  • % pass_hp_uv [type(group_pass_type)] :: Structure for group halo pass.

  • % pass_uv [type(group_pass_type)] :: Structure for group halo pass.

  • % pass_h [type(group_pass_type)] :: Structure for group halo pass.

  • % pass_av_uvh [type(group_pass_type)] :: Structure for group halo pass.

Function/Subroutine Documentation

subroutine mom_dynamics_split_rk2/step_mom_dyn_split_rk2(u_inst, v_inst, h, tv, visc, Time_local, dt, forces, p_surf_begin, p_surf_end, uh, vh, uhtr, vhtr, eta_av, G, GV, US, CS, calc_dtbt, VarMix, MEKE, thickness_diffuse_CSp, pbv, Waves)

RK2 splitting for time stepping MOM adiabatic dynamics.

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

  • gv :: [in] Ocean vertical grid structure

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

  • u_inst :: [inout] Instantaneous zonal velocity [L T-1 ~> m s-1]

  • v_inst :: [inout] Instantaneous meridional velocity [L T-1 ~> m s-1]

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

  • tv :: [in] Thermodynamic type

  • visc :: [inout] Vertical visc, bottom drag, and related

  • time_local :: [in] Model time at end of time step

  • dt :: [in] Baroclinic dynamics time step [T ~> s]

  • forces :: [in] A structure with the driving mechanical forces

  • p_surf_begin :: Surface pressure at the start of this dynamic time step [R L2 T-2 ~> Pa]

  • p_surf_end :: Surface pressure at the end of this dynamic time step [R L2 T-2 ~> Pa]

  • uh :: [inout] Zonal volume or mass transport

  • vh :: [inout] Meridional volume or mass transport

  • uhtr :: [inout] Accumulated zonal volume or mass transport

  • vhtr :: [inout] Accumulated meridional volume or mass transport

  • eta_av :: [out] Free surface height or column mass averaged over time step [H ~> m or kg m-2]

  • cs :: Module control structure

  • calc_dtbt :: [in] If true, recalculate the barotropic time step

  • varmix :: [inout] Variable mixing control structure

  • meke :: [inout] MEKE fields

  • thickness_diffuse_csp :: [inout] Pointer to a structure containing interface height diffusivities

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

  • waves :: A pointer to a structure containing fields related to the surface wave conditions

Call to:

mom_error_handler::calltree_enter mom_error_handler::calltree_leave mom_error_handler::calltree_waypoint mom_diag_mediator::diag_update_remap_grids mom_energetic_pbl::energetic_pbl_get_mld mom_interface_heights::find_col_avg_spv id_clock_btcalc id_clock_btforce id_clock_btstep id_clock_continuity id_clock_cor id_clock_horvisc id_clock_mom_update id_clock_pass id_clock_pres id_clock_vertvisc mom_cvmix_kpp::kpp_get_bld mom_checksum_packages::mom_accel_chksum mom_open_boundary::open_boundary_test_extern_h mom_set_visc::set_viscous_ml mom_wave_interface::stokes_pgf mom_boundary_update::update_obc_data mom_open_boundary::update_obc_ramp mom_vert_friction::updatecfltruncationvalue mom_vert_friction::vertfpmix

subroutine mom_dynamics_split_rk2/register_restarts_dyn_split_rk2(HI, GV, US, param_file, CS, restart_CS, uh, vh)

This subroutine sets up any auxiliary restart variables that are specific to the split-explicit time stepping scheme. All variables registered here should have the ability to be recreated if they are not present in a restart file.

Parameters:
  • hi :: [in] Horizontal index structure

  • gv :: [in] ocean vertical grid structure

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

  • param_file :: [in] parameter file

  • cs :: module control structure

  • restart_cs :: [inout] MOM restart control structure

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

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

Call to:

mom_verticalgrid::get_flux_units mom_io::var_desc

subroutine mom_dynamics_split_rk2/remap_dyn_split_rk2_aux_vars(G, GV, CS, h_old_u, h_old_v, h_new_u, h_new_v, ALE_CSp)

This subroutine does remapping for the auxiliary restart variables that are used with the split RK2 time stepping scheme.

Parameters:
  • g :: [inout] ocean grid structure

  • gv :: [in] ocean vertical grid structure

  • cs :: module control structure

  • h_old_u :: [in] Source grid thickness at zonal

  • h_old_v :: [in] Source grid thickness at meridional

  • h_new_u :: [in] Destination grid thickness at zonal

  • h_new_v :: [in] Destination grid thickness at meridional

  • ale_csp :: ALE control structure to use when remapping

Call to:

mom_ale::ale_remap_velocities

Called from:

mom::step_mom_thermo

subroutine mom_dynamics_split_rk2/initialize_dyn_split_rk2(u, v, h, uh, vh, eta, Time, G, GV, US, param_file, diag, CS, restart_CS, dt, Accel_diag, Cont_diag, MIS, VarMix, MEKE, thickness_diffuse_CSp, OBC, update_OBC_CSp, ALE_CSp, set_visc, visc, dirs, ntrunc, pbv, calc_dtbt, cont_stencil)

This subroutine initializes all of the variables that are used by this dynamic core, including diagnostics and the cpu clocks.

Parameters:
  • g :: [inout] ocean grid structure

  • gv :: [in] ocean vertical grid structure

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

  • u :: [inout] zonal velocity [L T-1 ~> m s-1]

  • v :: [inout] merid velocity [L T-1 ~> m s-1]

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

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

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

  • eta :: [inout] free surface height or column mass [H ~> m or kg m-2]

  • time :: [in] current model time

  • param_file :: [in] parameter file for parsing

  • diag :: [inout] to control diagnostics

  • cs :: module control structure

  • restart_cs :: [inout] MOM restart control structure

  • dt :: [in] time step [T ~> s]

  • accel_diag :: [inout] points to momentum equation terms for budget analysis

  • cont_diag :: [inout] points to terms in continuity equation

  • mis :: [inout] “MOM6 internal state” used to pass diagnostic pointers

  • varmix :: [inout] points to spatially variable viscosities

  • meke :: [inout] MEKE fields

  • thickness_diffuse_csp :: [inout] Pointer to the control structure used for the isopycnal height diffusive transport.

  • obc :: points to OBC related fields

  • update_obc_csp :: points to OBC update related fields

  • ale_csp :: points to ALE control structure

  • set_visc :: [in] set_visc control structure

  • visc :: [inout] vertical viscosities, bottom drag, and related

  • dirs :: [in] contains directory paths

  • ntrunc :: [inout] A target for the variable that records the number of times the velocity is truncated (this should be 0).

  • calc_dtbt :: [out] If true, recalculate the barotropic time step

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

  • cont_stencil :: [out] The stencil for thickness from the continuity solver.

Call to:

mom_coriolisadv::coriolisadv_init mom_verticalgrid::get_flux_units mom_hor_visc::hor_visc_init id_clock_btcalc id_clock_btforce id_clock_btstep id_clock_continuity id_clock_cor id_clock_horvisc id_clock_mom_update id_clock_pass id_clock_pass_init id_clock_pres id_clock_vertvisc mom_restart::is_new_run mom_pressureforce::pressureforce_init mom_self_attr_load::sal_init mom_tidal_forcing::tidal_forcing_init mom_open_boundary::update_obc_ramp mom_vert_friction::updatecfltruncationvalue

subroutine mom_dynamics_split_rk2/end_dyn_split_rk2(CS)

Close the dyn_split_RK2 module.

Parameters:

cs :: module control structure

Call to:

mom_barotropic::barotropic_end mom_coriolisadv::coriolisadv_end mom_hor_visc::hor_visc_end mom_self_attr_load::sal_end mom_tidal_forcing::tidal_forcing_end