MOM_spatial_means module reference

Functions and routines to take area, volume, mass-weighted, layerwise, zonal or meridional means

Functions/Subroutines

global_area_mean

Return the global area mean of a variable, perhaps with a change of units. This uses reproducing sums.

global_area_mean_v

Return the global area mean of a variable. This uses reproducing sums.

global_area_mean_u

Return the global area mean of a variable on U grid. This uses reproducing sums.

global_area_integral

Return the global area integral of a variable using reproducing sums, perhaps with a change of units. By default the integral uses the masked area from the grid, but an alternate could be used instead. The presence of the optional tmp_scale argument determines whether the returned value is in scaled (if it is present) or unscaled units for both the variable itself and for the area in the integral.

global_layer_mean

Return the layerwise global thickness-weighted mean of a variable. This uses reproducing sums.

global_volume_mean

Find the global thickness-weighted mean of a variable. This uses reproducing sums.

global_mass_integral

Find the global mass-weighted integral of a variable. The presence of the optional tmp_scale argument determines whether the returned value is in scaled (if it is present) or unscaled units for both the variable itself and for the mass in the integral. This function uses reproducing sums.

global_mass_int_EFP

Find the global mass-weighted order invariant integral of a variable in mks units, returning the value as an EFP_type. This uses reproducing sums.

global_i_mean

Determine the global mean of a field along rows of constant i, returning it in a 1-d array using the local indexing. This uses reproducing sums.

global_j_mean

Determine the global mean of a field along rows of constant j, returning it in a 1-d array using the local indexing. This uses reproducing sums.

adjust_area_mean_to_zero

Adjust 2d array such that area mean is zero without moving the zero contour

array_global_min_max

Find the global maximum and minimum of a tracer array and return the locations of the extrema. When there multiple cells with the same extreme values, the reported locations are from the uppermost layer where they occur, and then from the logically northernmost and then eastermost such location on the unrotated version of the grid within that layer. Only ocean points (as indicated by a positive value of G%mask2dT) are evaluated, and if there are no ocean points anywhere in the domain, the reported extrema and their locations are all returned as 0.

ijk_loc

Functions/Subroutine Documentation

function global_area_mean(var, G, scale, tmp_scale, unscale)

Return the global area mean of a variable, perhaps with a change of units. This uses reproducing sums.

Parameters
  • G [in]

    The ocean's grid structure

  • var [in]

    The variable to average in arbitrary units [a], or arbitrary rescaled units [A ~> a] if unscale or tmp_scale is present arbitrary, possibly rescaled units [A ~> a]

  • scale [in]

    A rescaling factor for the variable [a A-1 ~> 1] that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums

  • tmp_scale [in]

    A temporary rescaling factor for the variable that is reversed in the return value [a A-1 ~> 1], or [b B-1 ~> 1] if unscale is also present.

  • unscale [in]

    A rescaling factor for the variable [a A-1 ~> 1] that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums, or a factor converting between rescaled units if tmp_scale is also present [B A-1 ~> b a-1]. Here scale and unscale are synonymous, but unscale is preferred and takes precedence.

Callees call graph
Callees of mom_spatial_means::global_area_mean calls cluster_mom_coms MOM_coms cluster_mom_spatial_means MOM_spatial_means mom_coms::interface::reproducing_sum reproducing_sum (interface) mom_spatial_means::global_area_mean global_area_mean mom_spatial_means::global_area_mean->mom_coms::interface::reproducing_sum
Text view
Callers call graph
Callers of mom_spatial_means::global_area_mean calls cluster_mom_diagnostics MOM_diagnostics cluster_mom_forcing_type MOM_forcing_type cluster_mom_spatial_means MOM_spatial_means cluster_mom_wave_interface MOM_wave_interface mom_diagnostics::calculate_diagnostic_fields calculate_diagnostic_fields mom_spatial_means::global_area_mean global_area_mean mom_diagnostics::calculate_diagnostic_fields->mom_spatial_means::global_area_mean mom_diagnostics::post_surface_thermo_diags post_surface_thermo_diags mom_diagnostics::post_surface_thermo_diags->mom_spatial_means::global_area_mean mom_forcing_type::forcing_diagnostics forcing_diagnostics mom_forcing_type::forcing_diagnostics->mom_spatial_means::global_area_mean mom_forcing_type::homogenize_field_t homogenize_field_t [private/internal] mom_forcing_type::homogenize_field_t->mom_spatial_means::global_area_mean mom_wave_interface::surface_bands_by_data_override Surface_Bands_by_data_override [private/internal] mom_wave_interface::surface_bands_by_data_override->mom_spatial_means::global_area_mean
Text view
function global_area_mean_v(var, G, tmp_scale)

