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