MOM6
mom_domains Module Reference

Data Types

interface  clone_mom_domain
 
interface  create_group_pass
 
interface  fill_symmetric_edges
 
type  mom_domain_type
 The MOM_domain_type contains information about the domain decompositoin. More...
 
interface  pass_var
 
interface  pass_var_complete
 
interface  pass_var_start
 
interface  pass_vector
 
interface  pass_vector_complete
 
interface  pass_vector_start
 

Functions/Subroutines

subroutine pass_var_3d (array, MOM_dom, sideflag, complete, position, halo)
 
subroutine pass_var_2d (array, MOM_dom, sideflag, complete, position, halo)
 
integer function pass_var_start_2d (array, MOM_dom, sideflag, position, complete, halo)
 
integer function pass_var_start_3d (array, MOM_dom, sideflag, position, complete, halo)
 
subroutine pass_var_complete_2d (id_update, array, MOM_dom, sideflag, position, halo)
 
subroutine pass_var_complete_3d (id_update, array, MOM_dom, sideflag, position, halo)
 
subroutine pass_vector_2d (u_cmpt, v_cmpt, MOM_dom, direction, stagger, complete, halo)
 
subroutine fill_vector_symmetric_edges_2d (u_cmpt, v_cmpt, MOM_dom, stagger, scalar)
 
subroutine pass_vector_3d (u_cmpt, v_cmpt, MOM_dom, direction, stagger, complete, halo)
 
integer function pass_vector_start_2d (u_cmpt, v_cmpt, MOM_dom, direction, stagger, complete, halo)
 
integer function pass_vector_start_3d (u_cmpt, v_cmpt, MOM_dom, direction, stagger, complete, halo)
 
subroutine pass_vector_complete_2d (id_update, u_cmpt, v_cmpt, MOM_dom, direction, stagger, halo)
 
subroutine pass_vector_complete_3d (id_update, u_cmpt, v_cmpt, MOM_dom, direction, stagger, halo)
 
subroutine create_var_group_pass_2d (group, array, MOM_dom, sideflag, position, halo)
 
subroutine create_var_group_pass_3d (group, array, MOM_dom, sideflag, position, halo)
 
subroutine create_vector_group_pass_2d (group, u_cmpt, v_cmpt, MOM_dom, direction, stagger, halo)
 
subroutine create_vector_group_pass_3d (group, u_cmpt, v_cmpt, MOM_dom, direction, stagger, halo)
 
subroutine, public do_group_pass (group, MOM_dom)
 
subroutine, public start_group_pass (group, MOM_dom)
 
subroutine, public complete_group_pass (group, MOM_dom)
 
subroutine, public mom_domains_init (MOM_dom, param_file, symmetric, static_memory, NIHALO, NJHALO, NIGLOBAL, NJGLOBAL, NIPROC, NJPROC, min_halo, domain_name, include_name, param_suffix)
 
subroutine clone_md_to_md (MD_in, MOM_dom, min_halo, halo_size, symmetric, domain_name)
 
subroutine clone_md_to_d2d (MD_in, mpp_domain, min_halo, halo_size, symmetric, domain_name)
 
subroutine, public get_domain_extent (Domain, isc, iec, jsc, jec, isd, ied, jsd, jed, isg, ieg, jsg, jeg, idg_offset, jdg_offset, symmetric, local_indexing, index_offset)
 

Variables

integer, parameter, public to_all = To_East + To_West + To_North + To_South
 

Function/Subroutine Documentation

◆ clone_md_to_d2d()

subroutine mom_domains::clone_md_to_d2d ( type(mom_domain_type), intent(in)  MD_in,
type(domain2d), intent(inout)  mpp_domain,
integer, dimension(2), intent(inout), optional  min_halo,
integer, intent(in), optional  halo_size,
logical, intent(in), optional  symmetric,
character(len=*), intent(in), optional  domain_name 
)
private

Definition at line 1774 of file MOM_domains.F90.

References mom_error_handler::mom_error().

1774  type(mom_domain_type), intent(in) :: md_in
1775  type(domain2d), intent(inout) :: mpp_domain
1776  integer, dimension(2), optional, intent(inout) :: min_halo
1777  integer, optional, intent(in) :: halo_size
1778  logical, optional, intent(in) :: symmetric
1779  character(len=*), optional, intent(in) :: domain_name
1780 
1781  integer :: global_indices(4), layout(2), io_layout(2)
1782  integer :: x_flags, y_flags, niglobal, njglobal, nihalo, njhalo
1783  logical :: symmetric_dom
1784  character(len=64) :: dom_name
1785 
1786 ! Save the extra data for creating other domains of different resolution that overlay this domain
1787  niglobal = md_in%niglobal ; njglobal = md_in%njglobal
1788  nihalo = md_in%nihalo ; njhalo = md_in%njhalo
1789 
1790  symmetric_dom = md_in%symmetric
1791 
1792  x_flags = md_in%X_FLAGS ; y_flags = md_in%Y_FLAGS
1793  layout(:) = md_in%layout(:) ; io_layout(:) = md_in%io_layout(:)
1794 
1795  if (present(halo_size) .and. present(min_halo)) call mom_error(fatal, &
1796  "clone_MOM_domain can not have both halo_size and min_halo present.")
1797 
1798  if (present(min_halo)) then
1799  nihalo = max(nihalo, min_halo(1))
1800  njhalo = max(njhalo, min_halo(2))
1801  min_halo(1) = nihalo ; min_halo(2) = njhalo
1802  endif
1803 
1804  if (present(halo_size)) then
1805  nihalo = halo_size ; njhalo = halo_size
1806  endif
1807 
1808  if (present(symmetric)) then ; symmetric_dom = symmetric ; endif
1809 
1810  dom_name = "MOM"
1811  if (present(domain_name)) dom_name = trim(domain_name)
1812 
1813  global_indices(1) = 1 ; global_indices(2) = niglobal
1814  global_indices(3) = 1 ; global_indices(4) = njglobal
1815  if (associated(md_in%maskmap)) then
1816  call mom_define_domain( global_indices, layout, mpp_domain, &
1817  xflags=x_flags, yflags=y_flags, &
1818  xhalo=nihalo, yhalo=njhalo, &
1819  symmetry = symmetric, name=dom_name, &
1820  maskmap=md_in%maskmap )
1821  else
1822  call mom_define_domain( global_indices, layout, mpp_domain, &
1823  xflags=x_flags, yflags=y_flags, &
1824  xhalo=nihalo, yhalo=njhalo, &
1825  symmetry = symmetric, name=dom_name)
1826  endif
1827 
1828  if ((io_layout(1) + io_layout(2) > 0) .and. &
1829  (layout(1)*layout(2) > 1)) then
1830  call mom_define_io_domain(mpp_domain, io_layout)
1831  endif
1832 
Here is the call graph for this function:

◆ clone_md_to_md()

subroutine mom_domains::clone_md_to_md ( type(mom_domain_type), intent(in)  MD_in,
type(mom_domain_type), pointer  MOM_dom,
integer, dimension(2), intent(inout), optional  min_halo,
integer, intent(in), optional  halo_size,
logical, intent(in), optional  symmetric,
character(len=*), intent(in), optional  domain_name 
)
private

Definition at line 1695 of file MOM_domains.F90.

References mom_error_handler::mom_error().

1695  type(mom_domain_type), intent(in) :: md_in
1696  type(mom_domain_type), pointer :: mom_dom
1697  integer, dimension(2), optional, intent(inout) :: min_halo
1698  integer, optional, intent(in) :: halo_size
1699  logical, optional, intent(in) :: symmetric
1700  character(len=*), optional, intent(in) :: domain_name
1701 
1702  integer :: global_indices(4)
1703  logical :: mask_table_exists
1704  character(len=64) :: dom_name
1705 
1706  if (.not.associated(mom_dom)) then
1707  allocate(mom_dom)
1708  allocate(mom_dom%mpp_domain)
1709  endif
1710 
1711 ! Save the extra data for creating other domains of different resolution that overlay this domain
1712  mom_dom%niglobal = md_in%niglobal ; mom_dom%njglobal = md_in%njglobal
1713  mom_dom%nihalo = md_in%nihalo ; mom_dom%njhalo = md_in%njhalo
1714 
1715  mom_dom%symmetric = md_in%symmetric
1716  mom_dom%nonblocking_updates = md_in%nonblocking_updates
1717 
1718  mom_dom%X_FLAGS = md_in%X_FLAGS ; mom_dom%Y_FLAGS = md_in%Y_FLAGS
1719  mom_dom%layout(:) = md_in%layout(:) ; mom_dom%io_layout(:) = md_in%io_layout(:)
1720  mom_dom%use_io_layout = (mom_dom%io_layout(1) + mom_dom%io_layout(2) > 0)
1721 
1722  if (associated(md_in%maskmap)) then
1723  mask_table_exists = .true.
1724  allocate(mom_dom%maskmap(mom_dom%layout(1), mom_dom%layout(2)))
1725  mom_dom%maskmap(:,:) = md_in%maskmap(:,:)
1726  else
1727  mask_table_exists = .false.
1728  endif
1729 
1730  if (present(halo_size) .and. present(min_halo)) call mom_error(fatal, &
1731  "clone_MOM_domain can not have both halo_size and min_halo present.")
1732 
1733  if (present(min_halo)) then
1734  mom_dom%nihalo = max(mom_dom%nihalo, min_halo(1))
1735  min_halo(1) = mom_dom%nihalo
1736  mom_dom%njhalo = max(mom_dom%njhalo, min_halo(2))
1737  min_halo(2) = mom_dom%njhalo
1738  endif
1739 
1740  if (present(halo_size)) then
1741  mom_dom%nihalo = halo_size ; mom_dom%njhalo = halo_size
1742  endif
1743 
1744  if (present(symmetric)) then ; mom_dom%symmetric = symmetric ; endif
1745 
1746  dom_name = "MOM"
1747  if (present(domain_name)) dom_name = trim(domain_name)
1748 
1749  global_indices(1) = 1 ; global_indices(2) = mom_dom%niglobal
1750  global_indices(3) = 1 ; global_indices(4) = mom_dom%njglobal
1751  if (mask_table_exists) then
1752  call mom_define_domain( global_indices, mom_dom%layout, mom_dom%mpp_domain, &
1753  xflags=mom_dom%X_FLAGS, yflags=mom_dom%Y_FLAGS, &
1754  xhalo=mom_dom%nihalo, yhalo=mom_dom%njhalo, &
1755  symmetry = mom_dom%symmetric, name=dom_name, &
1756  maskmap=mom_dom%maskmap )
1757  else
1758  call mom_define_domain( global_indices, mom_dom%layout, mom_dom%mpp_domain, &
1759  xflags=mom_dom%X_FLAGS, yflags=mom_dom%Y_FLAGS, &
1760  xhalo=mom_dom%nihalo, yhalo=mom_dom%njhalo, &
1761  symmetry = mom_dom%symmetric, name=dom_name)
1762  endif
1763 
1764  if ((mom_dom%io_layout(1) + mom_dom%io_layout(2) > 0) .and. &
1765  (mom_dom%layout(1)*mom_dom%layout(2) > 1)) then
1766  call mom_define_io_domain(mom_dom%mpp_domain, mom_dom%io_layout)
1767  endif
1768 
Here is the call graph for this function:

◆ complete_group_pass()

subroutine, public mom_domains::complete_group_pass ( type(group_pass_type), intent(inout)  group,
type(mom_domain_type), intent(inout)  MOM_dom 
)
Parameters
[in,out]groupThe data type that store information for group update. This data will be used in do_group_pass.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent.

Definition at line 1239 of file MOM_domains.F90.

Referenced by mom_barotropic::btstep(), mom_internal_tides::propagate_int_tide(), mom::step_mom(), and mom_dynamics_split_rk2::step_mom_dyn_split_rk2().

1239  type(group_pass_type), intent(inout) :: group !< The data type that store information for
1240  !! group update. This data will be used in
1241  !! do_group_pass.
1242  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
1243  !! needed to determine where data should be
1244  !! sent.
1245  real :: d_type
1246 
1247 ! Arguments:
1248 ! (inout) group - The data type that store information for group update.
1249 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
1250 ! determine where data should be sent.
1251 
1252  call mpp_complete_group_update(group, mom_dom%mpp_domain, d_type)
1253 
Here is the caller graph for this function:

◆ create_var_group_pass_2d()

subroutine mom_domains::create_var_group_pass_2d ( type(group_pass_type), intent(inout)  group,
real, dimension(:,:), intent(inout)  array,
type(mom_domain_type), intent(inout)  MOM_dom,
integer, intent(in), optional  sideflag,
integer, intent(in), optional  position,
integer, intent(in), optional  halo 
)
private
Parameters
[in,out]groupThe data type that store information for group update. This data will be used in do_group_pass.
[in,out]arrayThe array which is having its halos points exchanged.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent.
[in]sideflagAn optional integer indicating which directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH. For example, TO_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO_ALL is the default if sideflag is omitted.
[in]positionAn optional argument indicating the position. This is usally CORNER, but is CENTER by default.
[in]haloThe size of the halo to update - the full halo by default.

Definition at line 956 of file MOM_domains.F90.

References to_all.

956  type(group_pass_type), intent(inout) :: group !< The data type that store information for
957  !! group update. This data will be used in
958  !! do_group_pass.
959  real, dimension(:,:), intent(inout) :: array !< The array which is having its halos points
960  !! exchanged.
961  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
962  !! needed to determine where data should be
963  !! sent.
964  integer, optional, intent(in) :: sideflag !< An optional integer indicating which
965  !! directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST,
966  !! TO_NORTH, and TO_SOUTH. For example, TO_EAST sends the data to the processor to the east,
967  !! so the halos on the western side are filled. TO_ALL is the default if sideflag is omitted.
968  integer, optional, intent(in) :: position !< An optional argument indicating the position.
969  !! This is usally CORNER, but is CENTER
970  !! by default.
971  integer, optional, intent(in) :: halo !< The size of the halo to update - the full
972  !! halo by default.
973 ! Arguments:
974 ! (inout) group - The data type that store information for group update.
975 ! This data will be used in do_group_pass.
976 ! (inout) array - The array which is having its halos points exchanged.
977 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
978 ! determine where data should be sent.
979 ! (in,opt) sideflag - An optional integer indicating which directions the
980 ! data should be sent. It is TO_ALL or the sum of any of
981 ! TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH. For example,
982 ! TO_EAST sends the data to the processor to the east, so
983 ! the halos on the western side are filled. TO_ALL is
984 ! the default if sideflag is omitted.
985 ! (in,opt) position - An optional argument indicating the position. This is
986 ! may be CORNER, but is CENTER by default.
987 ! (in,opt) halo - The size of the halo to update - the full halo by default.
988  integer :: dirflag
989 
990  dirflag = to_all ! 60
991  if (present(sideflag)) then ; if (sideflag > 0) dirflag = sideflag ; endif
992 
993  if (mpp_group_update_initialized(group)) then
994  call mpp_reset_group_update_field(group,array)
995  elseif (present(halo) .and. mom_dom%thin_halo_updates) then
996  call mpp_create_group_update(group, array, mom_dom%mpp_domain, flags=dirflag, &
997  position=position, whalo=halo, ehalo=halo, &
998  shalo=halo, nhalo=halo)
999  else
1000  call mpp_create_group_update(group, array, mom_dom%mpp_domain, flags=dirflag, &
1001  position=position)
1002  endif
1003 

