source: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/geopot_loc.f90 @ 5153

Last change on this file since 5153 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
File size: 1.6 KB
Line 
1SUBROUTINE geopot_loc( ngrid, teta, pk, pks, phis, phi )
2  USE parallel_lmdz
3  IMPLICIT NONE
4
5
6  !=======================================================================
7  !
8  !   Auteur:  P. Le Van
9  !   -------
10  !
11  !   Objet:
12  !   ------
13  !
14  !    *******************************************************************
15  !    ....   calcul du geopotentiel aux milieux des couches    .....
16  !    *******************************************************************
17  !
18  ! ....   l'integration se fait de bas en haut  ....
19  !
20  ! .. ngrid,teta,pk,pks,phis sont des argum. d'entree pour le s-pg ..
21  !          phi               est un  argum. de sortie pour le s-pg .
22  !
23  !=======================================================================
24  !-----------------------------------------------------------------------
25  !   Declarations:
26  !   -------------
27
28  INCLUDE "dimensions.h"
29  INCLUDE "paramet.h"
30
31  !   Arguments:
32  !   ----------
33  INTEGER :: ngrid
34  REAL :: teta(ijb_u:ije_u,llm),pks(ijb_u:ije_u),phis(ijb_u:ije_u), &
35        pk(ijb_u:ije_u,llm) , phi(ijb_u:ije_u,llm)
36
37
38  !   Local:
39  !   ------
40
41  INTEGER :: l, ij,ijb,ije
42
43
44  !-----------------------------------------------------------------------
45  ! 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
55  ! 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
65END SUBROUTINE geopot_loc
Note: See TracBrowser for help on using the repository browser.