source: LMDZ5/trunk/libf/dyn3dmem/mod_interface_dyn_phys.F90 @ 1632

Last change on this file since 1632 was 1632, checked in by Laurent Fairhead, 12 years ago

Import initial du répertoire dyn3dmem

Attention! ceci n'est qu'une version préliminaire du code "basse mémoire":
le code contenu dans ce répertoire est basé sur la r1320 et a donc besoin
d'être mis à jour par rapport à la dynamique parallèle d'aujourd'hui.
Ce code est toutefois mis à disposition pour circonvenir à des problèmes
de mémoire que certaines configurations du modèle pourraient rencontrer.
Dans l'état, il compile et tourne sur vargas et au CCRT


Initial import of dyn3dmem

Warning! this is just a preliminary version of the memory light code:
it is based on r1320 of the code and thus needs to be updated before
it can replace the present dyn3dpar code. It is nevertheless put at your
disposal to circumvent some memory problems some LMDZ configurations may
encounter. In its present state, it will compile and run on vargas and CCRT

File size: 1.1 KB
Line 
1!
2! $Id: mod_interface_dyn_phys.F90 1279 2009-12-10 09:02:56Z fairhead $
3!
4MODULE mod_interface_dyn_phys
5  INTEGER,SAVE,dimension(:),allocatable :: index_i
6  INTEGER,SAVE,dimension(:),allocatable :: index_j
7 
8 
9#ifdef CPP_EARTH
10! Interface with parallel physics,
11! for now this routine only works with Earth physics
12CONTAINS
13 
14  SUBROUTINE Init_interface_dyn_phys
15    USE mod_phys_lmdz_mpi_data
16    IMPLICIT NONE
17    include 'dimensions.h'   
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) 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) 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#endif
58! of #ifdef CPP_EARTH
59END MODULE mod_interface_dyn_phys
Note: See TracBrowser for help on using the repository browser.