source: LMDZ5/trunk/libf/dyn3dmem/geopot_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.7 KB
Line 
1      SUBROUTINE geopot_p ( ngrid, teta, pk, pks, phis, phi )
2      USE parallel
3      IMPLICIT NONE
4     
5     
6c=======================================================================
7c
8c   Auteur:  P. Le Van
9c   -------
10c
11c   Objet:
12c   ------
13c
14c    *******************************************************************
15c    ....   calcul du geopotentiel aux milieux des couches    .....
16c    *******************************************************************
17c
18c     ....   l'integration se fait de bas en haut  ....
19c
20c     .. ngrid,teta,pk,pks,phis sont des argum. d'entree pour le s-pg ..
21c              phi               est un  argum. de sortie pour le s-pg .
22c
23c=======================================================================
24c-----------------------------------------------------------------------
25c   Declarations:
26c   -------------
27
28#include "dimensions.h"
29#include "paramet.h"
30#include "comvert.h"
31
32c   Arguments:
33c   ----------
34      INTEGER ngrid
35      REAL teta(ngrid,llm),pks(ngrid),phis(ngrid),pk(ngrid,llm) ,
36     *       phi(ngrid,llm)
37
38
39c   Local:
40c   ------
41     
42      INTEGER  l, ij,ijb,ije
43
44
45c-----------------------------------------------------------------------
46c     calcul de phi au niveau 1 pres du sol  .....
47      ijb=ij_begin
48      ije=ij_end+iip1
49     
50      IF (pole_sud)  ije=ij_end
51
52      DO  ij  = ijb, ije
53      phi( ij,1 ) = phis( ij ) + teta(ij,1) * ( pks(ij) - pk(ij,1) )
54      ENDDO
55
56c     calcul de phi aux niveaux superieurs  .......
57
58      DO  l = 2,llm
59        DO  ij    = ijb,ije
60        phi(ij,l) = phi(ij,l-1) + 0.5 * ( teta(ij,l)  + teta(ij,l-1) )
61     *                              *   (  pk(ij,l-1) -  pk(ij,l)    )
62        ENDDO
63      ENDDO
64
65      RETURN
66      END
Note: See TracBrowser for help on using the repository browser.