Return the global area mean of a variable. This uses reproducing sums.

Parameters
  • G [in]

    The ocean's grid structure

  • var [in]

    The variable to average in arbitrary units [a], or arbitrary rescaled units [A ~> a] if tmp_scale is present

  • tmp_scale [in]

    A temporary rescaling factor for the variable that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums [a A-1 ~> 1], but is reversed before output so that the return value has the same units as var

Callees call graph
Callees of mom_spatial_means::global_area_mean_v calls cluster_mom_coms MOM_coms cluster_mom_spatial_means MOM_spatial_means mom_coms::interface::reproducing_sum reproducing_sum (interface) mom_spatial_means::global_area_mean_v global_area_mean_v mom_spatial_means::global_area_mean_v->mom_coms::interface::reproducing_sum
Text view
Callers call graph
Callers of mom_spatial_means::global_area_mean_v calls cluster_mom_forcing_type MOM_forcing_type cluster_mom_spatial_means MOM_spatial_means mom_forcing_type::homogenize_field_v homogenize_field_v [private/internal] mom_spatial_means::global_area_mean_v global_area_mean_v mom_forcing_type::homogenize_field_v->mom_spatial_means::global_area_mean_v mom_forcing_type::homogenize_mech_forcing homogenize_mech_forcing mom_forcing_type::homogenize_mech_forcing->mom_spatial_means::global_area_mean_v
Text view
function global_area_mean_u(var, G, tmp_scale)

Return the global area mean of a variable on U grid. This uses reproducing sums.

Parameters
  • G [in]

    The ocean's grid structure

  • var [in]

    The variable to average in arbitrary units [a], or arbitrary rescaled units [A ~> a] if tmp_scale is present

  • tmp_scale [in]

    A temporary rescaling factor for the variable that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums [a A-1 ~> 1], but is reversed before output so that the return value has the same units as var

Callees call graph
Callees of mom_spatial_means::global_area_mean_u calls cluster_mom_coms MOM_coms cluster_mom_spatial_means MOM_spatial_means mom_coms::interface::reproducing_sum reproducing_sum (interface) mom_spatial_means::global_area_mean_u global_area_mean_u mom_spatial_means::global_area_mean_u->mom_coms::interface::reproducing_sum
Text view
Callers call graph
Callers of mom_spatial_means::global_area_mean_u calls cluster_mom_forcing_type MOM_forcing_type cluster_mom_spatial_means MOM_spatial_means mom_forcing_type::homogenize_field_u homogenize_field_u [private/internal] mom_spatial_means::global_area_mean_u global_area_mean_u mom_forcing_type::homogenize_field_u->mom_spatial_means::global_area_mean_u mom_forcing_type::homogenize_mech_forcing homogenize_mech_forcing mom_forcing_type::homogenize_mech_forcing->mom_spatial_means::global_area_mean_u
Text view
function global_area_integral(var, G, scale, area, tmp_scale, unscale)

Return the global area integral of a variable using reproducing sums, perhaps with a change of units. By default the integral uses the masked area from the grid, but an alternate could be used instead. The presence of the optional tmp_scale argument determines whether the returned value is in scaled (if it is present) or unscaled units for both the variable itself and for the area in the integral.

Parameters
  • G [in]

    The ocean's grid structure

  • var [in]

    The variable to integrate in arbitrary units [a], or arbitrary rescaled units [A ~> a] if unscale or tmp_scale is present

  • scale [in]

    A rescaling factor for the variable [a A-1 ~> 1] that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums

  • area [in]

    The alternate area to use, including any required masking [L2 ~> m2].

  • tmp_scale [in]

    A temporary rescaling factor for the variable that is reversed in the return value [a A-1 ~> 1], or [b B-1 ~> 1] if unscale is also present.

  • unscale [in]

    A rescaling factor for the variable [a A-1 ~> 1] that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums, or a factor converting between rescaled units if tmp_scale is also present [B A-1 ~> b a-1]. Here scale and unscale are synonymous, but unscale is preferred and takes precedence if both are present.

  • global_area_integral

    The returned area integral, usually in the units of var times an area, [a m2] or [A L2 ~> a m2] or [B L2 ~> b m2], depending on which optional arguments are provided

