source: trunk/LMDZ.GENERIC/libf/misc/ioipsl_getincom_p.F90 @ 1470

Last change on this file since 1470 was 1316, checked in by milmd, 10 years ago

LMDZ.GENERIC. Bug fix when compiling start2archive and newstart.

File size: 4.0 KB
Line 
1!
2! $Id$
3!
4! Module/Routines extracted from IOIPSL v2_1_8
5!
6MODULE ioipsl_getincom_p
7!-
8!$Id: getincom.f90 536 2009-01-30 11:46:27Z bellier $
9!-
10! This software is governed by the CeCILL license
11! See IOIPSL/IOIPSL_License_CeCILL.txt
12!---------------------------------------------------------------------
13USE ioipsl_getincom ! to use  'getin'
14USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
15USE mod_phys_lmdz_omp_data, ONLY :  is_omp_root
16use mod_phys_lmdz_para, only : bcast
17!-
18IMPLICIT NONE
19!-
20PRIVATE
21PUBLIC :: getin_p
22!-
23INTERFACE getin_p
24
25  MODULE PROCEDURE getinrs_p, getinr1d_p, getinr2d_p, &
26 &                 getinis_p, getini1d_p, getini2d_p, &
27 &                 getincs_p,                         &
28 &                 getinls_p, getinl1d_p, getinl2d_p
29END INTERFACE
30!-
31CONTAINS
32
33
34!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
35!!   Definition des getin -> bcast      !!
36!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
37
38!! -- Les chaines de caracteres -- !!
39 
40  SUBROUTINE getincs_p(VarIn,VarOut)
41    IMPLICIT NONE   
42    CHARACTER(LEN=*),INTENT(IN) :: VarIn
43    CHARACTER(LEN=*),INTENT(INOUT) :: VarOut   
44
45!$OMP BARRIER
46    IF (is_mpi_root .AND. is_omp_root) THEN
47        CALL getin(VarIn,VarOut)
48    ENDIF
49    CALL bcast(VarOut)
50  END SUBROUTINE getincs_p
51
52!! -- Les entiers -- !!
53 
54  SUBROUTINE getinis_p(VarIn,VarOut)
55    IMPLICIT NONE   
56    CHARACTER(LEN=*),INTENT(IN) :: VarIn
57    INTEGER,INTENT(INOUT) :: VarOut   
58
59!$OMP BARRIER
60    IF (is_mpi_root .AND. is_omp_root) THEN
61        CALL getin(VarIn,VarOut)
62    ENDIF
63    CALL bcast(VarOut)
64  END SUBROUTINE getinis_p
65
66  SUBROUTINE getini1d_p(VarIn,VarOut)
67    IMPLICIT NONE   
68    CHARACTER(LEN=*),INTENT(IN) :: VarIn
69    INTEGER,INTENT(INOUT) :: VarOut(:)
70
71!$OMP BARRIER
72    IF (is_mpi_root .AND. is_omp_root) THEN
73        CALL getin(VarIn,VarOut)
74    ENDIF
75    CALL bcast(VarOut)
76  END SUBROUTINE getini1d_p
77
78  SUBROUTINE getini2d_p(VarIn,VarOut)
79    IMPLICIT NONE   
80    CHARACTER(LEN=*),INTENT(IN) :: VarIn
81    INTEGER,INTENT(INOUT) :: VarOut(:,:)
82
83!$OMP BARRIER
84    IF (is_mpi_root .AND. is_omp_root) THEN
85        CALL getin(VarIn,VarOut)
86    ENDIF
87    CALL bcast(VarOut)
88  END SUBROUTINE getini2d_p
89
90!! -- Les flottants -- !!
91 
92  SUBROUTINE getinrs_p(VarIn,VarOut)
93    IMPLICIT NONE   
94    CHARACTER(LEN=*),INTENT(IN) :: VarIn
95    REAL,INTENT(INOUT) :: VarOut
96
97!$OMP BARRIER
98    IF (is_mpi_root .AND. is_omp_root) THEN
99        CALL getin(VarIn,VarOut)
100    ENDIF
101    CALL bcast(VarOut)
102  END SUBROUTINE getinrs_p
103
104  SUBROUTINE getinr1d_p(VarIn,VarOut)
105    IMPLICIT NONE   
106    CHARACTER(LEN=*),INTENT(IN) :: VarIn
107    REAL,INTENT(INOUT) :: VarOut(:)
108
109!$OMP BARRIER
110    IF (is_mpi_root .AND. is_omp_root) THEN
111        CALL getin(VarIn,VarOut)
112    ENDIF
113    CALL bcast(VarOut)
114  END SUBROUTINE getinr1d_p
115
116  SUBROUTINE getinr2d_p(VarIn,VarOut)
117    IMPLICIT NONE   
118    CHARACTER(LEN=*),INTENT(IN) :: VarIn
119    REAL,INTENT(INOUT) :: VarOut(:,:)
120
121!$OMP BARRIER
122    IF (is_mpi_root .AND. is_omp_root) THEN
123        CALL getin(VarIn,VarOut)
124    ENDIF
125    CALL bcast(VarOut)
126  END SUBROUTINE getinr2d_p
127
128!! -- Les Booleens -- !!
129 
130  SUBROUTINE getinls_p(VarIn,VarOut)
131    IMPLICIT NONE   
132    CHARACTER(LEN=*),INTENT(IN) :: VarIn
133    LOGICAL,INTENT(INOUT) :: VarOut
134
135!$OMP BARRIER
136    IF (is_mpi_root .AND. is_omp_root) THEN
137        CALL getin(VarIn,VarOut)
138    ENDIF
139    CALL bcast(VarOut)
140  END SUBROUTINE getinls_p
141
142  SUBROUTINE getinl1d_p(VarIn,VarOut)
143    IMPLICIT NONE   
144    CHARACTER(LEN=*),INTENT(IN) :: VarIn
145    LOGICAL,INTENT(INOUT) :: VarOut(:)
146
147!$OMP BARRIER
148    IF (is_mpi_root .AND. is_omp_root) THEN
149        CALL getin(VarIn,VarOut)
150    ENDIF
151    CALL bcast(VarOut)
152  END SUBROUTINE getinl1d_p
153
154  SUBROUTINE getinl2d_p(VarIn,VarOut)
155    IMPLICIT NONE   
156    CHARACTER(LEN=*),INTENT(IN) :: VarIn
157    LOGICAL,INTENT(INOUT) :: VarOut(:,:)
158
159!$OMP BARRIER
160    IF (is_mpi_root .AND. is_omp_root) THEN
161        CALL getin(VarIn,VarOut)
162    ENDIF
163    CALL bcast(VarOut)
164  END SUBROUTINE getinl2d_p
165!-
166!-----------------------------
167!-----------------------------
168!-----------------------------
169
170END MODULE ioipsl_getincom_p
Note: See TracBrowser for help on using the repository browser.