source: LMDZ4/branches/LMDZ4-dev-20091210/libf/dyn3dpar/gr_dyn_fi_p.F @ 3281

Last change on this file since 3281 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.3 KB
Line 
1!
2! $Id: gr_dyn_fi_p.F 1222 2009-08-07 11:48:33Z musat $
3!
4      SUBROUTINE gr_dyn_fi_p(nfield,im,jm,ngrid,pdyn,pfi)
5#ifdef CPP_EARTH
6! Interface with parallel physics,
7! for now this routine only works with Earth physics
8      USE mod_interface_dyn_phys
9      USE dimphy
10      USE PARALLEL
11      IMPLICIT NONE
12c=======================================================================
13c   passage d'un champ de la grille scalaire a la grille physique
14c=======================================================================
15
16c-----------------------------------------------------------------------
17c   declarations:
18c   -------------
19
20      INTEGER im,jm,ngrid,nfield
21      REAL pdyn(im,jm,nfield)
22      REAL pfi(ngrid,nfield)
23
24      INTEGER i,j,ig,l
25
26c-----------------------------------------------------------------------
27c   calcul:
28c   -------
29
30c      IF(ngrid.NE.2+(jm-2)*(im-1)) STOP 'probleme de dim'
31c   traitement des poles
32c   traitement des point normaux
33c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
34      DO l=1,nfield   
35       DO ig=1,klon
36         i=index_i(ig)
37         j=index_j(ig)
38         pfi(ig,l)=pdyn(i,j,l)
39       ENDDO
40      ENDDO
41c$OMP END DO NOWAIT
42#else
43      write(lunout,*) "gr_fi_dyn_p : This routine should not be called",
44     &   "without parallelized physics"
45      stop
46#endif
47! of #ifdef CPP_EARTH
48      RETURN
49      END
Note: See TracBrowser for help on using the repository browser.