source: LMDZ5/trunk/libf/dyn3dmem/gr_v_scal_p.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.5 KB
Line 
1!
2! $Header$
3!
4      SUBROUTINE gr_v_scal_p(nx,x_v,x_scal)
5c%W%    %G%
6c=======================================================================
7c
8c   Author:    Frederic Hourdin      original: 11/11/92
9c   -------
10c
11c   Subject:
12c   ------
13c
14c   Method:
15c   --------
16c
17c   Interface:
18c   ----------
19c
20c      Input:
21c      ------
22c
23c      Output:
24c      -------
25c
26c=======================================================================
27      USE parallel
28      IMPLICIT NONE
29c-----------------------------------------------------------------------
30c   Declararations:
31c   ---------------
32
33#include "dimensions.h"
34#include "paramet.h"
35#include "comgeom.h"
36
37c   Arguments:
38c   ----------
39
40      INTEGER nx
41      REAL x_v(ip1jm,nx),x_scal(ip1jmp1,nx)
42
43c   Local:
44c   ------
45
46      INTEGER l,ij
47      INTEGER :: ijb,ije
48c-----------------------------------------------------------------------
49      ijb=ij_begin
50      ije=ij_end
51      if (pole_nord) ijb=ij_begin+iip1
52      if (pole_sud)  ije=ij_end-iip1
53     
54      DO l=1,nx
55         DO ij=ijb,ije
56            x_scal(ij,l)=
57     s      (airev(ij-iip1)*x_v(ij-iip1,l)+airev(ij)*x_v(ij,l))
58     s      /(airev(ij-iip1)+airev(ij))
59         ENDDO
60      ENDDO
61     
62      if (pole_nord) then
63        DO l=1,nx
64           DO ij=1,iip1
65              x_scal(ij,l)=0.
66           ENDDO
67        ENDDO
68      endif
69   
70      if (pole_sud) then
71        DO l=1,nx
72           DO ij=ip1jm+1,ip1jmp1
73              x_scal(ij,l)=0.
74           ENDDO
75        ENDDO
76      endif
77
78      RETURN
79      END
Note: See TracBrowser for help on using the repository browser.