MOM_sponge module reference

Implements sponge regions in isopycnal mode

Data Types

p3d

A structure for creating arrays of pointers to 3D arrays

p2d

A structure for creating arrays of pointers to 2D arrays

sponge_CS

This control structure holds memory and parameters for the MOM_sponge module

Functions/Subroutines

initialize_sponge

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.

init_sponge_diags

This subroutine sets up diagnostics for the sponges. It is separate from initialize_sponge because it requires fields that are not readily available where initialize_sponge is called.

set_up_sponge_field

This subroutine stores the reference profile for the variable whose address is given by f_ptr. nlay is the number of layers in this variable.

set_up_sponge_ML_density

This subroutine stores the reference value for mixed layer density. It is handled differently from other values because it is only used in determining which layers can be inflated.

apply_sponge

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

sponge_end

This call deallocates any memory in the sponge control structure.

Detailed Description

By Robert Hallberg, March 1999-June 2000

This program contains the subroutines that implement sponge regions, in which the stratification and water mass properties are damped toward some profiles. There are three externally callable subroutines in this file.

initialize_sponge determines the mapping from the model variables into the arrays of damped columns. This remapping is done for efficiency and to conserve memory. Only columns which have positive inverse damping times and which are deeper than a supplied depth are placed in sponges. The inverse damping time is also stored in this subroutine, and memory is allocated for all of the reference profiles which will subsequently be provided through calls to set_up_sponge_field. The first two arguments are a two-dimensional array containing the damping rates, and the interface heights to damp towards.

set_up_sponge_field is called to provide a reference profile and the location of the field that will be damped back toward that reference profile. A third argument, the number of layers in the field is also provided, but this should always be nz.

Apply_sponge damps all of the fields that have been registered with set_up_sponge_field toward their reference profiles. The four arguments are the thickness to be damped, the amount of time over which the damping occurs, and arrays to which the movement of fluid into a layer from above and below will be added. The effect on momentum of the sponge may be accounted for later using the movement of water recorded in these later arrays.

Type Documentation

type, public :: p3d

A structure for creating arrays of pointers to 3D arrays

Parameters
  • p

    A pointer to a 3D array [various]

type, public :: p2d

A structure for creating arrays of pointers to 2D arrays

Parameters
  • p

    A pointer to a 2D array [various]

type, public :: sponge_CS

This control structure holds memory and parameters for the MOM_sponge module

Parameters
  • bulkmixedlayer

    If true, a refined bulk mixed layer is used with nkml sublayers and nkbl buffer layer.

  • nz

    The total number of layers.

  • num_col

    The number of sponge points within the computational domain.

  • fldno

    The number of fields which have already been registered by calls to set_up_sponge_field

  • col_i

    Array of the i-indicies of each of the columns being damped.

  • col_j

    Array of the j-indicies of each of the columns being damped.

  • Iresttime_col

    The inverse restoring time of each column [T-1 ~> s-1].

  • Rcv_ml_ref

    The value toward which the mixed layer coordinate-density is being damped [R ~> kg m-3].

  • Ref_eta

    The value toward which the interface heights are being damped [Z ~> m].

  • var

    Pointers to the fields that are being damped.

  • Ref_val

    The values to which the fields are damped.

  • do_i_mean_sponge

    If true, apply sponges to the i-mean fields.

  • Iresttime_im

    The inverse restoring time of each row for i-mean sponges [T-1 ~> s-1].

  • Rcv_ml_ref_im

    The value toward which the i-mean mixed layer coordinate-density is being damped [R ~> kg m-3].

  • Ref_eta_im

    The value toward which the i-mean interface heights are being damped [Z ~> m].

  • Ref_val_im

    The values toward which the i-means of fields are damped.

  • diag

    A structure that is used to regulate the timing of diagnostic output.

  • id_w_sponge

    A diagnostic ID

Functions/Subroutine Documentation

subroutine initialize_sponge(Iresttime, int_height, G, param_file, CS, GV, Iresttime_i_mean, int_height_i_mean)

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 [in]

    The ocean's grid structure

  • GV [in]

    The ocean's vertical grid structure

  • Iresttime [in]

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

  • int_height [in]

    The interface heights to damp back toward [Z ~> m].

  • param_file [in]

    A structure to parse for run-time parameters

  • CS

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

  • Iresttime_i_mean [in]

    The inverse of the restoring time for the zonal mean properties [T-1 ~> s-1].

  • int_height_i_mean [in]

    The interface heights toward which to damp the zonal mean heights [Z ~> m].

