MOM_shared_initialization module reference

Code that initializes fixed aspects of the model grid, such as horizontal grid metrics, topography and Coriolis, and can be shared between components.

Functions/Subroutines

MOM_shared_init_init

MOM_shared_init_init just writes the code version.

MOM_initialize_rotation

MOM_initialize_rotation makes the appropriate call to set up the Coriolis parameter.

MOM_calculate_grad_Coriolis

Calculates the components of grad f (Coriolis parameter)

diagnoseMaximumDepth

Return the global maximum ocean bottom depth in the same units as the input depth.

set_meanSL_from_file

Read time mean ocean sea level from a file

initialize_topography_from_file

Read gridded depths from file

apply_topography_edits_from_file

Applies a list of topography overrides read from a netcdf file

initialize_topography_named

initialize the bathymetry based on one of several named idealized configurations

limit_topography

limit_topography ensures that min_depth < D(x,y) < max_depth

set_rotation_planetary

This subroutine sets up the Coriolis parameter for a sphere

set_rotation_beta_plane

This subroutine sets up the Coriolis parameter for a beta-plane or f-plane

initialize_grid_rotation_angle

initialize_grid_rotation_angle initializes the arrays with the sine and cosine of the angle between logical north on the grid and true north.

modulo_around_point

Return the modulo value of x in an interval [xc-(Lx/2) xc+(Lx/2)] If Lx<=0, then it returns x without applying modulo arithmetic.

reset_face_lengths_named

This subroutine sets the open face lengths at selected points to restrict passages to their observed widths based on a named set of sizes.

reset_face_lengths_file

This subroutine sets the open face lengths at selected points to restrict passages to their observed widths from a arrays read from a file.

reset_face_lengths_list

This subroutine sets the open face lengths at selected points to restrict passages to their observed widths from a list read from a file.

read_face_length_list

This subroutine reads and counts the non-blank lines in the face length list file, after removing comments.

set_subgrid_topo_at_vel_from_file

Read from a file the maximum, minimum and average bathymetry at velocity points, for the use of porous barrier. Note that we assume the depth values in the sub-grid bathymetry file of the same convention as in-cell bathymetry file, i.e. positive below the sea surface and increasing downward; while in subroutine reset_face_lengths_list, it is implied that read-in fields min_bathy, max_bathy and avg_bathy from the input file CHANNEL_LIST_FILE all have negative values below the surface. Therefore, to ensure backward compatibility, all signs of the variable are inverted here. And porous_Dmax[UV] = shallowest point, porous_Dmin[UV] = deepest point

set_velocity_depth_max

Set the bathymetry at velocity points to be the maximum of the depths at the neighoring tracer points.

set_velocity_depth_min

Set the bathymetry at velocity points to be the minimum of the depths at the neighoring tracer points.

compute_global_grid_integrals

Pre-compute global integrals of grid quantities (like masked ocean area) for later use in reporting diagnostics

write_ocean_geometry_file

Write out a file describing the topography, Coriolis parameter, grid locations and various other fixed fields from the grid.

Functions/Subroutine Documentation

subroutine MOM_shared_init_init(PF)

MOM_shared_init_init just writes the code version.

Parameters
  • PF [in]

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

Callees call graph
Callees of mom_shared_initialization::mom_shared_init_init calls cluster_mom_file_parser MOM_file_parser cluster_mom_shared_initialization MOM_shared_initialization mom_file_parser::interface::log_version log_version (interface) mom_shared_initialization::mom_shared_init_init MOM_shared_init_init mom_shared_initialization::mom_shared_init_init->mom_file_parser::interface::log_version
Text view
subroutine MOM_initialize_rotation(f, G, PF, US)

MOM_initialize_rotation makes the appropriate call to set up the Coriolis parameter.

Parameters
  • G [in]

    The dynamic horizontal grid type

  • f [out]

    The Coriolis parameter [T-1 ~> s-1]

  • PF [in]

    Parameter file structure

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_shared_initialization::mom_initialize_rotation calls cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_shared_initialization MOM_shared_initialization mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave mom_error_handler::mom_error MOM_error mom_file_parser::interface::get_param get_param (interface) mom_shared_initialization::mom_initialize_rotation MOM_initialize_rotation mom_shared_initialization::mom_initialize_rotation->mom_error_handler::calltree_enter mom_shared_initialization::mom_initialize_rotation->mom_error_handler::calltree_leave mom_shared_initialization::mom_initialize_rotation->mom_error_handler::mom_error mom_shared_initialization::mom_initialize_rotation->mom_file_parser::interface::get_param mom_shared_initialization::set_rotation_beta_plane set_rotation_beta_plane mom_shared_initialization::mom_initialize_rotation->mom_shared_initialization::set_rotation_beta_plane mom_shared_initialization::set_rotation_planetary set_rotation_planetary mom_shared_initialization::mom_initialize_rotation->mom_shared_initialization::set_rotation_planetary
Text view
Callers call graph
Callers of mom_shared_initialization::mom_initialize_rotation calls cluster_mom_fixed_initialization MOM_fixed_initialization cluster_mom_shared_initialization MOM_shared_initialization mom_fixed_initialization::mom_initialize_fixed MOM_initialize_fixed mom_shared_initialization::mom_initialize_rotation MOM_initialize_rotation mom_fixed_initialization::mom_initialize_fixed->mom_shared_initialization::mom_initialize_rotation
Text view
subroutine MOM_calculate_grad_Coriolis(dF_dx, dF_dy, G, US)

