1 | MODULE mod_comprism_proto |
---|
2 | ! - - - - - - - - - - - - - - - - - - - - - - - - - - - |
---|
3 | ! |
---|
4 | !* =comclim.h= CLIM 1.1 internal include file |
---|
5 | ! Coupling Library for Interfacing Models |
---|
6 | ! |
---|
7 | ! - - - - - - - - - - - - - - - - - - - - - - - - - - - |
---|
8 | USE mod_prism_proto |
---|
9 | USE mod_kinds_model |
---|
10 | ! |
---|
11 | !-----Unit number for trace file |
---|
12 | ! |
---|
13 | INTEGER(kind=ip_i4_p) :: nulprt |
---|
14 | ! |
---|
15 | !-----Models descriptors |
---|
16 | ! |
---|
17 | ! ncplprocs: total number of processes involved in the coupling |
---|
18 | ! counting oasis process (indirect case) |
---|
19 | INTEGER(kind=ip_i4_p) :: ncplprocs, mynum, mytid, ig_mynummod |
---|
20 | INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: modtid |
---|
21 | INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: kbtotproc, kbcplproc |
---|
22 | !! AC |
---|
23 | INTEGER(kind=ip_i4_p) :: knmods |
---|
24 | CHARACTER(len=CLIM_Clength), DIMENSION(:), ALLOCATABLE :: cunames |
---|
25 | !!AC |
---|
26 | INTEGER(kind=ip_intwp_p), DIMENSION(:), ALLOCATABLE :: iga_unitmod |
---|
27 | CHARACTER(len=6), DIMENSION(:), ALLOCATABLE :: cg_modnam |
---|
28 | ! |
---|
29 | !-----Minimum exchange frequency, total time of the simulation, total |
---|
30 | ! number of fields exchanged in the simulation, local communicator of |
---|
31 | ! each component, maximum size of grids, initial date of the simulation |
---|
32 | ! |
---|
33 | INTEGER(kind=ip_i4_p) :: ig_frqmin, ig_ntime, ig_clim_nfield, ig_local_comm |
---|
34 | INTEGER(kind=ip_i4_p) :: ig_CLIM_Maxgrd, ig_inidate(6) |
---|
35 | ! |
---|
36 | !-----Lag of exported fields, coupling period of fields, sequential index |
---|
37 | ! of fields, name of exchanged fields and restart files, restart files |
---|
38 | ! numbers, number of restart files, logical indicating if one field |
---|
39 | ! (at least) goes through Oasis or not, field I/O status, logical |
---|
40 | ! indicating a restart file netcdf or not, logical indicating if all |
---|
41 | ! fields go through Oasis or not. |
---|
42 | ! |
---|
43 | INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_clim_lag, ig_def_lag |
---|
44 | INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_clim_reverse, ig_def_reverse |
---|
45 | INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_clim_invert, ig_def_invert |
---|
46 | INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_clim_freq, ig_def_freq |
---|
47 | INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_clim_seq, ig_def_seq |
---|
48 | INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_clim_norstfile, ig_def_norstfile |
---|
49 | INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_aux, ig_clim_state |
---|
50 | INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_def_state |
---|
51 | INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_clim_trans, ig_def_trans |
---|
52 | INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_clim_numlab |
---|
53 | !RV Will contain label numbers of fields according to their port number |
---|
54 | INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_def_numlab |
---|
55 | !RV |
---|
56 | INTEGER(kind=ip_i4_p) :: ig_nbr_rstfile |
---|
57 | CHARACTER(len=8), DIMENSION(:), ALLOCATABLE :: cg_cnaminp, cg_cnamout |
---|
58 | CHARACTER(len=8), DIMENSION(:), ALLOCATABLE :: cg_clim_rstfile |
---|
59 | CHARACTER(len=8), DIMENSION(:), ALLOCATABLE :: cg_def_rstfile |
---|
60 | CHARACTER(len=32), DIMENSION(:), ALLOCATABLE :: cg_clim_inpfile |
---|
61 | CHARACTER(len=32), DIMENSION(:), ALLOCATABLE :: cg_def_inpfile |
---|
62 | CHARACTER(len=8), DIMENSION(:), ALLOCATABLE :: cg_ignout_field |
---|
63 | LOGICAL :: lg_ncdfrst, lg_oasis_field |
---|
64 | ! |
---|
65 | ! For lons and lats and corner outputs |
---|
66 | CHARACTER(len=5) :: cg_clim_cgrdnam |
---|
67 | CHARACTER(len=4) :: cg_clim_lonsuf, cg_clim_latsuf |
---|
68 | CHARACTER(len=4) :: crn_clim_lonsuf, crn_clim_latsuf |
---|
69 | CHARACTER(len=4), DIMENSION(:), ALLOCATABLE :: & |
---|
70 | cga_clim_locatorbf, cga_clim_locatoraf, cga_clim_locator |
---|
71 | INTEGER(kind=ip_intwp_p) :: ig_noc ! Number of corners |
---|
72 | |
---|
73 | ! |
---|
74 | !-----Local transformations descriptors |
---|
75 | ! |
---|
76 | REAL(kind=ip_single_p), DIMENSION(:,:), ALLOCATABLE :: rg_field_trans |
---|
77 | REAL(kind=ip_double_p), DIMENSION(:,:), ALLOCATABLE :: dg_field_trans |
---|
78 | INTEGER(kind=ip_intwp_p), DIMENSION(:), ALLOCATABLE :: ig_number |
---|
79 | LOGICAL :: lg_dgfield |
---|
80 | ! |
---|
81 | !-----Decomposition descriptors |
---|
82 | ! |
---|
83 | INTEGER(kind=ip_i4_p) :: ig_nbpart |
---|
84 | INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_length_part |
---|
85 | INTEGER(kind=ip_i4_p), DIMENSION(:,:), ALLOCATABLE :: ig_def_part |
---|
86 | ! |
---|
87 | !-----Ports descriptors |
---|
88 | ! |
---|
89 | INTEGER(kind=ip_i4_p) :: nports |
---|
90 | INTEGER(kind=ip_i4_p), DIMENSION(:,:), ALLOCATABLE :: myport, irport |
---|
91 | INTEGER(kind=ip_i4_p), DIMENSION(:,:), ALLOCATABLE :: mydist, irdist |
---|
92 | ! |
---|
93 | ! |
---|
94 | !-----Links descriptors |
---|
95 | ! |
---|
96 | INTEGER(kind=ip_i4_p) :: nlinks |
---|
97 | INTEGER(kind=ip_i4_p), DIMENSION(:,:), ALLOCATABLE :: mylink |
---|
98 | ! |
---|
99 | !-----Data encoding |
---|
100 | ! |
---|
101 | INTEGER(kind=ip_i4_p) :: mycode |
---|
102 | INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ncode |
---|
103 | ! |
---|
104 | !-----Inquiry descriptors |
---|
105 | ! |
---|
106 | INTEGER(kind=ip_i4_p) :: nbsend, nbrecv |
---|
107 | ! |
---|
108 | !-----Time out stuff |
---|
109 | ! |
---|
110 | INTEGER(kind=ip_i4_p) :: ntiret, ntiogp, ntiout, nexit |
---|
111 | ! |
---|
112 | !-----Timesteps descriptors |
---|
113 | ! |
---|
114 | INTEGER(kind=ip_i4_p) :: mystep, mystdt, myfcpl |
---|
115 | INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_nstep |
---|
116 | INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: nstdt |
---|
117 | INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: nfcpl |
---|
118 | ! |
---|
119 | !-----Delta time between models |
---|
120 | ! |
---|
121 | REAL (kind=ip_realwp_p), DIMENSION(:), ALLOCATABLE :: delta |
---|
122 | REAL (kind=ip_realwp_p), DIMENSION(:), ALLOCATABLE :: delte |
---|
123 | ! |
---|
124 | !-----Character strings |
---|
125 | ! |
---|
126 | CHARACTER*8 :: cgroup |
---|
127 | CHARACTER*16 :: cnaprt |
---|
128 | CHARACTER*32, DIMENSION(:), ALLOCATABLE :: cports, clrport |
---|
129 | CHARACTER*32 :: cmynam |
---|
130 | CHARACTER*32, DIMENSION(:), ALLOCATABLE :: cnames |
---|
131 | CHARACTER*4 :: ctype |
---|
132 | ! |
---|
133 | !-----Packing area for Export and Import |
---|
134 | ! |
---|
135 | REAL(kind=ip_double_p), DIMENSION(:), ALLOCATABLE :: pkwork |
---|
136 | REAL(kind=ip_double_p), DIMENSION(:), ALLOCATABLE :: pkwork_field |
---|
137 | ! |
---|
138 | ! |
---|
139 | !-----CLIM/MPI2 specific variable |
---|
140 | !-----mpi_rank : Rank of process in MPI communicator |
---|
141 | !-----mpi_size : Size of communicator |
---|
142 | !-----mpi_err : Error code of MPI calls |
---|
143 | !-----mpi_comm : Communicator handle |
---|
144 | |
---|
145 | INTEGER(kind=ip_i4_p) :: mpi_rank, mpi_size, mpi_err, mpi_comm |
---|
146 | ! |
---|
147 | !-----Buffer and logical for MPI_BSend |
---|
148 | ! |
---|
149 | LOGICAL :: lg_clim_bsend |
---|
150 | REAL(kind=ip_double_p), DIMENSION(:), ALLOCATABLE :: dg_bufsend |
---|
151 | ! |
---|
152 | ! |
---|
153 | !-----lg_mpiflag: logical true if MPI_Init has been called by application |
---|
154 | ! |
---|
155 | LOGICAL :: lg_mpiflag |
---|
156 | ! |
---|
157 | !vg>>> |
---|
158 | ! |
---|
159 | !-----flag to start grids writing |
---|
160 | ! |
---|
161 | INTEGER(kind=ip_i4_p) :: grids_start |
---|
162 | ! |
---|
163 | !vg<<< |
---|
164 | END MODULE mod_comprism_proto |
---|
165 | |
---|
166 | |
---|