◆ create_var_group_pass_3d()

subroutine mom_domains::create_var_group_pass_3d ( type(group_pass_type), intent(inout)  group,
real, dimension(:,:,:), intent(inout)  array,
type(mom_domain_type), intent(inout)  MOM_dom,
integer, intent(in), optional  sideflag,
integer, intent(in), optional  position,
integer, intent(in), optional  halo 
)
private
Parameters
[in,out]groupThe data type that store information for group update. This data will be used in do_group_pass.
[in,out]arrayThe array which is having its halos points exchanged.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent.
[in]sideflagAn optional integer indicating which directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH. For example, TO_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO_ALL is the default if sideflag is omitted.
[in]positionAn optional argument indicating the position. This is usally CORNER, but is CENTER by default.
[in]haloThe size of the halo to update - the full halo by default.

Definition at line 1008 of file MOM_domains.F90.

References to_all.

1008  type(group_pass_type), intent(inout) :: group !< The data type that store information for
1009  !! group update. This data will be used in
1010  !! do_group_pass.
1011  real, dimension(:,:,:), intent(inout) :: array !< The array which is having its halos points
1012  !! exchanged.
1013  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
1014  !! needed to determine where data should be
1015  !! sent.
1016  integer, optional, intent(in) :: sideflag !< An optional integer indicating which
1017  !! directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST,
1018  !! TO_NORTH, and TO_SOUTH. For example, TO_EAST sends the data to the processor to the east,
1019  !! so the halos on the western side are filled. TO_ALL is the default if sideflag is omitted.
1020  integer, optional, intent(in) :: position !< An optional argument indicating the position.
1021  !! This is usally CORNER, but is CENTER
1022  !! by default.
1023  integer, optional, intent(in) :: halo !< The size of the halo to update - the full
1024  !! halo by default.
1025 ! Arguments:
1026 ! (inout) group - The data type that store information for group update.
1027 ! This data will be used in do_group_pass.
1028 ! (inout) array - The array which is having its halos points exchanged.
1029 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
1030 ! determine where data should be sent.
1031 ! (in,opt) sideflag - An optional integer indicating which directions the
1032 ! data should be sent. It is TO_ALL or the sum of any of
1033 ! TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH. For example,
1034 ! TO_EAST sends the data to the processor to the east, so
1035 ! the halos on the western side are filled. TO_ALL is
1036 ! the default if sideflag is omitted.
1037 ! (in,opt) position - An optional argument indicating the position. This is
1038 ! may be CORNER, but is CENTER by default.
1039 ! (in,opt) halo - The size of the halo to update - the full halo by default.
1040  integer :: dirflag
1041 
1042  dirflag = to_all ! 60
1043  if (present(sideflag)) then ; if (sideflag > 0) dirflag = sideflag ; endif
1044 
1045  if (mpp_group_update_initialized(group)) then
1046  call mpp_reset_group_update_field(group,array)
1047  elseif (present(halo) .and. mom_dom%thin_halo_updates) then
1048  call mpp_create_group_update(group, array, mom_dom%mpp_domain, flags=dirflag, &
1049  position=position, whalo=halo, ehalo=halo, &
1050  shalo=halo, nhalo=halo)
1051  else
1052  call mpp_create_group_update(group, array, mom_dom%mpp_domain, flags=dirflag, &
1053  position=position)
1054  endif
1055 

◆ create_vector_group_pass_2d()

subroutine mom_domains::create_vector_group_pass_2d ( type(group_pass_type), intent(inout)  group,
real, dimension(:,:), intent(inout)  u_cmpt,
real, dimension(:,:), intent(inout)  v_cmpt,
type(mom_domain_type), intent(inout)  MOM_dom,
integer, intent(in), optional  direction,
integer, intent(in), optional  stagger,
integer, intent(in), optional  halo 
)
private
Parameters
[in,out]groupThe data type that store information for group update. This data will be used in do_group_pass.
[in,out]u_cmptThe nominal zonal (u) component of the vector pair which is having its halos points exchanged.
[in,out]v_cmptThe nominal meridional (v) component of the vector pair which is having its halos points exchanged.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent
[in]directionAn optional integer indicating which directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH, possibly plus SCALAR_PAIR if these are paired non-directional scalars discretized at the typical vector component locations. For example, TO_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO_ALL is the default if omitted.
[in]staggerAn optional flag, which may be one of A_GRID, BGRID_NE, or CGRID_NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to CGRID_NE.
[in]haloThe size of the halo to update - the full halo by default.

Definition at line 1060 of file MOM_domains.F90.

References to_all.

1060  type(group_pass_type), intent(inout) :: group !< The data type that store information for
1061  !! group update. This data will be used in
1062  !! do_group_pass.
1063  real, dimension(:,:), intent(inout) :: u_cmpt !< The nominal zonal (u) component of the vector
1064  !! pair which is having its halos points
1065  !! exchanged.
1066  real, dimension(:,:), intent(inout) :: v_cmpt !< The nominal meridional (v) component of the
1067  !! vector pair which is having its halos points
1068  !! exchanged.
1069 
1070  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
1071  !! needed to determine where data should be
1072  !! sent
1073  integer, optional, intent(in) :: direction !< An optional integer indicating which
1074  !! directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST,
1075  !! TO_NORTH, and TO_SOUTH, possibly plus SCALAR_PAIR if these are paired non-directional
1076  !! scalars discretized at the typical vector component locations. For example, TO_EAST sends
1077  !! the data to the processor to the east, so the halos on the western side are filled. TO_ALL
1078  !! is the default if omitted.
1079  integer, optional, intent(in) :: stagger !< An optional flag, which may be one of A_GRID,
1080  !! BGRID_NE, or CGRID_NE, indicating where the two components of the vector are
1081  !! discretized. Omitting stagger is the same as setting it to CGRID_NE.
1082  integer, optional, intent(in) :: halo !< The size of the halo to update - the full
1083  !! halo by default.
1084 ! Arguments:
1085 ! (inout) group - The data type that store information for group update.
1086 ! This data will be used in do_group_pass.
1087 ! (inout) u_cmpt - The nominal zonal (u) component of the vector pair which
1088 ! is having its halos points exchanged.
1089 ! (inout) v_cmpt - The nominal meridional (v) component of the vector pair
1090 ! which is having its halos points exchanged.
1091 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
1092 ! determine where data should be sent.
1093 ! (in) direction - An optional integer indicating which directions the
1094 ! data should be sent. It is TO_ALL or the sum of any of
1095 ! TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH, possibly
1096 ! plus SCALAR_PAIR if these are paired non-directional
1097 ! scalars discretized at the typical vector component
1098 ! locations. For example, TO_EAST sends the data to the
1099 ! processor to the east, so the halos on the western
1100 ! side are filled. TO_ALL is the default if omitted.
1101 ! (in) stagger - An optional flag, which may be one of A_GRID, BGRID_NE,
1102 ! or CGRID_NE, indicating where the two components of the
1103 ! vector are discretized. Omitting stagger is the same as
1104 ! setting it to CGRID_NE.
1105 ! (in,opt) halo - The size of the halo to update - the full halo by default.
1106  integer :: stagger_local
1107  integer :: dirflag
1108 
1109  stagger_local = cgrid_ne ! Default value for type of grid
1110  if (present(stagger)) stagger_local = stagger
1111 
1112  dirflag = to_all ! 60
1113  if (present(direction)) then ; if (direction > 0) dirflag = direction ; endif
1114 
1115  if (mpp_group_update_initialized(group)) then
1116  call mpp_reset_group_update_field(group,u_cmpt, v_cmpt)
1117  elseif (present(halo) .and. mom_dom%thin_halo_updates) then
1118  call mpp_create_group_update(group, u_cmpt, v_cmpt, mom_dom%mpp_domain, &
1119  flags=dirflag, gridtype=stagger_local, whalo=halo, ehalo=halo, &
1120  shalo=halo, nhalo=halo)
1121  else
1122  call mpp_create_group_update(group, u_cmpt, v_cmpt, mom_dom%mpp_domain, &
1123  flags=dirflag, gridtype=stagger_local)
1124  endif
1125 

◆ create_vector_group_pass_3d()

subroutine mom_domains::create_vector_group_pass_3d ( type(group_pass_type), intent(inout)  group,
real, dimension(:,:,:), intent(inout)  u_cmpt,
real, dimension(:,:,:), intent(inout)  v_cmpt,
type(mom_domain_type), intent(inout)  MOM_dom,
integer, intent(in), optional  direction,
integer, intent(in), optional  stagger,
integer, intent(in), optional  halo 
)
private
Parameters
[in,out]groupThe data type that store information for group update. This data will be used in do_group_pass.
[in,out]u_cmptThe nominal zonal (u) component of the vector pair which is having its halos points exchanged.
[in,out]v_cmptThe nominal meridional (v) component of the vector pair which is having its halos points exchanged.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent.
[in]directionAn optional integer indicating which directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH, possibly plus SCALAR_PAIR if these are paired non-directional scalars discretized at the typical vector component locations. For example, TO_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO_ALL is the default if omitted.
[in]staggerAn optional flag, which may be one of A_GRID, BGRID_NE, or CGRID_NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to CGRID_NE.
[in]haloThe size of the halo to update - the full halo by default.

Definition at line 1130 of file MOM_domains.F90.

References to_all.

1130  type(group_pass_type), intent(inout) :: group !< The data type that store information for
1131  !! group update. This data will be used in
1132  !! do_group_pass.
1133  real, dimension(:,:,:), intent(inout) :: u_cmpt !< The nominal zonal (u) component of the vector
1134  !! pair which is having its halos points
1135  !! exchanged.
1136  real, dimension(:,:,:), intent(inout) :: v_cmpt !< The nominal meridional (v) component of the
1137  !! vector pair which is having its halos points
1138  !! exchanged.
1139 
1140  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
1141  !! needed to determine where data should be
1142  !! sent.
1143  integer, optional, intent(in) :: direction !< An optional integer indicating which
1144  !! directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST,
1145  !! TO_NORTH, and TO_SOUTH, possibly plus SCALAR_PAIR if these are paired non-directional
1146  !! scalars discretized at the typical vector component locations. For example, TO_EAST sends
1147  !! the data to the processor to the east, so the halos on the western side are filled. TO_ALL
1148  !! is the default if omitted.
1149  integer, optional, intent(in) :: stagger !< An optional flag, which may be one of A_GRID,
1150  !! BGRID_NE, or CGRID_NE, indicating where the two components of the vector are
1151  !! discretized. Omitting stagger is the same as setting it to CGRID_NE.
1152  integer, optional, intent(in) :: halo !< The size of the halo to update - the full
1153  !! halo by default.
1154 ! Arguments:
1155 ! (inout) group - The data type that store information for group update.
1156 ! This data will be used in do_group_pass.
1157 ! (inout) u_cmpt - The nominal zonal (u) component of the vector pair which
1158 ! is having its halos points exchanged.
1159 ! (inout) v_cmpt - The nominal meridional (v) component of the vector pair
1160 ! which is having its halos points exchanged.
1161 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
1162 ! determine where data should be sent.
1163 ! (in) direction - An optional integer indicating which directions the
1164 ! data should be sent. It is TO_ALL or the sum of any of
1165 ! TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH, possibly
1166 ! plus SCALAR_PAIR if these are paired non-directional
1167 ! scalars discretized at the typical vector component
1168 ! locations. For example, TO_EAST sends the data to the
1169 ! processor to the east, so the halos on the western
1170 ! side are filled. TO_ALL is the default if omitted.
1171 ! (in) stagger - An optional flag, which may be one of A_GRID, BGRID_NE,
1172 ! or CGRID_NE, indicating where the two components of the
1173 ! vector are discretized. Omitting stagger is the same as
1174 ! setting it to CGRID_NE.
1175 ! (in,opt) halo - The size of the halo to update - the full halo by default.
1176 
1177  integer :: stagger_local
1178  integer :: dirflag
1179 
1180  stagger_local = cgrid_ne ! Default value for type of grid
1181  if (present(stagger)) stagger_local = stagger
1182 
1183  dirflag = to_all ! 60
1184  if (present(direction)) then ; if (direction > 0) dirflag = direction ; endif
1185 
1186  if (mpp_group_update_initialized(group)) then
1187  call mpp_reset_group_update_field(group,u_cmpt, v_cmpt)
1188  elseif (present(halo) .and. mom_dom%thin_halo_updates) then
1189  call mpp_create_group_update(group, u_cmpt, v_cmpt, mom_dom%mpp_domain, &
1190  flags=dirflag, gridtype=stagger_local, whalo=halo, ehalo=halo, &
1191  shalo=halo, nhalo=halo)
1192  else
1193  call mpp_create_group_update(group, u_cmpt, v_cmpt, mom_dom%mpp_domain, &
1194  flags=dirflag, gridtype=stagger_local)
1195  endif
1196 

◆ do_group_pass()

subroutine, public mom_domains::do_group_pass ( type(group_pass_type), intent(inout)  group,
type(mom_domain_type), intent(inout)  MOM_dom 
)
Parameters
[in,out]groupThe data type that store information for group update. This data will be used in do_group_pass.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent.

Definition at line 1201 of file MOM_domains.F90.

Referenced by mom_tracer_advect::advect_tracer(), mom_ale::ale_regrid_accelerated(), mom_bulk_mixed_layer::bulkmixedlayer(), and mom_diabatic_driver::diabatic().

1201  type(group_pass_type), intent(inout) :: group !< The data type that store information for
1202  !! group update. This data will be used in
1203  !! do_group_pass.
1204  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
1205  !! needed to determine where data should be
1206  !! sent.
1207  real :: d_type
1208 
1209 ! Arguments:
1210 ! (inout) group - The data type that store information for group update.
1211 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
1212 ! determine where data should be sent.
1213 
1214  call mpp_do_group_update(group, mom_dom%mpp_domain, d_type)
1215 
Here is the caller graph for this function:

