source: trunk/libf/dyn3dpar/gr_fi_dyn_p.F @ 1

Last change on this file since 1 was 1, checked in by emillour, 14 years ago

Import initial LMDZ5

File size: 1.5 KB
RevLine 
[1]1!
2! $Id: gr_fi_dyn_p.F 1279 2009-12-10 09:02:56Z fairhead $
3!
4      SUBROUTINE gr_fi_dyn_p(nfield,ngrid,im,jm,pfi,pdyn)
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,ifield,ig
25
26c-----------------------------------------------------------------------
27c   calcul:
28c   -------
29c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
30      DO ifield=1,nfield
31
32        do ig=1,klon
33          i=index_i(ig)
34          j=index_j(ig)
35          pdyn(i,j,ifield)=pfi(ig,ifield)
36          if (i==1) pdyn(im,j,ifield)=pdyn(i,j,ifield)
37        enddo
38
39c   traitement des poles
40      if (pole_nord) then
41        do i=1,im
42          pdyn(i,1,ifield)=pdyn(1,1,ifield)
43        enddo
44      endif
45       
46      if (pole_sud) then
47        do i=1,im
48          pdyn(i,jm,ifield)=pdyn(1,jm,ifield)
49        enddo
50      endif
51     
52      ENDDO
53c$OMP END DO NOWAIT
54#else
55      write(lunout,*) "gr_fi_dyn_p : This routine should not be called",
56     &   "without parallelized physics"
57      stop
58#endif
59! of #ifdef CPP_EARTH
60      RETURN
61      END
Note: See TracBrowser for help on using the repository browser.