source: LMDZ4/branches/LMDZ4-dev-20091210/libf/dyn3dpar/mod_interface_dyn_phys.F90 @ 5071

Last change on this file since 5071 was 1222, checked in by Ehouarn Millour, 15 years ago

Changes and cleanups to enable compiling without physics
and without ioipsl.

IOIPSL related cleanups:

  • bibio/writehist.F encapsulate the routine (which needs IOIPSL to function)

with #ifdef IOIPSL flag.

  • dyn3d/abort_gcm.F, dyn3dpar/abort_gcm.F and dyn3dpar/getparam.F90: use ioipsl_getincom module when not compiling with IOIPSL library, in order to always be able to use getin() routine.
  • removed unused "use IOIPSL" in dyn3dpar/guide_p_mod.F90
  • calendar related issue: Initialize day_ref and annee_ref in iniacademic.F (i.e. when they are not read from start.nc file)

Earth-specific programs/routines/modules:
create_etat0.F, fluxstokenc.F, limit_netcdf.F, startvar.F
(versions in dyn3d and dyn3dpar)
These routines and modules, which by design and porpose are made to function with
Earth physics are encapsulated with #CPP_EARTH cpp flag.

Earth-specific instructions:

  • calls to qminimum (specific treatment of first 2 tracers, i.e. water) in dyn3d/caladvtrac.F, dyn3d/integrd.F, dyn3dpar/caladvtrac_p.F, dyn3dpar/integrd_p.F only if (planet_type == 'earth')

Interaction with parallel physics:

  • routine dyn3dpar/parallel.F90 uses "surface_data" module (which is in the physics ...) to know value of "type_ocean" . Encapsulated that with #ifdef CPP_EARTH and set to a default type_ocean="dummy" otherwise.
  • So far, only Earth physics are parallelized, so all the interaction between parallel dynamics and parallel physics are encapsulated with #ifdef CCP_EARTH (this way we can run parallel without any physics). The (dyn3dpar) routines which contains such interaction are: bands.F90, gr_dyn_fi_p.F, gr_fi_dyn_p.F, mod_interface_dyn_phys.F90 This should later (when improving dyn/phys interface) be encapsulated with a more general and appropriate #ifdef CPP_PHYS cpp flag.

I checked that these changes do not alter results (on the simple
32x24x11 bench) on Ciclad (seq & mpi), Brodie (seq, mpi & omp) and
Vargas (seq, mpi & omp).

EM

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.0 KB
Line 
1!
2! $Id: mod_interface_dyn_phys.F90 1222 2009-08-07 11:48:33Z abarral $
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.