[764] | 1 | SUBROUTINE nxgrarot_p (klevel,xcov, ycov, lr, grx_out, gry_out ) |
---|
[630] | 2 | c *********************************************************** |
---|
| 3 | c |
---|
| 4 | c Auteur : P.Le Van |
---|
| 5 | c |
---|
| 6 | c lr |
---|
| 7 | c calcul de ( nXgrad (rot) ) du vect. v .... |
---|
| 8 | c |
---|
| 9 | c xcov et ycov etant les compos. covariantes de v |
---|
| 10 | c *********************************************************** |
---|
| 11 | c xcov , ycov et lr sont des arguments d'entree pour le s-prog |
---|
| 12 | c grx et gry sont des arguments de sortie pour le s-prog |
---|
| 13 | c |
---|
| 14 | c |
---|
[1864] | 15 | USE parallel_lmdz |
---|
[630] | 16 | USE times |
---|
| 17 | USE write_field_p |
---|
| 18 | IMPLICIT NONE |
---|
| 19 | c |
---|
| 20 | c |
---|
| 21 | #include "dimensions.h" |
---|
| 22 | #include "paramet.h" |
---|
| 23 | #include "comdissipn.h" |
---|
| 24 | c |
---|
| 25 | INTEGER klevel |
---|
| 26 | REAL xcov( ip1jmp1,klevel ), ycov( ip1jm,klevel ) |
---|
[764] | 27 | REAL grx_out( ip1jmp1,klevel ), gry_out( ip1jm,klevel ) |
---|
| 28 | REAL,SAVE :: grx( ip1jmp1,llm ), gry( ip1jm,llm ) |
---|
| 29 | |
---|
[630] | 30 | c |
---|
[764] | 31 | REAL,SAVE :: rot(ip1jm,llm) |
---|
[630] | 32 | |
---|
| 33 | INTEGER l,ij,iter,lr |
---|
| 34 | c |
---|
| 35 | INTEGER ijb,ije,jjb,jje |
---|
| 36 | c |
---|
| 37 | c |
---|
| 38 | c CALL SCOPY ( ip1jmp1*klevel, xcov, 1, grx, 1 ) |
---|
| 39 | c CALL SCOPY ( ip1jm*klevel, ycov, 1, gry, 1 ) |
---|
| 40 | c |
---|
| 41 | ijb=ij_begin |
---|
| 42 | ije=ij_end |
---|
[764] | 43 | c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
| 44 | DO l = 1, klevel |
---|
| 45 | grx(ijb:ije,l)=xcov(ijb:ije,l) |
---|
| 46 | ENDDO |
---|
| 47 | c$OMP END DO NOWAIT |
---|
| 48 | |
---|
[630] | 49 | if(pole_sud) ije=ij_end-iip1 |
---|
[764] | 50 | c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
| 51 | DO l = 1, klevel |
---|
| 52 | gry(ijb:ije,l)=ycov(ijb:ije,l) |
---|
| 53 | ENDDO |
---|
| 54 | c$OMP END DO NOWAIT |
---|
[630] | 55 | |
---|
| 56 | DO 10 iter = 1,lr |
---|
[764] | 57 | c$OMP BARRIER |
---|
| 58 | c$OMP MASTER |
---|
[630] | 59 | call suspend_timer(timer_dissip) |
---|
| 60 | call exchange_Hallo(grx,ip1jmp1,llm,0,1) |
---|
| 61 | call resume_timer(timer_dissip) |
---|
[764] | 62 | c$OMP END MASTER |
---|
| 63 | c$OMP BARRIER |
---|
| 64 | |
---|
[630] | 65 | CALL rotat_p (klevel,grx, gry, rot ) |
---|
| 66 | c call write_field3d_p('rot',reshape(rot,(/iip1,jjm,llm/))) |
---|
| 67 | |
---|
| 68 | jjb=jj_begin |
---|
| 69 | jje=jj_end |
---|
| 70 | if (pole_sud) jje=jj_end-1 |
---|
| 71 | CALL filtreg_p( rot,jjb,jje, jjm, klevel, 2,1, .false.,2) |
---|
[764] | 72 | |
---|
| 73 | c$OMP BARRIER |
---|
| 74 | c$OMP MASTER |
---|
[630] | 75 | call suspend_timer(timer_dissip) |
---|
| 76 | call exchange_Hallo(rot,ip1jm,llm,1,0) |
---|
| 77 | call resume_timer(timer_dissip) |
---|
[764] | 78 | c$OMP END MASTER |
---|
| 79 | c$OMP BARRIER |
---|
[630] | 80 | |
---|
| 81 | CALL nxgrad_p (klevel,rot, grx, gry ) |
---|
| 82 | c |
---|
[764] | 83 | c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
[630] | 84 | DO 5 l = 1, klevel |
---|
| 85 | if(pole_sud) ije=ij_end-iip1 |
---|
| 86 | DO 2 ij = ijb, ije |
---|
[764] | 87 | gry_out( ij,l ) = - gry( ij,l ) * crot |
---|
[630] | 88 | 2 CONTINUE |
---|
| 89 | if(pole_sud) ije=ij_end |
---|
| 90 | DO 3 ij = ijb, ije |
---|
[764] | 91 | grx_out( ij,l ) = - grx( ij,l ) * crot |
---|
[630] | 92 | 3 CONTINUE |
---|
| 93 | 5 CONTINUE |
---|
[764] | 94 | c$OMP END DO NOWAIT |
---|
[630] | 95 | c call write_field3d_p('grx',reshape(grx,(/iip1,jjp1,llm/))) |
---|
| 96 | c call write_field3d_p('gry',reshape(gry,(/iip1,jjm,llm/))) |
---|
| 97 | c stop |
---|
| 98 | 10 CONTINUE |
---|
| 99 | RETURN |
---|
| 100 | END |
---|