Callees call graph
Callees of mom_spatial_means::global_area_integral calls cluster_mom_coms MOM_coms cluster_mom_spatial_means MOM_spatial_means mom_coms::interface::reproducing_sum reproducing_sum (interface) mom_spatial_means::global_area_integral global_area_integral mom_spatial_means::global_area_integral->mom_coms::interface::reproducing_sum
Text view
Callers call graph
Callers of mom_spatial_means::global_area_integral calls cluster_mom_diagnose_kdwork MOM_diagnose_kdwork cluster_mom_diagnostics MOM_diagnostics cluster_mom_forcing_type MOM_forcing_type cluster_mom_ice_shelf MOM_ice_shelf cluster_mom_internal_tides MOM_internal_tides cluster_mom_spatial_means MOM_spatial_means mom_diagnose_kdwork::kdwork_diagnostics KdWork_Diagnostics mom_spatial_means::global_area_integral global_area_integral mom_diagnose_kdwork::kdwork_diagnostics->mom_spatial_means::global_area_integral mom_diagnostics::post_surface_thermo_diags post_surface_thermo_diags mom_diagnostics::post_surface_thermo_diags->mom_spatial_means::global_area_integral mom_forcing_type::forcing_diagnostics forcing_diagnostics mom_forcing_type::forcing_diagnostics->mom_spatial_means::global_area_integral mom_ice_shelf::add_shelf_flux add_shelf_flux [private/internal] mom_ice_shelf::add_shelf_flux->mom_spatial_means::global_area_integral mom_internal_tides::propagate_int_tide propagate_int_tide mom_internal_tides::propagate_int_tide->mom_spatial_means::global_area_integral mom_internal_tides::sum_en sum_En [private/internal] mom_internal_tides::sum_en->mom_spatial_means::global_area_integral
Text view
function global_layer_mean(var, h, G, GV, scale, tmp_scale, unscale)

Return the layerwise global thickness-weighted mean of a variable. This uses reproducing sums.

Parameters
  • G [in]

    The ocean's grid structure

  • GV [in]

    The ocean's vertical grid structure

  • var [in]

    The variable to average in arbitrary units [a], or arbitrary rescaled units [A ~> a] if unscale or tmp_scale is present

  • h [in]

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

  • scale [in]

    A rescaling factor for the variable [a A-1 ~> 1] that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums

  • tmp_scale [in]

    A temporary rescaling factor for the variable for use in the reproducing sums that is reversed in the return value [a A-1 ~> 1], or [b B-1 ~> 1] if unscale is also present.

  • unscale [in]

    A rescaling factor for the variable [a A-1 ~> 1] that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums, or a factor converting between rescaled units if tmp_scale is also present [B A-1 ~> b a-1]. Here scale and unscale are synonymous, but unscale is preferred and takes precedence.

  • global_layer_mean

    The mean of the variable in the arbitrary scaled [A ~> a] or [B ~> b] or unscaled [a] units of var, depending on which optional arguments are provided

Callees call graph
Callees of mom_spatial_means::global_layer_mean calls cluster_mom_coms MOM_coms cluster_mom_spatial_means MOM_spatial_means mom_coms::efp_to_real EFP_to_real mom_coms::interface::efp_sum_across_pes EFP_sum_across_PEs (interface) mom_coms::interface::reproducing_sum reproducing_sum (interface) mom_spatial_means::global_layer_mean global_layer_mean mom_spatial_means::global_layer_mean->mom_coms::efp_to_real mom_spatial_means::global_layer_mean->mom_coms::interface::efp_sum_across_pes mom_spatial_means::global_layer_mean->mom_coms::interface::reproducing_sum
Text view
Callers call graph
Callers of mom_spatial_means::global_layer_mean calls cluster_mom_diagnostics MOM_diagnostics cluster_mom_spatial_means MOM_spatial_means mom_diagnostics::calculate_diagnostic_fields calculate_diagnostic_fields mom_spatial_means::global_layer_mean global_layer_mean mom_diagnostics::calculate_diagnostic_fields->mom_spatial_means::global_layer_mean
Text view
function global_volume_mean(var, h, G, GV, scale, tmp_scale, unscale)

Find the global thickness-weighted mean of a variable. This uses reproducing sums.

