source: LMDZ5/branches/LF-private/libf/dyn3dmem/geopot.F @ 2942

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