mom_domains module reference

Describes the decomposed MOM domain and has routines for communications across PEs.

More…

Functions/Subroutines

mom_domains_init()

These encoding constants are used to indicate the staggering of scalars and vectors.

mom_define_layout()

Given a global array size and a number of (logical) processors, provide a layout of the processors in the two directions where the total number of processors is the product of the two layouts and number of points in the partitioned arrays are as close as possible to an aspect ratio of 1.

gen_auto_mask_table()

Given a desired number of active npes, generate a layout and mask_table.

determine_land_blocks()

Given a number of domain divisions, compute the max number of land blocks that can be eliminated, and return the resulting mask table if requested.

write_auto_mask_file()

Write out the auto-generated mask information to a file in the run directory.

Detailed Description

Describes the decomposed MOM domain and has routines for communications across PEs.

Function/Subroutine Documentation

subroutine mom_domains/mom_domains_init(MOM_dom, param_file, symmetric, static_memory, NIHALO, NJHALO, NIGLOBAL, NJGLOBAL, NIPROC, NJPROC, min_halo, domain_name, include_name, param_suffix, US)

These encoding constants are used to indicate the staggering of scalars and vectors.

These encoding constants are used to indicate the discretization position of a variable These encoding constants indicate communication patterns. In practice they can be added. MOM_domains_init initializes a MOM_domain_type variable, based on the information read in from a param_file_type, and optionally returns data describing various properties of the domain type.

Parameters:
  • mom_dom :: A pointer to the MOM_domain_type being defined here.

  • param_file :: [in] A structure to parse for run-time parameters

  • symmetric :: [in] If present, this specifies whether this domain is symmetric, regardless of whether the macro SYMMETRIC_MEMORY_ is defined.

  • static_memory :: [in] If present and true, this domain type is set up for static memory and error checking of various input values is performed against those in the input file.

  • nihalo :: [in] Default halo sizes, required with static memory.

  • njhalo :: [in] Default halo sizes, required with static memory.

  • niglobal :: [in] Total domain sizes, required with static memory.

  • njglobal :: [in] Total domain sizes, required with static memory.

  • niproc :: [in] Processor counts, required with static memory.

  • njproc :: [in] Processor counts, required with static memory.

  • min_halo :: [inout] If present, this sets the minimum halo size for this domain in the i- and j- directions, and returns the actual halo size used.

  • domain_name :: [in] A name for this domain, “MOM” if missing.

  • include_name :: [in] A name for model’s include file, “MOM_memory.h” if missing.

  • param_suffix :: [in] A suffix to apply to layout-specific parameters.

  • us :: A dimensional unit scaling type

Call to:

gen_auto_mask_table mom_define_layout mom_error_handler::mom_error mom_error_handler::mom_mesg mom_string_functions::slasher

Called from:

mom_oda_driver_mod::init_oda

subroutine mom_domains/mom_define_layout(n_global, ndivs, layout)

Given a global array size and a number of (logical) processors, provide a layout of the processors in the two directions where the total number of processors is the product of the two layouts and number of points in the partitioned arrays are as close as possible to an aspect ratio of 1.

Parameters:
  • n_global :: [in] The total number of gridpoints in 2 directions

  • ndivs :: [in] The total number of (logical) PEs

  • layout :: [out] The generated layout of PEs

Called from:

gen_auto_mask_table mom_domains_init

subroutine mom_domains/gen_auto_mask_table(n_global, reentrant, tripolar_N, npes, param_file, inputdir, filename, layout, US)

Given a desired number of active npes, generate a layout and mask_table.

Parameters:
  • n_global :: [in] The total number of gridpoints in 2 directions

  • reentrant :: [in] True if the x- and y- directions are periodic.

  • tripolar_n :: [in] A flag indicating whether there is n. tripolar connectivity

  • npes :: [in] The desired number of active PEs.

  • param_file :: [in] A structure to parse for run-time parameters

  • inputdir :: [in] INPUTDIR parameter

  • filename :: [in] Mask table file path (to be auto-generated.)

  • layout :: [out] The generated layout of PEs (incl. masked blocks)

  • us :: A dimensional unit scaling type

Call to:

determine_land_blocks mom_define_layout mom_error_handler::mom_error write_auto_mask_file

Called from:

mom_domains_init

subroutine mom_domains/determine_land_blocks(mask, nx, ny, idiv, jdiv, ibuf, jbuf, num_masked_blocks, mask_table)

Given a number of domain divisions, compute the max number of land blocks that can be eliminated, and return the resulting mask table if requested.

Parameters:
  • mask :: [in] cell masks based on depth and MINIMUM_DEPTH

  • nx :: [in] Total number of gridpoints in x-dir (global)

  • ny :: [in] Total number of gridpoints in y-dir (global)

  • idiv :: [in] number of divisions along x-dir

  • jdiv :: [in] number of divisions along y-dir

  • ibuf :: [in] number of buffer cells in x-dir. (not necessarily the same as NIHALO)

  • jbuf :: [in] number of buffer cells in y-dir. (not necessarily the same as NJHALO)

  • num_masked_blocks :: [out] the final number of masked blocks

  • mask_table :: [out] the resulting array of mask_table

Call to:

mom_error_handler::mom_error

Called from:

gen_auto_mask_table

subroutine mom_domains/write_auto_mask_file(mask_table, layout, npes, filename)

Write out the auto-generated mask information to a file in the run directory.

Called from:

gen_auto_mask_table