source: LMDZ.3.3/branches/rel-LF/libf/dyn3d/geopot.F @ 604

Last change on this file since 604 was 2, checked in by lmdz, 25 years ago

Initial revision

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