namespace mom_domains¶
Overview¶
Describes the decomposed MOM domain and has routines for communications across PEs. More…
namespace mom_domains { // interfaces interface clone_mom_domain; interface create_group_pass; interface fill_symmetric_edges; interface pass_var; interface pass_var_complete; interface pass_var_start; interface pass_vector; interface pass_vector_complete; interface pass_vector_start; // global variables integer, parameter, public to_all = To_East + To_West + To_North + To_South; // global functions subroutine, public do_group_pass(group group, MOM_dom MOM_dom, clock clock); subroutine, public start_group_pass(group group, MOM_dom MOM_dom, clock clock); subroutine, public complete_group_pass(group group, MOM_dom MOM_dom, clock clock); subroutine, public mom_domains_init( MOM_dom MOM_dom, param_file param_file, symmetric symmetric, static_memory static_memory, NIHALO NIHALO, NJHALO NJHALO, NIGLOBAL NIGLOBAL, NJGLOBAL NJGLOBAL, NIPROC NIPROC, NJPROC NJPROC, min_halo min_halo, domain_name domain_name, include_name include_name, param_suffix param_suffix ); subroutine, public get_domain_extent( Domain Domain, isc isc, iec iec, jsc jsc, jec jec, isd isd, ied ied, jsd jsd, jed jed, isg isg, ieg ieg, jsg jsg, jeg jeg, idg_offset idg_offset, jdg_offset jdg_offset, symmetric symmetric, local_indexing local_indexing, index_offset index_offset ); subroutine, public get_domain_extent_dsamp2( Domain Domain, isc_d2 isc_d2, iec_d2 iec_d2, jsc_d2 jsc_d2, jec_d2 jec_d2, isd_d2 isd_d2, ied_d2 ied_d2, jsd_d2 jsd_d2, jed_d2 jed_d2, isg_d2 isg_d2, ieg_d2 ieg_d2, jsg_d2 jsg_d2, jeg_d2 jeg_d2 ); subroutine, public get_simple_array_i_ind(domain domain, size size, is is, ie ie, symmetric symmetric); subroutine, public get_simple_array_j_ind(domain domain, size size, js js, je je, symmetric symmetric); subroutine, public get_global_shape(domain domain, niglobal niglobal, njglobal njglobal); } // namespace mom_domains
Detailed Documentation¶
Describes the decomposed MOM domain and has routines for communications across PEs.
Global Variables¶
integer, parameter, public to_all = To_East + To_West + To_North + To_South
A flag for passing in all directions.
Global Functions¶
subroutine, public do_group_pass(group group, MOM_dom MOM_dom, clock clock)
do_group_pass carries out a group halo update.
Parameters:
group |
The data type that store information for group update. This data will be used in do_group_pass. |
mom_dom |
The MOM_domain_type containing the mpp_domain needed to determine where data should be sent. |
clock |
The handle for a cpu time clock that should be started then stopped to time this routine. |
subroutine, public start_group_pass(group group, MOM_dom MOM_dom, clock clock)
start_group_pass starts out a group halo update.
Parameters:
group |
The data type that store information for group update. This data will be used in do_group_pass. |
mom_dom |
The MOM_domain_type containing the mpp_domain needed to determine where data should be sent. |
clock |
The handle for a cpu time clock that should be started then stopped to time this routine. |
subroutine, public complete_group_pass( group group, MOM_dom MOM_dom, clock clock )
complete_group_pass completes a group halo update.
Parameters:
group |
The data type that store information for group update. This data will be used in do_group_pass. |
mom_dom |
The MOM_domain_type containing the mpp_domain needed to determine where data should be sent. |
clock |
The handle for a cpu time clock that should be started then stopped to time this routine. |
subroutine, public mom_domains_init( MOM_dom MOM_dom, param_file param_file, symmetric symmetric, static_memory static_memory, NIHALO NIHALO, NJHALO NJHALO, NIGLOBAL NIGLOBAL, NJGLOBAL NJGLOBAL, NIPROC NIPROC, NJPROC NJPROC, min_halo min_halo, domain_name domain_name, include_name include_name, param_suffix param_suffix )
MOM_domains_init initalizes 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 |
A structure to parse for run-time parameters |
symmetric |
If present, this specifies whether this domain is symmetric, regardless of whether the macro SYMMETRIC_MEMORY_ is defined. |
static_memory |
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 |
Default halo sizes, required with static memory. |
njhalo |
Default halo sizes, required with static memory. |
niglobal |
Total domain sizes, required with static memory. |
njglobal |
Total domain sizes, required with static memory. |
niproc |
Processor counts, required with static memory. |
njproc |
Processor counts, required with static memory. |
min_halo |
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 |
A name for this domain, “MOM” if missing. |
include_name |
A name for model’s include file, “MOM_memory.h” if missing. |
param_suffix |
A suffix to apply to layout-specific parameters. |
subroutine, public get_domain_extent( Domain Domain, isc isc, iec iec, jsc jsc, jec jec, isd isd, ied ied, jsd jsd, jed jed, isg isg, ieg ieg, jsg jsg, jeg jeg, idg_offset idg_offset, jdg_offset jdg_offset, symmetric symmetric, local_indexing local_indexing, index_offset index_offset )
Returns various data that has been stored in a MOM_domain_type.
Parameters:
domain |
The MOM domain from which to extract information |
isc |
The start i-index of the computational domain |
iec |
The end i-index of the computational domain |
jsc |
The start j-index of the computational domain |
jec |
The end j-index of the computational domain |
isd |
The start i-index of the data domain |
ied |
The end i-index of the data domain |
jsd |
The start j-index of the data domain |
jed |
The end j-index of the data domain |
isg |
The start i-index of the global domain |
ieg |
The end i-index of the global domain |
jsg |
The start j-index of the global domain |
jeg |
The end j-index of the global domain |
idg_offset |
The offset between the corresponding global and data i-index spaces. |
jdg_offset |
The offset between the corresponding global and data j-index spaces. |
symmetric |
True if symmetric memory is used. |
local_indexing |
If true, local tracer array indices start at 1, as in most MOM6 code. |
index_offset |
A fixed additional offset to all indices. This can be useful for some types of debugging with dynamic memory allocation. |
subroutine, public get_domain_extent_dsamp2( Domain Domain, isc_d2 isc_d2, iec_d2 iec_d2, jsc_d2 jsc_d2, jec_d2 jec_d2, isd_d2 isd_d2, ied_d2 ied_d2, jsd_d2 jsd_d2, jed_d2 jed_d2, isg_d2 isg_d2, ieg_d2 ieg_d2, jsg_d2 jsg_d2, jeg_d2 jeg_d2 )
Parameters:
domain |
The MOM domain from which to extract information |
isc_d2 |
The start i-index of the computational domain |
iec_d2 |
The end i-index of the computational domain |
jsc_d2 |
The start j-index of the computational domain |
jec_d2 |
The end j-index of the computational domain |
isd_d2 |
The start i-index of the data domain |
ied_d2 |
The end i-index of the data domain |
jsd_d2 |
The start j-index of the data domain |
jed_d2 |
The end j-index of the data domain |
isg_d2 |
The start i-index of the global domain |
ieg_d2 |
The end i-index of the global domain |
jsg_d2 |
The start j-index of the global domain |
jeg_d2 |
The end j-index of the global domain |
subroutine, public get_simple_array_i_ind( domain domain, size size, is is, ie ie, symmetric symmetric )
Return the (potentially symmetric) computational domain i-bounds for an array passed without index specifications (i.e. indices start at 1) based on an array size.
Parameters:
domain |
MOM domain from which to extract information |
size |
The i-array size |
is |
The computational domain starting i-index. |
ie |
The computational domain ending i-index. |
symmetric |
If present, indicates whether symmetric sizes can be considered. |
subroutine, public get_simple_array_j_ind( domain domain, size size, js js, je je, symmetric symmetric )
Return the (potentially symmetric) computational domain j-bounds for an array passed without index specifications (i.e. indices start at 1) based on an array size.
Parameters:
domain |
MOM domain from which to extract information |
size |
The j-array size |
js |
The computational domain starting j-index. |
je |
The computational domain ending j-index. |
symmetric |
If present, indicates whether symmetric sizes can be considered. |
subroutine, public get_global_shape( domain domain, niglobal niglobal, njglobal njglobal )
Returns the global shape of h-point arrays.
Parameters:
domain |
MOM domain |
niglobal |
i-index global size of h-point arrays |
njglobal |
j-index global size of h-point arrays |