[764] | 1 | SUBROUTINE nxgraro2_p (klevel,xcov, ycov, lr, grx_out, gry_out ) |
---|
[630] | 2 | c |
---|
| 3 | c P.Le Van . |
---|
| 4 | c *********************************************************** |
---|
| 5 | c lr |
---|
| 6 | c calcul de ( nxgrad (rot) ) du vect. v .... |
---|
| 7 | c |
---|
| 8 | c xcov et ycov etant les compos. covariantes de v |
---|
| 9 | c *********************************************************** |
---|
| 10 | c xcov , ycov et lr sont des arguments d'entree pour le s-prog |
---|
| 11 | c grx et gry sont des arguments de sortie pour le s-prog |
---|
| 12 | c |
---|
| 13 | c |
---|
| 14 | USE write_Field_p |
---|
| 15 | USE parallel |
---|
| 16 | USE times |
---|
| 17 | IMPLICIT NONE |
---|
| 18 | c |
---|
| 19 | #include "dimensions.h" |
---|
| 20 | #include "paramet.h" |
---|
| 21 | #include "comdissipn.h" |
---|
| 22 | c |
---|
| 23 | c ...... variables en arguments ....... |
---|
| 24 | c |
---|
| 25 | INTEGER klevel |
---|
| 26 | REAL xcov( ip1jmp1,klevel ), ycov( ip1jm,klevel ) |
---|
[764] | 27 | REAL,SAVE :: grx( ip1jmp1,llm ), gry( ip1jm,llm ) |
---|
| 28 | REAL grx_out( ip1jmp1,klevel ), gry_out( ip1jm,klevel ) |
---|
[630] | 29 | c |
---|
| 30 | c ...... variables locales ........ |
---|
| 31 | c |
---|
[764] | 32 | REAL,SAVE :: rot(ip1jm,llm) |
---|
| 33 | REAL signe, nugradrs |
---|
[630] | 34 | INTEGER l,ij,iter,lr |
---|
| 35 | c ........................................................ |
---|
| 36 | c |
---|
| 37 | INTEGER :: ijb,ije,jjb,jje |
---|
| 38 | |
---|
| 39 | c |
---|
| 40 | c |
---|
| 41 | signe = (-1.)**lr |
---|
| 42 | nugradrs = signe * crot |
---|
| 43 | c |
---|
| 44 | c CALL SCOPY ( ip1jmp1* klevel, xcov, 1, grx, 1 ) |
---|
| 45 | c CALL SCOPY ( ip1jm * klevel, ycov, 1, gry, 1 ) |
---|
| 46 | |
---|
| 47 | ijb=ij_begin |
---|
| 48 | ije=ij_end |
---|
[764] | 49 | |
---|
| 50 | c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
| 51 | DO l = 1, klevel |
---|
| 52 | grx(ijb:ije,l)=xcov(ijb:ije,l) |
---|
| 53 | ENDDO |
---|
| 54 | c$OMP END DO NOWAIT |
---|
| 55 | |
---|
| 56 | c$OMP BARRIER |
---|
| 57 | c$OMP MASTER |
---|
[630] | 58 | call suspend_timer(timer_dissip) |
---|
| 59 | call exchange_Hallo(grx,ip1jmp1,llm,0,1) |
---|
| 60 | call resume_timer(timer_dissip) |
---|
[764] | 61 | c$OMP END MASTER |
---|
| 62 | c$OMP BARRIER |
---|
[630] | 63 | |
---|
| 64 | ijb=ij_begin |
---|
| 65 | ije=ij_end |
---|
| 66 | if(pole_sud) ije=ij_end-iip1 |
---|
[764] | 67 | |
---|
| 68 | c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
| 69 | DO l = 1, klevel |
---|
| 70 | gry(ijb:ije,l)=ycov(ijb:ije,l) |
---|
| 71 | ENDDO |
---|
| 72 | c$OMP END DO NOWAIT |
---|
| 73 | |
---|
[630] | 74 | c |
---|
| 75 | CALL rotatf_p ( klevel, grx, gry, rot ) |
---|
| 76 | c call write_field3d_p('rot1',reshape(rot,(/iip1,jjm,llm/))) |
---|
[764] | 77 | |
---|
| 78 | c$OMP BARRIER |
---|
| 79 | c$OMP MASTER |
---|
[630] | 80 | call suspend_timer(timer_dissip) |
---|
| 81 | call exchange_Hallo(rot,ip1jm,llm,1,1) |
---|
| 82 | call resume_timer(timer_dissip) |
---|
[764] | 83 | c$OMP END MASTER |
---|
| 84 | c$OMP BARRIER |
---|
[630] | 85 | |
---|
| 86 | CALL laplacien_rot_p ( klevel, rot, rot,grx,gry ) |
---|
| 87 | c call write_field3d_p('rot2',reshape(rot,(/iip1,jjm,llm/))) |
---|
| 88 | c |
---|
| 89 | c ..... Iteration de l'operateur laplacien_rotgam ..... |
---|
| 90 | c |
---|
| 91 | DO iter = 1, lr -2 |
---|
[764] | 92 | c$OMP BARRIER |
---|
| 93 | c$OMP MASTER |
---|
[630] | 94 | call suspend_timer(timer_dissip) |
---|
| 95 | call exchange_Hallo(rot,ip1jm,llm,1,1) |
---|
| 96 | call resume_timer(timer_dissip) |
---|
[764] | 97 | c$OMP END MASTER |
---|
| 98 | c$OMP BARRIER |
---|
[630] | 99 | CALL laplacien_rotgam_p ( klevel, rot, rot ) |
---|
| 100 | ENDDO |
---|
| 101 | |
---|
| 102 | c call write_field3d_p('rot3',reshape(rot,(/iip1,jjm,llm/))) |
---|
| 103 | |
---|
| 104 | c |
---|
| 105 | c |
---|
| 106 | jjb=jj_begin |
---|
| 107 | jje=jj_end |
---|
| 108 | if (pole_sud) jje=jj_end-1 |
---|
| 109 | |
---|
| 110 | CALL filtreg_p( rot, jjb,jje,jjm, klevel, 2,1, .FALSE.,1) |
---|
[764] | 111 | c$OMP BARRIER |
---|
| 112 | c$OMP MASTER |
---|
[630] | 113 | call suspend_timer(timer_dissip) |
---|
| 114 | call exchange_Hallo(rot,ip1jm,llm,1,0) |
---|
| 115 | call resume_timer(timer_dissip) |
---|
[764] | 116 | c$OMP END MASTER |
---|
| 117 | c$OMP BARRIER |
---|
[630] | 118 | CALL nxgrad_p ( klevel, rot, grx, gry ) |
---|
| 119 | |
---|
| 120 | c |
---|
| 121 | ijb=ij_begin |
---|
| 122 | ije=ij_end |
---|
[764] | 123 | |
---|
| 124 | c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
[630] | 125 | DO l = 1, klevel |
---|
| 126 | |
---|
| 127 | if(pole_sud) ije=ij_end-iip1 |
---|
| 128 | DO ij = ijb, ije |
---|
[764] | 129 | gry_out( ij,l ) = gry( ij,l ) * nugradrs |
---|
[630] | 130 | ENDDO |
---|
| 131 | |
---|
| 132 | if(pole_sud) ije=ij_end |
---|
| 133 | DO ij = ijb, ije |
---|
[764] | 134 | grx_out( ij,l ) = grx( ij,l ) * nugradrs |
---|
[630] | 135 | ENDDO |
---|
| 136 | |
---|
| 137 | ENDDO |
---|
[764] | 138 | c$OMP END DO NOWAIT |
---|
[630] | 139 | c |
---|
| 140 | RETURN |
---|
| 141 | END |
---|