Calculates the components of grad f (Coriolis parameter)

Parameters
  • G [inout]

    The dynamic horizontal grid type

  • dF_dx [out]

    x-component of grad f [T-1 L-1 ~> s-1 m-1]

  • dF_dy [out]

    y-component of grad f [T-1 L-1 ~> s-1 m-1]

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_shared_initialization::mom_calculate_grad_coriolis calls cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_handler MOM_error_handler cluster_mom_shared_initialization MOM_shared_initialization mom_domain_infra::interface::pass_vector pass_vector (interface) mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave mom_shared_initialization::mom_calculate_grad_coriolis MOM_calculate_grad_Coriolis mom_shared_initialization::mom_calculate_grad_coriolis->mom_domain_infra::interface::pass_vector mom_shared_initialization::mom_calculate_grad_coriolis->mom_error_handler::calltree_enter mom_shared_initialization::mom_calculate_grad_coriolis->mom_error_handler::calltree_leave
Text view
Callers call graph
Callers of mom_shared_initialization::mom_calculate_grad_coriolis calls cluster_mom_fixed_initialization MOM_fixed_initialization cluster_mom_shared_initialization MOM_shared_initialization mom_fixed_initialization::mom_initialize_fixed MOM_initialize_fixed mom_shared_initialization::mom_calculate_grad_coriolis MOM_calculate_grad_Coriolis mom_fixed_initialization::mom_initialize_fixed->mom_shared_initialization::mom_calculate_grad_coriolis
Text view
function diagnoseMaximumDepth(D, G)

Return the global maximum ocean bottom depth in the same units as the input depth.

Parameters
  • G [in]

    The dynamic horizontal grid type

  • D [in]

    Ocean bottom depth in [m] or [Z ~> m]

  • diagnoseMaximumDepth

    The global maximum ocean bottom depth in [m] or [Z ~> m]

Callees call graph
Callees of mom_shared_initialization::diagnosemaximumdepth calls cluster_mom_coms_infra MOM_coms_infra cluster_mom_shared_initialization MOM_shared_initialization mom_coms_infra::interface::max_across_pes max_across_PEs (interface) mom_shared_initialization::diagnosemaximumdepth diagnoseMaximumDepth mom_shared_initialization::diagnosemaximumdepth->mom_coms_infra::interface::max_across_pes
Text view
Callers call graph
Callers of mom_shared_initialization::diagnosemaximumdepth calls cluster_mom_fixed_initialization MOM_fixed_initialization cluster_mom_shared_initialization MOM_shared_initialization mom_fixed_initialization::mom_initialize_topography MOM_initialize_topography mom_shared_initialization::diagnosemaximumdepth diagnoseMaximumDepth mom_fixed_initialization::mom_initialize_topography->mom_shared_initialization::diagnosemaximumdepth
Text view
subroutine set_meanSL_from_file(meanSL, G, param_file, US)

Read time mean ocean sea level from a file

Parameters
  • G [in]

    The dynamic horizontal grid type

  • meanSL [out]

    Mean sea level referenced to a zero reference height at tracer points [Z ~> m].

  • param_file [in]

    Parameter file structure

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_shared_initialization::set_meansl_from_file calls cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_io MOM_io cluster_mom_io_infra MOM_io_infra cluster_mom_shared_initialization MOM_shared_initialization cluster_mom_string_functions MOM_string_functions mom_domain_infra::interface::pass_var pass_var (interface) mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave 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_io::interface::mom_read_data MOM_read_data (interface) mom_io_infra::interface::file_exists file_exists (interface) mom_shared_initialization::set_meansl_from_file set_meanSL_from_file mom_shared_initialization::set_meansl_from_file->mom_domain_infra::interface::pass_var mom_shared_initialization::set_meansl_from_file->mom_error_handler::calltree_enter mom_shared_initialization::set_meansl_from_file->mom_error_handler::calltree_leave mom_shared_initialization::set_meansl_from_file->mom_error_handler::mom_error mom_shared_initialization::set_meansl_from_file->mom_file_parser::interface::get_param mom_shared_initialization::set_meansl_from_file->mom_file_parser::interface::log_param mom_shared_initialization::set_meansl_from_file->mom_io::interface::mom_read_data mom_shared_initialization::set_meansl_from_file->mom_io_infra::interface::file_exists mom_string_functions::slasher slasher mom_shared_initialization::set_meansl_from_file->mom_string_functions::slasher
Text view
Callers call graph
Callers of mom_shared_initialization::set_meansl_from_file calls cluster_mom_fixed_initialization MOM_fixed_initialization cluster_mom_shared_initialization MOM_shared_initialization mom_fixed_initialization::mom_initialize_fixed MOM_initialize_fixed mom_shared_initialization::set_meansl_from_file set_meanSL_from_file mom_fixed_initialization::mom_initialize_fixed->mom_shared_initialization::set_meansl_from_file
Text view
subroutine initialize_topography_from_file(D, G, param_file, US)