◆ fill_vector_symmetric_edges_2d()

subroutine mom_domains::fill_vector_symmetric_edges_2d ( real, dimension(:,:), intent(inout)  u_cmpt,
real, dimension(:,:), intent(inout)  v_cmpt,
type(mom_domain_type), intent(inout)  MOM_dom,
integer, intent(in), optional  stagger,
logical, intent(in), optional  scalar 
)
private
Parameters
[in,out]u_cmptThe nominal zonal (u) component of the vector pair which is having its halos points exchanged.
[in,out]v_cmptThe nominal meridional (v) component of the vector pair which is having its halos points exchanged.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent.
[in]staggerAn optional flag, which may be one of A_GRID, BGRID_NE, or CGRID_NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to CGRID_NE.
[in]scalarAn optional argument indicating whether.

Definition at line 525 of file MOM_domains.F90.

References to_all.

525  real, dimension(:,:), intent(inout) :: u_cmpt !< The nominal zonal (u) component of the vector
526  !! pair which is having its halos points
527  !! exchanged.
528  real, dimension(:,:), intent(inout) :: v_cmpt !< The nominal meridional (v) component of the
529  !! vector pair which is having its halos points
530  !! exchanged.
531  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
532  !! needed to determine where data should be
533  !! sent.
534  integer, optional, intent(in) :: stagger !< An optional flag, which may be one of A_GRID,
535  !! BGRID_NE, or CGRID_NE, indicating where the two components of the vector are
536  !! discretized. Omitting stagger is the same as setting it to CGRID_NE.
537  logical, optional, intent(in) :: scalar !< An optional argument indicating whether.
538 ! Arguments: u_cmpt - The nominal zonal (u) component of the vector pair which
539 ! is having its halos points exchanged.
540 ! (inout) v_cmpt - The nominal meridional (v) component of the vector pair
541 ! which is having its halos points exchanged.
542 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
543 ! determine where data should be sent.
544 ! (in) stagger - An optional flag, which may be one of A_GRID, BGRID_NE,
545 ! or CGRID_NE, indicating where the two components of the
546 ! vector are discretized. Omitting stagger is the same as
547 ! setting it to CGRID_NE.
548 ! (in) scalar - An optional argument indicating whether
549 
550  integer :: stagger_local
551  integer :: dirflag
552  integer :: i, j, isc, iec, jsc, jec, isd, ied, jsd, jed, iscb, iecb, jscb, jecb
553  real, allocatable, dimension(:) :: sbuff_x, sbuff_y, wbuff_x, wbuff_y
554  logical :: block_til_complete
555 
556  if (.not. mom_dom%symmetric) return
557 
558  stagger_local = cgrid_ne ! Default value for type of grid
559  if (present(stagger)) stagger_local = stagger
560 
561  if (.not.(stagger_local == cgrid_ne .or. stagger_local == bgrid_ne)) return
562 
563  call mpp_get_compute_domain(mom_dom%mpp_domain, isc, iec, jsc, jec)
564  call mpp_get_data_domain(mom_dom%mpp_domain, isd, ied, jsd, jed)
565 
566  ! Adjust isc, etc., to account for the fact that the input arrays indices all
567  ! start at 1 (and are effectively on a SW grid!).
568  isc = isc - (isd-1) ; iec = iec - (isd-1)
569  jsc = jsc - (jsd-1) ; jec = jec - (jsd-1)
570  iscb = isc ; iecb = iec+1 ; jscb = jsc ; jecb = jec+1
571 
572  dirflag = to_all ! 60
573  if (present(scalar)) then ; if (scalar) dirflag = to_all+scalar_pair ; endif
574 
575  if (stagger_local == cgrid_ne) then
576  allocate(wbuff_x(jsc:jec)) ; allocate(sbuff_y(isc:iec))
577  wbuff_x(:) = 0.0 ; sbuff_y(:) = 0.0
578  call mpp_get_boundary(u_cmpt, v_cmpt, mom_dom%mpp_domain, flags=dirflag, &
579  wbufferx=wbuff_x, sbuffery=sbuff_y, &
580  gridtype=cgrid_ne)
581  do i=isc,iec
582  v_cmpt(i,jscb) = sbuff_y(i)
583  enddo
584  do j=jsc,jec
585  u_cmpt(iscb,j) = wbuff_x(j)
586  enddo
587  deallocate(wbuff_x) ; deallocate(sbuff_y)
588  elseif (stagger_local == bgrid_ne) then
589  allocate(wbuff_x(jscb:jecb)) ; allocate(sbuff_x(iscb:iecb))
590  allocate(wbuff_y(jscb:jecb)) ; allocate(sbuff_y(iscb:iecb))
591  wbuff_x(:) = 0.0 ; wbuff_y(:) = 0.0 ; sbuff_x(:) = 0.0 ; sbuff_y(:) = 0.0
592  call mpp_get_boundary(u_cmpt, v_cmpt, mom_dom%mpp_domain, flags=dirflag, &
593  wbufferx=wbuff_x, sbufferx=sbuff_x, &
594  wbuffery=wbuff_y, sbuffery=sbuff_y, &
595  gridtype=bgrid_ne)
596  do i=iscb,iecb
597  u_cmpt(i,jscb) = sbuff_x(i) ; v_cmpt(i,jscb) = sbuff_y(i)
598  enddo
599  do j=jscb,jecb
600  u_cmpt(iscb,j) = wbuff_x(j) ; v_cmpt(iscb,j) = wbuff_y(j)
601  enddo
602  deallocate(wbuff_x) ; deallocate(sbuff_x)
603  deallocate(wbuff_y) ; deallocate(sbuff_y)
604  endif
605 

◆ get_domain_extent()

subroutine, public mom_domains::get_domain_extent ( type(mom_domain_type), intent(in)  Domain,
integer, intent(out)  isc,
integer, intent(out)  iec,
integer, intent(out)  jsc,
integer, intent(out)  jec,
integer, intent(out)  isd,
integer, intent(out)  ied,
integer, intent(out)  jsd,
integer, intent(out)  jed,
integer, intent(out)  isg,
integer, intent(out)  ieg,
integer, intent(out)  jsg,
integer, intent(out)  jeg,
integer, intent(out)  idg_offset,
integer, intent(out)  jdg_offset,
logical, intent(out)  symmetric,
logical, intent(in), optional  local_indexing,
integer, intent(in), optional  index_offset 
)
Parameters
[out]jecThe start & end indices of the computational domain.
[out]jedThe start & end indices of the data domain.
[out]jegThe start & end indices of the global domain.
[out]jdg_offsetThe offset between the corresponding global and data index spaces.
[out]symmetricTrue if symmetric memory is used.
[in]local_indexingIf true, local tracer array indices start at 1,
[in]index_offsetA fixed additional offset to all indices. This

Definition at line 1839 of file MOM_domains.F90.

Referenced by mom_hor_index::hor_index_init(), and mom_grid::mom_grid_init().

1839  type(mom_domain_type), &
1840  intent(in) :: domain
1841  integer, intent(out) :: isc, iec, jsc, jec !< The start & end indices of the computational
1842  !! domain.
1843  integer, intent(out) :: isd, ied, jsd, jed !< The start & end indices of the data domain.
1844  integer, intent(out) :: isg, ieg, jsg, jeg !< The start & end indices of the global domain.
1845  integer, intent(out) :: idg_offset, jdg_offset !< The offset between the corresponding global and
1846  !! data index spaces.
1847  logical, intent(out) :: symmetric !< True if symmetric memory is used.
1848  logical, optional, &
1849  intent(in) :: local_indexing !< If true, local tracer array indices start at 1,
1850  !! as in most MOM6 or GOLD code.
1851  integer, optional, &
1852  intent(in) :: index_offset !< A fixed additional offset to all indices. This
1853  !! can be useful for some types of debugging with
1854  !! dynamic memory allocation.
1855 
1856 ! Arguments: Domain - The MOM_domain_type from which the indices are extracted.
1857 ! (out) isc, iec, jsc, jec - the start & end indices of the
1858 ! computational domain.
1859 ! (out) isd, ied, jsd, jed - the start & end indices of the data domain.
1860 ! (out) isg, ieg, jsg, jeg - the start & end indices of the global domain.
1861 ! (out) idg_offset, jdg_offset - the offset between the corresponding
1862 ! global and data index spaces.
1863 ! (out) symmetric - true if symmetric memory is used.
1864 ! (in,opt) local_indexing - if true, local tracer array indices start at 1, as
1865 ! in most MOM6 or GOLD code.
1866 ! (in,opt) index_offset - A fixed additional offset to all indices. This can
1867 ! be useful for some types of debugging with dynamic
1868 ! memory allocation.
1869 
1870  integer :: ind_off
1871  logical :: local
1872  local = .true. ; if (present(local_indexing)) local = local_indexing
1873  ind_off = 0 ; if (present(index_offset)) ind_off = index_offset
1874 
1875  call mpp_get_compute_domain(domain%mpp_domain, isc, iec, jsc, jec)
1876  call mpp_get_data_domain(domain%mpp_domain, isd, ied, jsd, jed)
1877  call mpp_get_global_domain(domain%mpp_domain, isg, ieg, jsg, jeg)
1878 
1879  ! This code institutes the MOM convention that local array indices start at 1.
1880  if (local) then
1881  idg_offset = isd-1 ; jdg_offset = jsd-1
1882  isc = isc-isd+1 ; iec = iec-isd+1 ; jsc = jsc-jsd+1 ; jec = jec-jsd+1
1883  ied = ied-isd+1 ; jed = jed-jsd+1
1884  isd = 1 ; jsd = 1
1885  else
1886  idg_offset = 0 ; jdg_offset = 0
1887  endif
1888  if (ind_off /= 0) then
1889  idg_offset = idg_offset + ind_off ; jdg_offset = jdg_offset + ind_off
1890  isc = isc + ind_off ; iec = iec + ind_off
1891  jsc = jsc + ind_off ; jec = jec + ind_off
1892  isd = isd + ind_off ; ied = ied + ind_off
1893  jsd = jsd + ind_off ; jed = jed + ind_off
1894  endif
1895  symmetric = domain%symmetric
1896 
Here is the caller graph for this function:

◆ mom_domains_init()

subroutine, public mom_domains::mom_domains_init ( type(mom_domain_type), pointer  MOM_dom,
type(param_file_type), intent(in)  param_file,
logical, intent(in), optional  symmetric,
logical, intent(in), optional  static_memory,
integer, intent(in), optional  NIHALO,
integer, intent(in), optional  NJHALO,
integer, intent(in), optional  NIGLOBAL,
integer, intent(in), optional  NJGLOBAL,
integer, intent(in), optional  NIPROC,
integer, intent(in), optional  NJPROC,
integer, dimension(2), intent(inout), optional  min_halo,
character(len=*), intent(in), optional  domain_name,
character(len=*), intent(in), optional  include_name,
character(len=*), intent(in), optional  param_suffix 
)
Parameters
mom_domA pointer to the MOM_domain_type being defined here.
[in]param_fileA structure to parse for run-time parameters
[in]symmetricIf present, this specifies whether this domain is symmetric, regardless of whether the macro SYMMETRIC_MEMORY_ is defined.
[in]static_memoryIf 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.
[in]nihaloDefault halo sizes, required with static memory.
[in]njhaloDefault halo sizes, required with static memory.
[in]niglobalTotal domain sizes, required with static memory.
[in]njglobalTotal domain sizes, required with static memory.
[in]niprocProcessor counts, required with static memory.
[in]njprocProcessor counts, required with static memory.
[in,out]min_haloIf present, this sets the minimum halo size for this domain in the x- and y- directions, and returns the actual halo size used.
[in]domain_nameA name for this domain, "MOM" if missing.
[in]include_nameA name for model's include file, "MOM_memory.h" if missing.
[in]param_suffixA suffix to apply to layout-specific parameters.

Definition at line 1260 of file MOM_domains.F90.

References mom_error_handler::mom_error(), mom_error_handler::mom_mesg(), and mom_string_functions::slasher().

