source: trunk/LMDZ.COMMON/libf/dynphy_lonlat/gr_fi_dyn_p.F @ 2757

Last change on this file since 2757 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.3 KB
Line 
1!
2! $Id: gr_fi_dyn_p.F 1615 2012-02-10 15:42:26Z emillour $
3!
4      SUBROUTINE gr_fi_dyn_p(nfield,ngrid,im,jm,pfi,pdyn)
5#ifdef CPP_PARA
6! Interface with parallel physics,
7      USE mod_interface_dyn_phys
8      USE dimphy
9      USE parallel_lmdz
10      IMPLICIT NONE
11c=======================================================================
12c   passage d'un champ de la grille scalaire a la grille physique
13c=======================================================================
14
15c-----------------------------------------------------------------------
16c   declarations:
17c   -------------
18
19      INTEGER im,jm,ngrid,nfield
20      REAL pdyn(im,jm,nfield)
21      REAL pfi(ngrid,nfield)
22
23      INTEGER i,j,ifield,ig
24
25c-----------------------------------------------------------------------
26c   calcul:
27c   -------
28c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
29      DO ifield=1,nfield
30
31        do ig=1,klon
32          i=index_i(ig)
33          j=index_j(ig)
34          pdyn(i,j,ifield)=pfi(ig,ifield)
35          if (i==1) pdyn(im,j,ifield)=pdyn(i,j,ifield)
36        enddo
37
38c   traitement des poles
39      if (pole_nord) then
40        do i=1,im
41          pdyn(i,1,ifield)=pdyn(1,1,ifield)
42        enddo
43      endif
44       
45      if (pole_sud) then
46        do i=1,im
47          pdyn(i,jm,ifield)=pdyn(1,jm,ifield)
48        enddo
49      endif
50     
51      ENDDO
52c$OMP END DO NOWAIT
53#endif
54! of #ifdef CPP_PARA
55      RETURN
56      END
Note: See TracBrowser for help on using the repository browser.