1 |
! |
SUBROUTINE convflu( xflu,yflu,nbniv,convfl ) |
2 |
! $Header: /home/cvsroot/LMDZ4/libf/dyn3d/convflu.F,v 1.1.1.1 2004/05/19 12:53:05 lmdzadmin Exp $ |
|
3 |
! |
! From LMDZ4/libf/dyn3d/convflu.F, version 1.1.1.1 2004/05/19 12:53:05 |
4 |
SUBROUTINE convflu( xflu,yflu,nbniv,convfl ) |
|
5 |
c |
! P. Le Van |
6 |
c P. Le Van |
|
7 |
c |
! Calcule la (convergence horiz. * aire locale) du flux ayant pour |
8 |
c |
! composantes xflu et yflu ,variables extensives . |
9 |
c ******************************************************************* |
|
10 |
c ... calcule la (convergence horiz. * aire locale)du flux ayant pour |
! nbniv est le nombre de niveaux vert. de xflu et de yflu. |
11 |
c composantes xflu et yflu ,variables extensives . ...... |
|
12 |
c ******************************************************************* |
use dimens_m |
13 |
c xflu , yflu et nbniv sont des arguments d'entree pour le s-pg .. |
use paramet_m |
14 |
c convfl est un argument de sortie pour le s-pg . |
use comgeom |
15 |
c |
|
16 |
c njxflu est le nombre de lignes de latitude de xflu, |
IMPLICIT NONE |
17 |
c ( = jjm ou jjp1 ) |
|
18 |
c nbniv est le nombre de niveaux vert. de xflu et de yflu . |
integer, intent(in):: nbniv |
19 |
c |
REAL, intent(in):: xflu( ip1jmp1,nbniv ), yflu( ip1jm,nbniv ) |
20 |
use dimens_m |
real, intent(out):: convfl( ip1jmp1,nbniv ) |
21 |
use paramet_m |
|
22 |
use comgeom |
real convpn,convps |
23 |
IMPLICIT NONE |
INTEGER l,ij |
24 |
c |
REAL SSUM |
25 |
REAL xflu,yflu,convfl,convpn,convps |
|
26 |
INTEGER l,ij,nbniv |
!------------------------------------------------------------------ |
27 |
DIMENSION xflu( ip1jmp1,nbniv ),yflu( ip1jm,nbniv ) , |
|
28 |
* convfl( ip1jmp1,nbniv ) |
DO l = 1,nbniv |
29 |
c |
DO ij = iip2, ip1jm - 1 |
30 |
REAL SSUM |
convfl( ij + 1,l ) = xflu( ij,l ) - xflu( ij + 1,l ) + & |
31 |
c |
yflu(ij +1,l ) - yflu( ij -iim,l ) |
32 |
c |
end DO |
33 |
c |
|
34 |
DO 5 l = 1,nbniv |
! correction pour convfl( 1,j,l) |
35 |
c |
! convfl(1,j,l)= convfl(iip1,j,l) |
36 |
DO 2 ij = iip2, ip1jm - 1 |
|
37 |
convfl( ij + 1,l ) = xflu( ij,l ) - xflu( ij + 1,l ) + |
DO ij = iip2,ip1jm,iip1 |
38 |
* yflu(ij +1,l ) - yflu( ij -iim,l ) |
convfl( ij,l ) = convfl( ij + iim,l ) |
39 |
2 CONTINUE |
end DO |
40 |
c |
|
41 |
c |
! calcul aux pĂ´les |
42 |
|
|
43 |
c .... correction pour convfl( 1,j,l) ...... |
convpn = SSUM( iim, yflu( 1 ,l ), 1 ) |
44 |
c .... convfl(1,j,l)= convfl(iip1,j,l) ... |
convps = - SSUM( iim, yflu( ip1jm-iim,l ), 1 ) |
45 |
c |
DO ij = 1,iip1 |
46 |
CDIR$ IVDEP |
convfl( ij ,l ) = convpn * aire( ij ) / apoln |
47 |
DO 3 ij = iip2,ip1jm,iip1 |
convfl( ij+ ip1jm,l ) = convps * aire( ij+ ip1jm) / apols |
48 |
convfl( ij,l ) = convfl( ij + iim,l ) |
end DO |
49 |
3 CONTINUE |
end DO |
50 |
c |
|
51 |
c ...... calcul aux poles ....... |
END SUBROUTINE convflu |
|
c |
|
|
convpn = SSUM( iim, yflu( 1 ,l ), 1 ) |
|
|
convps = - SSUM( iim, yflu( ip1jm-iim,l ), 1 ) |
|
|
DO 4 ij = 1,iip1 |
|
|
convfl( ij ,l ) = convpn * aire( ij ) / apoln |
|
|
convfl( ij+ ip1jm,l ) = convps * aire( ij+ ip1jm) / apols |
|
|
4 CONTINUE |
|
|
c |
|
|
5 CONTINUE |
|
|
RETURN |
|
|
END |
|