Oasis3-MCT
 All Classes Files Functions Variables Macros Pages
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_err
55  INTEGER(kind=ip_i4_p),allocatable :: mpi_root_global(:) ! for each model, the rank in comm_world
56  ! of the root process
57 
58 ! PARAMETERS
59 
60  character(len=*) ,parameter :: cspval = "spval_undef"
61  real(ip_double_p),parameter :: rspval = 1.0e36
62  integer(ip_i4_p) ,parameter :: ispval = -999999
63 
64  real(ip_double_p),parameter :: prism_pi = 3.14159265358979323846
65  real(ip_double_p),parameter :: eradius = 6371229. ! meters
66 
67 !------------------------------------------------------------
68 CONTAINS
69 !------------------------------------------------------------
70 
71 !< Initialize the module data
72 
73  SUBROUTINE oasis_data_zero()
74 
75  IMPLICIT NONE
76 
77  character(len=*),parameter :: subname = '(oasis_data_zero)'
78 
79  nulprt = 6
80  nulprt1 = 6
81  nullucia = 60
82  oasis_debug = 0
83  timer_debug = 0
84  lucia_debug = 0
85  compid = -1
86  compnm = trim(cspval)
87  oasis_coupled = .false.
88  mpi_comm_global = -1
89  mpi_rank_global = -1
90  mpi_size_global = -1
91  mpi_comm_local = -1
92  mpi_rank_local = -1
93  mpi_size_local = -1
94  enddef_called = .false.
95 
96 END SUBROUTINE oasis_data_zero
97 
98 !------------------------------------------------------------
99 END MODULE mod_oasis_data
100 
101 
Provides a common location for several OASIS variables.
Defines kinds for OASIS.
subroutine oasis_data_zero()