[5105] | 1 | SUBROUTINE convflu_loc( xflu,yflu,nbniv,convfl ) |
---|
| 2 | ! |
---|
| 3 | ! P. Le Van |
---|
| 4 | ! |
---|
| 5 | ! |
---|
| 6 | ! ******************************************************************* |
---|
| 7 | ! ... calcule la (convergence horiz. * aire locale)du flux ayant pour |
---|
| 8 | ! composantes xflu et yflu ,variables extensives . ...... |
---|
| 9 | ! ******************************************************************* |
---|
| 10 | ! xflu , yflu et nbniv sont des arguments d'entree pour le s-pg .. |
---|
| 11 | ! convfl est un argument de sortie pour le s-pg . |
---|
| 12 | ! |
---|
| 13 | ! njxflu est le nombre de lignes de latitude de xflu, |
---|
| 14 | ! ( = jjm ou jjp1 ) |
---|
| 15 | ! nbniv est le nombre de niveaux vert. de xflu et de yflu . |
---|
| 16 | ! |
---|
| 17 | USE parallel_lmdz |
---|
[5123] | 18 | USE lmdz_ssum_scopy, ONLY: ssum |
---|
[5136] | 19 | USE lmdz_comgeom |
---|
[5123] | 20 | |
---|
[5105] | 21 | IMPLICIT NONE |
---|
| 22 | ! |
---|
| 23 | INCLUDE "dimensions.h" |
---|
| 24 | INCLUDE "paramet.h" |
---|
| 25 | REAL :: xflu,yflu,convfl,convpn,convps |
---|
| 26 | INTEGER :: l,ij,nbniv |
---|
| 27 | DIMENSION xflu( ijb_u:ije_u,nbniv ),yflu( ijb_v:ije_v,nbniv ) , & |
---|
| 28 | convfl( ijb_u:ije_u,nbniv ) |
---|
| 29 | ! |
---|
| 30 | INTEGER :: ijb,ije |
---|
[1632] | 31 | |
---|
[5105] | 32 | !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
| 33 | DO l = 1,nbniv |
---|
| 34 | ! |
---|
| 35 | ijb=ij_begin |
---|
| 36 | ije=ij_end+iip1 |
---|
| 37 | |
---|
| 38 | IF (pole_nord) ijb=ij_begin+iip1 |
---|
| 39 | IF (pole_sud) ije=ij_end-iip1 |
---|
| 40 | |
---|
| 41 | DO ij = ijb , ije - 1 |
---|
| 42 | convfl(ij+1,l) = xflu(ij,l) - xflu(ij+ 1,l) + & |
---|
| 43 | yflu(ij +1,l ) - yflu( ij -iim,l ) |
---|
| 44 | END DO |
---|
| 45 | ! |
---|
| 46 | ! |
---|
| 47 | |
---|
| 48 | ! .... correction pour convfl( 1,j,l) ...... |
---|
| 49 | ! .... convfl(1,j,l)= convfl(iip1,j,l) ... |
---|
| 50 | ! |
---|
| 51 | !DIR$ IVDEP |
---|
| 52 | DO ij = ijb,ije,iip1 |
---|
| 53 | convfl( ij,l ) = convfl( ij + iim,l ) |
---|
| 54 | END DO |
---|
| 55 | ! |
---|
| 56 | ! ...... calcul aux poles ....... |
---|
| 57 | ! |
---|
| 58 | IF (pole_nord) THEN |
---|
| 59 | |
---|
| 60 | convpn = SSUM( iim, yflu( 1 ,l ), 1 ) |
---|
| 61 | |
---|
| 62 | DO ij = 1,iip1 |
---|
| 63 | convfl(ij,l) = convpn * aire(ij) / apoln |
---|
| 64 | ENDDO |
---|
| 65 | |
---|
| 66 | ENDIF |
---|
| 67 | |
---|
| 68 | IF (pole_sud) THEN |
---|
| 69 | |
---|
| 70 | convps = - SSUM( iim, yflu( ip1jm-iim,l ), 1 ) |
---|
| 71 | |
---|
| 72 | DO ij = 1,iip1 |
---|
| 73 | convfl(ij+ip1jm,l) = convps * aire(ij+ ip1jm) / apols |
---|
| 74 | ENDDO |
---|
| 75 | |
---|
| 76 | ENDIF |
---|
| 77 | |
---|
| 78 | END DO |
---|
| 79 | !$OMP END DO NOWAIT |
---|
| 80 | |
---|
| 81 | END SUBROUTINE convflu_loc |
---|