Read gridded depths from file

Parameters
  • G [in]

    The dynamic horizontal grid type

  • D [out]

    Ocean bottom depth [Z ~> m]

  • param_file [in]

    Parameter file structure

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_shared_initialization::initialize_topography_from_file calls cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_io MOM_io cluster_mom_io_infra MOM_io_infra cluster_mom_shared_initialization MOM_shared_initialization cluster_mom_string_functions MOM_string_functions mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave 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_io::interface::mom_read_data MOM_read_data (interface) mom_io_infra::interface::file_exists file_exists (interface) mom_shared_initialization::apply_topography_edits_from_file apply_topography_edits_from_file mom_shared_initialization::initialize_topography_from_file initialize_topography_from_file mom_shared_initialization::initialize_topography_from_file->mom_error_handler::calltree_enter mom_shared_initialization::initialize_topography_from_file->mom_error_handler::calltree_leave mom_shared_initialization::initialize_topography_from_file->mom_error_handler::mom_error mom_shared_initialization::initialize_topography_from_file->mom_file_parser::interface::get_param mom_shared_initialization::initialize_topography_from_file->mom_file_parser::interface::log_param mom_shared_initialization::initialize_topography_from_file->mom_io::interface::mom_read_data mom_shared_initialization::initialize_topography_from_file->mom_io_infra::interface::file_exists mom_shared_initialization::initialize_topography_from_file->mom_shared_initialization::apply_topography_edits_from_file mom_string_functions::slasher slasher mom_shared_initialization::initialize_topography_from_file->mom_string_functions::slasher
Text view
Callers call graph
Callers of mom_shared_initialization::initialize_topography_from_file calls cluster_mom_fixed_initialization MOM_fixed_initialization cluster_mom_shared_initialization MOM_shared_initialization mom_fixed_initialization::mom_initialize_topography MOM_initialize_topography mom_shared_initialization::initialize_topography_from_file initialize_topography_from_file mom_fixed_initialization::mom_initialize_topography->mom_shared_initialization::initialize_topography_from_file
Text view
subroutine apply_topography_edits_from_file(D, G, param_file, US)

Applies a list of topography overrides read from a netcdf file

Parameters
  • G [in]

    The dynamic horizontal grid type

  • D [inout]

    Ocean bottom depth [m] or [Z ~> m] if US is present

  • param_file [in]

    Parameter file structure

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_shared_initialization::apply_topography_edits_from_file calls cluster_mom_error_handler MOM_error_handler cluster_mom_error_infra MOM_error_infra cluster_mom_file_parser MOM_file_parser cluster_mom_io MOM_io cluster_mom_io_infra MOM_io_infra cluster_mom_shared_initialization MOM_shared_initialization cluster_mom_string_functions MOM_string_functions mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave mom_error_handler::mom_error MOM_error mom_error_infra::is_root_pe is_root_pe mom_file_parser::interface::get_param get_param (interface) mom_io::close_file_to_read close_file_to_read mom_io::field_size field_size mom_io::interface::read_variable read_variable (interface) mom_io::open_file_to_read open_file_to_read mom_io_infra::interface::file_exists file_exists (interface) mom_shared_initialization::apply_topography_edits_from_file apply_topography_edits_from_file mom_shared_initialization::apply_topography_edits_from_file->mom_error_handler::calltree_enter mom_shared_initialization::apply_topography_edits_from_file->mom_error_handler::calltree_leave mom_shared_initialization::apply_topography_edits_from_file->mom_error_handler::mom_error mom_shared_initialization::apply_topography_edits_from_file->mom_error_infra::is_root_pe mom_shared_initialization::apply_topography_edits_from_file->mom_file_parser::interface::get_param mom_shared_initialization::apply_topography_edits_from_file->mom_io::close_file_to_read mom_shared_initialization::apply_topography_edits_from_file->mom_io::field_size mom_shared_initialization::apply_topography_edits_from_file->mom_io::interface::read_variable mom_shared_initialization::apply_topography_edits_from_file->mom_io::open_file_to_read mom_shared_initialization::apply_topography_edits_from_file->mom_io_infra::interface::file_exists mom_string_functions::slasher slasher mom_shared_initialization::apply_topography_edits_from_file->mom_string_functions::slasher
Text view
Callers call graph
Callers of mom_shared_initialization::apply_topography_edits_from_file calls cluster_mom_shared_initialization MOM_shared_initialization mom_shared_initialization::apply_topography_edits_from_file apply_topography_edits_from_file mom_shared_initialization::initialize_topography_from_file initialize_topography_from_file mom_shared_initialization::initialize_topography_from_file->mom_shared_initialization::apply_topography_edits_from_file
Text view
subroutine initialize_topography_named(D, G, param_file, topog_config, max_depth, US)

