namespace mom_set_visc

Overview

Calculates various values related to the bottom boundary layer, such as the viscosity and thickness of the BBL (set_viscous_BBL). More…

namespace mom_set_visc {

// global functions

subroutine, public set_viscous_bbl(
    u u,
    v v,
    h h,
    tv tv,
    visc visc,
    G G,
    GV GV,
    US US,
    CS CS,
    symmetrize symmetrize
    );

subroutine, public set_viscous_ml(
    u u,
    v v,
    h h,
    tv tv,
    forces forces,
    visc visc,
    dt dt,
    G G,
    GV GV,
    US US,
    CS CS,
    symmetrize symmetrize
    );

subroutine, public set_visc_register_restarts(
    HI HI,
    GV GV,
    param_file param_file,
    visc visc,
    restart_CS restart_CS
    );

subroutine, public set_visc_init(
    Time Time,
    G G,
    GV GV,
    US US,
    param_file param_file,
    diag diag,
    visc visc,
    CS CS,
    restart_CS restart_CS,
    OBC OBC
    );

subroutine, public set_visc_end(visc visc, CS CS);

} // namespace mom_set_visc

Detailed Documentation

Calculates various values related to the bottom boundary layer, such as the viscosity and thickness of the BBL (set_viscous_BBL).

This would also be the module in which other viscous quantities that are flow-independent might be set. This information is transmitted to other modules via a vertvisc type structure.

The same code is used for the two velocity components, by indirectly referencing the velocities and defining a handful of direction-specific defined variables.

Global Functions

subroutine, public set_viscous_bbl(
    u u,
    v v,
    h h,
    tv tv,
    visc visc,
    G G,
    GV GV,
    US US,
    CS CS,
    symmetrize symmetrize
    )

Calculates the thickness of the bottom boundary layer and the viscosity within that layer. A drag law is used, either linearized about an assumed bottom velocity or using the actual near-bottom velocities combined with an assumed unresolved velocity. The bottom boundary layer thickness is limited by a combination of stratification and rotation, as in the paper of Killworth and Edwards, JPO 1999. It is not necessary to calculate the thickness and viscosity every time step; instead previous values may be used.

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

tv

A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs..

visc

A structure containing vertical viscosities and related fields.

cs

The control structure returned by a previous call to vertvisc_init.

symmetrize

If present and true, do extra calculations of those values in visc that would be calculated with symmetric memory.

subroutine, public set_viscous_ml(
    u u,
    v v,
    h h,
    tv tv,
    forces forces,
    visc visc,
    dt dt,
    G G,
    GV GV,
    US US,
    CS CS,
    symmetrize symmetrize
    )

Calculates the thickness of the surface boundary layer for applying an elevated viscosity.

A bulk Richardson criterion or the thickness of the topmost NKML layers (with a bulk mixed layer) are currently used. The thicknesses are given in terms of fractional layers, so that this thickness will move as the thickness of the topmost layers change.

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

tv

A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

forces

A structure with the driving mechanical forces

visc

A structure containing vertical viscosities and related fields.

dt

Time increment [s].

cs

The control structure returned by a previous call to vertvisc_init.

symmetrize

If present and true, do extra calculations of those values in visc that would be calculated with symmetric memory.

subroutine, public set_visc_register_restarts(
    HI HI,
    GV GV,
    param_file param_file,
    visc visc,
    restart_CS restart_CS
    )

Register any fields associated with the vertvisc_type.

Parameters:

hi

A horizontal index type structure.

gv

The ocean’s vertical grid structure.

param_file

A structure to parse for run-time parameters.

visc

A structure containing vertical viscosities and related fields. Allocated here.

restart_cs

A pointer to the restart control structure.

subroutine, public set_visc_init(
    Time Time,
    G G,
    GV GV,
    US US,
    param_file param_file,
    diag diag,
    visc visc,
    CS CS,
    restart_CS restart_CS,
    OBC OBC
    )

Initializes the MOM_set_visc control structure.

Parameters:

time

The current model time.

g

The ocean’s grid structure.

gv

The ocean’s vertical grid structure.

us

A dimensional unit scaling type

param_file

A structure to parse for run-time parameters.

diag

A structure that is used to regulate diagnostic output.

visc

A structure containing vertical viscosities and related fields. Allocated here.

cs

A pointer that is set to point to the control structure for this module

restart_cs

A pointer to the restart control structure.

obc

A pointer to an open boundary condition structure

subroutine, public set_visc_end(visc visc, CS CS)

This subroutine dellocates any memory in the set_visc control structure.

Parameters:

visc

A structure containing vertical viscosities and related fields. Elements are deallocated here.

cs

The control structure returned by a previous call to vertvisc_init.