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