initialize the bathymetry based on one of several named idealized configurations

Parameters
  • G [in]

    The dynamic horizontal grid type

  • D [out]

    Ocean bottom depth [Z ~> m]

  • param_file [in]

    Parameter file structure

  • topog_config [in]

    The name of an idealized topographic configuration

  • max_depth [in]

    Maximum depth [Z ~> m]

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_shared_initialization::initialize_topography_named calls cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_shared_initialization MOM_shared_initialization mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave mom_error_handler::mom_error MOM_error mom_error_handler::mom_mesg MOM_mesg mom_file_parser::interface::get_param get_param (interface) mom_shared_initialization::initialize_topography_named initialize_topography_named mom_shared_initialization::initialize_topography_named->mom_error_handler::calltree_enter mom_shared_initialization::initialize_topography_named->mom_error_handler::calltree_leave mom_shared_initialization::initialize_topography_named->mom_error_handler::mom_error mom_shared_initialization::initialize_topography_named->mom_error_handler::mom_mesg mom_shared_initialization::initialize_topography_named->mom_file_parser::interface::get_param
Text view
Callers call graph
Callers of mom_shared_initialization::initialize_topography_named calls cluster_mom_fixed_initialization MOM_fixed_initialization cluster_mom_shared_initialization MOM_shared_initialization mom_fixed_initialization::mom_initialize_topography MOM_initialize_topography mom_shared_initialization::initialize_topography_named initialize_topography_named mom_fixed_initialization::mom_initialize_topography->mom_shared_initialization::initialize_topography_named
Text view
subroutine limit_topography(D, G, param_file, max_depth, US)

limit_topography ensures that min_depth < D(x,y) < max_depth

Parameters
  • G [in]

    The dynamic horizontal grid type

  • D [inout]

    Ocean bottom depth [Z ~> m]

  • param_file [in]

    Parameter file structure

  • max_depth [in]

    Maximum depth of model [Z ~> m]

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_shared_initialization::limit_topography calls cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_shared_initialization MOM_shared_initialization mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave mom_error_handler::mom_error MOM_error mom_file_parser::interface::get_param get_param (interface) mom_shared_initialization::limit_topography limit_topography mom_shared_initialization::limit_topography->mom_error_handler::calltree_enter mom_shared_initialization::limit_topography->mom_error_handler::calltree_leave mom_shared_initialization::limit_topography->mom_error_handler::mom_error mom_shared_initialization::limit_topography->mom_file_parser::interface::get_param
Text view
Callers call graph
Callers of mom_shared_initialization::limit_topography calls cluster_mom_fixed_initialization MOM_fixed_initialization cluster_mom_shared_initialization MOM_shared_initialization mom_fixed_initialization::mom_initialize_topography MOM_initialize_topography mom_shared_initialization::limit_topography limit_topography mom_fixed_initialization::mom_initialize_topography->mom_shared_initialization::limit_topography
Text view
subroutine set_rotation_planetary(f, G, param_file, US)

This subroutine sets up the Coriolis parameter for a sphere

Parameters
  • G [in]

    The dynamic horizontal grid

  • f [out]

    Coriolis parameter (vertical component) [T-1 ~> s-1]

  • param_file [in]

    A structure to parse for run-time parameters

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_shared_initialization::set_rotation_planetary calls cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_shared_initialization MOM_shared_initialization mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave mom_file_parser::interface::get_param get_param (interface) mom_shared_initialization::set_rotation_planetary set_rotation_planetary mom_shared_initialization::set_rotation_planetary->mom_error_handler::calltree_enter mom_shared_initialization::set_rotation_planetary->mom_error_handler::calltree_leave mom_shared_initialization::set_rotation_planetary->mom_file_parser::interface::get_param
Text view
Callers call graph
Callers of mom_shared_initialization::set_rotation_planetary calls cluster_mom_shared_initialization MOM_shared_initialization mom_shared_initialization::mom_initialize_rotation MOM_initialize_rotation mom_shared_initialization::set_rotation_planetary set_rotation_planetary mom_shared_initialization::mom_initialize_rotation->mom_shared_initialization::set_rotation_planetary
Text view
subroutine set_rotation_beta_plane(f, G, param_file, US)

This subroutine sets up the Coriolis parameter for a beta-plane or f-plane