Callees call graph
Callees of mom_sponge::initialize_sponge calls cluster_mom_coms_infra MOM_coms_infra cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_sponge MOM_sponge mom_coms_infra::interface::sum_across_pes sum_across_PEs (interface) mom_error_handler::mom_error MOM_error mom_file_parser::interface::get_param get_param (interface) mom_file_parser::interface::log_param log_param (interface) mom_file_parser::interface::log_version log_version (interface) mom_sponge::initialize_sponge initialize_sponge mom_sponge::initialize_sponge->mom_coms_infra::interface::sum_across_pes mom_sponge::initialize_sponge->mom_error_handler::mom_error mom_sponge::initialize_sponge->mom_file_parser::interface::get_param mom_sponge::initialize_sponge->mom_file_parser::interface::log_param mom_sponge::initialize_sponge->mom_file_parser::interface::log_version
Text view
Callers call graph
Callers of mom_sponge::initialize_sponge calls cluster_bfb_initialization BFB_initialization cluster_dome2d_initialization DOME2d_initialization cluster_dome_initialization DOME_initialization cluster_dumbbell_initialization dumbbell_initialization cluster_isomip_initialization ISOMIP_initialization cluster_mom_sponge MOM_sponge cluster_mom_state_initialization MOM_state_initialization cluster_phillips_initialization Phillips_initialization cluster_rgc_initialization RGC_initialization bfb_initialization::bfb_initialize_sponges_southonly BFB_initialize_sponges_southonly mom_sponge::initialize_sponge initialize_sponge bfb_initialization::bfb_initialize_sponges_southonly->mom_sponge::initialize_sponge dome2d_initialization::dome2d_initialize_sponges DOME2d_initialize_sponges dome2d_initialization::dome2d_initialize_sponges->mom_sponge::initialize_sponge dome_initialization::dome_initialize_sponges DOME_initialize_sponges dome_initialization::dome_initialize_sponges->mom_sponge::initialize_sponge dumbbell_initialization::dumbbell_initialize_sponges dumbbell_initialize_sponges dumbbell_initialization::dumbbell_initialize_sponges->mom_sponge::initialize_sponge isomip_initialization::isomip_initialize_sponges ISOMIP_initialize_sponges isomip_initialization::isomip_initialize_sponges->mom_sponge::initialize_sponge mom_state_initialization::initialize_sponges_file initialize_sponges_file [private/internal] mom_state_initialization::initialize_sponges_file->mom_sponge::initialize_sponge phillips_initialization::phillips_initialize_sponges Phillips_initialize_sponges phillips_initialization::phillips_initialize_sponges->mom_sponge::initialize_sponge rgc_initialization::rgc_initialize_sponges RGC_initialize_sponges rgc_initialization::rgc_initialize_sponges->mom_sponge::initialize_sponge
Text view
subroutine init_sponge_diags(Time, G, GV, US, diag, CS)

This subroutine sets up diagnostics for the sponges. It is separate from initialize_sponge because it requires fields that are not readily available where initialize_sponge is called.

Parameters
  • Time [in]

    The current model time

  • G [in]

    The ocean's grid structure

  • GV [in]

    The ocean's vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • diag [inout]

    A structure that is used to regulate diagnostic output

  • CS

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

Callees call graph
Callees of mom_sponge::init_sponge_diags calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_sponge MOM_sponge mom_diag_mediator::register_diag_field register_diag_field mom_sponge::init_sponge_diags init_sponge_diags mom_sponge::init_sponge_diags->mom_diag_mediator::register_diag_field
Text view
Callers call graph
Callers of mom_sponge::init_sponge_diags calls cluster_mom MOM cluster_mom_sponge MOM_sponge mom::initialize_mom initialize_MOM mom_sponge::init_sponge_diags init_sponge_diags mom::initialize_mom->mom_sponge::init_sponge_diags
Text view
subroutine set_up_sponge_field(sp_val, f_ptr, G, GV, nlay, CS, sp_val_i_mean)

This subroutine stores the reference profile for the variable whose address is given by f_ptr. nlay is the number of layers in this variable.

Parameters
  • G [in]

    The ocean's grid structure

  • GV [in]

    The ocean's vertical grid structure

  • sp_val [in]

    The reference profiles of the quantity being registered [various]

  • f_ptr [in]

    a pointer to the field which will be damped [various]

  • nlay [in]

    the number of layers in this quantity

  • CS

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

  • sp_val_i_mean [in]

    The i-mean reference value for this field with i-mean sponges [various]

