source: LMDZ5/trunk/libf/dyn3dmem/gr_int_dyn.F @ 1632

Last change on this file since 1632 was 1632, checked in by Laurent Fairhead, 12 years ago

Import initial du répertoire dyn3dmem

Attention! ceci n'est qu'une version préliminaire du code "basse mémoire":
le code contenu dans ce répertoire est basé sur la r1320 et a donc besoin
d'être mis à jour par rapport à la dynamique parallèle d'aujourd'hui.
Ce code est toutefois mis à disposition pour circonvenir à des problèmes
de mémoire que certaines configurations du modèle pourraient rencontrer.
Dans l'état, il compile et tourne sur vargas et au CCRT


Initial import of dyn3dmem

Warning! this is just a preliminary version of the memory light code:
it is based on r1320 of the code and thus needs to be updated before
it can replace the present dyn3dpar code. It is nevertheless put at your
disposal to circumvent some memory problems some LMDZ configurations may
encounter. In its present state, it will compile and run on vargas and CCRT

File size: 1.2 KB
Line 
1!
2! $Header$
3!
4      subroutine gr_int_dyn(champin,champdyn,iim,jp1)
5      implicit none
6c=======================================================================
7c   passage d'un champ interpole a un champ sur grille scalaire
8c=======================================================================
9c-----------------------------------------------------------------------
10c   declarations:
11c   -------------
12
13      INTEGER iim
14      integer ip1, jp1
15      REAL champin(iim, jp1)
16      REAL champdyn(iim+1, jp1)
17
18      INTEGER i, j
19      real polenord, polesud
20
21c-----------------------------------------------------------------------
22c   calcul:
23c   -------
24
25      ip1 = iim + 1
26      polenord = 0.
27      polesud = 0.
28      do i = 1, iim
29        polenord = polenord + champin (i, 1)
30        polesud = polesud + champin (i, jp1)
31      enddo
32      polenord = polenord / iim
33      polesud = polesud / iim
34      do j = 1, jp1
35        do i = 1, iim
36          if (j .eq. 1) then
37            champdyn(i, j) = polenord
38          else if (j .eq. jp1) then
39            champdyn(i, j) = polesud
40          else
41            champdyn(i, j) = champin (i, j)
42          endif
43        enddo
44        champdyn(ip1, j) = champdyn(1, j)
45      enddo
46
47      RETURN
48      END
49
Note: See TracBrowser for help on using the repository browser.