Parameters
  • G [in]

    The dynamic horizontal grid

  • f [out]

    Coriolis parameter (vertical component) [T-1 ~> s-1]

  • param_file [in]

    A structure to parse for run-time parameters

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_shared_initialization::set_rotation_beta_plane calls cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_shared_initialization MOM_shared_initialization mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave mom_error_handler::mom_error MOM_error mom_file_parser::interface::get_param get_param (interface) mom_shared_initialization::set_rotation_beta_plane set_rotation_beta_plane mom_shared_initialization::set_rotation_beta_plane->mom_error_handler::calltree_enter mom_shared_initialization::set_rotation_beta_plane->mom_error_handler::calltree_leave mom_shared_initialization::set_rotation_beta_plane->mom_error_handler::mom_error mom_shared_initialization::set_rotation_beta_plane->mom_file_parser::interface::get_param
Text view
Callers call graph
Callers of mom_shared_initialization::set_rotation_beta_plane calls cluster_mom_shared_initialization MOM_shared_initialization mom_shared_initialization::mom_initialize_rotation MOM_initialize_rotation mom_shared_initialization::set_rotation_beta_plane set_rotation_beta_plane mom_shared_initialization::mom_initialize_rotation->mom_shared_initialization::set_rotation_beta_plane
Text view
subroutine initialize_grid_rotation_angle(G, PF)

initialize_grid_rotation_angle initializes the arrays with the sine and cosine of the angle between logical north on the grid and true north.

Parameters
  • G [inout]

    The dynamic horizontal grid

  • PF [in]

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

Callees call graph
Callees of mom_shared_initialization::initialize_grid_rotation_angle calls cluster_mom_domain_infra MOM_domain_infra cluster_mom_file_parser MOM_file_parser cluster_mom_shared_initialization MOM_shared_initialization mom_domain_infra::interface::pass_var pass_var (interface) mom_domain_infra::interface::pass_vector pass_vector (interface) mom_file_parser::interface::get_param get_param (interface) mom_shared_initialization::initialize_grid_rotation_angle initialize_grid_rotation_angle mom_shared_initialization::initialize_grid_rotation_angle->mom_domain_infra::interface::pass_var mom_shared_initialization::initialize_grid_rotation_angle->mom_domain_infra::interface::pass_vector mom_shared_initialization::initialize_grid_rotation_angle->mom_file_parser::interface::get_param mom_shared_initialization::modulo_around_point modulo_around_point [private/internal] mom_shared_initialization::initialize_grid_rotation_angle->mom_shared_initialization::modulo_around_point
Text view
Callers call graph
Callers of mom_shared_initialization::initialize_grid_rotation_angle calls cluster_mom_fixed_initialization MOM_fixed_initialization cluster_mom_shared_initialization MOM_shared_initialization mom_fixed_initialization::mom_initialize_fixed MOM_initialize_fixed mom_shared_initialization::initialize_grid_rotation_angle initialize_grid_rotation_angle mom_fixed_initialization::mom_initialize_fixed->mom_shared_initialization::initialize_grid_rotation_angle
Text view
function modulo_around_point(x, xc, Lx) result(x_mod)

Return the modulo value of x in an interval [xc-(Lx/2) xc+(Lx/2)] If Lx<=0, then it returns x without applying modulo arithmetic.

Parameters
  • x [in]

    Value to which to apply modulo arithmetic [A]

  • xc [in]

    Center of modulo range [A]

  • Lx [in]

    Modulo range width [A]

  • x_mod

    x shifted by an integer multiple of Lx to be close to xc [A].

Callers call graph
Callers of mom_shared_initialization::modulo_around_point calls cluster_mom_shared_initialization MOM_shared_initialization mom_shared_initialization::initialize_grid_rotation_angle initialize_grid_rotation_angle mom_shared_initialization::modulo_around_point modulo_around_point [private/internal] mom_shared_initialization::initialize_grid_rotation_angle->mom_shared_initialization::modulo_around_point
Text view
subroutine reset_face_lengths_named(G, param_file, name, US)

This subroutine sets the open face lengths at selected points to restrict passages to their observed widths based on a named set of sizes.

Parameters
  • G [inout]

    The dynamic horizontal grid

  • param_file [in]

    A structure to parse for run-time parameters

  • name [in]

    The name for the set of face lengths. Only "global_1deg" is currently implemented.

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_shared_initialization::reset_face_lengths_named calls cluster_mom_error_handler MOM_error_handler cluster_mom_shared_initialization MOM_shared_initialization mom_error_handler::mom_error MOM_error mom_shared_initialization::reset_face_lengths_named reset_face_lengths_named mom_shared_initialization::reset_face_lengths_named->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_shared_initialization::reset_face_lengths_named calls cluster_mom_fixed_initialization MOM_fixed_initialization cluster_mom_shared_initialization MOM_shared_initialization mom_fixed_initialization::mom_initialize_fixed MOM_initialize_fixed mom_shared_initialization::reset_face_lengths_named reset_face_lengths_named mom_fixed_initialization::mom_initialize_fixed->mom_shared_initialization::reset_face_lengths_named
Text view
subroutine reset_face_lengths_file(G, param_file, US)

