namespace mom_tracer_hor_diff

Overview

Main routine for lateral (along surface or neutral) diffusion of tracers. More…

namespace mom_tracer_hor_diff {

// global functions

subroutine, public tracer_hordiff(
    h h,
    dt dt,
    MEKE MEKE,
    VarMix VarMix,
    G G,
    GV GV,
    US US,
    CS CS,
    Reg Reg,
    tv tv,
    do_online_flag do_online_flag,
    read_khdt_x read_khdt_x,
    read_khdt_y read_khdt_y
    );

subroutine, public tracer_hor_diff_init(
    Time Time,
    G G,
    US US,
    param_file param_file,
    diag diag,
    EOS EOS,
    CS CS
    );

subroutine, public tracer_hor_diff_end(CS CS);

} // namespace mom_tracer_hor_diff

Detailed Documentation

Main routine for lateral (along surface or neutral) diffusion of tracers.

Introduction to the module

This module contains subroutines that handle horizontal diffusion (i.e., isoneutral or along layer) of tracers.

Each of the tracers are subject to Fickian along-coordinate diffusion if Khtr is defined and positive. The tracer diffusion can use a suitable number of iterations to guarantee stability with an arbitrarily large time step.

Global Functions

subroutine, public tracer_hordiff(
    h h,
    dt dt,
    MEKE MEKE,
    VarMix VarMix,
    G G,
    GV GV,
    US US,
    CS CS,
    Reg Reg,
    tv tv,
    do_online_flag do_online_flag,
    read_khdt_x read_khdt_x,
    read_khdt_y read_khdt_y
    )

Compute along-coordinate diffusion of all tracers using the diffusivity in CSKhTr, or using space-dependent diffusivity. Multiple iterations are used (if necessary) so that there is no limit on the acceptable time increment.

Parameters:

g

Grid type

h

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

dt

time step [s]

meke

MEKE type

varmix

Variable mixing type

gv

ocean vertical grid structure

us

A dimensional unit scaling type

cs

module control structure

reg

registered tracers

tv

A structure containing pointers to any available thermodynamic fields, including potential temp and salinity or mixed layer density. Absent fields have NULL ptrs, and these may (probably will) point to some of the same arrays as Tr does. tv is required for epipycnal mixing between mixed layer and the interior.

do_online_flag

If present and true, do online tracer transport with stored velcities.

read_khdt_x

If present, these are the zonal

read_khdt_y

If present, these are the meridional

subroutine, public tracer_hor_diff_init(
    Time Time,
    G G,
    US US,
    param_file param_file,
    diag diag,
    EOS EOS,
    CS CS
    )

Initialize lateral tracer diffusion module.

Parameters:

time

current model time

g

ocean grid structure

us

A dimensional unit scaling type

diag

diagnostic control

eos

Equation of state CS

param_file

parameter file

cs

horz diffusion control structure

subroutine, public tracer_hor_diff_end(CS CS)

Parameters:

cs

module control structure