source: LMDZ6/trunk/libf/dyn3dpar/geopot_p.F @ 3981

Last change on this file since 3981 was 2600, checked in by Ehouarn Millour, 8 years ago

Cleanup in the dynamics: turn comvert.h into module comvert_mod.F90
EM

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1      SUBROUTINE geopot_p ( ngrid, teta, pk, pks, phis, phi )
2      USE parallel_lmdz
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
31c   Arguments:
32c   ----------
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,ijb,ije
42
43
44c-----------------------------------------------------------------------
45c     calcul de phi au niveau 1 pres du sol  .....
46      ijb=ij_begin
47      ije=ij_end+iip1
48     
49      IF (pole_sud)  ije=ij_end
50
51      DO  ij  = ijb, ije
52      phi( ij,1 ) = phis( ij ) + teta(ij,1) * ( pks(ij) - pk(ij,1) )
53      ENDDO
54
55c     calcul de phi aux niveaux superieurs  .......
56
57      DO  l = 2,llm
58        DO  ij    = ijb,ije
59        phi(ij,l) = phi(ij,l-1) + 0.5 * ( teta(ij,l)  + teta(ij,l-1) )
60     *                              *   (  pk(ij,l-1) -  pk(ij,l)    )
61        ENDDO
62      ENDDO
63
64      RETURN
65      END
Note: See TracBrowser for help on using the repository browser.