namespace mom_dynamics_split_rk2

Overview

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

namespace mom_dynamics_split_rk2 {

// global variables

integer id_clock_cor;

// global functions

subroutine, public step_mom_dyn_split_rk2(
    u u,
    v v,
    h h,
    tv tv,
    visc visc,
    Time_local Time_local,
    dt dt,
    forces forces,
    p_surf_begin p_surf_begin,
    p_surf_end p_surf_end,
    uh uh,
    vh vh,
    uhtr uhtr,
    vhtr vhtr,
    eta_av eta_av,
    G G,
    GV GV,
    US US,
    CS CS,
    calc_dtbt calc_dtbt,
    VarMix VarMix,
    MEKE MEKE,
    thickness_diffuse_CSp thickness_diffuse_CSp,
    Waves Waves
    );

subroutine, public register_restarts_dyn_split_rk2(
    HI HI,
    GV GV,
    param_file param_file,
    CS CS,
    restart_CS restart_CS,
    uh uh,
    vh vh
    );

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

subroutine, public end_dyn_split_rk2(CS CS);

} // namespace mom_dynamics_split_rk2

Detailed Documentation

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

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.

Global Variables

integer id_clock_cor

CPU time clock IDs.

Global Functions

subroutine, public step_mom_dyn_split_rk2(
    u u,
    v v,
    h h,
    tv tv,
    visc visc,
    Time_local Time_local,
    dt dt,
    forces forces,
    p_surf_begin p_surf_begin,
    p_surf_end p_surf_end,
    uh uh,
    vh vh,
    uhtr uhtr,
    vhtr vhtr,
    eta_av eta_av,
    G G,
    GV GV,
    US US,
    CS CS,
    calc_dtbt calc_dtbt,
    VarMix VarMix,
    MEKE MEKE,
    thickness_diffuse_CSp thickness_diffuse_CSp,
    Waves Waves
    )

RK2 splitting for time stepping MOM adiabatic dynamics.

Parameters:

g

ocean grid structure

gv

ocean vertical grid structure

us

A dimensional unit scaling type

u

zonal velocity [L T-1 ~> m s-1]

v

merid velocity [L T-1 ~> m s-1]

h

layer thickness [H ~> m or kg m-2]

tv

thermodynamic type

visc

vertical visc, bottom drag, and related

time_local

model time at end of time step

dt

time step [s]

forces

A structure with the driving mechanical forces

p_surf_begin

surf pressure at start of this dynamic time step [Pa]

p_surf_end

surf pressure at end of this dynamic time step [Pa]

uh

zonal volume/mass transport

vh

merid volume/mass transport

uhtr

accumulatated zonal volume/mass transport

vhtr

accumulatated merid volume/mass transport

eta_av

free surface height or column mass time averaged over time step [H ~> m or kg m-2]

cs

module control structure

calc_dtbt

if true, recalculate barotropic time step

varmix

specify the spatially varying viscosities

meke

related to mesoscale eddy kinetic energy param

thickness_diffuse_csp

Pointer to a structure containing interface height diffusivities

waves

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

subroutine, public register_restarts_dyn_split_rk2(
    HI HI,
    GV GV,
    param_file param_file,
    CS CS,
    restart_CS restart_CS,
    uh uh,
    vh vh
    )

This subroutine sets up any auxiliary restart variables that are specific to the unsplit 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

Horizontal index structure

gv

ocean vertical grid structure

param_file

parameter file

cs

module control structure

restart_cs

restart control structure

uh

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

vh

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

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

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

Parameters:

g

ocean grid structure

gv

ocean vertical grid structure

us

A dimensional unit scaling type

u

zonal velocity [L T-1 ~> m s-1]

v

merid velocity [L T-1 ~> m s-1]

h

layer thickness [H ~> m or kg m-2]

uh

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

vh

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

eta

free surface height or column mass [H ~> m or kg m-2]

time

current model time

param_file

parameter file for parsing

diag

to control diagnostics

cs

module control structure

restart_cs

restart control structure

dt

time step [s]

accel_diag

points to momentum equation terms for budget analysis

cont_diag

points to terms in continuity equation

mis

“MOM6 internal state” used to pass diagnostic pointers

varmix

points to spatially variable viscosities

meke

points to mesoscale eddy kinetic energy fields

thickness_diffuse_csp

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

setvisc_csp

points to the set_visc control structure.

visc

vertical viscosities, bottom drag, and related

dirs

contains directory paths

ntrunc

A target for the variable that records the number of times the velocity is truncated (this should be 0).

calc_dtbt

If true, recalculate the barotropic time step

subroutine, public end_dyn_split_rk2(CS CS)

Close the dyn_split_RK2 module.

Parameters:

cs

module control structure