Parameters
  • G [in]

    The ocean's grid structure

  • GV [in]

    The ocean's vertical grid structure

  • var [in]

    The variable to average in arbitrary units [a], or arbitrary rescaled units [A ~> a] if unscale or tmp_scale is present

  • h [in]

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

  • scale [in]

    A rescaling factor for the variable [a A-1 ~> 1] that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums

  • tmp_scale [in]

    A temporary rescaling factor for the variable that is reversed in the return value [a A-1 ~> 1], or [b B-1 ~> 1] if unscale is also present.

  • unscale [in]

    A rescaling factor for the variable [a A-1 ~> 1] that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums, or a factor converting between rescaled units if tmp_scale is also present [B A-1 ~> b a-1]. Here scale and unscale are synonymous, but unscale is preferred and takes precedence if both are present.

  • global_volume_mean

    The thickness-weighted average of var in the arbitrary scaled [A ~> a] or [B ~> b] or unscaled [a] units of var, depending on which optional arguments are provided

Callees call graph
Callees of mom_spatial_means::global_volume_mean calls cluster_mom_coms MOM_coms cluster_mom_spatial_means MOM_spatial_means mom_coms::interface::reproducing_sum reproducing_sum (interface) mom_spatial_means::global_volume_mean global_volume_mean mom_spatial_means::global_volume_mean->mom_coms::interface::reproducing_sum
Text view
Callers call graph
Callers of mom_spatial_means::global_volume_mean calls cluster_mom_diagnostics MOM_diagnostics cluster_mom_spatial_means MOM_spatial_means mom_diagnostics::calculate_diagnostic_fields calculate_diagnostic_fields mom_spatial_means::global_volume_mean global_volume_mean mom_diagnostics::calculate_diagnostic_fields->mom_spatial_means::global_volume_mean
Text view
function global_mass_integral(h, G, GV, var, on_PE_only, scale, tmp_scale, unscale)

Find the global mass-weighted integral of a variable. The presence of the optional tmp_scale argument determines whether the returned value is in scaled (if it is present) or unscaled units for both the variable itself and for the mass in the integral. This function uses reproducing sums.

Parameters
  • G [in]

    The ocean's grid structure

  • GV [in]

    The ocean's vertical grid structure

  • h [in]

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

  • var [in]

    The variable to integrate in arbitrary units [a], or arbitrary rescaled units [A ~> a] if unscale or tmp_scale is present

  • on_PE_only [in]

    If present and true, the sum is only done on the local PE, and it is _not_ order invariant.

  • scale [in]

    A rescaling factor for the variable [a A-1 ~> 1] that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums

  • tmp_scale [in]

    A temporary rescaling factor for the variable that is reversed in the return value [a A-1 ~> 1], or [b B-1 ~> 1] if unscale is also present.

  • unscale [in]

    A rescaling factor for the variable [a A-1 ~> 1] that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums, or a factor converting between rescaled units if tmp_scale is also present [B A-1 ~> b a-1]. Here scale and unscale are synonymous, but unscale is preferred and takes precedence if both are present.

  • global_mass_integral

    The mass-weighted integral of var (or 1) in kg times the arbitrary units of var [kg a] or in [R Z L2 A ~> kg a] if tmp_scale is present or [R Z L2 B ~> kg b] if both unscale and tmp_scale are present

Callees call graph
Callees of mom_spatial_means::global_mass_integral calls cluster_mom_coms MOM_coms cluster_mom_spatial_means MOM_spatial_means mom_coms::interface::reproducing_sum reproducing_sum (interface) mom_spatial_means::global_mass_integral global_mass_integral mom_spatial_means::global_mass_integral->mom_coms::interface::reproducing_sum
Text view
Callers call graph
Callers of mom_spatial_means::global_mass_integral calls cluster_mom MOM cluster_mom_hor_bnd_diffusion MOM_hor_bnd_diffusion cluster_mom_spatial_means MOM_spatial_means mom::get_ocean_stocks get_ocean_stocks mom_spatial_means::global_mass_integral global_mass_integral mom::get_ocean_stocks->mom_spatial_means::global_mass_integral mom_hor_bnd_diffusion::hor_bnd_diffusion hor_bnd_diffusion mom_hor_bnd_diffusion::hor_bnd_diffusion->mom_spatial_means::global_mass_integral
Text view
function global_mass_int_EFP(h, G, GV, var, on_PE_only, scale, unscale)