Callees call graph
Callees of mom_sponge::set_up_sponge_field calls cluster_mom_error_handler MOM_error_handler cluster_mom_error_infra MOM_error_infra cluster_mom_sponge MOM_sponge mom_error_handler::mom_error MOM_error mom_error_infra::is_root_pe is_root_pe mom_sponge::set_up_sponge_field set_up_sponge_field mom_sponge::set_up_sponge_field->mom_error_handler::mom_error mom_sponge::set_up_sponge_field->mom_error_infra::is_root_pe
Text view
Callers call graph
Callers of mom_sponge::set_up_sponge_field calls cluster_dome_initialization DOME_initialization cluster_dome_tracer DOME_tracer cluster_dumbbell_initialization dumbbell_initialization cluster_isomip_initialization ISOMIP_initialization cluster_mom_sponge MOM_sponge cluster_mom_state_initialization MOM_state_initialization cluster_rgc_initialization RGC_initialization cluster_rgc_tracer RGC_tracer cluster_user_tracer_example USER_tracer_example dome_initialization::dome_initialize_sponges DOME_initialize_sponges mom_sponge::set_up_sponge_field set_up_sponge_field dome_initialization::dome_initialize_sponges->mom_sponge::set_up_sponge_field dome_tracer::initialize_dome_tracer initialize_DOME_tracer dome_tracer::initialize_dome_tracer->mom_sponge::set_up_sponge_field dumbbell_initialization::dumbbell_initialize_sponges dumbbell_initialize_sponges dumbbell_initialization::dumbbell_initialize_sponges->mom_sponge::set_up_sponge_field isomip_initialization::isomip_initialize_sponges ISOMIP_initialize_sponges isomip_initialization::isomip_initialize_sponges->mom_sponge::set_up_sponge_field mom_state_initialization::initialize_sponges_file initialize_sponges_file [private/internal] mom_state_initialization::initialize_sponges_file->mom_sponge::set_up_sponge_field rgc_initialization::rgc_initialize_sponges RGC_initialize_sponges rgc_initialization::rgc_initialize_sponges->mom_sponge::set_up_sponge_field rgc_tracer::initialize_rgc_tracer initialize_RGC_tracer rgc_tracer::initialize_rgc_tracer->mom_sponge::set_up_sponge_field user_tracer_example::user_initialize_tracer USER_initialize_tracer user_tracer_example::user_initialize_tracer->mom_sponge::set_up_sponge_field
Text view
subroutine set_up_sponge_ML_density(sp_val, G, CS, sp_val_i_mean)

This subroutine stores the reference value for mixed layer density. It is handled differently from other values because it is only used in determining which layers can be inflated.

Parameters
  • G [in]

    The ocean's grid structure

  • sp_val [in]

    The reference values of the mixed layer density [R ~> kg m-3]

  • CS

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

  • sp_val_i_mean [in]

    the reference values of the zonal mean mixed layer density [R ~> kg m-3], for use if Iresttime_i_mean > 0.

Callees call graph
Callees of mom_sponge::set_up_sponge_ml_density calls cluster_mom_error_handler MOM_error_handler cluster_mom_sponge MOM_sponge mom_error_handler::mom_error MOM_error mom_sponge::set_up_sponge_ml_density set_up_sponge_ML_density mom_sponge::set_up_sponge_ml_density->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_sponge::set_up_sponge_ml_density calls cluster_mom_sponge MOM_sponge cluster_mom_state_initialization MOM_state_initialization cluster_rgc_initialization RGC_initialization mom_sponge::set_up_sponge_ml_density set_up_sponge_ML_density mom_state_initialization::initialize_sponges_file initialize_sponges_file [private/internal] mom_state_initialization::initialize_sponges_file->mom_sponge::set_up_sponge_ml_density rgc_initialization::rgc_initialize_sponges RGC_initialize_sponges rgc_initialization::rgc_initialize_sponges->mom_sponge::set_up_sponge_ml_density
Text view
subroutine apply_sponge(h, tv, dt, G, GV, US, ea, eb, CS, Rcv_ml)

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

Parameters
  • G [inout]

    The ocean's grid structure

  • GV [in]

    The ocean's vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • h [inout]

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

  • tv [in]

    A structure pointing to various thermodynamic variables

  • dt [in]

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

  • ea [inout]

    An array to which the amount of fluid entrained from the layer above during this call will be added [H ~> m or kg m-2].

  • eb [inout]

    An array to which the amount of fluid entrained from the layer below during this call will be added [H ~> m or kg m-2].

  • CS

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

  • Rcv_ml [inout]

    The coordinate density of the mixed layer [R ~> kg m-3].

Callees call graph
Callees of mom_sponge::apply_sponge calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_error_handler MOM_error_handler cluster_mom_spatial_means MOM_spatial_means cluster_mom_sponge MOM_sponge mom_diag_mediator::interface::post_data post_data (interface) mom_diag_mediator::query_averaging_enabled query_averaging_enabled mom_error_handler::mom_error MOM_error mom_spatial_means::global_i_mean global_i_mean mom_sponge::apply_sponge apply_sponge mom_sponge::apply_sponge->mom_diag_mediator::interface::post_data mom_sponge::apply_sponge->mom_diag_mediator::query_averaging_enabled mom_sponge::apply_sponge->mom_error_handler::mom_error mom_sponge::apply_sponge->mom_spatial_means::global_i_mean
Text view
Callers call graph
Callers of mom_sponge::apply_sponge calls cluster_mom_diabatic_driver MOM_diabatic_driver cluster_mom_sponge MOM_sponge mom_diabatic_driver::layered_diabatic layered_diabatic [private/internal] mom_sponge::apply_sponge apply_sponge mom_diabatic_driver::layered_diabatic->mom_sponge::apply_sponge
Text view
subroutine sponge_end(CS)

This call deallocates any memory in the sponge control structure.

Parameters
  • CS

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

API generated with Flint · Rendered from reStructuredText