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

Last change on this file was 5271, checked in by abarral, 8 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
RevLine 
[1279]1!
2! $Id: mod_interface_dyn_phys.F90 5271 2024-10-24 14:25:39Z fhourdin $
3!
[774]4MODULE mod_interface_dyn_phys
5  INTEGER,SAVE,dimension(:),allocatable :: index_i
6  INTEGER,SAVE,dimension(:),allocatable :: index_j
7 
8 
[2351]9CONTAINS
10 
[2239]11#ifdef CPP_PARA
[1279]12! Interface with parallel physics,
[774]13  SUBROUTINE Init_interface_dyn_phys
14    USE mod_phys_lmdz_mpi_data
[5271]15    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
16IMPLICIT NONE
17
[774]18   
19    INTEGER :: i,j,k
20   
21    ALLOCATE(index_i(klon_mpi))
22    ALLOCATE(index_j(klon_mpi))
23   
24    k=1
[2429]25    IF (is_north_pole_dyn) THEN
[774]26      index_i(k)=1
27      index_j(k)=1
28      k=2
29    ELSE
30      DO i=ii_begin,iim
[2429]31        index_i(k)=i
32        index_j(k)=jj_begin
33        k=k+1
34      ENDDO
[774]35    ENDIF
36   
37    DO j=jj_begin+1,jj_end-1
38      DO i=1,iim
[2429]39        index_i(k)=i
40        index_j(k)=j
41        k=k+1
[774]42      ENDDO
43    ENDDO
44   
[2429]45    IF (is_south_pole_dyn) THEN
[774]46      index_i(k)=1
47      index_j(k)=jj_end
48    ELSE
49      DO i=1,ii_end
[2429]50        index_i(k)=i
51        index_j(k)=jj_end
52        k=k+1
[774]53       ENDDO
54    ENDIF
55 
56  END SUBROUTINE Init_interface_dyn_phys
[2351]57#else
58  SUBROUTINE Init_interface_dyn_phys
59  ! dummy routine for seq case
60  END SUBROUTINE Init_interface_dyn_phys
[1279]61#endif
[2239]62! of #ifdef CPP_PARA
[774]63END MODULE mod_interface_dyn_phys
Note: See TracBrowser for help on using the repository browser.