source: trunk/LMDZ.COMMON/libf/dynlonlat_phylonlat/mod_interface_dyn_phys.F90 @ 1403

Last change on this file since 1403 was 1403, checked in by emillour, 10 years ago

All models: Reorganizing the physics/dynamics interface.

  • makelmdz and makelmdz_fcm scripts adapted to handle the new directory settings
  • misc: (replaces what was the "bibio" directory)
  • Should only contain extremely generic (and non physics or dynamics-specific) routines
  • Therefore moved initdynav.F90, initfluxsto.F, inithist.F, writedynav.F90, write_field.F90, writehist.F to "dyn3d_common"
  • dynlonlat_phylonlat: (new interface directory)
  • This directory contains routines relevent to physics/dynamics grid interactions, e.g. routines gr_dyn_fi or gr_fi_dyn and calfis
  • Moreover the dynlonlat_phylonlat contains directories "phy*" corresponding to each physics package "phy*" to be used. These subdirectories should only contain specific interfaces (e.g. iniphysiq) or main programs (e.g. newstart)
  • phy*/dyn1d: this subdirectory contains the 1D model using physics from phy*

EM

File size: 1.2 KB
Line 
1!
2! $Id: mod_interface_dyn_phys.F90 1615 2012-02-10 15:42:26Z emillour $
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_PHYS
10! Interface with parallel physics,
11CONTAINS
12 
13  SUBROUTINE Init_interface_dyn_phys
14    USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi, is_north_pole, is_south_pole, &
15                                      ii_begin, jj_begin, ii_end, jj_end
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_PHYS
59END MODULE mod_interface_dyn_phys
Note: See TracBrowser for help on using the repository browser.