Oasis3-MCT
mod_oasis_data.F90
Go to the documentation of this file.
1 
2 !> Provides a common location for several OASIS variables
3 
5 ! - - - - - - - - - - - - - - - - - - - - - - - - - - -
6 !
7 !
9 
10  IMPLICIT NONE
11 
12  public
13 
14 ! public prism_data_zero
15 
16 #include <mpif.h>
17 
18 ! GENERAL
19 
20  INTEGER(kind=ip_intwp_p) :: nulprt, nulprt1, nullucia ! unit numbers for log files
21  INTEGER(kind=ip_i4_p) :: oasis_debug
22  INTEGER(kind=ip_i4_p) :: timer_debug
23  INTEGER(kind=ip_i4_p) :: lucia_debug
24 
25  logical :: enddef_called ! true when enddef is called, for error checking
26 
27  INTEGER(kind=ip_i4_p) :: size_namfld
28  CHARACTER(len=ic_lvar), POINTER :: total_namsrcfld(:), total_namdstfld(:)
29 
30 ! Models
31 
32  ! These are identical on all MPI tasks
33  INTEGER(kind=ip_i4_p),parameter :: prism_mmodels = 20
34  INTEGER(kind=ip_i4_p) :: prism_nmodels ! number of models
35  INTEGER(kind=ip_i4_p) :: prism_amodels ! number of active models
36  character(len=ic_lvar) :: prism_modnam(prism_mmodels) ! model names
37  logical :: prism_modcpl(prism_mmodels) ! model coupling flags
38 
39  ! These are task specific
40  character(len=ic_lvar):: compnm ! name of model on TASK
41  integer(kind=ip_i4_p) :: compid ! integer id associated with model on TASK
42  logical :: oasis_coupled ! flag whether this TASK is coupled
43 
44 
45 ! MPI
46 
47  INTEGER(kind=ip_i4_p) :: mpi_comm_global
48  INTEGER(kind=ip_i4_p) :: mpi_rank_global
49  INTEGER(kind=ip_i4_p) :: mpi_size_global
50  INTEGER(kind=ip_i4_p) :: mpi_comm_local
51  INTEGER(kind=ip_i4_p) :: mpi_rank_local
52  INTEGER(kind=ip_i4_p) :: mpi_size_local
53  INTEGER(kind=ip_i4_p) :: mpi_root_local
54  INTEGER(kind=ip_i4_p) :: mpi_comm_map
55  INTEGER(kind=ip_i4_p) :: mpi_rank_map
56  INTEGER(kind=ip_i4_p) :: mpi_size_map
57  INTEGER(kind=ip_i4_p) :: mpi_root_map
58  LOGICAL :: mpi_in_map
59  CHARACTER(len=MPI_MAX_PROCESSOR_NAME) :: mpi_node_name
60  INTEGER(kind=ip_i4_p) :: mpi_err
61  INTEGER(kind=ip_i4_p),allocatable :: mpi_root_global(:) ! for each model, the rank in comm_world
62  ! of the root process
63 
64 ! PARAMETERS
65 
66  character(len=*) ,parameter :: cspval = "spval_undef"
67  real(ip_double_p),parameter :: rspval = 1.0e36
68  integer(ip_i4_p) ,parameter :: ispval = -999999
69 
70  real(ip_double_p),parameter :: prism_pi = 3.14159265358979323846
71  real(ip_double_p),parameter :: eradius = 6371229. ! meters
72 
73 !------------------------------------------------------------
74 CONTAINS
75 !------------------------------------------------------------
76 
77 !< Initialize the module data
78 
79  SUBROUTINE oasis_data_zero()
80 
81  IMPLICIT NONE
82 
83  character(len=*),parameter :: subname = '(oasis_data_zero)'
84 
85  nulprt = 6
86  nulprt1 = 6
87  nullucia = 60
88  oasis_debug = 0
89  timer_debug = 0
90  lucia_debug = 0
91  compid = -1
92  compnm = trim(cspval)
93  oasis_coupled = .false.
94  mpi_comm_global = -1
95  mpi_rank_global = -1
96  mpi_size_global = -1
97  mpi_comm_local = -1
98  mpi_rank_local = -1
99  mpi_size_local = -1
100  enddef_called = .false.
101 
102 END SUBROUTINE oasis_data_zero
103 
104 !------------------------------------------------------------
105 END MODULE mod_oasis_data
106 
107 
real(ip_double_p), parameter rspval
Provides a common location for several OASIS variables.
integer(kind=ip_i4_p) mpi_comm_map
integer(kind=ip_i4_p) lucia_debug
integer(kind=ip_i4_p) mpi_rank_map
integer(kind=ip_i4_p) mpi_size_local
integer(kind=ip_i4_p) size_namfld
integer(kind=ip_intwp_p) nulprt
logical, dimension(prism_mmodels) prism_modcpl
integer(kind=ip_i4_p) mpi_root_map
real(ip_double_p), parameter eradius
integer(kind=ip_i4_p) mpi_comm_global
integer(kind=ip_intwp_p) nulprt1
integer, parameter ip_i4_p
integer(kind=ip_i4_p) compid
character(len= *), parameter cspval
integer(kind=ip_i4_p) mpi_rank_local
Defines kinds for OASIS.
integer(kind=ip_i4_p) mpi_size_global
integer(kind=ip_i4_p) prism_amodels
integer(kind=ip_intwp_p) nullucia
character(len=ic_lvar), dimension(:), pointer total_namsrcfld
integer(kind=ip_i4_p) prism_nmodels
integer(kind=ip_i4_p) mpi_root_local
character(len=mpi_max_processor_name) mpi_node_name
integer(kind=ip_i4_p) mpi_rank_global
integer(kind=ip_i4_p), dimension(:), allocatable mpi_root_global
integer(kind=ip_i4_p) mpi_err
character(len=ic_lvar), dimension(:), pointer total_namdstfld
character(len=ic_lvar) compnm
integer(kind=ip_i4_p) oasis_debug
integer(kind=ip_i4_p) mpi_comm_local
integer(kind=ip_i4_p), parameter prism_mmodels
real(ip_double_p), parameter prism_pi
subroutine oasis_data_zero()
integer(ip_i4_p), parameter ispval
integer(kind=ip_i4_p) mpi_size_map
character(len=ic_lvar), dimension(prism_mmodels) prism_modnam
integer(kind=ip_i4_p) timer_debug