namespace mom_neutral_diffusion

Overview

A column-wise toolbox for implementing neutral diffusion. More…

namespace mom_neutral_diffusion {

// global variables

character(len=40) mdl = "MOM_neutral_diffusion";

// global functions

logical function, public neutral_diffusion_init(
    Time Time,
    G G,
    param_file param_file,
    diag diag,
    EOS EOS,
    CS CS
    );

subroutine, public neutral_diffusion_calc_coeffs(G G, GV GV, h h, T T, S S, CS CS);

subroutine, public neutral_diffusion(
    G G,
    GV GV,
    h h,
    Coef_x Coef_x,
    Coef_y Coef_y,
    dt dt,
    Reg Reg,
    US US,
    CS CS
    );

logical function, public neutral_diffusion_unit_tests(verbose verbose);
subroutine, public neutral_diffusion_end(CS CS);

} // namespace mom_neutral_diffusion

Detailed Documentation

A column-wise toolbox for implementing neutral diffusion.

Global Variables

character(len=40) mdl = "MOM_neutral_diffusion"

module name

Global Functions

logical function, public neutral_diffusion_init(
    Time Time,
    G G,
    param_file param_file,
    diag diag,
    EOS EOS,
    CS CS
    )

Read parameters and allocate control structure for neutral_diffusion module.

Parameters:

time

Time structure

g

Grid structure

diag

Diagnostics control structure

param_file

Parameter file structure

eos

Equation of state

cs

Neutral diffusion control structure

subroutine, public neutral_diffusion_calc_coeffs(
    G G,
    GV GV,
    h h,
    T T,
    S S,
    CS CS
    )

Calculate remapping factors for u/v columns used to map adjoining columns to a shared coordinate space.

Parameters:

g

Ocean grid structure

gv

ocean vertical grid structure

h

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

t

Potential temperature [degC]

s

Salinity [ppt]

cs

Neutral diffusion control structure

subroutine, public neutral_diffusion(
    G G,
    GV GV,
    h h,
    Coef_x Coef_x,
    Coef_y Coef_y,
    dt dt,
    Reg Reg,
    US US,
    CS CS
    )

Update tracer concentration due to neutral diffusion; layer thickness unchanged by this update.

Parameters:

g

Ocean grid structure

gv

ocean vertical grid structure

h

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

coef_x

dt * Kh * dy / dx at u-points [L2 ~> m2]

coef_y

dt * Kh * dx / dy at v-points [L2 ~> m2]

dt

Tracer time step * I_numitts (I_numitts in tracer_hordiff)

reg

Tracer registry

us

A dimensional unit scaling type

cs

Neutral diffusion control structure

logical function, public neutral_diffusion_unit_tests(verbose verbose)

Returns true if unit tests of neutral_diffusion functions fail. Otherwise returns false.

Parameters:

verbose

If true, write results to stdout

subroutine, public neutral_diffusion_end(CS CS)

Deallocates neutral_diffusion control structure.

Parameters:

cs

Neutral diffusion control structure