FMS  2025.03
Flexible Modeling System
mpp_data.F90
1 !***********************************************************************
2 !* GNU Lesser General Public License
3 !*
4 !* This file is part of the GFDL Flexible Modeling System (FMS).
5 !*
6 !* FMS is free software: you can redistribute it and/or modify it under
7 !* the terms of the GNU Lesser General Public License as published by
8 !* the Free Software Foundation, either version 3 of the License, or (at
9 !* your option) any later version.
10 !*
11 !* FMS is distributed in the hope that it will be useful, but WITHOUT
12 !* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 !* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 !* for more details.
15 !*
16 !* You should have received a copy of the GNU Lesser General Public
17 !* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
18 !***********************************************************************
19 !> @defgroup mpp_data_mod mpp_data_mod
20 !> @ingroup mpp
21 !> @brief Module to hold pointer and stack data for use in @ref mpp modules.
22 !!
23 !> Makes stack and pointer data publicly available from @ref mpp_data_mpi.inc or @ref
24 !! mpp_data_nocomm.inc for use in @ref mpp modules. This module is mainly
25 !! for internal use within @ref mpp_mod and @ref mpp_domains_mod .
26 
27 !> @addtogroup mpp_data_mod
28 !> @{
29 module mpp_data_mod
30 
31 #if defined(use_libMPI)
32  use mpi
33 #endif
34 
35  use mpp_parameter_mod, only : maxpes
36  use platform_mod
37 
38  implicit none
39  private
40 
41 ! Include variable "version" to be written to log file.
42 #include<file_version.h>
43  public version
44 
45  !> public data used by mpp_mod
46  public :: stat, mpp_stack, ptr_stack, status, ptr_status, sync, ptr_sync
47  public :: mpp_from_pe, ptr_from, remote_data_loc, ptr_remote
48 
49  !--- All othere modules should import these parameters from mpp_domains_mod.
50  !> public data which is used by mpp_domains_mod.
51  public :: mpp_domains_stack, ptr_domains_stack
52  public :: mpp_domains_stack_nonblock, ptr_domains_stack_nonblock
53 
54  !-------------------------------------------------------------------------------!
55  ! The following data included in the .inc file are diffrent for sma or mpi case !
56  !-------------------------------------------------------------------------------!
57 
58 #ifdef use_libMPI
59 #include <mpp_data_mpi.inc>
60 #else
61 #include <mpp_data_nocomm.inc>
62 #endif
63 
64 end module mpp_data_mod
65 !> @}
66 ! close documentation grouping