Last change
on this file was
2996,
checked in by emillour, 17 months ago
|
Common dynamics:
Adapt script and interface for the possibility of running 1D model with MPI
(will only be usefull for running 1D models with XIOS).
In anticipation of next commit also remove the link to dyn3d/mod_const_mpi.F90 in the Mars dyn1d directory.
EM
|
File size:
1.2 KB
|
Line | |
---|
1 | ! |
---|
2 | ! $Id: mod_interface_dyn_phys.F90 2351 2015-08-25 15:14:59Z emillour $ |
---|
3 | ! |
---|
4 | MODULE mod_interface_dyn_phys |
---|
5 | INTEGER,SAVE,dimension(:),allocatable :: index_i |
---|
6 | INTEGER,SAVE,dimension(:),allocatable :: index_j |
---|
7 | |
---|
8 | |
---|
9 | CONTAINS |
---|
10 | |
---|
11 | #ifdef CPP_PARA |
---|
12 | ! Interface with parallel physics, |
---|
13 | SUBROUTINE Init_interface_dyn_phys |
---|
14 | USE mod_phys_lmdz_mpi_data |
---|
15 | IMPLICIT NONE |
---|
16 | include 'dimensions.h' |
---|
17 | |
---|
18 | INTEGER :: i,j,k |
---|
19 | |
---|
20 | ALLOCATE(index_i(klon_mpi)) |
---|
21 | ALLOCATE(index_j(klon_mpi)) |
---|
22 | |
---|
23 | k=1 |
---|
24 | IF (is_north_pole_dyn) THEN |
---|
25 | index_i(k)=1 |
---|
26 | index_j(k)=1 |
---|
27 | k=2 |
---|
28 | ! handle very specific case of 1D "parallel" setup |
---|
29 | if (klon_mpi==1) k=1 |
---|
30 | ELSE |
---|
31 | DO i=ii_begin,iim |
---|
32 | index_i(k)=i |
---|
33 | index_j(k)=jj_begin |
---|
34 | k=k+1 |
---|
35 | ENDDO |
---|
36 | ENDIF |
---|
37 | |
---|
38 | DO j=jj_begin+1,jj_end-1 |
---|
39 | DO i=1,iim |
---|
40 | index_i(k)=i |
---|
41 | index_j(k)=j |
---|
42 | k=k+1 |
---|
43 | ENDDO |
---|
44 | ENDDO |
---|
45 | |
---|
46 | IF (is_south_pole_dyn) THEN |
---|
47 | index_i(k)=1 |
---|
48 | index_j(k)=jj_end |
---|
49 | ELSE |
---|
50 | DO i=1,ii_end |
---|
51 | index_i(k)=i |
---|
52 | index_j(k)=jj_end |
---|
53 | k=k+1 |
---|
54 | ENDDO |
---|
55 | ENDIF |
---|
56 | |
---|
57 | END SUBROUTINE Init_interface_dyn_phys |
---|
58 | #else |
---|
59 | SUBROUTINE Init_interface_dyn_phys |
---|
60 | ! dummy routine for seq case |
---|
61 | END SUBROUTINE Init_interface_dyn_phys |
---|
62 | #endif |
---|
63 | ! of #ifdef CPP_PARA |
---|
64 | END MODULE mod_interface_dyn_phys |
---|
Note: See
TracBrowser
for help on using the repository browser.