This subroutine sets the open face lengths at selected points to restrict passages to their observed widths from a arrays read from a file.

Parameters
  • G [inout]

    The dynamic horizontal grid

  • param_file [in]

    A structure to parse for run-time parameters

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_shared_initialization::reset_face_lengths_file calls cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_handler MOM_error_handler cluster_mom_error_infra MOM_error_infra cluster_mom_file_parser MOM_file_parser cluster_mom_io MOM_io cluster_mom_io_infra MOM_io_infra cluster_mom_shared_initialization MOM_shared_initialization cluster_mom_string_functions MOM_string_functions mom_domain_infra::interface::pass_vector pass_vector (interface) mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave mom_error_handler::mom_error MOM_error mom_error_infra::is_root_pe is_root_pe mom_file_parser::interface::get_param get_param (interface) mom_file_parser::interface::log_param log_param (interface) mom_io::interface::mom_read_vector MOM_read_vector (interface) mom_io_infra::interface::file_exists file_exists (interface) mom_shared_initialization::reset_face_lengths_file reset_face_lengths_file mom_shared_initialization::reset_face_lengths_file->mom_domain_infra::interface::pass_vector mom_shared_initialization::reset_face_lengths_file->mom_error_handler::calltree_enter mom_shared_initialization::reset_face_lengths_file->mom_error_handler::calltree_leave mom_shared_initialization::reset_face_lengths_file->mom_error_handler::mom_error mom_shared_initialization::reset_face_lengths_file->mom_error_infra::is_root_pe mom_shared_initialization::reset_face_lengths_file->mom_file_parser::interface::get_param mom_shared_initialization::reset_face_lengths_file->mom_file_parser::interface::log_param mom_shared_initialization::reset_face_lengths_file->mom_io::interface::mom_read_vector mom_shared_initialization::reset_face_lengths_file->mom_io_infra::interface::file_exists mom_string_functions::slasher slasher mom_shared_initialization::reset_face_lengths_file->mom_string_functions::slasher
Text view
Callers call graph
Callers of mom_shared_initialization::reset_face_lengths_file calls cluster_mom_fixed_initialization MOM_fixed_initialization cluster_mom_shared_initialization MOM_shared_initialization mom_fixed_initialization::mom_initialize_fixed MOM_initialize_fixed mom_shared_initialization::reset_face_lengths_file reset_face_lengths_file mom_fixed_initialization::mom_initialize_fixed->mom_shared_initialization::reset_face_lengths_file
Text view
subroutine reset_face_lengths_list(G, param_file, US)

This subroutine sets the open face lengths at selected points to restrict passages to their observed widths from a list read from a file.

Parameters
  • G [inout]

    The dynamic horizontal grid

  • param_file [in]

    A structure to parse for run-time parameters

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_shared_initialization::reset_face_lengths_list calls cluster_mom_coms_infra MOM_coms_infra cluster_mom_error_handler MOM_error_handler cluster_mom_error_infra MOM_error_infra cluster_mom_file_parser MOM_file_parser cluster_mom_io_infra MOM_io_infra cluster_mom_shared_initialization MOM_shared_initialization cluster_mom_string_functions MOM_string_functions mom_coms_infra::interface::broadcast broadcast (interface) mom_coms_infra::interface::sum_across_pes sum_across_PEs (interface) mom_coms_infra::root_pe root_PE mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave mom_error_handler::mom_error MOM_error mom_error_infra::is_root_pe is_root_pe mom_file_parser::interface::get_param get_param (interface) mom_file_parser::interface::log_param log_param (interface) mom_io_infra::interface::file_exists file_exists (interface) mom_shared_initialization::read_face_length_list read_face_length_list mom_shared_initialization::reset_face_lengths_list reset_face_lengths_list mom_shared_initialization::reset_face_lengths_list->mom_coms_infra::interface::broadcast mom_shared_initialization::reset_face_lengths_list->mom_coms_infra::interface::sum_across_pes mom_shared_initialization::reset_face_lengths_list->mom_coms_infra::root_pe mom_shared_initialization::reset_face_lengths_list->mom_error_handler::calltree_enter mom_shared_initialization::reset_face_lengths_list->mom_error_handler::calltree_leave mom_shared_initialization::reset_face_lengths_list->mom_error_handler::mom_error mom_shared_initialization::reset_face_lengths_list->mom_error_infra::is_root_pe mom_shared_initialization::reset_face_lengths_list->mom_file_parser::interface::get_param mom_shared_initialization::reset_face_lengths_list->mom_file_parser::interface::log_param mom_shared_initialization::reset_face_lengths_list->mom_io_infra::interface::file_exists mom_shared_initialization::reset_face_lengths_list->mom_shared_initialization::read_face_length_list mom_string_functions::slasher slasher mom_shared_initialization::reset_face_lengths_list->mom_string_functions::slasher mom_string_functions::uppercase uppercase mom_shared_initialization::reset_face_lengths_list->mom_string_functions::uppercase
Text view
Callers call graph
Callers of mom_shared_initialization::reset_face_lengths_list calls cluster_mom_fixed_initialization MOM_fixed_initialization cluster_mom_shared_initialization MOM_shared_initialization mom_fixed_initialization::mom_initialize_fixed MOM_initialize_fixed mom_shared_initialization::reset_face_lengths_list reset_face_lengths_list mom_fixed_initialization::mom_initialize_fixed->mom_shared_initialization::reset_face_lengths_list
Text view
subroutine read_face_length_list(iounit, filename, num_lines, lines)