Find the global mass-weighted order invariant integral of a variable in mks units, returning the value as an EFP_type. This uses reproducing sums.

Parameters
  • G [in]

    The ocean's grid structure

  • GV [in]

    The ocean's vertical grid structure

  • h [in]

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

  • var [in]

    The variable to integrate in arbitrary units [a], or arbitrary rescaled units [A ~> a] if unscale is present

  • on_PE_only [in]

    If present and true, the sum is only done on the local PE, but it is still order invariant.

  • scale [in]

    A rescaling factor for the variable [a A-1 ~> 1] that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums

  • unscale [in]

    A rescaling factor for the variable [a A-1 ~> 1] that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums. Here scale and unscale are synonymous, but unscale is preferred and takes precedence if both are present.

  • global_mass_int_EFP

    The mass-weighted integral of var (or 1) in kg times the arbitrary units of var [kg a]

Callees call graph
Callees of mom_spatial_means::global_mass_int_efp calls cluster_mom_coms MOM_coms cluster_mom_spatial_means MOM_spatial_means mom_coms::interface::reproducing_sum_efp reproducing_sum_EFP (interface) mom_spatial_means::global_mass_int_efp global_mass_int_EFP mom_spatial_means::global_mass_int_efp->mom_coms::interface::reproducing_sum_efp
Text view
Callers call graph
Callers of mom_spatial_means::global_mass_int_efp calls cluster_advection_test_tracer advection_test_tracer cluster_boundary_impulse_tracer boundary_impulse_tracer cluster_ideal_age_example ideal_age_example cluster_marbl_tracers MARBL_tracers cluster_mom_cfc_cap MOM_CFC_cap cluster_mom_ocmip2_cfc MOM_OCMIP2_CFC cluster_mom_spatial_means MOM_spatial_means cluster_oil_tracer oil_tracer cluster_pseudo_salt_tracer pseudo_salt_tracer cluster_regional_dyes regional_dyes cluster_user_tracer_example USER_tracer_example advection_test_tracer::advection_test_stock advection_test_stock mom_spatial_means::global_mass_int_efp global_mass_int_EFP advection_test_tracer::advection_test_stock->mom_spatial_means::global_mass_int_efp boundary_impulse_tracer::boundary_impulse_stock boundary_impulse_stock boundary_impulse_tracer::boundary_impulse_stock->mom_spatial_means::global_mass_int_efp ideal_age_example::ideal_age_stock ideal_age_stock ideal_age_example::ideal_age_stock->mom_spatial_means::global_mass_int_efp marbl_tracers::marbl_tracers_stock MARBL_tracers_stock marbl_tracers::marbl_tracers_stock->mom_spatial_means::global_mass_int_efp mom_cfc_cap::cfc_cap_stock CFC_cap_stock mom_cfc_cap::cfc_cap_stock->mom_spatial_means::global_mass_int_efp mom_ocmip2_cfc::ocmip2_cfc_stock OCMIP2_CFC_stock mom_ocmip2_cfc::ocmip2_cfc_stock->mom_spatial_means::global_mass_int_efp oil_tracer::oil_stock oil_stock oil_tracer::oil_stock->mom_spatial_means::global_mass_int_efp pseudo_salt_tracer::pseudo_salt_stock pseudo_salt_stock pseudo_salt_tracer::pseudo_salt_stock->mom_spatial_means::global_mass_int_efp regional_dyes::dye_stock dye_stock regional_dyes::dye_stock->mom_spatial_means::global_mass_int_efp user_tracer_example::user_tracer_stock USER_tracer_stock user_tracer_example::user_tracer_stock->mom_spatial_means::global_mass_int_efp
Text view
subroutine global_i_mean(array, i_mean, G, mask, scale, tmp_scale, unscale)

Determine the global mean of a field along rows of constant i, returning it in a 1-d array using the local indexing. This uses reproducing sums.

Parameters
  • G [inout]

    The ocean's grid structure

  • array [in]

    The variable to integrate in arbitrary units [a], or arbitrary rescaled units [A ~> a] if unscale is present

  • i_mean [out]

    Global mean of array along its i-axis [a] or [A ~> a]

  • mask [in]

    An array used for weighting the i-mean [nondim]

  • scale [in]

    A rescaling factor for the output variable [a A-1 ~> 1] that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums

  • tmp_scale [in]

    A rescaling factor for the internal calculations that is removed from the output [a A-1 ~> 1]

  • unscale [in]

    A rescaling factor for the variable [a A-1 ~> 1] that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums. Here scale and unscale are synonymous, but unscale is preferred and takes precedence if both are present.

