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

Last change on this file since 5205 was 5159, checked in by abarral, 7 weeks ago

Put dimensions.h and paramet.h into modules

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