LMDZ
geopot_loc.F
Go to the documentation of this file.
1  SUBROUTINE geopot_loc ( ngrid, teta, pk, pks, phis, phi )
3  IMPLICIT NONE
4 
5 
6 c=======================================================================
7 c
8 c Auteur: P. Le Van
9 c -------
10 c
11 c Objet:
12 c ------
13 c
14 c *******************************************************************
15 c .... calcul du geopotentiel aux milieux des couches .....
16 c *******************************************************************
17 c
18 c .... l'integration se fait de bas en haut ....
19 c
20 c .. ngrid,teta,pk,pks,phis sont des argum. d'entree pour le s-pg ..
21 c phi est un argum. de sortie pour le s-pg .
22 c
23 c=======================================================================
24 c-----------------------------------------------------------------------
25 c Declarations:
26 c -------------
27 
28 #include "dimensions.h"
29 #include "paramet.h"
30 #include "comvert.h"
31 
32 c Arguments:
33 c ----------
34  INTEGER ngrid
35  REAL teta(ijb_u:ije_u,llm),pks(ijb_u:ije_u),phis(ijb_u:ije_u),
36  * pk(ijb_u:ije_u,llm) , phi(ijb_u:ije_u,llm)
37 
38 
39 c Local:
40 c ------
41 
42  INTEGER l, ij,ijb,ije
43 
44 
45 c-----------------------------------------------------------------------
46 c calcul de phi au niveau 1 pres du sol .....
47  ijb=ij_begin
48  ije=ij_end+iip1
49 
50  IF (pole_sud) ije=ij_end
51 
52  DO ij = ijb, ije
53  phi( ij,1 ) = phis( ij ) + teta(ij,1) * ( pks(ij) - pk(ij,1) )
54  ENDDO
55 
56 c calcul de phi aux niveaux superieurs .......
57 
58  DO l = 2,llm
59  DO ij = ijb,ije
60  phi(ij,l) = phi(ij,l-1) + 0.5 * ( teta(ij,l) + teta(ij,l-1) )
61  * * ( pk(ij,l-1) - pk(ij,l) )
62  ENDDO
63  ENDDO
64 
65  RETURN
66  END
integer, save ij_end
logical, save pole_sud
!$Id Turb_fcg_gcssold get_uvd hqturb_gcssold endif!large scale llm day day1 day day1 *dt_toga endif!time annee_ref dt_toga u_toga vq_toga w_prof vq_prof llm day day1 day day1 *dt_dice endif!time annee_ref dt_dice swup_dice vg_dice omega_dice tg_prof vg_profd w_profd omega_profd!do llm!print llm l llm
integer, save ij_begin
subroutine geopot_loc(ngrid, teta, pk, pks, phis, phi)
Definition: geopot_loc.F:2
integer, save ije_u
integer, save ijb_u