Callees call graph
Callees of mom_spatial_means::global_i_mean calls cluster_mom_coms MOM_coms cluster_mom_error_handler MOM_error_handler cluster_mom_spatial_means MOM_spatial_means mom_coms::efp_to_real EFP_to_real mom_coms::interface::efp_sum_across_pes EFP_sum_across_PEs (interface) mom_coms::query_efp_overflow_error query_EFP_overflow_error mom_coms::real_to_efp real_to_EFP mom_coms::reset_efp_overflow_error reset_EFP_overflow_error mom_error_handler::mom_error MOM_error mom_spatial_means::global_i_mean global_i_mean mom_spatial_means::global_i_mean->mom_coms::efp_to_real mom_spatial_means::global_i_mean->mom_coms::interface::efp_sum_across_pes mom_spatial_means::global_i_mean->mom_coms::query_efp_overflow_error mom_spatial_means::global_i_mean->mom_coms::real_to_efp mom_spatial_means::global_i_mean->mom_coms::reset_efp_overflow_error mom_spatial_means::global_i_mean->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_spatial_means::global_i_mean calls cluster_mom_spatial_means MOM_spatial_means cluster_mom_sponge MOM_sponge mom_spatial_means::global_i_mean global_i_mean mom_sponge::apply_sponge apply_sponge mom_sponge::apply_sponge->mom_spatial_means::global_i_mean
Text view
subroutine global_j_mean(array, j_mean, G, mask, scale, tmp_scale, unscale)

Determine the global mean of a field along rows of constant j, returning it in a 1-d array using the local indexing. This uses reproducing sums.

Parameters
  • G [inout]

    The ocean's grid structure

  • array [in]

    The variable to integrate in arbitrary units [a], or arbitrary rescaled units [A ~> a] if unscale is present

  • j_mean [out]

    Global mean of array along its j-axis [a] or [A ~> a]

  • mask [in]

    An array used for weighting the j-mean [nondim]

  • scale [in]

    A rescaling factor for the output variable [a A-1 ~> 1] that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums

  • tmp_scale [in]

    A rescaling factor for the internal calculations that is removed from the output [a A-1 ~> 1]

  • unscale [in]

    A rescaling factor for the variable [a A-1 ~> 1] that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums. Here scale and unscale are synonymous, but unscale is preferred and takes precedence if both are present.

Callees call graph
Callees of mom_spatial_means::global_j_mean calls cluster_mom_coms MOM_coms cluster_mom_error_handler MOM_error_handler cluster_mom_spatial_means MOM_spatial_means mom_coms::efp_to_real EFP_to_real mom_coms::interface::efp_sum_across_pes EFP_sum_across_PEs (interface) mom_coms::query_efp_overflow_error query_EFP_overflow_error mom_coms::real_to_efp real_to_EFP mom_coms::reset_efp_overflow_error reset_EFP_overflow_error mom_error_handler::mom_error MOM_error mom_spatial_means::global_j_mean global_j_mean mom_spatial_means::global_j_mean->mom_coms::efp_to_real mom_spatial_means::global_j_mean->mom_coms::interface::efp_sum_across_pes mom_spatial_means::global_j_mean->mom_coms::query_efp_overflow_error mom_spatial_means::global_j_mean->mom_coms::real_to_efp mom_spatial_means::global_j_mean->mom_coms::reset_efp_overflow_error mom_spatial_means::global_j_mean->mom_error_handler::mom_error
Text view
subroutine adjust_area_mean_to_zero(array, G, scaling, unit_scale, unscale)

Adjust 2d array such that area mean is zero without moving the zero contour

Parameters
  • G [in]

    Grid structure

  • array [inout]

    2D array to be adjusted in arbitrary units [a], or arbitrary rescaled units [A ~> a] if unscale is present

  • scaling [out]

    The scaling factor used [nondim]

  • unit_scale [in]

    A rescaling factor for the variable [a A-1 ~> 1] that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums

  • unscale [in]

    A rescaling factor for the variable [a A-1 ~> 1] that converts it back to unscaled (e.g., mks) units to enable the use of the reproducing sums. Here unit_scale and unscale are synonymous, but unscale is preferred and takes precedence if both are present.