1260  type(mom_domain_type), pointer :: mom_dom !< A pointer to the MOM_domain_type
1261  !! being defined here.
1262  type(param_file_type), intent(in) :: param_file !< A structure to parse for
1263  !! run-time parameters
1264  logical, optional, intent(in) :: symmetric !< If present, this specifies
1265  !! whether this domain is symmetric, regardless of
1266  !! whether the macro SYMMETRIC_MEMORY_ is defined.
1267  logical, optional, intent(in) :: static_memory !< If present and true, this
1268  !! domain type is set up for static memory and error checking of
1269  !! various input values is performed against those in the input file.
1270  integer, optional, intent(in) :: nihalo !< Default halo sizes, required
1271  !! with static memory.
1272  integer, optional, intent(in) :: njhalo !< Default halo sizes, required
1273  !! with static memory.
1274  integer, optional, intent(in) :: niglobal !< Total domain sizes, required
1275  !! with static memory.
1276  integer, optional, intent(in) :: njglobal !< Total domain sizes, required
1277  !! with static memory.
1278  integer, optional, intent(in) :: niproc !< Processor counts, required with
1279  !! static memory.
1280  integer, optional, intent(in) :: njproc !< Processor counts, required with
1281  !! static memory.
1282  integer, dimension(2), optional, intent(inout) :: min_halo !< If present, this sets the
1283  !! minimum halo size for this domain in the x- and y-
1284  !! directions, and returns the actual halo size used.
1285  character(len=*), optional, intent(in) :: domain_name !< A name for this domain, "MOM"
1286  !! if missing.
1287  character(len=*), optional, intent(in) :: include_name !< A name for model's include file,
1288  !! "MOM_memory.h" if missing.
1289  character(len=*), optional, intent(in) :: param_suffix !< A suffix to apply to
1290  !! layout-specific parameters.
1291 
1292 
1293 ! Arguments: MOM_dom - A pointer to the MOM_domain_type being defined here.
1294 ! (in) param_file - A structure indicating the open file to parse for
1295 ! model parameter values.
1296 ! (in,opt) symmetric - If present, this specifies whether this domain
1297 ! is symmetric, regardless of whether the macro
1298 ! SYMMETRIC_MEMORY_ is defined.
1299 ! (in,opt) static_memory - If present and true, this domain type is set up for
1300 ! static memory and error checking of various input
1301 ! values is performed against those in the input file.
1302 ! (in,opt) NIHALO, NJHALO - Default halo sizes, required with static memory.
1303 ! (in,opt) NIGLOBAL, NJGLOBAL - Total domain sizes, required with static memory.
1304 ! (in,opt) NIPROC, NJPROC - Processor counts, required with static memory.
1305 ! (in,opt) min_halo - If present, this sets the minimum halo size for this
1306 ! domain in the x- and y- directions, and returns the
1307 ! actual halo size used.
1308 ! (in,opt) domain_name - A name for this domain, "MOM" if missing.
1309 ! (in,opt) include_name - A name for model's include file, "MOM_memory.h" if missing.
1310 ! (in,opt) param_suffix - A suffix to apply to layout-specific parameters.
1311 
1312  integer, dimension(2) :: layout = (/ 1, 1 /)
1313  integer, dimension(2) :: io_layout = (/ 0, 0 /)
1314  integer, dimension(4) :: global_indices
1315 !$ integer :: ocean_nthreads ! Number of Openmp threads
1316 !$ integer :: get_cpu_affinity, omp_get_thread_num, omp_get_num_threads
1317 !$ integer :: omp_cores_per_node, adder, base_cpu
1318 !$ logical :: ocean_omp_hyper_thread
1319  integer :: nihalo_dflt, njhalo_dflt
1320  integer :: pe, proc_used
1321  integer :: x_flags, y_flags
1322  logical :: reentrant_x, reentrant_y, tripolar_n, is_static
1323  logical :: mask_table_exists
1324  character(len=128) :: mask_table, inputdir
1325  character(len=64) :: dom_name, inc_nm
1326  character(len=200) :: mesg
1327 
1328  integer :: xsiz, ysiz, nip_parsed, njp_parsed
1329  integer :: isc,iec,jsc,jec ! The bounding indices of the computational domain.
1330  character(len=8) :: char_xsiz, char_ysiz, char_niglobal, char_njglobal
1331  character(len=40) :: nihalo_nm, njhalo_nm, layout_nm, io_layout_nm, masktable_nm
1332  character(len=40) :: niproc_nm, njproc_nm
1333 
1334 ! This include declares and sets the variable "version".
1335 #include "version_variable.h"
1336  character(len=40) :: mdl ! This module's name.
1337 
1338  if (.not.associated(mom_dom)) then
1339  allocate(mom_dom)
1340  allocate(mom_dom%mpp_domain)
1341  endif
1342 
1343  pe = pe_here()
1344  proc_used = num_pes()
1345 
1346  mdl = "MOM_domains"
1347 
1348  mom_dom%symmetric = .true.
1349  if (present(symmetric)) then ; mom_dom%symmetric = symmetric ; endif
1350  if (present(min_halo)) mdl = trim(mdl)//" min_halo"
1351 
1352  dom_name = "MOM" ; inc_nm = "MOM_memory.h"
1353  if (present(domain_name)) dom_name = trim(domain_name)
1354  if (present(include_name)) inc_nm = trim(include_name)
1355 
1356  nihalo_nm = "NIHALO" ; njhalo_nm = "NJHALO"
1357  layout_nm = "LAYOUT" ; io_layout_nm = "IO_LAYOUT" ; masktable_nm = "MASKTABLE"
1358  niproc_nm = "NIPROC" ; njproc_nm = "NJPROC"
1359  if (present(param_suffix)) then ; if (len(trim(adjustl(param_suffix))) > 0) then
1360  nihalo_nm = "NIHALO"//(trim(adjustl(param_suffix)))
1361  njhalo_nm = "NJHALO"//(trim(adjustl(param_suffix)))
1362  layout_nm = "LAYOUT"//(trim(adjustl(param_suffix)))
1363  io_layout_nm = "IO_LAYOUT"//(trim(adjustl(param_suffix)))
1364  masktable_nm = "MASKTABLE"//(trim(adjustl(param_suffix)))
1365  niproc_nm = "NIPROC"//(trim(adjustl(param_suffix)))
1366  njproc_nm = "NJPROC"//(trim(adjustl(param_suffix)))
1367  endif ; endif
1368 
1369  is_static = .false. ; if (present(static_memory)) is_static = static_memory
1370  if (is_static) then
1371  if (.not.present(nihalo)) call mom_error(fatal, "NIHALO must be "// &
1372  "present in the call to MOM_domains_init with static memory.")
1373  if (.not.present(njhalo)) call mom_error(fatal, "NJHALO must be "// &
1374  "present in the call to MOM_domains_init with static memory.")
1375  if (.not.present(niglobal)) call mom_error(fatal, "NIGLOBAL must be "// &
1376  "present in the call to MOM_domains_init with static memory.")
1377  if (.not.present(njglobal)) call mom_error(fatal, "NJGLOBAL must be "// &
1378  "present in the call to MOM_domains_init with static memory.")
1379  if (.not.present(niproc)) call mom_error(fatal, "NIPROC must be "// &
1380  "present in the call to MOM_domains_init with static memory.")
1381  if (.not.present(njproc)) call mom_error(fatal, "NJPROC must be "// &
1382  "present in the call to MOM_domains_init with static memory.")
1383  endif
1384 
1385  ! Read all relevant parameters and write them to the model log.
1386  call log_version(param_file, mdl, version, "")
1387  call get_param(param_file, mdl, "REENTRANT_X", reentrant_x, &
1388  "If true, the domain is zonally reentrant.", default=.true.)
1389  call get_param(param_file, mdl, "REENTRANT_Y", reentrant_y, &
1390  "If true, the domain is meridionally reentrant.", &
1391  default=.false.)
1392  call get_param(param_file, mdl, "TRIPOLAR_N", tripolar_n, &
1393  "Use tripolar connectivity at the northern edge of the \n"//&
1394  "domain. With TRIPOLAR_N, NIGLOBAL must be even.", &
1395  default=.false.)
1396 
1397 #ifndef NOT_SET_AFFINITY
1398 !$ call get_param(param_file, mdl, "OCEAN_OMP_THREADS", ocean_nthreads, &
1399 !$ "The number of OpenMP threads that MOM6 will use.", &
1400 !$ default = 1, layoutParam=.true.)
1401 !$ call get_param(param_file, mdl, "OCEAN_OMP_HYPER_THREAD", ocean_omp_hyper_thread, &
1402 !$ "If True, use hyper-threading.", default = .false., layoutParam=.true.)
1403 !$ if (ocean_omp_hyper_thread) then
1404 !$ call get_param(param_file, mdl, "OMP_CORES_PER_NODE", omp_cores_per_node, &
1405 !$ "Number of cores per node needed for hyper-threading.", &
1406 !$ fail_if_missing=.true., layoutParam=.true.)
1407 !$ endif
1408 !$ call omp_set_num_threads(ocean_nthreads)
1409 !$OMP PARALLEL private(adder)
1410 !$ base_cpu = get_cpu_affinity()
1411 !$ if (ocean_omp_hyper_thread) then
1412 !$ if (mod(omp_get_thread_num(),2) == 0) then
1413 !$ adder = omp_get_thread_num()/2
1414 !$ else
1415 !$ adder = omp_cores_per_node + omp_get_thread_num()/2
1416 !$ endif
1417 !$ else
1418 !$ adder = omp_get_thread_num()
1419 !$ endif
1420 !$ call set_cpu_affinity(base_cpu + adder)
1421 !!$ write(6,*) " ocean ", omp_get_num_threads(), get_cpu_affinity(), adder, omp_get_thread_num()
1422 !!$ call flush(6)
1423 !$OMP END PARALLEL
1424 #endif
1425 
1426  call log_param(param_file, mdl, "!SYMMETRIC_MEMORY_", mom_dom%symmetric, &
1427  "If defined, the velocity point data domain includes \n"//&
1428  "every face of the thickness points. In other words, \n"//&
1429  "some arrays are larger than others, depending on where \n"//&
1430  "they are on the staggered grid. Also, the starting \n"//&
1431  "index of the velocity-point arrays is usually 0, not 1. \n"//&
1432  "This can only be set at compile time.",&
1433  layoutparam=.true.)
1434  call get_param(param_file, mdl, "NONBLOCKING_UPDATES", mom_dom%nonblocking_updates, &
1435  "If true, non-blocking halo updates may be used.", &
1436  default=.false., layoutparam=.true.)
1437  call get_param(param_file, mdl, "THIN_HALO_UPDATES", mom_dom%thin_halo_updates, &
1438  "If true, optional arguments may be used to specify the \n"//&
1439  "The width of the halos that are updated with each call.", &
1440  default=.true., layoutparam=.true.)
1441 
1442  nihalo_dflt = 4 ; njhalo_dflt = 4
1443  if (present(nihalo)) nihalo_dflt = nihalo
1444  if (present(njhalo)) njhalo_dflt = njhalo
1445 
1446  call log_param(param_file, mdl, "!STATIC_MEMORY_", is_static, &
1447  "If STATIC_MEMORY_ is defined, the principle variables \n"//&
1448  "will have sizes that are statically determined at \n"//&
1449  "compile time. Otherwise the sizes are not determined \n"//&
1450  "until run time. The STATIC option is substantially \n"//&
1451  "faster, but does not allow the PE count to be changed \n"//&
1452  "at run time. This can only be set at compile time.",&
1453  layoutparam=.true.)
1454 
1455  call get_param(param_file, mdl, trim(nihalo_nm), mom_dom%nihalo, &
1456  "The number of halo points on each side in the \n"//&
1457  "x-direction. With STATIC_MEMORY_ this is set as NIHALO_ \n"//&
1458  "in "//trim(inc_nm)//" at compile time; without STATIC_MEMORY_ \n"//&
1459  "the default is NIHALO_ in "//trim(inc_nm)//" (if defined) or 2.", &
1460  default=4, static_value=nihalo_dflt, layoutparam=.true.)
1461  call get_param(param_file, mdl, trim(njhalo_nm), mom_dom%njhalo, &
1462  "The number of halo points on each side in the \n"//&
1463  "y-direction. With STATIC_MEMORY_ this is set as NJHALO_ \n"//&
1464  "in "//trim(inc_nm)//" at compile time; without STATIC_MEMORY_ \n"//&
1465  "the default is NJHALO_ in "//trim(inc_nm)//" (if defined) or 2.", &
1466  default=4, static_value=njhalo_dflt, layoutparam=.true.)
1467  if (present(min_halo)) then
1468  mom_dom%nihalo = max(mom_dom%nihalo, min_halo(1))
1469  min_halo(1) = mom_dom%nihalo
1470  mom_dom%njhalo = max(mom_dom%njhalo, min_halo(2))
1471  min_halo(2) = mom_dom%njhalo
1472  call log_param(param_file, mdl, "!NIHALO min_halo", mom_dom%nihalo, layoutparam=.true.)
1473  call log_param(param_file, mdl, "!NJHALO min_halo", mom_dom%nihalo, layoutparam=.true.)
1474  endif
1475  if (is_static) then
1476  call get_param(param_file, mdl, "NIGLOBAL", mom_dom%niglobal, &
1477  "The total number of thickness grid points in the \n"//&
1478  "x-direction in the physical domain. With STATIC_MEMORY_ \n"//&
1479  "this is set in "//trim(inc_nm)//" at compile time.", &
1480  static_value=niglobal)
1481  call get_param(param_file, mdl, "NJGLOBAL", mom_dom%njglobal, &
1482  "The total number of thickness grid points in the \n"//&
1483  "y-direction in the physical domain. With STATIC_MEMORY_ \n"//&
1484  "this is set in "//trim(inc_nm)//" at compile time.", &
1485  static_value=njglobal)
1486  if (mom_dom%niglobal /= niglobal) call mom_error(fatal,"MOM_domains_init: " // &
1487  "static mismatch for NIGLOBAL_ domain size. Header file does not match input namelist")
1488  if (mom_dom%njglobal /= njglobal) call mom_error(fatal,"MOM_domains_init: " // &
1489  "static mismatch for NJGLOBAL_ domain size. Header file does not match input namelist")
1490 
1491  if (.not.present(min_halo)) then
1492  if (mom_dom%nihalo /= nihalo) call mom_error(fatal,"MOM_domains_init: " // &
1493  "static mismatch for "//trim(nihalo_nm)//" domain size")
1494  if (mom_dom%njhalo /= njhalo) call mom_error(fatal,"MOM_domains_init: " // &
1495  "static mismatch for "//trim(njhalo_nm)//" domain size")
1496  endif
1497  else
1498  call get_param(param_file, mdl, "NIGLOBAL", mom_dom%niglobal, &
1499  "The total number of thickness grid points in the \n"//&
1500  "x-direction in the physical domain. With STATIC_MEMORY_ \n"//&
1501  "this is set in "//trim(inc_nm)//" at compile time.", &
1502  fail_if_missing=.true.)
1503  call get_param(param_file, mdl, "NJGLOBAL", mom_dom%njglobal, &
1504  "The total number of thickness grid points in the \n"//&
1505  "y-direction in the physical domain. With STATIC_MEMORY_ \n"//&
1506  "this is set in "//trim(inc_nm)//" at compile time.", &
1507  fail_if_missing=.true.)
1508  endif
1509 
1510  global_indices(1) = 1 ; global_indices(2) = mom_dom%niglobal
1511  global_indices(3) = 1 ; global_indices(4) = mom_dom%njglobal
1512 
1513  call get_param(param_file, mdl, "INPUTDIR", inputdir, do_not_log=.true., default=".")
1514  inputdir = slasher(inputdir)
1515 
1516  call get_param(param_file, mdl, trim(masktable_nm), mask_table, &
1517  "A text file to specify n_mask, layout and mask_list. \n"//&
1518  "This feature masks out processors that contain only land points. \n"//&
1519  "The first line of mask_table is the number of regions to be masked out.\n"//&
1520  "The second line is the layout of the model and must be \n"//&
1521  "consistent with the actual model layout.\n"//&
1522  "The following (n_mask) lines give the logical positions \n"//&
1523  "of the processors that are masked out. The mask_table \n"//&
1524  "can be created by tools like check_mask. The \n"//&
1525  "following example of mask_table masks out 2 processors, \n"//&
1526  "(1,2) and (3,6), out of the 24 in a 4x6 layout: \n"//&
1527  " 2\n 4,6\n 1,2\n 3,6\n", default="MOM_mask_table", &
1528  layoutparam=.true.)
1529  mask_table = trim(inputdir)//trim(mask_table)
1530  mask_table_exists = file_exist(mask_table)
1531 
1532  if (is_static) then
1533  layout(1) = niproc ; layout(2) = njproc
1534  else
1535  call get_param(param_file, mdl, trim(layout_nm), layout, &
1536  "The processor layout to be used, or 0, 0 to automatically \n"//&
1537  "set the layout based on the number of processors.", default=0, &
1538  do_not_log=.true.)
1539  call get_param(param_file, mdl, trim(niproc_nm), nip_parsed, &
1540  "The number of processors in the x-direction.", default=-1, &
1541  do_not_log=.true.)
1542  call get_param(param_file, mdl, trim(njproc_nm), njp_parsed, &
1543  "The number of processors in the y-direction.", default=-1, &
1544  do_not_log=.true.)
1545  if (nip_parsed > -1) then
1546  if ((layout(1) > 0) .and. (layout(1) /= nip_parsed)) &
1547  call mom_error(fatal, trim(layout_nm)//" and "//trim(niproc_nm)//" set inconsistently. "//&
1548  "Only LAYOUT should be used.")
1549  layout(1) = nip_parsed
1550  call mom_mesg(trim(niproc_nm)//" used to set "//trim(layout_nm)//" in dynamic mode. "//&
1551  "Shift to using "//trim(layout_nm)//" instead.")
1552  endif
1553  if (njp_parsed > -1) then
1554  if ((layout(2) > 0) .and. (layout(2) /= njp_parsed)) &
1555  call mom_error(fatal, trim(layout_nm)//" and "//trim(njproc_nm)//" set inconsistently. "//&
1556  "Only "//trim(layout_nm)//" should be used.")
1557  layout(2) = njp_parsed
1558  call mom_mesg(trim(njproc_nm)//" used to set "//trim(layout_nm)//" in dynamic mode. "//&
1559  "Shift to using "//trim(layout_nm)//" instead.")
1560  endif
1561 
1562  if ( layout(1)==0 .and. layout(2)==0 ) &
1563  call mpp_define_layout(global_indices, proc_used, layout)
1564  if ( layout(1)/=0 .and. layout(2)==0 ) layout(2) = proc_used/layout(1)
1565  if ( layout(1)==0 .and. layout(2)/=0 ) layout(1) = proc_used/layout(2)
1566 
1567  if (layout(1)*layout(2) /= proc_used .and. (.not. mask_table_exists) ) then
1568  write(mesg,'("MOM_domains_init: The product of the two components of layout, ", &
1569  & 2i4,", is not the number of PEs used, ",i5,".")') &
1570  layout(1),layout(2),proc_used
1571  call mom_error(fatal, mesg)
1572  endif
1573  endif
1574  call log_param(param_file, mdl, trim(niproc_nm), layout(1), &
1575  "The number of processors in the x-direction. With \n"//&
1576  "STATIC_MEMORY_ this is set in "//trim(inc_nm)//" at compile time.",&
1577  layoutparam=.true.)
1578  call log_param(param_file, mdl, trim(njproc_nm), layout(2), &
1579  "The number of processors in the x-direction. With \n"//&
1580  "STATIC_MEMORY_ this is set in "//trim(inc_nm)//" at compile time.",&
1581  layoutparam=.true.)
1582  call log_param(param_file, mdl, trim(layout_nm), layout, &
1583  "The processor layout that was acutally used.",&
1584  layoutparam=.true.)
1585 
1586  ! Idiot check that fewer PEs than columns have been requested
1587  if (layout(1)*layout(2)>mom_dom%niglobal*mom_dom%njglobal) then
1588  write(mesg,'(a,2(i5,x,a))') 'You requested to use',layout(1)*layout(2), &
1589  'PEs but there are only',mom_dom%niglobal*mom_dom%njglobal,'columns in the model'
1590  call mom_error(fatal, mesg)
1591  endif
1592 
1593  if (mask_table_exists) then
1594  call mom_error(note, 'MOM_domains_init: reading maskmap information from '//&
1595  trim(mask_table))
1596  allocate(mom_dom%maskmap(layout(1), layout(2)))
1597  call parse_mask_table(mask_table, mom_dom%maskmap, dom_name)
1598  endif
1599 
1600  ! Set up the I/O lay-out, and check that it uses an even multiple of the
1601  ! number of PEs in each direction.
1602  io_layout(:) = (/ 1, 1 /)
1603  call get_param(param_file, mdl, trim(io_layout_nm), io_layout, &
1604  "The processor layout to be used, or 0,0 to automatically \n"//&
1605  "set the io_layout to be the same as the layout.", default=1, &
1606  layoutparam=.true.)
1607 
1608  if (io_layout(1) < 0) then
1609  write(mesg,'("MOM_domains_init: IO_LAYOUT(1) = ",i4,". Negative values "//&
1610  &"are not allowed in ")') io_layout(1)
1611  call mom_error(fatal, mesg//trim(io_layout_nm))
1612  elseif (io_layout(1) > 0) then ; if (modulo(layout(1), io_layout(1)) /= 0) then
1613  write(mesg,'("MOM_domains_init: The x-direction I/O-layout, IO_LAYOUT(1)=",i4, &
1614  &", does not evenly divide the x-direction layout, NIPROC=,",i4,".")') &
1615  io_layout(1),layout(1)
1616  call mom_error(fatal, mesg)
1617  endif ; endif
1618 
1619  if (io_layout(2) < 0) then
1620  write(mesg,'("MOM_domains_init: IO_LAYOUT(2) = ",i4,". Negative values "//&
1621  &"are not allowed in ")') io_layout(2)
1622  call mom_error(fatal, mesg//trim(io_layout_nm))
1623  elseif (io_layout(2) /= 0) then ; if (modulo(layout(2), io_layout(2)) /= 0) then
1624  write(mesg,'("MOM_domains_init: The y-direction I/O-layout, IO_LAYOUT(2)=",i4, &
1625  &", does not evenly divide the y-direction layout, NJPROC=,",i4,".")') &
1626  io_layout(2),layout(2)
1627  call mom_error(fatal, mesg)
1628  endif ; endif
1629 
1630  if (io_layout(2) == 0) io_layout(2) = layout(2)
1631  if (io_layout(1) == 0) io_layout(1) = layout(1)
1632 
1633  x_flags = 0 ; y_flags = 0
1634  if (reentrant_x) x_flags = cyclic_global_domain
1635  if (reentrant_y) y_flags = cyclic_global_domain
1636  if (tripolar_n) then
1637  y_flags = fold_north_edge
1638  if (reentrant_y) call mom_error(fatal,"MOM_domains: "// &
1639  "TRIPOLAR_N and REENTRANT_Y may not be defined together.")
1640  endif
1641 
1642  global_indices(1) = 1 ; global_indices(2) = mom_dom%niglobal
1643  global_indices(3) = 1 ; global_indices(4) = mom_dom%njglobal
1644 
1645  if (mask_table_exists) then
1646  call mom_define_domain( global_indices, layout, mom_dom%mpp_domain, &
1647  xflags=x_flags, yflags=y_flags, &
1648  xhalo=mom_dom%nihalo, yhalo=mom_dom%njhalo, &
1649  symmetry = mom_dom%symmetric, name=dom_name, &
1650  maskmap=mom_dom%maskmap )
1651  else
1652  call mom_define_domain( global_indices, layout, mom_dom%mpp_domain, &
1653  xflags=x_flags, yflags=y_flags, &
1654  xhalo=mom_dom%nihalo, yhalo=mom_dom%njhalo, &
1655  symmetry = mom_dom%symmetric, name=dom_name)
1656  endif
1657 
1658  if ((io_layout(1) > 0) .and. (io_layout(2) > 0) .and. &
1659  (layout(1)*layout(2) > 1)) then
1660  call mom_define_io_domain(mom_dom%mpp_domain, io_layout)
1661  endif
1662 
1663 ! Save the extra data for creating other domains of different resolution that overlay this domain
1664  mom_dom%X_FLAGS = x_flags
1665  mom_dom%Y_FLAGS = y_flags
1666  mom_dom%layout = layout
1667  mom_dom%io_layout = io_layout
1668  mom_dom%use_io_layout = (io_layout(1) + io_layout(2) > 0)
1669 
1670  if (is_static) then
1671  ! A requirement of equal sized compute domains is necessary when STATIC_MEMORY_
1672  ! is used.
1673  call mpp_get_compute_domain(mom_dom%mpp_domain,isc,iec,jsc,jec)
1674  xsiz = iec - isc + 1
1675  ysiz = jec - jsc + 1
1676  if (xsiz*niproc /= mom_dom%niglobal .OR. ysiz*njproc /= mom_dom%njglobal) then
1677  write( char_xsiz,'(i4)' ) niproc
1678  write( char_ysiz,'(i4)' ) njproc
1679  write( char_niglobal,'(i4)' ) mom_dom%niglobal
1680  write( char_njglobal,'(i4)' ) mom_dom%njglobal
1681  call mom_error(warning,'MOM_domains: Processor decomposition (NIPROC_,NJPROC_) = (' &
1682  //trim(char_xsiz)//','//trim(char_ysiz)// &
1683  ') does not evenly divide size set by preprocessor macro ('&
1684  //trim(char_niglobal)//','//trim(char_njglobal)// '). ')
1685  call mom_error(fatal,'MOM_domains: #undef STATIC_MEMORY_ in "//trim(inc_nm)//" to use &
1686  &dynamic allocation, or change processor decomposition to evenly divide the domain.')
1687  endif
1688  endif
1689 
Here is the call graph for this function:

◆ pass_var_2d()

subroutine mom_domains::pass_var_2d ( real, dimension(:,:), intent(inout)  array,
type(mom_domain_type), intent(inout)  MOM_dom,
integer, intent(in), optional  sideflag,
logical, intent(in), optional  complete,
integer, intent(in), optional  position,
integer, intent(in), optional  halo 
)
private
Parameters
[in,out]arrayThe array which is having its halos points exchanged.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent.
[in]sideflagAn optional integer indicating which directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH. For example, TO_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO_ALL is the default if sideflag is omitted.
[in]completeAn optional argument indicating whether the halo updates should be completed before progress resumes. Omitting complete is the same as setting complete to .true.
[in]positionAn optional argument indicating the position. This is usally CORNER, but is CENTER by default.
[in]haloThe size of the halo to update - the full halo by default.

Definition at line 198 of file MOM_domains.F90.

References to_all.

198  real, dimension(:,:), intent(inout) :: array !< The array which is having its halos points
199  !! exchanged.
200  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
201  !! needed to determine where data should be sent.
202  integer, optional, intent(in) :: sideflag !< An optional integer indicating which
203  !! directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST,
204  !! TO_NORTH, and TO_SOUTH. For example, TO_EAST sends the data to the processor to the east,
205  !! so the halos on the western side are filled. TO_ALL is the default if sideflag is omitted.
206  logical, optional, intent(in) :: complete !< An optional argument indicating whether the
207  !! halo updates should be completed before
208  !! progress resumes. Omitting complete is the
209  !! same as setting complete to .true.
210  integer, optional, intent(in) :: position !< An optional argument indicating the position.
211  !! This is usally CORNER, but is CENTER
212  !! by default.
213  integer, optional, intent(in) :: halo !< The size of the halo to update - the full halo
214  !! by default.
215 ! Arguments: array - The array which is having its halos points exchanged.
216 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
217 ! determine where data should be sent.
218 ! (in) sideflag - An optional integer indicating which directions the
219 ! data should be sent. It is TO_ALL or the sum of any of
220 ! TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH. For example,
221 ! TO_EAST sends the data to the processor to the east, so
222 ! the halos on the western side are filled. TO_ALL is
223 ! the default if sideflag is omitted.
224 ! (in,opt) complete - An optional argument indicating whether the halo updates
225 ! should be completed before progress resumes. Omitting
226 ! complete is the same as setting complete to .true.
227 ! (in,opt) position - An optional argument indicating the position. This is
228 ! usally CORNER, but is CENTER by default.
229 ! (in,opt) halo - The size of the halo to update - the full halo by default.
230 
231  integer :: dirflag
232  logical :: block_til_complete
233 
234  dirflag = to_all ! 60
235  if (present(sideflag)) then ; if (sideflag > 0) dirflag = sideflag ; endif
236  block_til_complete = .true.
237  if (present(complete)) block_til_complete = complete
238 
239  if (present(halo) .and. mom_dom%thin_halo_updates) then
240  call mpp_update_domains(array, mom_dom%mpp_domain, flags=dirflag, &
241  complete=block_til_complete, position=position, &
242  whalo=halo, ehalo=halo, shalo=halo, nhalo=halo)
243  else
244  call mpp_update_domains(array, mom_dom%mpp_domain, flags=dirflag, &
245  complete=block_til_complete, position=position)
246  endif
247 

◆ pass_var_3d()

subroutine mom_domains::pass_var_3d ( real, dimension(:,:,:), intent(inout)  array,
type(mom_domain_type), intent(inout)  MOM_dom,
integer, intent(in), optional  sideflag,
logical, intent(in), optional  complete,
integer, intent(in), optional  position,
integer, intent(in), optional  halo 
)
private
Parameters
[in,out]arrayThe array which is having its halos points exchanged.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent.
[in]sideflagAn optional integer indicating which directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH. For example, TO_EAST sends the data to the processor to the east, sothe halos on the western side are filled. TO_ALL is the default if sideflag is omitted.
[in]completeAn optional argument indicating whether the halo updates should be completed before progress resumes. Omitting complete is the same as setting complete to .true.
[in]positionAn optional argument indicating the position. This is usally CORNER, but is CENTER by default.
[in]haloThe size of the halo to update - the full halo by default.

Definition at line 144 of file MOM_domains.F90.

References to_all.

144  real, dimension(:,:,:), intent(inout) :: array !< The array which is having its halos points
145  !! exchanged.
146  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
147  !! needed to determine where data should be
148  !! sent.
149  integer, optional, intent(in) :: sideflag !< An optional integer indicating which
150  !! directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST,
151  !! TO_NORTH, and TO_SOUTH. For example, TO_EAST sends the data to the processor to the east,
152  !! sothe halos on the western side are filled. TO_ALL is the default if sideflag is omitted.
153  logical, optional, intent(in) :: complete !< An optional argument indicating whether the
154  !! halo updates should be completed before
155  !! progress resumes. Omitting complete is the
156  !! same as setting complete to .true.
157  integer, optional, intent(in) :: position !< An optional argument indicating the position.
158  !! This is usally CORNER, but is CENTER by
159  !! default.
160  integer, optional, intent(in) :: halo !< The size of the halo to update - the full
161  !! halo by default.
162 ! Arguments: array - The array which is having its halos points exchanged.
163 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
164 ! determine where data should be sent.
165 ! (in) sideflag - An optional integer indicating which directions the
166 ! data should be sent. It is TO_ALL or the sum of any of
167 ! TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH. For example,
168 ! TO_EAST sends the data to the processor to the east, so
169 ! the halos on the western side are filled. TO_ALL is
170 ! the default if sideflag is omitted.
171 ! (in,opt) complete - An optional argument indicating whether the halo updates
172 ! should be completed before progress resumes. Omitting
173 ! complete is the same as setting complete to .true.
174 ! (in,opt) position - An optional argument indicating the position. This is
175 ! usally CORNER, but is CENTER by default.
176 ! (in,opt) halo - The size of the halo to update - the full halo by default.
177  integer :: dirflag
178  logical :: block_til_complete
179 
180  dirflag = to_all ! 60
181  if (present(sideflag)) then ; if (sideflag > 0) dirflag = sideflag ; endif
182  block_til_complete = .true.
183  if (present(complete)) block_til_complete = complete
184 
185  if (present(halo) .and. mom_dom%thin_halo_updates) then
186  call mpp_update_domains(array, mom_dom%mpp_domain, flags=dirflag, &
187  complete=block_til_complete, position=position, &
188  whalo=halo, ehalo=halo, shalo=halo, nhalo=halo)
189  else
190  call mpp_update_domains(array, mom_dom%mpp_domain, flags=dirflag, &
191  complete=block_til_complete, position=position)
192  endif
193 

◆ pass_var_complete_2d()

subroutine mom_domains::pass_var_complete_2d ( integer, intent(in)  id_update,
real, dimension(:,:), intent(inout)  array,
type(mom_domain_type), intent(inout)  MOM_dom,
integer, intent(in), optional  sideflag,
integer, intent(in), optional  position,
integer, intent(in), optional  halo 
)
private
Parameters
[in]id_updateThe integer id of this update which has been returned from a previous call to pass_var_start.
[in,out]arrayThe array which is having its halos points exchanged.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent.
[in]sideflagAn optional integer indicating which directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH. For example, TO_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO_ALL is the default if sideflag is omitted.
[in]positionAn optional argument indicating the position. This is usally CORNER, but is CENTER by default.
[in]haloThe size of the halo to update - the full halo by default.

Definition at line 356 of file MOM_domains.F90.

References to_all.

356  integer, intent(in) :: id_update !< The integer id of this update which has
357  !! been returned from a previous call to
358  !! pass_var_start.
359  real, dimension(:,:), intent(inout) :: array !< The array which is having its halos points
360  !! exchanged.
361  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
362  !! needed to determine where data should be
363  !! sent.
364  integer, optional, intent(in) :: sideflag !< An optional integer indicating which
365  !! directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST,
366  !! TO_NORTH, and TO_SOUTH. For example, TO_EAST sends the data to the processor to the east,
367  !! so the halos on the western side are filled. TO_ALL is the default if sideflag is omitted.
368  integer, optional, intent(in) :: position !< An optional argument indicating the position.
369  !! This is usally CORNER, but is CENTER
370  !! by default.
371  integer, optional, intent(in) :: halo !< The size of the halo to update - the full
372  !! halo by default.
373 ! Arguments: id_update - The integer id of this update which has been returned
374 ! from a previous call to pass_var_start.
375 ! (inout) array - The array which is having its halos points exchanged.
376 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
377 ! determine where data should be sent.
378 ! (in) sideflag - An optional integer indicating which directions the
379 ! data should be sent. It is TO_ALL or the sum of any of
380 ! TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH. For example,
381 ! TO_EAST sends the data to the processor to the east, so
382 ! the halos on the western side are filled. TO_ALL is
383 ! the default if sideflag is omitted.
384 ! (in) position - An optional argument indicating the position. This is
385 ! may be CORNER, but is CENTER by default.
386 ! (in,opt) halo - The size of the halo to update - the full halo by default.
387  integer :: dirflag
388 
389  dirflag = to_all ! 60
390  if (present(sideflag)) then ; if (sideflag > 0) dirflag = sideflag ; endif
391 
392  if (present(halo) .and. mom_dom%thin_halo_updates) then
393  call mpp_complete_update_domains(id_update, array, mom_dom%mpp_domain, &
394  flags=dirflag, position=position, &
395  whalo=halo, ehalo=halo, shalo=halo, nhalo=halo)
396  else
397  call mpp_complete_update_domains(id_update, array, mom_dom%mpp_domain, &
398  flags=dirflag, position=position)
399  endif
400 

◆ pass_var_complete_3d()

subroutine mom_domains::pass_var_complete_3d ( integer, intent(in)  id_update,
real, dimension(:,:,:), intent(inout)  array,
type(mom_domain_type), intent(inout)  MOM_dom,
integer, intent(in), optional  sideflag,
integer, intent(in), optional  position,
integer, intent(in), optional  halo 
)
private
Parameters
[in]id_updateThe integer id of this update which has been returned from a previous call to pass_var_start.
[in,out]arrayThe array which is having its halos points exchanged.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent.
[in]sideflagAn optional integer indicating which directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH. For example, TO_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO_ALL is the default if sideflag is omitted.
[in]positionAn optional argument indicating the position. This is usally CORNER, but is CENTER by default.
[in]haloThe size of the halo to update - the full halo by default.

Definition at line 405 of file MOM_domains.F90.

References to_all.

405  integer, intent(in) :: id_update !< The integer id of this update which has
406  !! been returned from a previous call to
407  !! pass_var_start.
408  real, dimension(:,:,:), intent(inout) :: array !< The array which is having its halos points
409  !! exchanged.
410  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
411  !! needed to determine where data should be
412  !! sent.
413  integer, optional, intent(in) :: sideflag !< An optional integer indicating which
414  !! directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST,
415  !! TO_NORTH, and TO_SOUTH. For example, TO_EAST sends the data to the processor to the east,
416  !! so the halos on the western side are filled. TO_ALL is the default if sideflag is omitted.
417  integer, optional, intent(in) :: position !< An optional argument indicating the position.
418  !! This is usally CORNER, but is CENTER
419  !! by default.
420  integer, optional, intent(in) :: halo !< The size of the halo to update - the full
421  !! halo by default.
422 ! Arguments: id_update - The integer id of this update which has been returned
423 ! from a previous call to pass_var_start.
424 ! (inout) array - The array which is having its halos points exchanged.
425 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
426 ! determine where data should be sent.
427 ! (in) sideflag - An optional integer indicating which directions the
428 ! data should be sent. It is TO_ALL or the sum of any of
429 ! TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH. For example,
430 ! TO_EAST sends the data to the processor to the east, so
431 ! the halos on the western side are filled. TO_ALL is
432 ! the default if sideflag is omitted.
433 ! (in) position - An optional argument indicating the position. This is
434 ! may be CORNER, but is CENTER by default.
435 ! (in,opt) halo - The size of the halo to update - the full halo by default.
436  integer :: dirflag
437 
438  dirflag = to_all ! 60
439  if (present(sideflag)) then ; if (sideflag > 0) dirflag = sideflag ; endif
440 
441  if (present(halo) .and. mom_dom%thin_halo_updates) then
442  call mpp_complete_update_domains(id_update, array, mom_dom%mpp_domain, &
443  flags=dirflag, position=position, &
444  whalo=halo, ehalo=halo, shalo=halo, nhalo=halo)
445  else
446  call mpp_complete_update_domains(id_update, array, mom_dom%mpp_domain, &
447  flags=dirflag, position=position)
448  endif
449 

◆ pass_var_start_2d()

integer function mom_domains::pass_var_start_2d ( real, dimension(:,:), intent(inout)  array,
type(mom_domain_type), intent(inout)  MOM_dom,
integer, intent(in), optional  sideflag,
integer, intent(in), optional  position,
logical, intent(in), optional  complete,
integer, intent(in), optional  halo 
)
private
Parameters
[in,out]arrayThe array which is having its halos points exchanged.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent.
[in]sideflagAn optional integer indicating which directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH. For example, TO_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO_ALL is the default if sideflag is omitted.
[in]positionAn optional argument indicating the position. This is usally CORNER, but is CENTER by default.
[in]completeAn optional argument indicating whether the halo updates should be completed before progress resumes. Omitting complete is the same as setting complete to .true.
[in]haloThe size of the halo to update - the full halo by default.
Returns
The integer index for this update.

Definition at line 251 of file MOM_domains.F90.

References to_all.

251  real, dimension(:,:), intent(inout) :: array !< The array which is having its halos points
252  !! exchanged.
253  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
254  !! needed to determine where data should be
255  !! sent.
256  integer, optional, intent(in) :: sideflag !< An optional integer indicating which
257  !! directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST,
258  !! TO_NORTH, and TO_SOUTH. For example, TO_EAST sends the data to the processor to the east,
259  !! so the halos on the western side are filled. TO_ALL is the default if sideflag is omitted.
260  integer, optional, intent(in) :: position !< An optional argument indicating the position.
261  !! This is usally CORNER, but is CENTER
262  !! by default.
263  logical, optional, intent(in) :: complete !< An optional argument indicating whether the
264  !! halo updates should be completed before
265  !! progress resumes. Omitting complete is the
266  !! same as setting complete to .true.
267  integer, optional, intent(in) :: halo !< The size of the halo to update - the full
268  !! halo by default.
269  integer :: pass_var_start_2d !<The integer index for this update.
270 ! Arguments: array - The array which is having its halos points exchanged.
271 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
272 ! determine where data should be sent.
273 ! (in) sideflag - An optional integer indicating which directions the
274 ! data should be sent. It is TO_ALL or the sum of any of
275 ! TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH. For example,
276 ! TO_EAST sends the data to the processor to the east, so
277 ! the halos on the western side are filled. TO_ALL is
278 ! the default if sideflag is omitted.
279 ! (in) position - An optional argument indicating the position. This is
280 ! may be CORNER, but is CENTER by default.
281 ! (in) complete - An optional argument indicating whether the halo updates
282 ! should be initiated immediately or wait for second
283 ! pass_..._start call. Omitting complete is the same as
284 ! setting complete to .true.
285 ! (in,opt) halo - The size of the halo to update - the full halo by default.
286 ! (return value) - The integer index for this update.
287  integer :: dirflag
288 
289  dirflag = to_all ! 60
290  if (present(sideflag)) then ; if (sideflag > 0) dirflag = sideflag ; endif
291 
292  if (present(halo) .and. mom_dom%thin_halo_updates) then
293  pass_var_start_2d = mpp_start_update_domains(array, mom_dom%mpp_domain, &
294  flags=dirflag, position=position, &
295  whalo=halo, ehalo=halo, shalo=halo, nhalo=halo)
296  else
297  pass_var_start_2d = mpp_start_update_domains(array, mom_dom%mpp_domain, &
298  flags=dirflag, position=position)
299  endif

◆ pass_var_start_3d()

integer function mom_domains::pass_var_start_3d ( real, dimension(:,:,:), intent(inout)  array,
type(mom_domain_type), intent(inout)  MOM_dom,
integer, intent(in), optional  sideflag,
integer, intent(in), optional  position,
logical, intent(in), optional  complete,
integer, intent(in), optional  halo 
)
private
Parameters
[in,out]arrayThe array which is having its halos points exchanged.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent.
[in]sideflagAn optional integer indicating which directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH. For example, TO_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO_ALL is the default if sideflag is omitted.
[in]positionAn optional argument indicating the position. This is usally CORNER, but is CENTER by default.
[in]completeAn optional argument indicating whether the halo updates should be completed before progress resumes. Omitting complete is the same as setting complete to .true.
[in]haloThe size of the halo to update - the full halo by default.
Returns
The integer index for this update.

Definition at line 303 of file MOM_domains.F90.

References to_all.

303  real, dimension(:,:,:), intent(inout) :: array !< The array which is having its halos points
304  !! exchanged.
305  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
306  !! needed to determine where data should be
307  !! sent.
308  integer, optional, intent(in) :: sideflag !< An optional integer indicating which
309  !! directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST,
310  !! TO_NORTH, and TO_SOUTH. For example, TO_EAST sends the data to the processor to the east,
311  !! so the halos on the western side are filled. TO_ALL is the default if sideflag is omitted.
312  integer, optional, intent(in) :: position !< An optional argument indicating the position.
313  !! This is usally CORNER, but is CENTER
314  !! by default.
315  logical, optional, intent(in) :: complete !< An optional argument indicating whether the
316  !! halo updates should be completed before
317  !! progress resumes. Omitting complete is the
318  !! same as setting complete to .true.
319  integer, optional, intent(in) :: halo !< The size of the halo to update - the full
320  !! halo by default.
321  integer :: pass_var_start_3d !< The integer index for this update.
322 ! Arguments: array - The array which is having its halos points exchanged.
323 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
324 ! determine where data should be sent.
325 ! (in) sideflag - An optional integer indicating which directions the
326 ! data should be sent. It is TO_ALL or the sum of any of
327 ! TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH. For example,
328 ! TO_EAST sends the data to the processor to the east, so
329 ! the halos on the western side are filled. TO_ALL is
330 ! the default if sideflag is omitted.
331 ! (in) position - An optional argument indicating the position. This is
332 ! may be CORNER, but is CENTER by default.
333 ! (in) complete - An optional argument indicating whether the halo updates
334 ! should be initiated immediately or wait for second
335 ! pass_..._start call. Omitting complete is the same as
336 ! setting complete to .true.
337 ! (in,opt) halo - The size of the halo to update - the full halo by default.
338 ! (return value) - The integer index for this update.
339  integer :: dirflag
340 
341  dirflag = to_all ! 60
342  if (present(sideflag)) then ; if (sideflag > 0) dirflag = sideflag ; endif
343 
344  if (present(halo) .and. mom_dom%thin_halo_updates) then
345  pass_var_start_3d = mpp_start_update_domains(array, mom_dom%mpp_domain, &
346  flags=dirflag, position=position, &
347  whalo=halo, ehalo=halo, shalo=halo, nhalo=halo)
348  else
349  pass_var_start_3d = mpp_start_update_domains(array, mom_dom%mpp_domain, &
350  flags=dirflag, position=position)
351  endif

◆ pass_vector_2d()

subroutine mom_domains::pass_vector_2d ( real, dimension(:,:), intent(inout)  u_cmpt,
real, dimension(:,:), intent(inout)  v_cmpt,
type(mom_domain_type), intent(inout)  MOM_dom,
integer, intent(in), optional  direction,
integer, intent(in), optional  stagger,
logical, intent(in), optional  complete,
integer, intent(in), optional  halo 
)
private
Parameters
[in,out]u_cmptThe nominal zonal (u) component of the vector pair which is having its halos points exchanged.
[in,out]v_cmptThe nominal meridional (v) component of the vector pair which is having its halos points exchanged.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent.
[in]directionAn optional integer indicating which directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH, possibly plus SCALAR_PAIR if these are paired non-directional scalars discretized at the typical vector component locations. For example, TO_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO_ALL is the default if omitted.
[in]staggerAn optional flag, which may be one of A_GRID, BGRID_NE, or CGRID_NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to CGRID_NE.
[in]completeAn optional argument indicating whether the halo updates should be completed before progress resumes. Omitting complete is the same as setting complete to .true.
[in]haloThe size of the halo to update - the full halo by default.

Definition at line 454 of file MOM_domains.F90.

References to_all.

454  real, dimension(:,:), intent(inout) :: u_cmpt !< The nominal zonal (u) component of the vector
455  !! pair which is having its halos points
456  !! exchanged.
457  real, dimension(:,:), intent(inout) :: v_cmpt !< The nominal meridional (v) component of the
458  !! vector pair which is having its halos points
459  !! exchanged.
460  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
461  !! needed to determine where data should be
462  !! sent.
463  integer, optional, intent(in) :: direction !< An optional integer indicating which
464  !! directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST,
465  !! TO_NORTH, and TO_SOUTH, possibly plus SCALAR_PAIR if these are paired non-directional
466  !! scalars discretized at the typical vector component locations. For example, TO_EAST sends
467  !! the data to the processor to the east, so the halos on the western side are filled. TO_ALL
468  !! is the default if omitted.
469  integer, optional, intent(in) :: stagger !< An optional flag, which may be one of A_GRID,
470  !! BGRID_NE, or CGRID_NE, indicating where the two components of the vector are
471  !! discretized. Omitting stagger is the same as setting it to CGRID_NE.
472  logical, optional, intent(in) :: complete !< An optional argument indicating whether the
473  !! halo updates should be completed before progress resumes.
474  !! Omitting complete is the same as setting complete to .true.
475  integer, optional, intent(in) :: halo !< The size of the halo to update - the full
476  !! halo by default.
477 ! Arguments: u_cmpt - The nominal zonal (u) component of the vector pair which
478 ! is having its halos points exchanged.
479 ! (inout) v_cmpt - The nominal meridional (v) component of the vector pair
480 ! which is having its halos points exchanged.
481 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
482 ! determine where data should be sent.
483 ! (in) direction - An optional integer indicating which directions the
484 ! data should be sent. It is TO_ALL or the sum of any of
485 ! TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH, possibly
486 ! plus SCALAR_PAIR if these are paired non-directional
487 ! scalars discretized at the typical vector component
488 ! locations. For example, TO_EAST sends the data to the
489 ! processor to the east, so the halos on the western
490 ! side are filled. TO_ALL is the default if omitted.
491 ! (in) stagger - An optional flag, which may be one of A_GRID, BGRID_NE,
492 ! or CGRID_NE, indicating where the two components of the
493 ! vector are discretized. Omitting stagger is the same as
494 ! setting it to CGRID_NE.
495 ! (in) complete - An optional argument indicating whether the halo updates
496 ! should be completed before progress resumes. Omitting
497 ! complete is the same as setting complete to .true.
498 ! (in,opt) halo - The size of the halo to update - the full halo by default.
499 
500  integer :: stagger_local
501  integer :: dirflag
502  logical :: block_til_complete
503 
504  stagger_local = cgrid_ne ! Default value for type of grid
505  if (present(stagger)) stagger_local = stagger
506 
507  dirflag = to_all ! 60
508  if (present(direction)) then ; if (direction > 0) dirflag = direction ; endif
509  block_til_complete = .true.
510  if (present(complete)) block_til_complete = complete
511 
512  if (present(halo) .and. mom_dom%thin_halo_updates) then
513  call mpp_update_domains(u_cmpt, v_cmpt, mom_dom%mpp_domain, flags=dirflag, &
514  gridtype=stagger_local, complete = block_til_complete, &
515  whalo=halo, ehalo=halo, shalo=halo, nhalo=halo)
516  else
517  call mpp_update_domains(u_cmpt, v_cmpt, mom_dom%mpp_domain, flags=dirflag, &
518  gridtype=stagger_local, complete = block_til_complete)
519  endif
520 

◆ pass_vector_3d()

subroutine mom_domains::pass_vector_3d ( real, dimension(:,:,:), intent(inout)  u_cmpt,
real, dimension(:,:,:), intent(inout)  v_cmpt,
type(mom_domain_type), intent(inout)  MOM_dom,
integer, intent(in), optional  direction,
integer, intent(in), optional  stagger,
logical, intent(in), optional  complete,
integer, intent(in), optional  halo 
)
private
Parameters
[in,out]u_cmptThe nominal zonal (u) component of the vector pair which is having its halos points exchanged.
[in,out]v_cmptThe nominal meridional (v) component of the vector pair which is having its halos points exchanged.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent.
[in]directionAn optional integer indicating which directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH, possibly plus SCALAR_PAIR if these are paired non-directional scalars discretized at the typical vector component locations. For example, TO_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO_ALL is the default if omitted.
[in]staggerAn optional flag, which may be one of A_GRID, BGRID_NE, or CGRID_NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to CGRID_NE.
[in]completeAn optional argument indicating whether the halo updates should be completed before progress resumes. Omitting complete is the same as setting complete to .true.
[in]haloThe size of the halo to update - the full halo by default.

Definition at line 610 of file MOM_domains.F90.

References to_all.

610  real, dimension(:,:,:), intent(inout) :: u_cmpt !< The nominal zonal (u) component of the vector
611  !! pair which is having its halos points
612  !! exchanged.
613  real, dimension(:,:,:), intent(inout) :: v_cmpt !< The nominal meridional (v) component of the
614  !! vector pair which is having its halos points
615  !! exchanged.
616  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
617  !! needed to determine where data should be
618  !! sent.
619  integer, optional, intent(in) :: direction !< An optional integer indicating which
620  !! directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST,
621  !! TO_NORTH, and TO_SOUTH, possibly plus SCALAR_PAIR if these are paired non-directional
622  !! scalars discretized at the typical vector component locations. For example, TO_EAST sends
623  !! the data to the processor to the east, so the halos on the western side are filled. TO_ALL
624  !! is the default if omitted.
625  integer, optional, intent(in) :: stagger !< An optional flag, which may be one of A_GRID,
626  !! BGRID_NE, or CGRID_NE, indicating where the two components of the vector are
627  !! discretized. Omitting stagger is the same as setting it to CGRID_NE.
628  logical, optional, intent(in) :: complete !< An optional argument indicating whether the
629  !! halo updates should be completed before progress resumes.
630  !! Omitting complete is the same as setting complete to .true.
631  integer, optional, intent(in) :: halo !< The size of the halo to update - the full
632  !! halo by default.
633 ! Arguments: u_cmpt - The nominal zonal (u) component of the vector pair which
634 ! is having its halos points exchanged.
635 ! (inout) v_cmpt - The nominal meridional (v) component of the vector pair
636 ! which is having its halos points exchanged.
637 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
638 ! determine where data should be sent.
639 ! (in) direction - An optional integer indicating which directions the
640 ! data should be sent. It is TO_ALL or the sum of any of
641 ! TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH, possibly
642 ! plus SCALAR_PAIR if these are paired non-directional
643 ! scalars discretized at the typical vector component
644 ! locations. For example, TO_EAST sends the data to the
645 ! processor to the east, so the halos on the western
646 ! side are filled. TO_ALL is the default if omitted.
647 ! (in) stagger - An optional flag, which may be one of A_GRID, BGRID_NE,
648 ! or CGRID_NE, indicating where the two components of the
649 ! vector are discretized. Omitting stagger is the same as
650 ! setting it to CGRID_NE.
651 ! (in) complete - An optional argument indicating whether the halo updates
652 ! should be completed before progress resumes. Omitting
653 ! complete is the same as setting complete to .true.
654 ! (in,opt) halo - The size of the halo to update - the full halo by default.
655 
656  integer :: stagger_local
657  integer :: dirflag
658  logical :: block_til_complete
659 
660  stagger_local = cgrid_ne ! Default value for type of grid
661  if (present(stagger)) stagger_local = stagger
662 
663  dirflag = to_all ! 60
664  if (present(direction)) then ; if (direction > 0) dirflag = direction ; endif
665  block_til_complete = .true.
666  if (present(complete)) block_til_complete = complete
667 
668  if (present(halo) .and. mom_dom%thin_halo_updates) then
669  call mpp_update_domains(u_cmpt, v_cmpt, mom_dom%mpp_domain, flags=dirflag, &
670  gridtype=stagger_local, complete = block_til_complete, &
671  whalo=halo, ehalo=halo, shalo=halo, nhalo=halo)
672  else
673  call mpp_update_domains(u_cmpt, v_cmpt, mom_dom%mpp_domain, flags=dirflag, &
674  gridtype=stagger_local, complete = block_til_complete)
675  endif
676 

◆ pass_vector_complete_2d()

subroutine mom_domains::pass_vector_complete_2d ( integer, intent(in)  id_update,
real, dimension(:,:), intent(inout)  u_cmpt,
real, dimension(:,:), intent(inout)  v_cmpt,
type(mom_domain_type), intent(inout)  MOM_dom,
integer, intent(in), optional  direction,
integer, intent(in), optional  stagger,
integer, intent(in), optional  halo 
)
private
Parameters
[in]id_updateThe integer id of this update which has been returned from a previous call to pass_var_start.
[in,out]u_cmptThe nominal zonal (u) component of the vector pair which is having its halos points exchanged.
[in,out]v_cmptThe nominal meridional (v) component of the vector pair which is having its halos points exchanged.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent.
[in]directionAn optional integer indicating which directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH, possibly plus SCALAR_PAIR if these are paired non-directional scalars discretized at the typical vector component locations. For example, TO_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO_ALL is the default if omitted.
[in]staggerAn optional flag, which may be one of A_GRID, BGRID_NE, or CGRID_NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to CGRID_NE.
[in]haloThe size of the halo to update - the full halo by default.

Definition at line 821 of file MOM_domains.F90.

References to_all.

821  integer, intent(in) :: id_update !< The integer id of this update which has been
822  !! returned from a previous call to
823  !! pass_var_start.
824  real, dimension(:,:), intent(inout) :: u_cmpt !< The nominal zonal (u) component of the vector
825  !! pair which is having its halos points
826  !! exchanged.
827  real, dimension(:,:), intent(inout) :: v_cmpt !< The nominal meridional (v) component of the
828  !! vector pair which is having its halos points
829  !! exchanged.
830  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
831  !! needed to determine where data should be
832  !! sent.
833  integer, optional, intent(in) :: direction !< An optional integer indicating which
834  !! directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST,
835  !! TO_NORTH, and TO_SOUTH, possibly plus SCALAR_PAIR if these are paired non-directional
836  !! scalars discretized at the typical vector component locations. For example, TO_EAST sends
837  !! the data to the processor to the east, so the halos on the western side are filled. TO_ALL
838  !! is the default if omitted.
839  integer, optional, intent(in) :: stagger !< An optional flag, which may be one of A_GRID,
840  !! BGRID_NE, or CGRID_NE, indicating where the two components of the vector are
841  !! discretized. Omitting stagger is the same as setting it to CGRID_NE.
842  integer, optional, intent(in) :: halo !< The size of the halo to update - the full
843  !! halo by default.
844 ! Arguments: id_update - The integer id of this update which has been returned
845 ! from a previous call to pass_var_start.
846 ! (inout) u_cmpt - The nominal zonal (u) component of the vector pair which
847 ! is having its halos points exchanged.
848 ! (inout) v_cmpt - The nominal meridional (v) component of the vector pair
849 ! which is having its halos points exchanged.
850 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
851 ! determine where data should be sent.
852 ! (in) direction - An optional integer indicating which directions the
853 ! data should be sent. It is TO_ALL or the sum of any of
854 ! TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH, possibly
855 ! plus SCALAR_PAIR if these are paired non-directional
856 ! scalars discretized at the typical vector component
857 ! locations. For example, TO_EAST sends the data to the
858 ! processor to the east, so the halos on the western
859 ! side are filled. TO_ALL is the default if omitted.
860 ! (in) stagger - An optional flag, which may be one of A_GRID, BGRID_NE,
861 ! or CGRID_NE, indicating where the two components of the
862 ! vector are discretized. Omitting stagger is the same as
863 ! setting it to CGRID_NE.
864 ! (in,opt) halo - The size of the halo to update - the full halo by default.
865 ! (return value) - The integer index for this update.
866  integer :: stagger_local
867  integer :: dirflag
868 
869  stagger_local = cgrid_ne ! Default value for type of grid
870  if (present(stagger)) stagger_local = stagger
871 
872  dirflag = to_all ! 60
873  if (present(direction)) then ; if (direction > 0) dirflag = direction ; endif
874 
875  if (present(halo) .and. mom_dom%thin_halo_updates) then
876  call mpp_complete_update_domains(id_update, u_cmpt, v_cmpt, &
877  mom_dom%mpp_domain, flags=dirflag, gridtype=stagger_local, &
878  whalo=halo, ehalo=halo, shalo=halo, nhalo=halo)
879  else
880  call mpp_complete_update_domains(id_update, u_cmpt, v_cmpt, &
881  mom_dom%mpp_domain, flags=dirflag, gridtype=stagger_local)
882  endif
883 

◆ pass_vector_complete_3d()

subroutine mom_domains::pass_vector_complete_3d ( integer, intent(in)  id_update,
real, dimension(:,:,:), intent(inout)  u_cmpt,
real, dimension(:,:,:), intent(inout)  v_cmpt,
type(mom_domain_type), intent(inout)  MOM_dom,
integer, intent(in), optional  direction,
integer, intent(in), optional  stagger,
integer, intent(in), optional  halo 
)
private
Parameters
[in]id_updateThe integer id of this update which has been returned from a previous call to pass_var_start.
[in,out]u_cmptThe nominal zonal (u) component of the vector pair which is having its halos points exchanged.
[in,out]v_cmptThe nominal meridional (v) component of the vector pair which is having its halos points exchanged.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent.
[in]directionAn optional integer indicating which directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH, possibly plus SCALAR_PAIR if these are paired non-directional scalars discretized at the typical vector component locations. For example, TO_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO_ALL is the default if omitted.
[in]staggerAn optional flag, which may be one of A_GRID, BGRID_NE, or CGRID_NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to CGRID_NE.
[in]haloThe size of the halo to update - the full halo by default.

Definition at line 888 of file MOM_domains.F90.

References to_all.

888  integer, intent(in) :: id_update !< The integer id of this update which has been
889  !! returned from a previous call to
890  !! pass_var_start.
891  real, dimension(:,:,:), intent(inout) :: u_cmpt !< The nominal zonal (u) component of the vector
892  !! pair which is having its halos points
893  !! exchanged.
894  real, dimension(:,:,:), intent(inout) :: v_cmpt !< The nominal meridional (v) component of the
895  !! vector pair which is having its halos points
896  !! exchanged.
897  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
898  !! needed to determine where data should be
899  !! sent.
900  integer, optional, intent(in) :: direction !< An optional integer indicating which
901  !! directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST,
902  !! TO_NORTH, and TO_SOUTH, possibly plus SCALAR_PAIR if these are paired non-directional
903  !! scalars discretized at the typical vector component locations. For example, TO_EAST sends
904  !! the data to the processor to the east, so the halos on the western side are filled. TO_ALL
905  !! is the default if omitted.
906  integer, optional, intent(in) :: stagger !< An optional flag, which may be one of A_GRID,
907  !! BGRID_NE, or CGRID_NE, indicating where the two components of the vector are
908  !! discretized. Omitting stagger is the same as setting it to CGRID_NE.
909  integer, optional, intent(in) :: halo !< The size of the halo to update - the full
910  !! halo by default.
911 ! Arguments: id_update - The integer id of this update which has been returned
912 ! from a previous call to pass_var_start.
913 ! (inout) u_cmpt - The nominal zonal (u) component of the vector pair which
914 ! is having its halos points exchanged.
915 ! (inout) v_cmpt - The nominal meridional (v) component of the vector pair
916 ! which is having its halos points exchanged.
917 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
918 ! determine where data should be sent.
919 ! (in) direction - An optional integer indicating which directions the
920 ! data should be sent. It is TO_ALL or the sum of any of
921 ! TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH, possibly
922 ! plus SCALAR_PAIR if these are paired non-directional
923 ! scalars discretized at the typical vector component
924 ! locations. For example, TO_EAST sends the data to the
925 ! processor to the east, so the halos on the western
926 ! side are filled. TO_ALL is the default if omitted.
927 ! (in) stagger - An optional flag, which may be one of A_GRID, BGRID_NE,
928 ! or CGRID_NE, indicating where the two components of the
929 ! vector are discretized. Omitting stagger is the same as
930 ! setting it to CGRID_NE.
931 ! (in,opt) halo - The size of the halo to update - the full halo by default.
932 ! (return value) - The integer index for this update.
933  integer :: stagger_local
934  integer :: dirflag
935 
936  stagger_local = cgrid_ne ! Default value for type of grid
937  if (present(stagger)) stagger_local = stagger
938 
939  dirflag = to_all ! 60
940  if (present(direction)) then ; if (direction > 0) dirflag = direction ; endif
941 
942  if (present(halo) .and. mom_dom%thin_halo_updates) then
943  call mpp_complete_update_domains(id_update, u_cmpt, v_cmpt, &
944  mom_dom%mpp_domain, flags=dirflag, gridtype=stagger_local, &
945  whalo=halo, ehalo=halo, shalo=halo, nhalo=halo)
946  else
947  call mpp_complete_update_domains(id_update, u_cmpt, v_cmpt, &
948  mom_dom%mpp_domain, flags=dirflag, gridtype=stagger_local)
949  endif
950 

◆ pass_vector_start_2d()

integer function mom_domains::pass_vector_start_2d ( real, dimension(:,:), intent(inout)  u_cmpt,
real, dimension(:,:), intent(inout)  v_cmpt,
type(mom_domain_type), intent(inout)  MOM_dom,
integer, intent(in), optional  direction,
integer, intent(in), optional  stagger,
logical, intent(in), optional  complete,
integer, intent(in), optional  halo 
)
private
Parameters
[in,out]u_cmptThe nominal zonal (u) component of the vector pair which is having its halos points exchanged.
[in,out]v_cmptThe nominal meridional (v) component of the vector pair which is having its halos points exchanged.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent.
[in]directionAn optional integer indicating which directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH, possibly plus SCALAR_PAIR if these are paired non-directional scalars discretized at the typical vector component locations. For example, TO_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO_ALL is the default if omitted.
[in]staggerAn optional flag, which may be one of A_GRID, BGRID_NE, or CGRID_NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to CGRID_NE.
[in]completeAn optional argument indicating whether the halo updates should be completed before progress resumes. Omitting complete is the same as setting complete to .true.
[in]haloThe size of the halo to update - the full halo by default.
Returns
The integer index for this update.

Definition at line 680 of file MOM_domains.F90.

References to_all.

680  real, dimension(:,:), intent(inout) :: u_cmpt !< The nominal zonal (u) component of the vector
681  !! pair which is having its halos points
682  !! exchanged.
683  real, dimension(:,:), intent(inout) :: v_cmpt !< The nominal meridional (v) component of the
684  !! vector pair which is having its halos points
685  !! exchanged.
686  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
687  !! needed to determine where data should be
688  !! sent.
689  integer, optional, intent(in) :: direction !< An optional integer indicating which
690  !! directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST,
691  !! TO_NORTH, and TO_SOUTH, possibly plus SCALAR_PAIR if these are paired non-directional
692  !! scalars discretized at the typical vector component locations. For example, TO_EAST sends
693  !! the data to the processor to the east, so the halos on the western side are filled. TO_ALL
694  !! is the default if omitted.
695  integer, optional, intent(in) :: stagger !< An optional flag, which may be one of A_GRID,
696  !! BGRID_NE, or CGRID_NE, indicating where the two components of the vector are
697  !! discretized. Omitting stagger is the same as setting it to CGRID_NE.
698  logical, optional, intent(in) :: complete !< An optional argument indicating whether the
699  !! halo updates should be completed before progress resumes.
700  !! Omitting complete is the same as setting complete to .true.
701  integer, optional, intent(in) :: halo !< The size of the halo to update - the full
702  !! halo by default.
703  integer :: pass_vector_start_2d !< The integer index for this
704  !! update.
705 ! Arguments: u_cmpt - The nominal zonal (u) component of the vector pair which
706 ! is having its halos points exchanged.
707 ! (inout) v_cmpt - The nominal meridional (v) component of the vector pair
708 ! which is having its halos points exchanged.
709 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
710 ! determine where data should be sent.
711 ! (in) direction - An optional integer indicating which directions the
712 ! data should be sent. It is TO_ALL or the sum of any of
713 ! TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH, possibly
714 ! plus SCALAR_PAIR if these are paired non-directional
715 ! scalars discretized at the typical vector component
716 ! locations. For example, TO_EAST sends the data to the
717 ! processor to the east, so the halos on the western
718 ! side are filled. TO_ALL is the default if omitted.
719 ! (in) stagger - An optional flag, which may be one of A_GRID, BGRID_NE,
720 ! or CGRID_NE, indicating where the two components of the
721 ! vector are discretized. Omitting stagger is the same as
722 ! setting it to CGRID_NE.
723 ! (in) complete - An optional argument indicating whether the halo updates
724 ! should be initiated immediately or wait for second
725 ! pass_..._start call. Omitting complete is the same as
726 ! setting complete to .true.
727 ! (in,opt) halo - The size of the halo to update - the full halo by default.
728 ! (return value) - The integer index for this update.
729  integer :: stagger_local
730  integer :: dirflag
731 
732  stagger_local = cgrid_ne ! Default value for type of grid
733  if (present(stagger)) stagger_local = stagger
734 
735  dirflag = to_all ! 60
736  if (present(direction)) then ; if (direction > 0) dirflag = direction ; endif
737 
738  if (present(halo) .and. mom_dom%thin_halo_updates) then
739  pass_vector_start_2d = mpp_start_update_domains(u_cmpt, v_cmpt, &
740  mom_dom%mpp_domain, flags=dirflag, gridtype=stagger_local, &
741  whalo=halo, ehalo=halo, shalo=halo, nhalo=halo)
742  else
743  pass_vector_start_2d = mpp_start_update_domains(u_cmpt, v_cmpt, &
744  mom_dom%mpp_domain, flags=dirflag, gridtype=stagger_local)
745  endif
746 

◆ pass_vector_start_3d()

integer function mom_domains::pass_vector_start_3d ( real, dimension(:,:,:), intent(inout)  u_cmpt,
real, dimension(:,:,:), intent(inout)  v_cmpt,
type(mom_domain_type), intent(inout)  MOM_dom,
integer, intent(in), optional  direction,
integer, intent(in), optional  stagger,
logical, intent(in), optional  complete,
integer, intent(in), optional  halo 
)
private
Parameters
[in,out]u_cmptThe nominal zonal (u) component of the vector pair which is having its halos points exchanged.
[in,out]v_cmptThe nominal meridional (v) component of the vector pair which is having its halos points exchanged.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent.
[in]directionAn optional integer indicating which directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH, possibly plus SCALAR_PAIR if these are paired non-directional scalars discretized at the typical vector component locations. For example, TO_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO_ALL is the default if omitted.
[in]staggerAn optional flag, which may be one of A_GRID, BGRID_NE, or CGRID_NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to CGRID_NE.
[in]completeAn optional argument indicating whether the halo updates should be completed before progress resumes. Omitting complete is the same as setting complete to .true.
[in]haloThe size of the halo to update - the full halo by default.
Returns
The integer index for this update.

Definition at line 750 of file MOM_domains.F90.

References to_all.

750  real, dimension(:,:,:), intent(inout) :: u_cmpt !< The nominal zonal (u) component of the vector
751  !! pair which is having its halos points
752  !! exchanged.
753  real, dimension(:,:,:), intent(inout) :: v_cmpt !< The nominal meridional (v) component of the
754  !! vector pair which is having its halos points
755  !! exchanged.
756  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
757  !! needed to determine where data should be
758  !! sent.
759  integer, optional, intent(in) :: direction !< An optional integer indicating which
760  !! directions the data should be sent. It is TO_ALL or the sum of any of TO_EAST, TO_WEST,
761  !! TO_NORTH, and TO_SOUTH, possibly plus SCALAR_PAIR if these are paired non-directional
762  !! scalars discretized at the typical vector component locations. For example, TO_EAST sends
763  !! the data to the processor to the east, so the halos on the western side are filled. TO_ALL
764  !! is the default if omitted.
765  integer, optional, intent(in) :: stagger !< An optional flag, which may be one of A_GRID,
766  !! BGRID_NE, or CGRID_NE, indicating where the two components of the vector are
767  !! discretized. Omitting stagger is the same as setting it to CGRID_NE.
768  logical, optional, intent(in) :: complete !< An optional argument indicating whether the
769  !! halo updates should be completed before progress resumes.
770  !! Omitting complete is the same as setting complete to .true.
771  integer, optional, intent(in) :: halo !< The size of the halo to update - the full
772  !! halo by default.
773  integer :: pass_vector_start_3d !< The integer index for this
774  !! update.
775 ! Arguments: u_cmpt - The nominal zonal (u) component of the vector pair which
776 ! is having its halos points exchanged.
777 ! (inout) v_cmpt - The nominal meridional (v) component of the vector pair
778 ! which is having its halos points exchanged.
779 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
780 ! determine where data should be sent.
781 ! (in) direction - An optional integer indicating which directions the
782 ! data should be sent. It is TO_ALL or the sum of any of
783 ! TO_EAST, TO_WEST, TO_NORTH, and TO_SOUTH, possibly
784 ! plus SCALAR_PAIR if these are paired non-directional
785 ! scalars discretized at the typical vector component
786 ! locations. For example, TO_EAST sends the data to the
787 ! processor to the east, so the halos on the western
788 ! side are filled. TO_ALL is the default if omitted.
789 ! (in) stagger - An optional flag, which may be one of A_GRID, BGRID_NE,
790 ! or CGRID_NE, indicating where the two components of the
791 ! vector are discretized. Omitting stagger is the same as
792 ! setting it to CGRID_NE.
793 ! (in) complete - An optional argument indicating whether the halo updates
794 ! should be initiated immediately or wait for second
795 ! pass_..._start call. Omitting complete is the same as
796 ! setting complete to .true.
797 ! (in,opt) halo - The size of the halo to update - the full halo by default.
798 ! (return value) - The integer index for this update.
799  integer :: stagger_local
800  integer :: dirflag
801 
802  stagger_local = cgrid_ne ! Default value for type of grid
803  if (present(stagger)) stagger_local = stagger
804 
805  dirflag = to_all ! 60
806  if (present(direction)) then ; if (direction > 0) dirflag = direction ; endif
807 
808  if (present(halo) .and. mom_dom%thin_halo_updates) then
809  pass_vector_start_3d = mpp_start_update_domains(u_cmpt, v_cmpt, &
810  mom_dom%mpp_domain, flags=dirflag, gridtype=stagger_local, &
811  whalo=halo, ehalo=halo, shalo=halo, nhalo=halo)
812  else
813  pass_vector_start_3d = mpp_start_update_domains(u_cmpt, v_cmpt, &
814  mom_dom%mpp_domain, flags=dirflag, gridtype=stagger_local)
815  endif
816 

◆ start_group_pass()

subroutine, public mom_domains::start_group_pass ( type(group_pass_type), intent(inout)  group,
type(mom_domain_type), intent(inout)  MOM_dom 
)
Parameters
[in,out]groupThe data type that store information for group update. This data will be used in do_group_pass.
[in,out]mom_domThe MOM_domain_type containing the mpp_domain needed to determine where data should be sent.

Definition at line 1220 of file MOM_domains.F90.

Referenced by mom_barotropic::btstep(), mom_internal_tides::propagate_int_tide(), mom::step_mom(), and mom_dynamics_split_rk2::step_mom_dyn_split_rk2().

1220  type(group_pass_type), intent(inout) :: group !< The data type that store information for
1221  !! group update. This data will be used in
1222  !! do_group_pass.
1223  type(mom_domain_type), intent(inout) :: mom_dom !< The MOM_domain_type containing the mpp_domain
1224  !! needed to determine where data should be
1225  !! sent.
1226  real :: d_type
1227 
1228 ! Arguments:
1229 ! (inout) group - The data type that store information for group update.
1230 ! (in) MOM_dom - The MOM_domain_type containing the mpp_domain needed to
1231 ! determine where data should be sent.
1232 
1233  call mpp_start_group_update(group, mom_dom%mpp_domain, d_type)
1234 
Here is the caller graph for this function:

Variable Documentation

◆ to_all