source: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/geopot.f90 @ 5139

Last change on this file since 5139 was 5134, checked in by abarral, 8 weeks ago

Replace academic.h, alpale.h, comdissip.h, comdissipn.h, comdissnew.h by modules
Remove unused clesph0.h

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