Callees call graph
Callees of mom_spatial_means::adjust_area_mean_to_zero calls cluster_mom_coms MOM_coms cluster_mom_spatial_means MOM_spatial_means mom_coms::efp_to_real EFP_to_real mom_coms::interface::efp_sum_across_pes EFP_sum_across_PEs (interface) mom_coms::interface::reproducing_sum_efp reproducing_sum_EFP (interface) mom_spatial_means::adjust_area_mean_to_zero adjust_area_mean_to_zero mom_spatial_means::adjust_area_mean_to_zero->mom_coms::efp_to_real mom_spatial_means::adjust_area_mean_to_zero->mom_coms::interface::efp_sum_across_pes mom_spatial_means::adjust_area_mean_to_zero->mom_coms::interface::reproducing_sum_efp
Text view
subroutine array_global_min_max(tr_array, G, nk, g_min, g_max, xgmin, ygmin, zgmin, xgmax, ygmax, zgmax, unscale)

Find the global maximum and minimum of a tracer array and return the locations of the extrema. When there multiple cells with the same extreme values, the reported locations are from the uppermost layer where they occur, and then from the logically northernmost and then eastermost such location on the unrotated version of the grid within that layer. Only ocean points (as indicated by a positive value of G%mask2dT) are evaluated, and if there are no ocean points anywhere in the domain, the reported extrema and their locations are all returned as 0.

Parameters
  • nk [in]

    The number of vertical levels

  • G [in]

    The ocean's grid structure

  • tr_array [in]

    The tracer array to search for extrema in arbitrary concentration units [CU ~> conc]

  • g_min [out]

    The global minimum of tr_array, either in the same units as tr_array [CU ~> conc] or in unscaled units if unscale is present [conc]

  • g_max [out]

    The global maximum of tr_array, either in the same units as tr_array [CU ~> conc] or in unscaled units if unscale is present [conc]

  • xgmin [out]

    The x-position of the global minimum in the units of G%geoLonT, often [degrees_E] or [km] or [m]

  • ygmin [out]

    The y-position of the global minimum in the units of G%geoLatT, often [degrees_N] or [km] or [m]

  • zgmin [out]

    The z-position of the global minimum [layer]

  • xgmax [out]

    The x-position of the global maximum in the units of G%geoLonT, often [degrees_E] or [km] or [m]

  • ygmax [out]

    The y-position of the global maximum in the units of G%geoLatT, often [degrees_N] or [km] or [m]

  • zgmax [out]

    The z-position of the global maximum [layer]

  • unscale [in]

    A factor to use to undo any scaling of the input tracer array [conc CU-1 ~> 1]

Callees call graph
Callees of mom_spatial_means::array_global_min_max calls cluster_mom_coms_infra MOM_coms_infra cluster_mom_spatial_means MOM_spatial_means mom_coms_infra::interface::max_across_pes max_across_PEs (interface) mom_coms_infra::interface::min_across_pes min_across_PEs (interface) mom_spatial_means::array_global_min_max array_global_min_max mom_spatial_means::array_global_min_max->mom_coms_infra::interface::max_across_pes mom_spatial_means::array_global_min_max->mom_coms_infra::interface::min_across_pes mom_spatial_means::ijk_loc ijk_loc [private/internal] mom_spatial_means::array_global_min_max->mom_spatial_means::ijk_loc
Text view
Callers call graph
Callers of mom_spatial_means::array_global_min_max calls cluster_mom_spatial_means MOM_spatial_means cluster_mom_sum_output MOM_sum_output mom_spatial_means::array_global_min_max array_global_min_max mom_sum_output::write_energy write_energy mom_sum_output::write_energy->mom_spatial_means::array_global_min_max
Text view

function ijk_loc(i, j, k, nk, HI)

Parameters
  • i [in]

    Local i-index

  • j [in]

    Local j-index

  • k [in]

    Local k-index

  • nk [in]

    Range of k-index, used to pick out a low-k position.

  • HI [in]

    Horizontal index ranges

Callers call graph
Callers of mom_spatial_means::ijk_loc calls cluster_mom_spatial_means MOM_spatial_means mom_spatial_means::array_global_min_max array_global_min_max mom_spatial_means::ijk_loc ijk_loc [private/internal] mom_spatial_means::array_global_min_max->mom_spatial_means::ijk_loc
Text view
API generated with Flint · Rendered from reStructuredText