[5246] | 1 | SUBROUTINE geopot_loc ( ngrid, teta, pk, pks, phis, phi ) |
---|
| 2 | USE parallel_lmdz |
---|
[5271] | 3 | USE dimensions_mod, ONLY: iim, jjm, llm, ndm |
---|
| 4 | IMPLICIT NONE |
---|
[1632] | 5 | |
---|
| 6 | |
---|
[5246] | 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 | ! ------------- |
---|
[1632] | 28 | |
---|
[5271] | 29 | |
---|
[5246] | 30 | include "paramet.h" |
---|
[1632] | 31 | |
---|
[5246] | 32 | ! Arguments: |
---|
| 33 | ! ---------- |
---|
| 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) |
---|
[1632] | 37 | |
---|
| 38 | |
---|
[5246] | 39 | ! Local: |
---|
| 40 | ! ------ |
---|
[1632] | 41 | |
---|
[5246] | 42 | INTEGER :: l, ij,ijb,ije |
---|
[1632] | 43 | |
---|
| 44 | |
---|
[5246] | 45 | !----------------------------------------------------------------------- |
---|
| 46 | ! calcul de phi au niveau 1 pres du sol ..... |
---|
| 47 | ijb=ij_begin |
---|
| 48 | ije=ij_end+iip1 |
---|
[1632] | 49 | |
---|
[5246] | 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 | ! 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 SUBROUTINE geopot_loc |
---|