source: LMDZ6/trunk/libf/phy_common/ioipsl_getin_p_mod.f90 @ 5420

Last change on this file since 5420 was 5268, checked in by abarral, 2 months ago

.f90 <-> .F90 depending on cpp key use

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