source: LMDZ6/trunk/libf/dynphy_lonlat/mod_interface_dyn_phys.F90 @ 5348

Last change on this file since 5348 was 5271, checked in by abarral, 5 weeks ago

Move dimensions.h into a module
Nb: doesn't compile yet

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.2 KB
Line 
1!
2! $Id: mod_interface_dyn_phys.F90 5271 2024-10-24 14:25:39Z fhourdin $
3!
4MODULE mod_interface_dyn_phys
5  INTEGER,SAVE,dimension(:),allocatable :: index_i
6  INTEGER,SAVE,dimension(:),allocatable :: index_j
7 
8 
9CONTAINS
10 
11#ifdef CPP_PARA
12! Interface with parallel physics,
13  SUBROUTINE Init_interface_dyn_phys
14    USE mod_phys_lmdz_mpi_data
15    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
16IMPLICIT NONE
17
18   
19    INTEGER :: i,j,k
20   
21    ALLOCATE(index_i(klon_mpi))
22    ALLOCATE(index_j(klon_mpi))
23   
24    k=1
25    IF (is_north_pole_dyn) THEN
26      index_i(k)=1
27      index_j(k)=1
28      k=2
29    ELSE
30      DO i=ii_begin,iim
31        index_i(k)=i
32        index_j(k)=jj_begin
33        k=k+1
34      ENDDO
35    ENDIF
36   
37    DO j=jj_begin+1,jj_end-1
38      DO i=1,iim
39        index_i(k)=i
40        index_j(k)=j
41        k=k+1
42      ENDDO
43    ENDDO
44   
45    IF (is_south_pole_dyn) THEN
46      index_i(k)=1
47      index_j(k)=jj_end
48    ELSE
49      DO i=1,ii_end
50        index_i(k)=i
51        index_j(k)=jj_end
52        k=k+1
53       ENDDO
54    ENDIF
55 
56  END SUBROUTINE Init_interface_dyn_phys
57#else
58  SUBROUTINE Init_interface_dyn_phys
59  ! dummy routine for seq case
60  END SUBROUTINE Init_interface_dyn_phys
61#endif
62! of #ifdef CPP_PARA
63END MODULE mod_interface_dyn_phys
Note: See TracBrowser for help on using the repository browser.