This subroutine reads and counts the non-blank lines in the face length list file, after removing comments.

Parameters
  • iounit [in]

    An open I/O unit number for the file

  • filename [in]

    The name of the face-length file to read

  • num_lines [out]

    The number of non-blank lines in the file

  • lines

    The non-blank lines, after removing comments

Callees call graph
Callees of mom_shared_initialization::read_face_length_list calls cluster_mom_error_handler MOM_error_handler cluster_mom_shared_initialization MOM_shared_initialization cluster_mom_string_functions MOM_string_functions mom_error_handler::mom_error MOM_error mom_shared_initialization::read_face_length_list read_face_length_list mom_shared_initialization::read_face_length_list->mom_error_handler::mom_error mom_string_functions::uppercase uppercase mom_shared_initialization::read_face_length_list->mom_string_functions::uppercase
Text view
Callers call graph
Callers of mom_shared_initialization::read_face_length_list calls cluster_mom_shared_initialization MOM_shared_initialization mom_shared_initialization::read_face_length_list read_face_length_list mom_shared_initialization::reset_face_lengths_list reset_face_lengths_list mom_shared_initialization::reset_face_lengths_list->mom_shared_initialization::read_face_length_list
Text view
subroutine set_subgrid_topo_at_vel_from_file(G, param_file, US)

Read from a file the maximum, minimum and average bathymetry at velocity points, for the use of porous barrier. Note that we assume the depth values in the sub-grid bathymetry file of the same convention as in-cell bathymetry file, i.e. positive below the sea surface and increasing downward; while in subroutine reset_face_lengths_list, it is implied that read-in fields min_bathy, max_bathy and avg_bathy from the input file CHANNEL_LIST_FILE all have negative values below the surface. Therefore, to ensure backward compatibility, all signs of the variable are inverted here. And porous_Dmax[UV] = shallowest point, porous_Dmin[UV] = deepest point

Parameters
  • G [inout]

    The dynamic horizontal grid type

  • param_file [in]

    Parameter file structure

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_shared_initialization::set_subgrid_topo_at_vel_from_file calls cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_io MOM_io cluster_mom_io_infra MOM_io_infra cluster_mom_shared_initialization MOM_shared_initialization cluster_mom_string_functions MOM_string_functions mom_domain_infra::interface::pass_vector pass_vector (interface) mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave 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_io::interface::mom_read_vector MOM_read_vector (interface) mom_io_infra::interface::file_exists file_exists (interface) mom_shared_initialization::set_subgrid_topo_at_vel_from_file set_subgrid_topo_at_vel_from_file mom_shared_initialization::set_subgrid_topo_at_vel_from_file->mom_domain_infra::interface::pass_vector mom_shared_initialization::set_subgrid_topo_at_vel_from_file->mom_error_handler::calltree_enter mom_shared_initialization::set_subgrid_topo_at_vel_from_file->mom_error_handler::calltree_leave mom_shared_initialization::set_subgrid_topo_at_vel_from_file->mom_error_handler::mom_error mom_shared_initialization::set_subgrid_topo_at_vel_from_file->mom_file_parser::interface::get_param mom_shared_initialization::set_subgrid_topo_at_vel_from_file->mom_file_parser::interface::log_param mom_shared_initialization::set_subgrid_topo_at_vel_from_file->mom_io::interface::mom_read_vector mom_shared_initialization::set_subgrid_topo_at_vel_from_file->mom_io_infra::interface::file_exists mom_string_functions::slasher slasher mom_shared_initialization::set_subgrid_topo_at_vel_from_file->mom_string_functions::slasher
Text view
Callers call graph
Callers of mom_shared_initialization::set_subgrid_topo_at_vel_from_file calls cluster_mom_fixed_initialization MOM_fixed_initialization cluster_mom_shared_initialization MOM_shared_initialization mom_fixed_initialization::mom_initialize_fixed MOM_initialize_fixed mom_shared_initialization::set_subgrid_topo_at_vel_from_file set_subgrid_topo_at_vel_from_file mom_fixed_initialization::mom_initialize_fixed->mom_shared_initialization::set_subgrid_topo_at_vel_from_file
Text view
subroutine set_velocity_depth_max(G)

