[1632] | 1 | ! |
---|
| 2 | ! $Header$ |
---|
| 3 | ! |
---|
[5246] | 4 | SUBROUTINE gr_u_scal_loc(nx,x_u,x_scal) |
---|
| 5 | !%W% %G% |
---|
| 6 | !======================================================================= |
---|
| 7 | ! |
---|
| 8 | ! Author: Frederic Hourdin original: 11/11/92 |
---|
| 9 | ! ------- |
---|
| 10 | ! |
---|
| 11 | ! Subject: |
---|
| 12 | ! ------ |
---|
| 13 | ! |
---|
| 14 | ! Method: |
---|
| 15 | ! -------- |
---|
| 16 | ! |
---|
| 17 | ! Interface: |
---|
| 18 | ! ---------- |
---|
| 19 | ! |
---|
| 20 | ! Input: |
---|
| 21 | ! ------ |
---|
| 22 | ! |
---|
| 23 | ! Output: |
---|
| 24 | ! ------- |
---|
| 25 | ! |
---|
| 26 | !======================================================================= |
---|
[5281] | 27 | USE comgeom_mod_h |
---|
[5246] | 28 | USE parallel_lmdz |
---|
[5271] | 29 | USE dimensions_mod, ONLY: iim, jjm, llm, ndm |
---|
[5272] | 30 | USE paramet_mod_h, ONLY: iip1, iip2, iip3, jjp1, llmp1, llmp2, llmm1, kftd, ip1jm, ip1jmp1, & |
---|
| 31 | ip1jmi1, ijp1llm, ijmllm, mvar, jcfil, jcfllm |
---|
[5271] | 32 | IMPLICIT NONE |
---|
[5246] | 33 | !----------------------------------------------------------------------- |
---|
| 34 | ! Declararations: |
---|
| 35 | ! --------------- |
---|
[1632] | 36 | |
---|
[5271] | 37 | |
---|
[5272] | 38 | |
---|
[1632] | 39 | |
---|
[5246] | 40 | ! Arguments: |
---|
| 41 | ! ---------- |
---|
[1632] | 42 | |
---|
[5246] | 43 | INTEGER :: nx |
---|
| 44 | REAL :: x_u(ijb_u:ije_u,nx),x_scal(ijb_u:ije_u,nx) |
---|
[1632] | 45 | |
---|
[5246] | 46 | ! Local: |
---|
| 47 | ! ------ |
---|
[1632] | 48 | |
---|
[5246] | 49 | INTEGER :: l,ij |
---|
| 50 | INTEGER :: ijb,ije |
---|
[1632] | 51 | |
---|
[5246] | 52 | !----------------------------------------------------------------------- |
---|
| 53 | ijb=ij_begin |
---|
| 54 | ije=ij_end |
---|
[1632] | 55 | |
---|
[5246] | 56 | !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
| 57 | DO l=1,nx |
---|
| 58 | DO ij=ijb+1,ije |
---|
| 59 | x_scal(ij,l)= & |
---|
| 60 | (aireu(ij)*x_u(ij,l)+aireu(ij-1)*x_u(ij-1,l)) & |
---|
| 61 | /(aireu(ij)+aireu(ij-1)) |
---|
| 62 | ENDDO |
---|
| 63 | ENDDO |
---|
[1632] | 64 | !$OMP ENDDO NOWAIT |
---|
| 65 | |
---|
[5246] | 66 | ijb=ij_begin |
---|
| 67 | ije=ij_end |
---|
[1632] | 68 | |
---|
[5246] | 69 | !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
| 70 | DO l=1,nx |
---|
| 71 | DO ij=ijb,ije-iip1+1,iip1 |
---|
| 72 | x_scal(ij,l)=x_scal(ij+iip1-1,l) |
---|
| 73 | ENDDO |
---|
| 74 | ENDDO |
---|
[1632] | 75 | !$OMP ENDDO NOWAIT |
---|
[5246] | 76 | RETURN |
---|
| 77 | |
---|
| 78 | END SUBROUTINE gr_u_scal_loc |
---|