| 1 | |
|---|
| 2 | ! $Header$ |
|---|
| 3 | |
|---|
| 4 | SUBROUTINE convflu( xflu,yflu,nbniv,convfl ) |
|---|
| 5 | |
|---|
| 6 | ! P. Le Van |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | ! ******************************************************************* |
|---|
| 10 | ! ... calcule la (convergence horiz. * aire locale)du flux ayant pour |
|---|
| 11 | ! composantes xflu et yflu ,variables extensives . ...... |
|---|
| 12 | ! ******************************************************************* |
|---|
| 13 | ! xflu , yflu et nbniv sont des arguments d'entree pour le s-pg .. |
|---|
| 14 | ! convfl est un argument de sortie pour le s-pg . |
|---|
| 15 | |
|---|
| 16 | ! njxflu est le nombre de lignes de latitude de xflu, |
|---|
| 17 | ! ( = jjm ou jjp1 ) |
|---|
| 18 | ! nbniv est le nombre de niveaux vert. de xflu et de yflu . |
|---|
| 19 | |
|---|
| 20 | USE lmdz_ssum_scopy, ONLY: ssum |
|---|
| 21 | USE lmdz_comgeom |
|---|
| 22 | |
|---|
| 23 | USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm |
|---|
| 24 | USE lmdz_paramet |
|---|
| 25 | IMPLICIT NONE |
|---|
| 26 | ! |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | REAL :: xflu,yflu,convfl,convpn,convps |
|---|
| 30 | INTEGER :: l,ij,nbniv |
|---|
| 31 | DIMENSION xflu( ip1jmp1,nbniv ),yflu( ip1jm,nbniv ) , & |
|---|
| 32 | convfl( ip1jmp1,nbniv ) |
|---|
| 33 | |
|---|
| 34 | |
|---|
| 35 | DO l = 1,nbniv |
|---|
| 36 | |
|---|
| 37 | DO ij = iip2, ip1jm - 1 |
|---|
| 38 | convfl( ij + 1,l ) = xflu( ij,l ) - xflu( ij + 1,l ) + & |
|---|
| 39 | yflu(ij +1,l ) - yflu( ij -iim,l ) |
|---|
| 40 | END DO |
|---|
| 41 | |
|---|
| 42 | ! |
|---|
| 43 | |
|---|
| 44 | ! .... correction pour convfl( 1,j,l) ...... |
|---|
| 45 | ! .... convfl(1,j,l)= convfl(iip1,j,l) ... |
|---|
| 46 | |
|---|
| 47 | !DIR$ IVDEP |
|---|
| 48 | DO ij = iip2,ip1jm,iip1 |
|---|
| 49 | convfl( ij,l ) = convfl( ij + iim,l ) |
|---|
| 50 | END DO |
|---|
| 51 | |
|---|
| 52 | ! ...... calcul aux poles ....... |
|---|
| 53 | |
|---|
| 54 | convpn = SSUM( iim, yflu( 1 ,l ), 1 ) |
|---|
| 55 | convps = - SSUM( iim, yflu( ip1jm-iim,l ), 1 ) |
|---|
| 56 | DO ij = 1,iip1 |
|---|
| 57 | convfl( ij ,l ) = convpn * aire( ij ) / apoln |
|---|
| 58 | convfl( ij+ ip1jm,l ) = convps * aire( ij+ ip1jm) / apols |
|---|
| 59 | END DO |
|---|
| 60 | |
|---|
| 61 | END DO |
|---|
| 62 | RETURN |
|---|
| 63 | END SUBROUTINE convflu |
|---|