namespace mom_ale_sponge

Overview

This module contains the routines used to apply sponge layers when using the ALE mode. More…

namespace mom_ale_sponge {

// interfaces

interface initialize_ale_sponge;
interface set_up_ale_sponge_field;
interface set_up_ale_sponge_vel_field;

// global functions

subroutine initialize_ale_sponge_fixed(
    Iresttime Iresttime,
    G G,
    param_file param_file,
    CS CS,
    data_h data_h,
    nz_data nz_data
    );

integer function, public get_ale_sponge_nz_data(CS CS);
subroutine, public get_ale_sponge_thicknesses(G G, data_h data_h, sponge_mask sponge_mask, CS CS);
subroutine, public init_ale_sponge_diags(Time Time, G G, diag diag, CS CS);
subroutine, public apply_ale_sponge(h h, dt dt, G G, GV GV, US US, CS CS, Time Time);
subroutine, public ale_sponge_end(CS CS);

} // namespace mom_ale_sponge

Detailed Documentation

This module contains the routines used to apply sponge layers when using the ALE mode.

Applying sponges requires the following:

  1. initialize_ALE_sponge

  2. set_up_ALE_sponge_field (tracers) and set_up_ALE_sponge_vel_field (vel)

  3. apply_ALE_sponge

  4. init_ALE_sponge_diags (not being used for now)

  5. ALE_sponge_end (not being used for now)

Global Functions

subroutine initialize_ale_sponge_fixed(
    Iresttime Iresttime,
    G G,
    param_file param_file,
    CS CS,
    data_h data_h,
    nz_data nz_data
    )

This subroutine determines the number of points which are within sponges in this computational domain. Only points that have positive values of Iresttime and which mask2dT indicates are ocean points are included in the sponges. It also stores the target interface heights.

Parameters:

g

The ocean’s grid structure.

nz_data

The total number of sponge input layers.

iresttime

The inverse of the restoring time [s-1].

param_file

A structure indicating the open file to parse for model parameter values.

cs

A pointer that is set to point to the control structure for this module (in/out).

data_h

The thicknesses of the sponge input layers [H ~> m or kg m-2].

integer function, public get_ale_sponge_nz_data(CS CS)

Return the number of layers in the data with a fixed ALE sponge, or 0 if there are no sponge columns on this PE.

Parameters:

cs

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

Returns:

The number of layers in the fixed sponge data.

subroutine, public get_ale_sponge_thicknesses(
    G G,
    data_h data_h,
    sponge_mask sponge_mask,
    CS CS
    )

Return the thicknesses used for the data with a fixed ALE sponge.

Parameters:

g

The ocean’s grid structure (in).

data_h

The thicknesses of the sponge input layers [H ~> m or kg m-2].

sponge_mask

A logical mask that is true where

cs

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

subroutine, public init_ale_sponge_diags(Time Time, G G, diag diag, CS CS)

Initialize diagnostics for the ALE_sponge module.

Parameters:

time

The current model time

g

The ocean’s grid structure

diag

A structure that is used to regulate diagnostic output.

cs

ALE sponge control structure

subroutine, public apply_ale_sponge(
    h h,
    dt dt,
    G G,
    GV GV,
    US US,
    CS CS,
    Time Time
    )

This subroutine applies damping to the layers thicknesses, temp, salt and a variety of tracers for every column where there is damping.

Parameters:

g

The ocean’s grid structure (in).

gv

ocean vertical grid structure

us

A dimensional unit scaling type

h

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

dt

The amount of time covered by this call [s].

cs

A pointer to the control structure for this module that is set by a previous call to initialize_sponge (in).

time

The current model date

subroutine, public ale_sponge_end(CS CS)

This subroutine deallocates any memory associated with the ALE_sponge module.

Parameters:

cs

A pointer to the control structure that is set by a previous call to initialize_sponge.