namespace mom_dynamics_unsplit_rk2

Overview

Time steps the ocean dynamics with an unsplit quasi 2nd order Runge-Kutta scheme. More…

namespace mom_dynamics_unsplit_rk2 {

// global variables

integer id_clock_cor;

// global functions

subroutine, public step_mom_dyn_unsplit_rk2(
    u_in u_in,
    v_in v_in,
    h_in h_in,
    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,
    VarMix VarMix,
    MEKE MEKE
    );

subroutine, public register_restarts_dyn_unsplit_rk2(
    HI HI,
    GV GV,
    param_file param_file,
    CS CS,
    restart_CS restart_CS
    );

subroutine, public initialize_dyn_unsplit_rk2(
    u u,
    v v,
    h h,
    Time Time,
    G G,
    GV GV,
    US US,
    param_file param_file,
    diag diag,
    CS CS,
    restart_CS restart_CS,
    Accel_diag Accel_diag,
    Cont_diag Cont_diag,
    MIS MIS,
    MEKE MEKE,
    OBC OBC,
    update_OBC_CSp update_OBC_CSp,
    ALE_CSp ALE_CSp,
    setVisc_CSp setVisc_CSp,
    visc visc,
    dirs dirs,
    ntrunc ntrunc
    );

subroutine, public end_dyn_unsplit_rk2(CS CS);

} // namespace mom_dynamics_unsplit_rk2

Detailed Documentation

Time steps the ocean dynamics with an unsplit quasi 2nd order Runge-Kutta scheme.

Global Variables

integer id_clock_cor

CPU time clock IDs.

Global Functions

subroutine, public step_mom_dyn_unsplit_rk2(
    u_in u_in,
    v_in v_in,
    h_in h_in,
    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,
    VarMix VarMix,
    MEKE MEKE
    )

Step the MOM6 dynamics using an unsplit quasi-2nd order Runge-Kutta scheme.

Parameters:

g

The ocean’s grid structure.

gv

The ocean’s vertical grid structure.

us

A dimensional unit scaling type

u_in

The input and output zonal velocity [L T-1 ~> m s-1].

v_in

The input and output meridional velocity [L T-1 ~> m s-1].

h_in

The input and output layer thicknesses, [H ~> m or kg m-2], depending on whether the Boussinesq approximation is made.

tv

A structure pointing to various thermodynamic variables.

visc

A structure containing vertical viscosities, bottom drag viscosities, and related fields.

time_local

The model time at the end of the time step.

dt

The baroclinic dynamics time step [s].

forces

A structure with the driving mechanical forces

p_surf_begin

A pointer (perhaps NULL) to the surface pressure at the beginning of this dynamic step [Pa].

p_surf_end

A pointer (perhaps NULL) to the surface pressure at the end of this dynamic step [Pa].

uh

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

vh

The meridional volume or mass transport [H L2 T-1 ~> m3 s-1 or kg s-1].

uhtr

The accumulated zonal volume or mass transport since the last tracer advection [H L2 ~> m3 or kg].

vhtr

The accumulated meridional volume or mass transport since the last tracer advection [H L2 ~> m3 or kg].

eta_av

The time-mean free surface height or column mass [H ~> m or kg m-2].

cs

The control structure set up by initialize_dyn_unsplit_RK2.

varmix

A pointer to a structure with fields that specify the spatially variable viscosities.

meke

A pointer to a structure containing fields related to the Mesoscale Eddy Kinetic Energy.

subroutine, public register_restarts_dyn_unsplit_rk2(
    HI HI,
    GV GV,
    param_file param_file,
    CS CS,
    restart_CS restart_CS
    )

Allocate the control structure for this module, allocates memory in it, and registers any auxiliary restart variables that are specific to the unsplit RK2 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

A horizontal index type structure.

gv

The ocean’s vertical grid structure.

param_file

A structure to parse for run-time parameters.

cs

The control structure set up by initialize_dyn_unsplit_RK2.

restart_cs

A pointer to the restart control structure.

subroutine, public initialize_dyn_unsplit_rk2(
    u u,
    v v,
    h h,
    Time Time,
    G G,
    GV GV,
    US US,
    param_file param_file,
    diag diag,
    CS CS,
    restart_CS restart_CS,
    Accel_diag Accel_diag,
    Cont_diag Cont_diag,
    MIS MIS,
    MEKE MEKE,
    OBC OBC,
    update_OBC_CSp update_OBC_CSp,
    ALE_CSp ALE_CSp,
    setVisc_CSp setVisc_CSp,
    visc visc,
    dirs dirs,
    ntrunc ntrunc
    )

Initialize parameters and allocate memory associated with the unsplit RK2 dynamics module.

Parameters:

g

The ocean’s grid structure.

gv

The ocean’s vertical grid structure.

us

A dimensional unit scaling type

u

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

v

The meridional velocity [L T-1 ~> m s-1].

h

Layer thicknesses [H ~> m or kg m-2]

time

The current model time.

param_file

A structure to parse for run-time parameters.

diag

A structure that is used to regulate diagnostic output.

cs

The control structure set up by initialize_dyn_unsplit_RK2.

restart_cs

A pointer to the restart control structure.

accel_diag

A set of pointers to the various accelerations in the momentum equations, which can be used for later derived diagnostics, like energy budgets.

cont_diag

A structure with pointers to various terms in the continuity equations.

mis

The “MOM6 Internal State” structure, used to pass around pointers to various arrays for diagnostic purposes.

meke

MEKE data

obc

If open boundary conditions are used, this points to the ocean_OBC_type that was set up in MOM_initialization.

update_obc_csp

If open boundary condition updates are used, this points to the appropriate control structure.

ale_csp

This points to the ALE control structure.

setvisc_csp

This points to the set_visc control structure.

visc

A structure containing vertical viscosities, bottom drag viscosities, and related fields.

dirs

A structure containing several relevant directory paths.

ntrunc

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

subroutine, public end_dyn_unsplit_rk2(CS CS)

Clean up and deallocate memory associated with the dyn_unsplit_RK2 module.

Parameters:

cs

dyn_unsplit_RK2 control structure that will be deallocated in this subroutine.