Set the bathymetry at velocity points to be the maximum of the depths at the neighoring tracer points.

Parameters
  • G [inout]

    The dynamic horizontal grid

Callers call graph
Callers of mom_shared_initialization::set_velocity_depth_max calls cluster_mom_fixed_initialization MOM_fixed_initialization cluster_mom_shared_initialization MOM_shared_initialization mom_fixed_initialization::mom_initialize_fixed MOM_initialize_fixed mom_shared_initialization::set_velocity_depth_max set_velocity_depth_max mom_fixed_initialization::mom_initialize_fixed->mom_shared_initialization::set_velocity_depth_max
Text view
subroutine set_velocity_depth_min(G)

Set the bathymetry at velocity points to be the minimum of the depths at the neighoring tracer points.

Parameters
  • G [inout]

    The dynamic horizontal grid

Callers call graph
Callers of mom_shared_initialization::set_velocity_depth_min calls cluster_mom_fixed_initialization MOM_fixed_initialization cluster_mom_shared_initialization MOM_shared_initialization mom_fixed_initialization::mom_initialize_fixed MOM_initialize_fixed mom_shared_initialization::set_velocity_depth_min set_velocity_depth_min mom_fixed_initialization::mom_initialize_fixed->mom_shared_initialization::set_velocity_depth_min
Text view
subroutine compute_global_grid_integrals(G, US)

Pre-compute global integrals of grid quantities (like masked ocean area) for later use in reporting diagnostics

Parameters
  • G [inout]

    The dynamic horizontal grid

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_shared_initialization::compute_global_grid_integrals calls cluster_mom_coms MOM_coms cluster_mom_error_handler MOM_error_handler cluster_mom_shared_initialization MOM_shared_initialization mom_coms::interface::reproducing_sum reproducing_sum (interface) mom_error_handler::mom_error MOM_error mom_shared_initialization::compute_global_grid_integrals compute_global_grid_integrals mom_shared_initialization::compute_global_grid_integrals->mom_coms::interface::reproducing_sum mom_shared_initialization::compute_global_grid_integrals->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_shared_initialization::compute_global_grid_integrals calls cluster_mom_fixed_initialization MOM_fixed_initialization cluster_mom_shared_initialization MOM_shared_initialization mom_fixed_initialization::mom_initialize_fixed MOM_initialize_fixed mom_shared_initialization::compute_global_grid_integrals compute_global_grid_integrals mom_fixed_initialization::mom_initialize_fixed->mom_shared_initialization::compute_global_grid_integrals
Text view
subroutine write_ocean_geometry_file(G, param_file, directory, US, geom_file)

Write out a file describing the topography, Coriolis parameter, grid locations and various other fixed fields from the grid.

Parameters
  • G [inout]

    The dynamic horizontal grid

  • param_file [in]

    Parameter file structure

  • directory [in]

    The directory into which to place the geometry file.

  • US [in]

    A dimensional unit scaling type

  • geom_file [in]

    If present, the name of the geometry file (otherwise the file is "ocean_geometry")

Callees call graph
Callees of mom_shared_initialization::write_ocean_geometry_file calls cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_io MOM_io cluster_mom_shared_initialization MOM_shared_initialization mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave mom_file_parser::interface::get_param get_param (interface) mom_io::create_mom_file create_MOM_file mom_io::insert_ensemble_appendix insert_ensemble_appendix mom_io::interface::mom_write_field MOM_write_field (interface) mom_io::var_desc var_desc mom_shared_initialization::write_ocean_geometry_file write_ocean_geometry_file mom_shared_initialization::write_ocean_geometry_file->mom_error_handler::calltree_enter mom_shared_initialization::write_ocean_geometry_file->mom_error_handler::calltree_leave mom_shared_initialization::write_ocean_geometry_file->mom_file_parser::interface::get_param mom_shared_initialization::write_ocean_geometry_file->mom_io::create_mom_file mom_shared_initialization::write_ocean_geometry_file->mom_io::insert_ensemble_appendix mom_shared_initialization::write_ocean_geometry_file->mom_io::interface::mom_write_field mom_shared_initialization::write_ocean_geometry_file->mom_io::var_desc
Text view
Callers call graph
Callers of mom_shared_initialization::write_ocean_geometry_file calls cluster_mom MOM cluster_mom_shared_initialization MOM_shared_initialization mom::initialize_mom initialize_MOM mom_shared_initialization::write_ocean_geometry_file write_ocean_geometry_file mom::initialize_mom->mom_shared_initialization::write_ocean_geometry_file
Text view
API generated with Flint · Rendered from reStructuredText